[postgis-users] Google Mercator and PostGIS under Ubuntu

Frens fj.rumph at gmail.com
Thu Nov 20 00:23:22 PST 2008


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


Frens wrote:
> 
> 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
> 
> 
> 
> Burgholzer,Robert wrote:
>> 
>> 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
>> rwburgholzer at deq.virginia.gov
>> 804-698-4405
>> Open Source Modeling Tools:
>> http://sourceforge.net/projects/npsource/
>> 
>> -----Original Message-----
>> From: postgis-users-bounces at postgis.refractions.net
>> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
>> Frens
>> Sent: Wednesday, November 19, 2008 1:47 PM
>> To: postgis-users at postgis.refractions.net
>> Subject: [postgis-users] Google Mercator and PostGIS under Ubuntu
>> 
>> 
>> 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_nor
>> 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"]]"
>> 
>> 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-tp2058529
>> 5p20585295.html
>> Sent from the PostGIS - User mailing list archive at Nabble.com.
>> 
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Google-Mercator-and-PostGIS-under-Ubuntu-tp20585295p20596863.html
Sent from the PostGIS - User mailing list archive at Nabble.com.




More information about the postgis-users mailing list