dbf2pgsql type utility

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

dbf2pgsql type utility

Kralidis,Tom [Ontario]

Hi,

I have some pure attribute data which I will join to spatial tables in
PostGIS.  They are formatted as .dbf files.

Is there a dbf2pgsql type utility to do this?  Or will I have to resort
to Perl and roll my own?

Thanks

..Tom
_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: dbf2pgsql type utility

strk
On Thu, May 26, 2005 at 04:27:14PM -0400, Kralidis,Tom [Burlington] wrote:
>
> Hi,
>
> I have some pure attribute data which I will join to spatial tables in
> PostGIS.  They are formatted as .dbf files.
>
> Is there a dbf2pgsql type utility to do this?  Or will I have to resort
> to Perl and roll my own?

What about patching shp2pgsql instead ?
--strk;

>
> Thanks
>
> ..Tom
> _______________________________________________
> postgis-users mailing list
> [hidden email]
> http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

RE: dbf2pgsql type utility

Kralidis,Tom [Ontario]
In reply to this post by Kralidis,Tom [Ontario]

> > Hi,
> >
> > I have some pure attribute data which I will join to
> spatial tables in
> > PostGIS.  They are formatted as .dbf files.
> >
> > Is there a dbf2pgsql type utility to do this?  Or will I have to
> > resort to Perl and roll my own?
>
> What about patching shp2pgsql instead ?
>

I'd love to.  However that won't work for my this Tuesday deliverable.
At any rate, what (at a high level) would be involved in patching
shp2pgsql.c to do this?  I could see this being extended via a "-t" flag
which means "just insert the .dbf table".

In the short-term, if anyone has any ideas, that would be much
appreciated.

..Tom
_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: dbf2pgsql type utility

Paul Ramsey
http://www.whitetown.com/dbf2sql/

http://www.google.com/search?q=dbf2sql

Kralidis,Tom [Burlington] wrote:

>>>Hi,
>>>
>>>I have some pure attribute data which I will join to
>>
>>spatial tables in
>>
>>>PostGIS.  They are formatted as .dbf files.
>>>
>>>Is there a dbf2pgsql type utility to do this?  Or will I have to
>>>resort to Perl and roll my own?
>>
>>What about patching shp2pgsql instead ?
>>
>
>
> I'd love to.  However that won't work for my this Tuesday deliverable.
> At any rate, what (at a high level) would be involved in patching
> shp2pgsql.c to do this?  I could see this being extended via a "-t" flag
> which means "just insert the .dbf table".
>
> In the short-term, if anyone has any ideas, that would be much
> appreciated.
>
> ..Tom
> _______________________________________________
> postgis-users mailing list
> [hidden email]
> http://postgis.refractions.net/mailman/listinfo/postgis-users

_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: dbf2pgsql type utility

Jeff Hoffmann
In reply to this post by Kralidis,Tom [Ontario]
Kralidis,Tom [Burlington] wrote:
>>>Hi,
>>>
>>>I have some pure attribute data which I will join to
>>
>>spatial tables in
>>
>>>PostGIS.  They are formatted as .dbf files.

In the contrib directory of the PostgreSQL source, there's a utility
called dbf2pg.  If I understand what you're looking for correctly, that
should do what you want.

--
Jeff Hoffmann
[hidden email]
_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: dbf2pgsql type utility

strk
In reply to this post by Kralidis,Tom [Ontario]
On Thu, May 26, 2005 at 04:31:00PM -0400, Kralidis,Tom [Burlington] wrote:

>
> > > Hi,
> > >
> > > I have some pure attribute data which I will join to
> > spatial tables in
> > > PostGIS.  They are formatted as .dbf files.
> > >
> > > Is there a dbf2pgsql type utility to do this?  Or will I have to
> > > resort to Perl and roll my own?
> >
> > What about patching shp2pgsql instead ?
> >
>
> I'd love to.  However that won't work for my this Tuesday deliverable.
> At any rate, what (at a high level) would be involved in patching
> shp2pgsql.c to do this?  I could see this being extended via a "-t" flag
> which means "just insert the .dbf table".
>
> In the short-term, if anyone has any ideas, that would be much
> appreciated.

I'd use no flags, allowing use of what's available (shp only / dbf only).
You should handle the failures in OpenShape and somehow notify absence
of either shape or dbf file still counting number of rows.

--strk;

>
> ..Tom
> _______________________________________________
> postgis-users mailing list
> [hidden email]
> http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

RE: dbf2pgsql type utility

Kralidis,Tom [Ontario]
In reply to this post by Kralidis,Tom [Ontario]

BINGO!  Thanks.

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On
> Behalf Of Jeff Hoffmann
> Sent: Thursday, 26 May, 2005 16:37
> To: PostGIS Users Discussion; Kralidis,Tom [Burlington]
> Subject: Re: [postgis-users] dbf2pgsql type utility
>
>
> Kralidis,Tom [Burlington] wrote:
> >>>Hi,
> >>>
> >>>I have some pure attribute data which I will join to
> >>
> >>spatial tables in
> >>
> >>>PostGIS.  They are formatted as .dbf files.
>
> In the contrib directory of the PostgreSQL source, there's a utility
> called dbf2pg.  If I understand what you're looking for
> correctly, that
> should do what you want.
>
> --
> Jeff Hoffmann
> [hidden email] _______________________________________________
> postgis-users mailing list [hidden email]
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Res: Re: dbf2pgsql type utility

Ezequias Rodrigues da Rocha
In reply to this post by strk
Yes there is a utility to do that.
 
It is on the contrib directory contrib of source Postgresql. The instalation is on the folder you found it. Look for it.
 
I didn't try to compile this utility but if you have sucess please tell me.
 
Best regards
Ezequias Rodrigues da Rocha
 
-------Mensagem original-------
 
Data: 05/26/05 17:53:44
Assunto: Re: [postgis-users] dbf2pgsql type utility
 
On Thu, May 26, 2005 at 04:31:00PM -0400, Kralidis,Tom [Burlington] wrote:
>
> > > Hi,
> > >
> > > I have some pure attribute data which I will join to
> > spatial tables in
> > > PostGIS.  They are formatted as .dbf files.
> > >
> > > Is there a dbf2pgsql type utility to do this?  Or will I have to
> > > resort to Perl and roll my own?
> >
> > What about patching shp2pgsql instead ?
> >
>
> I'd love to.  However that won't work for my this Tuesday deliverable.
> At any rate, what (at a high level) would be involved in patching
> shp2pgsql.c to do this?  I could see this being extended via a "-t" flag
> which means "just insert the .dbf table".
>
> In the short-term, if anyone has any ideas, that would be much
> appreciated.
 
I'd use no flags, allowing use of what's available (shp only / dbf only).
You should handle the failures in OpenShape and somehow notify absence
of either shape or dbf file still counting number of rows.
 
--strk;
 
>
> ..Tom
> _______________________________________________
> postgis-users mailing list
_______________________________________________
postgis-users mailing list
Add FUN to your email - CLICK HERE!
_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users