[Geoserver-users] problem with 900913 projection in geoserver

Hi all,

I’m having a problem with 900913 projection too. It does display, it works pretty well, except that it is showing my data in the sea of ochotsk, whereas it should be in the Netherlands. Is this a known problem?
It might also have to do with postgis import (the data is on the correct location in arcGIS), but since I see there are problems with the 900913 projection it seemed logical to ask here first.
(Geoserver does recognize the 900913 projection when importing data. )

Any suggestions/help would be great!
Jonas

Afbeeldingen1.jpg

Afbeeldingen2.jpg

···

Met vriendelijke groet,

Jonas van Schrojenstein Lantman




Nelen & Schuurmans

Postbus 1219 3500 BE Utrecht
Zakkendragershof 34-44 Utrecht
tel. 030 23 30 200
www.nelen-schuurmans.nl






Jonas,

I assume you are viewing your data coming out of geoserver in
openlayers ? If so, the problem might be that you have not got the
'sphericalMercator' tag in your openlayers config on the google
layers.

Check out the doco here:
http://openlayers.org/dev/examples/spherical-mercator.html

that might fix your prob, there shouldn't be any problems overlaying
your data once everything is setup correctly.

-i

2008/9/23 Jonas van Schrojenstein Lantman
<jonas.vanschrojenstein@anonymised.com>:

Hi all,

I'm having a problem with 900913 projection too. It does display, it works
pretty well, except that it is showing my data in the sea of ochotsk,
whereas it should be in the Netherlands. Is this a known problem?
It might also have to do with postgis import (the data is on the correct
location in arcGIS), but since I see there are problems with the 900913
projection it seemed logical to ask here first.
(Geoserver does recognize the 900913 projection when importing data. )

Any suggestions/help would be great!
Jonas
--

Met vriendelijke groet,

Jonas van Schrojenstein Lantman

Nelen & Schuurmans

Postbus 1219 3500 BE Utrecht
Zakkendragershof 34-44 Utrecht
tel. 030 23 30 200
www.nelen-schuurmans.nl

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi Ivan,

Thanks for your response. I am indeed using openlayers, but first I check the location in google earth in de demo - map preview section. And there it displays on the wrong location. I think there is a difference between the 900913 projection in postgis and geoserver since it looks like the longitude is exactly 150 degrees off (155 instead of 5). Any ideas what the best way is to fix this?

Jonas

