AW: [OpenLayers-Users] Creating an application with
pre-definedmapscales/resolutions
Arnd Wippermann
arnd.wippermann at web.de
Tue Dec 6 14:43:32 EST 2011
Hi,
it's up to you, what resolutions or scales you want take. How it best match
in your map div.
The commercial layers use a resolution array with
maxResolution=156543.0339/zoomLevel with zoomLevel = 0 - n.
As far as I know for maxResolution the world match in a square of 256x256
pixel.
For EPSG:4326 OL suggest a maxResolution=1.40625 = 360/256. The world match
in a rectangle of 256x128 pixel.
It's a practical choice, the world boundary is always a tile boundary.
I use
map.layers[0].resolutions => [500, 250, 125, 62.5, 31.25, 15.625, 7.8125,
3.90625, 1.953125, 0.9765625, 0.48828125, 0.244140625, 0.1220703125,
0.06103515625, 0.030517578125, 0.0152587890625];
that is in scales
map.layers[0].scales => [1417323.5999999999, 708661.7999999999,
354330.89999999997, 177165.44999999998, 88582.72499999999,
44291.362499999996, 22145.681249999998, 11072.840624999999,
5536.420312499999, 2768.2101562499997, 1384.1050781249999,
692.0525390624999, 346.02626953124997, 173.01313476562498,
86.50656738281249, 43.253283691406246];
to display Nordrhein-Westfalen in my map with a size of 900x600 pixel.
It's a practical choice. For the maxResolution=500 NRW matches in the map
div.
If you declare a maxExtent in the map options and set resolution to auto, OL
calculates a resolution from the maxExtent and the map div.
So I would think, it's always a practical choice, what resolution you take.
Viele Grüße,
Arnd
_____
Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Robert
Buckley
Gesendet: Dienstag, 6. Dezember 2011 19:15
An: users at openlayers.org
Betreff: Re: AW: [OpenLayers-Users] Creating an application with
pre-definedmapscales/resolutions
Hi,
Thanks.
"The differences between the different projections is, that the meter
doesn't describe the real length." ...ok I think I see...you mean that
google distorted the projection so it fits nicely in a square whereas the
others are "real" projected coordinate systems?
But what I was really asking is that why have I seen so many different
resolutions for various maps.
cheers,
Rob
.
_____
Von: Arnd Wippermann <arnd.wippermann at web.de>
An: 'Robert Buckley' <robertdbuckley at yahoo.com>
Cc: users at openlayers.org
Gesendet: 19:01 Dienstag, 6.Dezember 2011
Betreff: AW: [OpenLayers-Users] Creating an application with pre-defined
mapscales/resolutions
Hi,
it should be correct. 1 meter is always 1 meter. The differences between the
different projections is, that the meter doesn't describe the real length.
EPSG:25832 is a projection, where a meter on map is a meter in reality.
For i.e. EPSG:900913 (Google Projection) it's not.
Distance Düsseldorf - Hannover
EPSG:25832 : 240.9911275436498
EPSG:900913 : 389.3661105393922
Arnd
_____
Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Robert
Buckley
Gesendet: Dienstag, 6. Dezember 2011 08:48
An: users at openlayers.org
Betreff: [OpenLayers-Users] Creating an application with pre-defined
mapscales/resolutions
Hi,
I would like to have a simple application which delivers wms layers in
scales/resolutions which are not the usual OSM/Google messy scales, but
rather include 1:1000 000 / 1:500 000 / 1:250 000 / 1:100 000 / 1: 50 0000/
1:10 000, 1: 5000 and 1:2,500. To make this even more difficult I need to do
this in EPSG:25832 the european standard ETRS/ UTM zone 32 projected CRS
with units of meters
As far as I have understood, this is fully dependant on the basemap
resolutions. As this is pure mathematical I would like to show what I think
I have learnt and wait for comments....
R = resolution
S = scale as denominator
IPU = OpenLayers.INCHES_PER_UNIT[units] = 39.3701 inches in a meter
DPI = OpenLayers.DOTS_PER_INCH = 25.4 / 0.28 = 90.71428571428571 ( 1 inch =
25.4 mm / standardized pixel size of 0.28x0.28mm)
this must be set in the application code "OpenLayers.DOTS_PER_INCH = 25.4 /
0.28" = 90.7142 otherwise, the scale factor would be 72 / 90.7143 =
0.7937.
R= S / IPU * DPI
using this formular, we are basically working out how many pixels there are
in 1 meter of screen, to so find out how many pixels there are in 1000000
meters of screen we use...
[Scale 1:1000 000]
R = 1000000 / (39.2701 * 90.71428571428571)
R =1000000 / 3562.359071428571260271
R = 280.712859077111976006937033
[Scale 1:500000]
R = 500000 / (39.2701 * 90.71428571428571)
R =500000 / 3562.359071428571260271
R = 140.356429538555988003468517
...etc for the 1:250 000 / 1:100 000 ...
What bothers me though, is that every EPSG code with units of meters will
have the same resolutions. Is this
correct?
sources:
http://geowebcache.org/docs/current/concepts/gridsets.html
http://wiki.osgeo.org/wiki/WMS_Tiling_Client_Recommendation
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20111206/3957d0f8/attachment-0001.html
More information about the Users
mailing list