[Tilecache] extents, resolutions, etc
pawprint_net
scott at pawprint.net
Mon May 5 13:59:04 EDT 2008
THANK YOU SO MUCH!!!! :clap:
I have spent 3 months trying to figure this out!
... I guess I have one point for clarification though: There does seem to be
a "standard" for resolutions used on most of the data sources - and
deviating from that prevents one using any typical tilecache servers out
there (metacarta for example) because the requested resolution won't be
available. As a result one of the things I found helpful was to always set
the array of resolutions to ensure I was always dealing with the "standard"
set. When I was starting out I tried using the numZoomLevels and let the
resolutions get set automatically - but that caused a whole host of
compatibility problems between data sets.
I have no idea what the math behind these standard ones is though - do you
know if there is actually some kind of standard here - or is it just
coincidence? Pretty much all the O/L examples stick to these (or a sub/super
set of them)
resolutions=1.40625, 0.3515625, 0.087890625, 0.02197265625, 0.0054931640625,
0.001373291015625, 0.00034332275390625, 8.58306884765625e-05,
4.291534423828125e-05
Gregor Mosheh-3 wrote:
>
> alim karim wrote:
>> i have just started experimenting with tilecache. can someone please
>> give me a quick walk through the relationships between extents,
>> resolutions and zoom levels?
>
> Resolution: The width or height, in map units, per pixel. For example:
> 100 miles wide divided by 256 pixels is a resolution of 0.390625 miles
> per pixel
>
> The maxResolution defines the resolution of the map when zoomed all the
> way out, e.g. the resolution of the "entire world" as far as the map is
> concerned.
>
> The extent, as you know, is the bounding box. Some arithmetic yields the
> resolutions: width in map units, or height in map units, whichever is
> bigger, divided by some number of pixels. e.g.
> Extent extent using latlon: -100 30 -80 45
> width is 20 map units
> height is 15 map units
> We want the entire map to fit into a 512x512 area (a tile is 256 by
> default). So we take the larger number of map units (20) and divide by
> the desired size in pixels (512) and get a maxResolution of 0.0390625
>
> Simple, huh? Take the extent of your map and divide by how big you want
> it to be.
>
>
> Then each zoom level halves the resolution, fitting the same spatial
> region into a pixel area twice as high and twice as wide as the one
> before it. So your resolution list would look something like this:
> 0.0390625
> 0.01953125
> 0.009765625
> 0.0048828125
> ...and so on
> But for starters you'll just define X zoom levels and not get into
> manually defining a list of resolutions like this.
>
>
> Does that clarify a bit, or make it worse? :)
>
> --
> Gregor Mosheh / Greg Allensworth, BS, A+
> System Administrator
> HostGIS cartographic development & hosting services
> http://www.HostGIS.com/
>
> "Remember that no one cares if you can back up,
> only if you can restore." - AMANDA
> _______________________________________________
> Tilecache mailing list
> Tilecache at openlayers.org
> http://openlayers.org/mailman/listinfo/tilecache
>
>
--
View this message in context: http://www.nabble.com/extents%2C-resolutions%2C-etc-tp16735362p17067323.html
Sent from the TileCache mailing list archive at Nabble.com.
More information about the Tilecache
mailing list