3

I'm trying to develop my own map service then display my generated images into ARCGIS map viewer ... Anyway my *.ashx service reads ARCGIS Tile URL looks like "http://services.arcgisonline.com/ArcGIS/rest/services/NGS_Topo_US_2D/MapServer/tile/1/1/2"

I want to transform the value of (Zoom/TileX/TileY) from the url above to Pixel or BoundingBox USING SRID 4326

BoundingBox values should not exceeds Max/Min value between (-180,-90) to (180,90).

I'm taking the Bbox then passe it to my Stored procedure witch intersects some SQL geography rows.

Any Ideas ?

CharlesB
  • 86,532
  • 28
  • 194
  • 218
Gerard
  • 65
  • 1
  • 6

1 Answers1

0

You could look at BruTile's InvertedYAxis.TileToWorld

You will need to define a schema based on the information you find here: http://server.arcgisonline.com/ArcGIS/rest/services/NGS_Topo_US_2D/MapServer

Not sure if this is the easiest solution in your situation

pauldendulk
  • 1,378
  • 12
  • 23
  • thanx .. Actually i'm reading the response from text file contains the response of "http://server.arcgisonline.com/ArcGIS/rest/services/NGS_Topo_US_2D/MapServer?f=json" Do you think that i sould transfer the content to BruTile.TileSchema ? Still cant find TileToWord ... no result for my search on it .. – Gerard Oct 31 '11 at 09:10
  • 1
    i used the code in http://brutile.codeplex.com/discussions/238295 but the **GetExtentOfTilesInView(my.Extent, zoom)** always return the full range (Max={180 , 90}, Min = {-180 , -90}) I want to get the extend for specific LATITUDE/LONGITUDE from the ArcGis Tile URL /zoom/tileX/TileY – Gerard Oct 31 '11 at 15:37
  • That sample code serves another purpose. You should define the schema (as in that sample) but use the values you find in the definition of the schema you actually use, which you can find here: http://server.arcgisonline.com/ArcGIS/rest/services/NGS_Topo_US_2D/MapServer – pauldendulk Oct 31 '11 at 16:03
  • ...Then use the method InvertedYAxis.TileToWorld which takes a TileRange as argument (which you can initialize with the x and y values of the the tile), then the level (or z value) and the TileSchema that you initialized – pauldendulk Oct 31 '11 at 16:13
  • The TileToWorld class is now a member of a public class TileTransform. Here some code that demonstrates it's use: http://brutile.codeplex.com/SourceControl/changeset/view/577c85609df0#BruTile.Tests%2fTileTransformTest.cs – pauldendulk Jan 01 '12 at 14:39