[GRASSLIST:6844] Re: exporting vector maps to postgis
Stephan Holl
holl at gdf-hannover.de
Sun May 22 05:31:01 EDT 2005
Hello Jaime,
On Fri, 20 May 2005 18:00:57 -0500 (CDT) Jaime Carrera
<jaicarrerahdez at yahoo.com> wrote:
> Dear list,
>
> I'm trying to export a vector map from GRASS to a
> postGIS table through the use of the v.to.pg function.
> I create a table in PostgreSQL with 2 fields and use
> the AddGeometryColumn function in the database.
> However I get "invalid geometry" on the column that
> has the polygon data.
> I'm using the following command:
> \copy municipalities from 'geom.postgis' with
> delimiter as '|'
> Basically, I want to copy a table that has the
> id|name|geom of each municipality, where geom is the
> polygon data exported from GRASS.
Using GRASS > 5.7 it is possible to use OGR to write GRASS-vector-data
into any OGR-supported formats (postGIS as well).
just use v.out.ogr.
An example can be found in the manual-page of v.out.ogr.
http://grass.itc.it/grass60/manuals/html60_user/v.out.ogr.html
Best
Stephan
--
GDF Hannover - Solutions for spatial data analysis and remote sensing
Hannover Office (TCH) - Vahrenwalder Straße 7 - D-30165 Hannover
Internet: www.gdf-hannover.de - Email: holl at gdf-hannover.de
Phone : ++49-(0)511-9357560 - Fax: ++49-(0)511-9357100
More information about the grass-user
mailing list