Forum #23 - Topic #36 - Message List
Are there any plans to support geographic spatial references natively? It appears that assign_vertex_id doesn't care for tolerances between 0 and 1. I guess I can appreciate the complexity of the problem of assigning a degree map unit as a tolerance but I'd really like to store my data as WGS84 and thus far I haven't been able to get pgRouting working with the 4326 srid. It works great for me on projected coordinate systems.
-
Message #131
I see no reason why assign_vertex_id shouldn't work with degree units.
I tried it with, for example, NAD83 and 0.0001 degrees of tolerance and it worked perfectly.Can you describe your problem? Where assign_vertex_id fails?
anton08/10/07 14:41:23 -
Message #136
In the pgAdmin III Query dialog I enter...
SELECT assign_vertex_id('roadsegments_nwk', 0.0001);
I receive back...
ERROR: function assign_vertex_id("unknown", numeric) does not exist SQL state: 42883 Hint: No function matches the given name and argument types. You may need to add explicit type casts. Character: 8
I've added the necessary x1,y1,x2,y2,source_id, and target_id fields to roadsegments_nwk table and am certain that I'm running the query on the correct database. My roadsegments_nwk table is registered in the geometry_columns table as a 'LINESTRING' with 4326 as its srid.
I've had issues before on LINESTRING types so maybe it's that? Not quite sure. Thanks in advance for the help!
Jason08/11/07 14:26:31 -
Message #137
Which version of pgRouting are you using?
anton08/13/07 10:21:23 -
Message #138
I'm using 1.0.0.a win32 installer with an updated routing_postgis.sql file from trunk.
Jason08/13/07 10:33:36 -
Message #139
Ah, I see.
Updated routing_postgis.sql file contains newer version of the assign_vertex function:
assign_vertex_id(geom_table varchar, tolerance double precision, geo_cname varchar, gid_cname varchar)
where geo_cname is your geometry column name and geo_cname (usualy the_geom) is your edge id column name (usualy gid).
anton08/13/07 10:57:55 -
Message #511
Is there a possibility to convert a table with a geometry column with srid 4326 into a column with srid 54004?
06/11/08 22:17:27 -
Message #512
Yes, it is possible.
Create a new geometry column for that with srid 54004, then update this column with the function ST_Transform(<geometry>, 54004). You can drop the old geometry column then to keep it small for routing.daniel06/12/08 08:14:51 -
Message #519
Thanks but my spatial_ref_sys table doesn't have an entry for srid 54004
06/23/08 22:38:18 -
Message #520
This is a good resource for spatial reference systems: http://spatialreference.org
You can find some information about 54004 there: http://spatialreference.org/ref/epsg/54004/PS: if you intend to use OpenLayers with Google Maps as background map, you better take 900913 as EPSG code since this is the projection OpenLayers uses now for it. The tutorial was made before that and needs to be updated.
daniel06/24/08 00:09:49

