[postgis-users] Google Mercator and PostGIS under Ubuntu

13 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Frens

ungelesen,
19.11.2008, 13:46:3219.11.08
an postgi...@postgis.refractions.net

Hi,

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

Burgholzer,Robert

ungelesen,
19.11.2008, 14:06:3419.11.08
an PostGIS Users Discussion
I am just guessing, but why don't you try to install a fresh PostGIS
enabled db in the Ubuntu machine, perhaps something in the process of
"restore" was not compatible, and hosed your translation.

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/

Frens

ungelesen,
20.11.2008, 02:16:3620.11.08
an postgi...@postgis.refractions.net

Just did, but without any luck. Created fresh postgis db, but system behaves
exactly the same: faulty transform and this warning: WARNING: transform:

-38 (failed to load NAD27-83 correction file)

Any other thoughts?

Cheers,
Frens Jan

--
View this message in context: http://www.nabble.com/Google-Mercator-and-PostGIS-under-Ubuntu-tp20585295p20596177.html

Paragon Corporation

ungelesen,
20.11.2008, 02:48:3220.11.08
an PostGIS Users Discussion
Frens Jan,

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.

http://trac.osgeo.org/proj/


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"]]"

Frens

ungelesen,
20.11.2008, 03:23:2220.11.08
an postgi...@postgis.refractions.net

I just solved my problem: After some headache I noticed a difference between
my windows installation and the postgis installation: and the warning I got
was actually pretty helpful if I would have fully known what it meant.. The
difference between my two systems is that the proj package (proj4) does not
include datum shifting files. As is explained at:
http://trac.osgeo.org/proj/wiki/FAQ. I copied those missing files from my
windows installation into /usr/share/proj restarted postgress and that did
the trick. I will report this to the Ubuntu ‘packaging departement’.

BR,
Frens

--
View this message in context: http://www.nabble.com/Google-Mercator-and-PostGIS-under-Ubuntu-tp20585295p20596863.html

Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten