data (#23) - Help with coordinates system (#181) - Message List
Hi everybody.
I'm new to pgRouting.
I'm following the tutorial at http://pgrouting.postlbs.org/wiki/WorkshopFOSS4G2007
but I've encountered a problem with coordinates system.
I don't know how to convert coordinates used in victoria table to other systems. What system is it?
I would appreciate your help.
Regards
-
Message #627
Hi,
The Victoria data is in 54004 projection. To reproject your data please use transform() function. It is also worth to check PostGIS functions documentation.
anton10/20/08 08:33:17 (2 years ago)-
Message #629
ok.. I tried to use that function you suggested me but I obtain the followin error message
ERROR: AddToPROJ4SRSCache: Cannot find SRID (54004) in spatial_ref_sys
********** Errore **********
ERROR: AddToPROJ4SRSCache: Cannot find SRID (54004) in spatial_ref_sys Stato SQL: XX000
my query was:
SELECT * FROM transform('01050...B755741','32754');
I just picked up a geometry value from the victoria table and a SRID from spatial_ref_sys table. Could you help me?
Thank you anyway for your answers
itacacicciofrank10/21/08 22:08:45 (2 years ago)-
Message #630
There is no trick - the problem is with what's written in the error message. It looks like there is no 54004 projection in your spatial_ref_sys table.
PLease look here http://pgrouting.postlbs.org/discussion/23/36#519
anton10/21/08 22:28:17 (2 years ago) -
Message #631
54004 is the World Mercator projection and it is an ESRI projection, so if you had installed Proj4 it's not in the "epsg" but "esri" file. And that's why it doesn't go to the spatial_reference table by default ... unfortunately.
You can add it manually to the spatial_reference table according to this very convenient website: http://spatialreference.org/ref/epsg/54004/
INSERT into spatial_ref_sys (srid, auth_name, auth_srid, proj4text, srtext) VALUES ( 54004, 'spatialreference.org', 54004, '+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ', 'PROJCS["World_Mercator",GEOGCS["GCS_WGS_1984",DATUM["WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Mercator_1SP"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",0],PARAMETER["Standard_Parallel_1",0],UNIT["Meter",1],AUTHORITY["EPSG","54004"]]');
See: http://spatialreference.org/ref/epsg/54004/postgis/ (Note: just changed srid from 954004 to 54004)
daniel10/22/08 00:34:15 (2 years ago)
-
-
-
Message #628
Just wanted to add that the original projection of the Victoria data (National Road Network data) is not 54004 but was reprojected to 54004 for the workshop dataset. (Don't remember what was the original projection, but that should be somewhere in their documents.)
daniel10/20/08 10:05:46 (2 years ago)