Gentle folk,
I've been trying GeoServer for a few weeks and lately have been
playing with WMS requests. I downloaded a few administrative
shapefiles of the EU, inserted it into a PostGIS database and
successfully configured a DataStorage and a few FeatureTypes.
The data is both at database and at GeoServer configured with SRS
3035, the recommended system for European wide cartography.
When trying the WMS it was a shock to get the features all distorted.
I soon found out the service was re-shaping the chart to the
WIDTH/HEIGHT parameters. I thought this was some problem with the
server, but alas, checking the WMS specification it should work that
way (page 36). A really poor choice from the service designers.
But it gets worse, by some reason, the service is assuming the
coordinates provided with the BBOX to be geodetic, not cartographic.
This results in a forced Erathostenes projection, over-riding the one
provided in the SRS parameter. Assuming these coordinates to be
geodetic, it is impossible to retrieve correctly any chart produced
with a non cylindrical projection (where lat/long iso-lines are not
straight lines).
So, the question is: how can I make the service interpret the BBOX
coordinates as cartographic instead of geodetic?
Thanks in advance,
Luís
2009/4/6 Luís de Sousa <luis.a.de.sousa@anonymised.com>:
Gentle folk,
I've been trying GeoServer for a few weeks and lately have been
playing with WMS requests. I downloaded a few administrative
shapefiles of the EU, inserted it into a PostGIS database and
successfully configured a DataStorage and a few FeatureTypes.
The data is both at database and at GeoServer configured with SRS
3035, the recommended system for European wide cartography.
When trying the WMS it was a shock to get the features all distorted.
I soon found out the service was re-shaping the chart to the
WIDTH/HEIGHT parameters. I thought this was some problem with the
server, but alas, checking the WMS specification it should work that
way (page 36). A really poor choice from the service designers.
Actually it allows for the support of output devices that have
non-square pixels, and so for some people it is a vital feature.
But it gets worse, by some reason, the service is assuming the
coordinates provided with the BBOX to be geodetic, not cartographic.
This results in a forced Erathostenes projection, over-riding the one
provided in the SRS parameter. Assuming these coordinates to be
geodetic, it is impossible to retrieve correctly any chart produced
with a non cylindrical projection (where lat/long iso-lines are not
straight lines).
You don't say which client you are using but this sounds like it's
wrong. As you can see from
http://webmapping.mgis.psu.edu/geoserver/wms?WIDTH=800&SRS=EPSG%3A2227&LAYERS=topp%3Acreeks01&HEIGHT=584&STYLES=&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&BBOX=5949782.017010136,1699580.3125167463,6458962.462169735,2071282.0374832537
this layers is clearly projected into EPSG:2227 (California State
Plane III, I think) and the bounding box is specified in meters (or
feet).
Can you post an example URL which shows your problem.
Ian