I am experiencing projection problems with the following set up:
- GeoServer with ESPG:4326 based shapefiles (*.shp)
- OpenJump to edit my shapefiles
- Openlayers with EPSG:900913 base layers
- GeoServer provides the shapefiles as WMS to OpenLayers.
Here is my source code:
Openplanning mit Geoserver
It seems that GeoServer is converting from ESPG:4326 to EPSG:900913 internally. Here you can see a sample request for Vienna (which is sent by my OpenLayers application to GeoServer):
http://localhost:8888/geoserver/wms?LAYERS=topp:ma_vienna&SRS=EPSG:900913&TRANSPARENT=TRUE&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FORMAT=image/png&BBOX=1800244.8899219,6116147.6705496,1839380.6483984,6155283.4290261&WIDTH=256&HEIGHT=256
My problem: the requested file looks distored, as you can see here:
In case I open the WMS layer in the OpenLayers preview of GeoServer, it looks OK:
The question is: Why is my shapefile distorted in my OpenLayers application, but not in the GeoServer preview? As you can see, the GeoServer preview uses EPSG:4326 and my OpenLayers application EPSG:900913 (Update: EPSG:4326 as well; mouse coordinates are displayed as latitude/longitude). But, however, as GeoServer provides a WMS interface with EPSG:900913 capabilities, shouldn't it correctly reproject my vector sources?
No comments:
Post a Comment