[GRASS-user] v.out.ogr: Convert Attribute Database?
Rich Shepard
rshepard at appl-ecosys.com
Thu Mar 22 14:47:52 EDT 2012
Trying to convert the attribute database of a vector (points) table from
dbf to postgres, and I'm missing a critical step.
Asked and answered:
GRASS 6.5.svn (Washington-Kinross):~/grassdata > v.db.connect
map=surface_h2o -p
Vector map <surface_h2o at buckhorn> is connected by:
layer <1> table <suface_water_sites> in database
</home/rshepard/grassdata/Washington-Kinross/buckhorn/dbf/> through driver
<dbf> with key <cat>
Used v.out.ogr to export from dbf to a postgres table emulating the
example on the manual page:
The example's syntax is:
Export to PostgreSQL/PostGIS
Export areas from GRASS vector map directly to PostGIS:
v.out.ogr input=polygons type=area \
dsn="PG:host=localhost dbname=postgis user=postgres" \
olayer=polymap format=PostgreSQL
so I try,
GRASS 6.5.svn (Washington-Kinross):~/grassdata > v.out.ogr in=surface_h2o
type=point dsn="PG:dbname=buckhornmine"
Exporting 13 geometries...
100%
v.out.ogr complete. 13 features written to <surface_h2o> (ESRI_Shapefile).
and end up with a directory called PG\:dbname\=buckhornmine/ containing the
shapefile.
What command line do I use to transfer the attributes from the native dbf
to a postgres table in the defined database?
Rich
More information about the grass-user
mailing list