Re: [postgis-users] tool to load dbf into postgresql table
On Jan 29, 2012, at 11:39 PM, pcr...@pcreso.com wrote: > > When did this become available? > > I'm using pgsql2shp from Postgis version 1.5.3 for Linux, which is pretty > > current, > > and that is not a listed command line option. > > Not really sure when but see > > http://trac.osgeo.org/postgis/browser/trunk/loader/shp2pgsql-cli.c#L22 > > --- On Mon, 1/30/12, Richard Greenwood wrote: > > On Sun, Jan 29, 2012 at 7:17 PM, John Morgan wrote: > > Hello, > > This may be more of a postgresql question, but it is related to my postgis > > setup. I was hoping that someone might know of an easy way to load a dbf > > into postgresql table. I have used the gdal tool shp2pgsql to load a > > shapefile in this way and it worked great. Is there a similar tool for > > Use the -n switch with shp2pgsql will do what you want: >shp2pgsql -n > Also ogr2ogr will do the trick. ogr2ogr can also handle conversions > between numerous other spatial and non-spatial data formats. ODBC is > especially handy. ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] tool to load dbf into postgresql table
Thanks for the feedback guys. The -n option on shp2pgsql worked well. Derek On Sun, Jan 29, 2012 at 9:17 PM, John Morgan wrote: > Hello, > This may be more of a postgresql question, but it is related to my postgis > setup. I was hoping that someone might know of an easy way to load a dbf > into postgresql table. I have used the gdal tool shp2pgsql to load a > shapefile in this way and it worked great. Is there a similar tool for > loading just a dbf? > > Thanks, > Derek > ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] tool to load dbf into postgresql table
It's been around for years. Since 1.4 I'd guess. When you type shp2pgsql you should see this option: -n Only import DBF file. The OP was how to load a dbf into postgres, you're exporting with pgsql2shp, which will export only the dbf if there is not geometry column in the table being exported. Rich On Sun, Jan 29, 2012 at 9:39 PM, wrote: > When did this become available? > > I'm using pgsql2shp from Postgis version 1.5.3 for Linux, which is pretty > current, and that is not a listed command line option. > > Cheers, > >Brent Wood > > --- On *Mon, 1/30/12, Richard Greenwood *wrote: > > > From: Richard Greenwood > Subject: Re: [postgis-users] tool to load dbf into postgresql table > To: "PostGIS Users Discussion" > Date: Monday, January 30, 2012, 3:55 PM > > On Sun, Jan 29, 2012 at 7:17 PM, John Morgan > http://mc/compose?to=jdmor...@unca.edu>> > wrote: > > Hello, > > This may be more of a postgresql question, but it is related to my > postgis > > setup. I was hoping that someone might know of an easy way to load a dbf > > into postgresql table. I have used the gdal tool shp2pgsql to load a > > shapefile in this way and it worked great. Is there a similar tool for > > loading just a dbf? > > > > Thanks, > > Derek > > Derek, > > Use the -n switch with shp2pgsql will do what you want: >shp2pgsql -n > Also ogr2ogr will do the trick. ogr2ogr can also handle conversions > between numerous other spatial and non-spatial data formats. ODBC is > especially handy. > > Rich > > -- > Richard Greenwood > richard.greenw...@gmail.com<http://mc/compose?to=richard.greenw...@gmail.com> > www.greenwoodmap.com > ___ > postgis-users mailing list > postgis-users@postgis.refractions.net<http://mc/compose?to=postgis-users@postgis.refractions.net> > http://postgis.refractions.net/mailman/listinfo/postgis-users > > > ___ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > > -- Richard Greenwood richard.greenw...@gmail.com www.greenwoodmap.com ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] tool to load dbf into postgresql table
When did this become available? I'm using pgsql2shp from Postgis version 1.5.3 for Linux, which is pretty current, and that is not a listed command line option. Cheers, Brent Wood --- On Mon, 1/30/12, Richard Greenwood wrote: From: Richard Greenwood Subject: Re: [postgis-users] tool to load dbf into postgresql table To: "PostGIS Users Discussion" Date: Monday, January 30, 2012, 3:55 PM On Sun, Jan 29, 2012 at 7:17 PM, John Morgan wrote: > Hello, > This may be more of a postgresql question, but it is related to my postgis > setup. I was hoping that someone might know of an easy way to load a dbf > into postgresql table. I have used the gdal tool shp2pgsql to load a > shapefile in this way and it worked great. Is there a similar tool for > loading just a dbf? > > Thanks, > Derek Derek, Use the -n switch with shp2pgsql will do what you want: shp2pgsql -n Also ogr2ogr will do the trick. ogr2ogr can also handle conversions between numerous other spatial and non-spatial data formats. ODBC is especially handy. Rich -- Richard Greenwood richard.greenw...@gmail.com www.greenwoodmap.com ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] tool to load dbf into postgresql table
shp2pgsql is a Postgis utility, not a GDAL one, though GDAL can also do this. Without knowing the platform you are using, recommending a solution is not straightforward. An effective commercial tool, with a free trial, is: http://www.spectralcore.com/fullconvert/ The Postgres Wiki lists a few options: http://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL#DBF_Format Also see the shapefile & DBF loader notes at: http://postgis.refractions.net/download/windows/ Brent Wood --- On Mon, 1/30/12, John Morgan wrote: From: John Morgan Subject: [postgis-users] tool to load dbf into postgresql table To: postgis-users@postgis.refractions.net Date: Monday, January 30, 2012, 3:17 PM Hello, This may be more of a postgresql question, but it is related to my postgis setup. I was hoping that someone might know of an easy way to load a dbf into postgresql table. I have used the gdal tool shp2pgsql to load a shapefile in this way and it worked great. Is there a similar tool for loading just a dbf? Thanks, Derek -Inline Attachment Follows- ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] tool to load dbf into postgresql table
On Sun, Jan 29, 2012 at 7:17 PM, John Morgan wrote: > Hello, > This may be more of a postgresql question, but it is related to my postgis > setup. I was hoping that someone might know of an easy way to load a dbf > into postgresql table. I have used the gdal tool shp2pgsql to load a > shapefile in this way and it worked great. Is there a similar tool for > loading just a dbf? > > Thanks, > Derek Derek, Use the -n switch with shp2pgsql will do what you want: shp2pgsql -n Also ogr2ogr will do the trick. ogr2ogr can also handle conversions between numerous other spatial and non-spatial data formats. ODBC is especially handy. Rich -- Richard Greenwood richard.greenw...@gmail.com www.greenwoodmap.com ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users