Btw I need them in the same projection as google to have webcache working properly. If someones has tips how to work with geowebcache in wgs1984 while googlemaps is in mercator than I will be happy to hear it. I got it almost working but the default values for mapextent seem to be incorrect, on some zoom levels, some tiles are displayed, while mostly the tiles are not displayed because the grids are 5% off. (see http://geowebcache.org/trac/wiki/openlayers bottom of the page) and the grids that do display are not correctly reprojected, hence my quest to reproject my data in the database instead of doing this in openlayers.

Ivan Price schreef:

Afbeeldingen1.jpg

Afbeeldingen2.jpg

···

Met vriendelijke groet,

Jonas van Schrojenstein Lantman




Nelen & Schuurmans

Postbus 1219 3500 BE Utrecht
Zakkendragershof 34-44 Utrecht
tel. 030 23 30 200
www.nelen-schuurmans.nl






Jonas van Schrojenstein Lantman ha scritto:

Hi Ivan,

Thanks for your response. I am indeed using openlayers, but first I check the location in google earth in de demo - map preview section. And there it displays on the wrong location. I think there is a difference between the 900913 projection in postgis and geoserver since it looks like the longitude is exactly 150 degrees off (155 instead of 5). Any ideas what the best way is to fix this?

How did you reproject your data into 900913? I'm under the impression
that's the cause, the SRS assigned to the data is not the proper one
(most common cause of data ending up in the wrong side of the world).

Btw I need them in the same projection as google to have webcache working properly. If someones has tips how to work with geowebcache in wgs1984 while googlemaps is in mercator than I will be happy to hear it. I got it almost working but the default values for mapextent seem to be incorrect, on some zoom levels, some tiles are displayed, while mostly the tiles are not displayed because the grids are 5% off. (see http://geowebcache.org/trac/wiki/openlayers bottom of the page) and the grids that do display are not correctly reprojected, hence my quest to reproject my data in the database instead of doing this in openlayers.

We use lots of data in 4326 and it reprojects just fine in 900913
using GeoWebCache, with no errors. That FAQ also suggests what to do
in case you're getting that error, the extents used in OL are not matching the ones used to create the tile cache. You can either fix
OL or use GWC stand alone and define your own custom extents
for the layer you want to cache (or, finally, specify by hand the
extents of your layer in GeoServer, wipe out the gwc cache, and
restart GeoServer).

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Andrea Aime schreef:

Jonas van Schrojenstein Lantman ha scritto:

Hi Ivan,

Thanks for your response. I am indeed using openlayers, but first I check the location in google earth in de demo - map preview section. And there it displays on the wrong location. I think there is a difference between the 900913 projection in postgis and geoserver since it looks like the longitude is exactly 150 degrees off (155 instead of 5). Any ideas what the best way is to fix this?

How did you reproject your data into 900913? I'm under the impression
that's the cause, the SRS assigned to the data is not the proper one
(most common cause of data ending up in the wrong side of the world).

With projection tools in ArcGIS, where it projects fine when converted to kml and shown in google earth.

Btw I need them in the same projection as google to have webcache working properly. If someones has tips how to work with geowebcache in wgs1984 while googlemaps is in mercator than I will be happy to hear it. I got it almost working but the default values for mapextent seem to be incorrect, on some zoom levels, some tiles are displayed, while mostly the tiles are not displayed because the grids are 5% off. (see http://geowebcache.org/trac/wiki/openlayers bottom of the page) and the grids that do display are not correctly reprojected, hence my quest to reproject my data in the database instead of doing this in openlayers.

We use lots of data in 4326 and it reprojects just fine in 900913
using GeoWebCache, with no errors. That FAQ also suggests what to do
in case you're getting that error, the extents used in OL are not matching the ones used to create the tile cache. You can either fix
OL or use GWC stand alone and define your own custom extents
for the layer you want to cache (or, finally, specify by hand the
extents of your layer in GeoServer, wipe out the gwc cache, and
restart GeoServer).

Thanks to you both I got it solved. I added the sphericalmercator: True expression and cleared the cache, restarted everything and it worked.

Thanks!
Jonas

Jonas van Schrojenstein Lantman ha scritto:

Andrea Aime schreef:

Jonas van Schrojenstein Lantman ha scritto:

Hi Ivan,

Thanks for your response. I am indeed using openlayers, but first I check the location in google earth in de demo - map preview section. And there it displays on the wrong location. I think there is a difference between the 900913 projection in postgis and geoserver since it looks like the longitude is exactly 150 degrees off (155 instead of 5). Any ideas what the best way is to fix this?

How did you reproject your data into 900913? I'm under the impression
that's the cause, the SRS assigned to the data is not the proper one
(most common cause of data ending up in the wrong side of the world).

With projection tools in ArcGIS, where it projects fine when converted to kml and shown in google earth.

Hmmm... not sure I understand. Google Earth uses only data in 4326,
it's not using 900913 at all.

Btw I need them in the same projection as google to have webcache working properly. If someones has tips how to work with geowebcache in wgs1984 while googlemaps is in mercator than I will be happy to hear it. I got it almost working but the default values for mapextent seem to be incorrect, on some zoom levels, some tiles are displayed, while mostly the tiles are not displayed because the grids are 5% off. (see http://geowebcache.org/trac/wiki/openlayers bottom of the page) and the grids that do display are not correctly reprojected, hence my quest to reproject my data in the database instead of doing this in openlayers.

We use lots of data in 4326 and it reprojects just fine in 900913
using GeoWebCache, with no errors. That FAQ also suggests what to do
in case you're getting that error, the extents used in OL are not matching the ones used to create the tile cache. You can either fix
OL or use GWC stand alone and define your own custom extents
for the layer you want to cache (or, finally, specify by hand the
extents of your layer in GeoServer, wipe out the gwc cache, and
restart GeoServer).

Thanks to you both I got it solved. I added the sphericalmercator: True expression and cleared the cache, restarted everything and it worked.

Duh, ok :slight_smile:
Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.