On Thu, Mar 3, 2011 at 2:04 AM, <[email protected]> wrote:

> I would appreciate any help with the following…
>
> I have a postgres/postgis database that has a table with points using srid
> = 2163. If I do:Â
>
> SELECT ST_AsEWKT(ST_Transform((select spatial_location from vw_maps where
> id=1),900913));Â
>
> I get  "SRID=900913;POINT(-13672282.345767 5705158.43996816)", which is
> the right reprojection for my point.Â
>
> If I define a layer in GeoServer pointing to that same table (which means
> it will be assume 2163) and use OpenLayers (or uDig) to request a 900913
> layer,
> that same point now comes back as -13672358.78089 573596.56157 Notice the
> shift on the second value… All my values are shifted up  !Â
>
> I tried everything, even comparing the definitions of 900913 in Postgis,
> Geoserver and uDig, and they are all the same…Â
>
> PROJCS["WGS84 / Google Mercator",              Â
>   GEOGCS["WGS
> 84",                              Â
>     DATUM["World Geodetic System
> 1984",                                    
> Â Â Â Â Â Â Â Â Â Â Â
>     SPHEROID["WGS 84", 6378137.0, 298.257223563,
> AUTHORITY["EPSG","7030"]],Â
>
> AUTHORITY["EPSG","6326"]],                          
> Â Â Â Â Â
>   PRIMEM["Greenwich", 0.0,
> AUTHORITY["EPSG","8901"]],                          
> Â Â Â Â Â
>   UNIT["degree",
> 0.017453292519943295],                            
> Â Â Â
>   AXIS["Longitude",
> EAST],                              Â
>   AXIS["Latitude",
> NORTH],                              Â
>   AUTHORITY["EPSG","4326"]],              Â
>   PROJECTION["Mercator_1SP"],              Â
>   PARAMETER["semi_minor", 6378137.0],              Â
>   PARAMETER["latitude_of_origin", 0.0],              Â
>   PARAMETER["central_meridian", 0.0],              Â
>   PARAMETER["scale_factor", 1.0],              Â
>   PARAMETER["false_easting", 0.0],              Â
>   PARAMETER["false_northing", 0.0],              Â
>   UNIT["m", 1.0],              Â
>   AXIS["x", EAST],              Â
>   AXIS["y", NORTH],              Â
>   AUTHORITY["EPSG","900913"]]Â
>
> Can someone give me a hint here? Thanks,Alex
>

This was discussed some time ago on the mailing list. 900913 does have the
same WKT definition
in various systems, but the WKT definition misses some important details
that make the
definition be interpreted in different ways by different systems.

If you want an interoperable one use EPSG:3785 instead, that has a proper
definition
that should be interpreted in a uniform way by different systems:
http://demo1.geo-solutions.it/geoserver/web/?wicket:bookmarkablePage=:org.geoserver.web.demo.SRSDescriptionPage&code=EPSG:3785

Cheers
Andrea

-- 
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313
mob:    +39 333 8128928

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to