[GRASSLIST:5163] Re: GRASS + PostgreSQL

Brent Wood b.wood at niwa.co.nz
Tue Dec 14 19:19:10 EST 2004


Hi,


Most of these assume you have a shapefile, with the dbf
component containing the aspatial data.


The shapelib package includes dbfdump, which will extract the data in a
dbf file into a text file, which can be loaded into Postgres via a shell
script or reformatted & loaded using copy or other Postgres options. This
can be used with or without an accompanying shapefile, it just looks at
the dbf component.


The shp2pgsql package will take a shape file (including the dbf file) and
create a sql file which can be run by psql to create the table and load
all the dbf data as well as the geometry data into a PostGIS table.

ogr2ogr (part of the GDAL package, but deals with vector data) can take a
shapefile & dbf file & "reformat" into a PostGIS table.

QGIS (an open source GIS compatible with GRASS) has a plugin called SPIT
this is a GUI where you can select one or more shapefiles, point it at a
PostGIS database & the shape/dbf files will be imported into PostGIS
tables.


Hopefully one of these approaches will meet your needs.

  Cheers,

    Brent Wood



> > Dear,
> >
> > I have a map in grass and I need to import datas in DBF format.
> >
> > How I do this?
> >
> > I'm working with GRASS 5.3, Conectiva Linux and Postgress 7.2.
> >
> > I need to configure Postgress at GRASS? Where?
> >
> > Please, send me step by step.
> >
> > Thanks,
> >
> > João
> > gruposig at uniplac.net
> >
> >
> >
> > ________________________________________________
> > Message sent using UebiMiau 2.7.8
> >
> >
>
>
>
> -----------------------------------------
> Stay ahead of the information curve.
> Receive GIS news and jobs on your desktop daily.
> Subscribe today to the GIS CafeNews newsletter.
> [ http://www10.giscafe.com/nl/newsletter_subscribe.php ]
> It's informative and essential.
>
>




More information about the grass-user mailing list