I am using PostGIS for a project quite succesfully until recently I tried
moving applications from my Windows based development environment to a
Ubuntu based test / demo environment. The postgis versions etc. are exactly
the same: "POSTGIS="1.3.3" GEOS="3.0.0-CAPI-1.4.1" PROJ="Rel. 4.6.0, 21 Dec
2007" USE_STATS". The database used on the Ubuntu machine is a restore of a
backup from the windows machine. (the database is an open street map db for
NL).
How ever I get some weird behaviour from the translate function on the
Ubuntu machine. For instance if I execute the following query:
SELECT ST_AsEWKT(
ST_transform(
ST_transform(
GeomFromText(
'POINT(5.167485 52.271499)',
4326
),
900913
),
4326
)
);
on my Windows machine I get: "SRID=4326;POINT(5.16748499999999 52.271499)".
Which is what I expect. However, when I execute the exact same query on my
Ubuntu machine (with the same postgis / postgres / etc versions) I get:
"SRID=4326;POINT(8.10187206703149e-07 8.19541802859524e-06)". The only qlue
I have is that I get this warning: WARNING: transform: -38 (failed to load
NAD27-83 correction file).
So far googling didn't pay off... Anyone got some ideas?
P.S. 900913 is the SRID I use for the Google projection system, with the
following data in spatial_ref_sys:
srtext =
"PROJCS["Google Mercator",GEOGCS["WGS 84",DATUM["World Geodetic System
1984",SPHEROID["WGS
84",6378137,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Mercator_2SP"],PARAMETER["standard_parallel_1",0],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1],EXTENSION["PROJ4","+proj=merc
+a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m
+nadgrids=@null +wktext +no_defs"]]"
proj4text =
"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0
+k=1.0 +units=m +nadgrids=@null +wktext +no_defs"
--
View this message in context: http://www.nabble.com/Google-Mercator-and-PostGIS-under-Ubuntu-tp20585295p20585295.html
Sent from the PostGIS - User mailing list archive at Nabble.com.
_______________________________________________
postgis-users mailing list
postgi...@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
HTH,
r.b.
Robert W. Burgholzer
Surface Water Modeler
Office of Water Supply and Planning
Virginia Department of Environmental Quality
rwburg...@deq.virginia.gov
804-698-4405
Open Source Modeling Tools:
http://sourceforge.net/projects/npsource/
Any other thoughts?
Cheers,
Frens Jan
--
View this message in context: http://www.nabble.com/Google-Mercator-and-PostGIS-under-Ubuntu-tp20585295p20596177.html
I vaguely remember getting this error before but usually when projecting
NAD27 data and I don't see that in this case.
Anyrate this I think is caused by the Proj library not being able to find
the datum shift grids NAD27/83 grid translation files. I'm really not sure
why that would even come into play here and your sample works on my proj 4.6
install on EL 4.
Anyrate to fix, I would try downloading a fresh proj copy and recompiling
your proj library from scratch and you may need to copy the
proj-datumgrid-1.4.zip in your nad/proj of your source folder before
configure make install. I'm actually not completely clear if that is even
necessary with new installs or how all that works.
Hope that helps,
Regina
Any other thoughts?
Cheers,
Frens Jan
> or thing",0],UNIT["Meter",1],EXTENSION["PROJ4","+proj=merc
> +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0
> +units=m nadgrids=@null +wktext +no_defs"]]"
BR,
Frens
--
View this message in context: http://www.nabble.com/Google-Mercator-and-PostGIS-under-Ubuntu-tp20585295p20596863.html