[GRASS-user] v.out.postgis and v.out.ogr - inconsistencies in output
Mark Wynter
mark at dimensionaledge.com
Wed Feb 11 18:15:06 PST 2015
As context, I’m running analysis using v.net.allpairs, whereby vector geometries are often common to more than 1 origin-destination journey path, hence the line segments appear multiple times but with unique cat values, and from_cat and to_cat combinations.
When exporting the output layer of v.net.allpairs back into PostGIS, only the third method returns the correct number of geometry features - and this requires first exporting to shapefile and then importing using ogr2ogr.
Methods (1) and (2) discard line strings that appear more than once (despite them having unique cat values). This is not what I was expecting. The third method correctly treats each linestring feature at unique, hence assigns a unique ogc_fid to each feature.
Are there flags for methods (1) and (2) that deal with this issue - or is method (3) the only feasible option?
(1) v.out.postgis --o input=temp_8 output="PG:host=localhost dbname=osm_au user=postgres password=password" olayer=jtw.temp_8_pg options="GEOMETRY_NAME=wkb_geometry,SRID=3577"
134 Features Written
(2) v.out.ogr --o input=temp_8 type=line output="PG:host=localhost dbname=osm_au user=postgres password=password" output_layer=jtw.temp_8_ogr format=PostgreSQL
134 Features Written
(3) v.out.ogr --o input=temp_8 output=/var/tmp/temp_8 type=line
ogr2ogr -overwrite -f "PostgreSQL" PG:"host=localhost dbname=osm_au user=postgres password=password" /var/tmp/temp_8/temp_8.shp -nln jtw.temp_8_ogr -s_srs EPSG:3577 -t_srs EPSG:3577 -a_srs EPSG:3577 -nlt LINESTRING
1323 Features Written
Kind regards
Mark
More information about the grass-user
mailing list