Thread: GIS/GPS Experiences with pgsql?

GIS/GPS Experiences with pgsql?

From
Bryan Mattern
Date:
I'm working on a personal project to develop some sort of GPS software
for Linux.  I was talking with a friend the other day and he let me
borrow a "TIGER/Line CD" (!1990!) from the US Bureau of the Census.  I
know the data is old, but I just wanted to test it with PostgreSQL.  I
don't know all that much about GIS maps, there might be a better source
I don't know about, but the data seems pretty easy to rip apart and
pitch into PostgreSQL.

Has anyone done anything like this?  If so, is there any info on the
web?  I checked the old mailing list archives, but they were not much
help.

I'm using perl to get lat./long./velocity from a GPS sensor and would
like to extract data from PostgreSQL to draw/label the maps.

Any ideas or help would be great.

thx,

--bryan

-- Failure is not an option. It comes
   bundled with your Microsoft product.

---
Bryan R. Mattern
bm@datapace.com  http://www.datapace.com
--------

Re: [GENERAL] GIS/GPS Experiences with pgsql?

From
Peter T Mount
Date:
On Tue, 16 Feb 1999, Bryan Mattern wrote:

> I'm working on a personal project to develop some sort of GPS software
> for Linux.  I was talking with a friend the other day and he let me
> borrow a "TIGER/Line CD" (!1990!) from the US Bureau of the Census.  I
> know the data is old, but I just wanted to test it with PostgreSQL.  I
> don't know all that much about GIS maps, there might be a better source
> I don't know about, but the data seems pretty easy to rip apart and
> pitch into PostgreSQL.
>
> Has anyone done anything like this?  If so, is there any info on the
> web?  I checked the old mailing list archives, but they were not much
> help.
>
> I'm using perl to get lat./long./velocity from a GPS sensor and would
> like to extract data from PostgreSQL to draw/label the maps.
>
> Any ideas or help would be great.

Hmmm, I'm not sure how the TIGER/Line CD will import, as I don't know the
format, but you'll want to look at the geometric types that PostgreSQL
supports.

Infact, it was both GIS and Astronomy that made me implement their support
in the JDBC driver in the first place :-)

If the TIGER/Line data is raster, and each feature (polygon, line,
circle, etc) doesn't exceed the block size, then postgresql should be able
to handle it.

I have in the works some Java code to draw the geometric types, and some
GPS code as well, but it's mainly aimed at the Astronomical rather than
GIS use.

Peter

--
       Peter T Mount peter@retep.org.uk
      Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
 Java PDF Generator: http://www.retep.org.uk/pdf


Re: [GENERAL] GIS/GPS Experiences with pgsql?

From
Gregory Maxwell
Date:
On Wed, 17 Feb 1999, Peter T Mount wrote:

[snip]
> If the TIGER/Line data is raster, and each feature (polygon, line,
> circle, etc) doesn't exceed the block size, then postgresql should be able
> to handle it.
[snip]

Vector not raster. Right?



Re: [GENERAL] GIS/GPS Experiences with pgsql?

From
Bryan Mattern
Date:
Gregory Maxwell wrote:
>
> On Wed, 17 Feb 1999, Peter T Mount wrote:
>
> [snip]
> > If the TIGER/Line data is raster, and each feature (polygon, line,
> > circle, etc) doesn't exceed the block size, then postgresql should be able
> > to handle it.
> [snip]
>
> Vector not raster. Right?

Actually, it's just text.  Here's a sample record:

10003 43140280 B Smallwood Road A31 13131891899301893018 9501 9501 227
222  -82521645+33638976 -82528956+33639940

...the CD-ROM "database" is about 600MB.

It should present no problem to extract the important data w/perl.

In related news, I read on slashdot.org today, in the "Bruce Perens
Resigns From OSI" article:

"...I'm Bruce Perens. You may know me as the primary author of the
Debian Free Software Guidelines and the Open Source Definition. I wrote
the Electric Fence malloc() debugger, and some pieces of Debian. And you
may remember me for having brought the TIGER map database to free
software. If you want copies of that, you can get them through Dale
Scheetz..."

Anybody know WTF he is talking about?

--bryan

-- Failure is not an option. It comes
   bundled with your Microsoft product.

---
Bryan R. Mattern
bm@datapace.com  http://www.datapace.com
--------

Re: [GENERAL] GIS/GPS Experiences with pgsql?

From
Peter T Mount
Date:
On Thu, 18 Feb 1999, Gregory Maxwell wrote:

> On Wed, 17 Feb 1999, Peter T Mount wrote:
>
> [snip]
> > If the TIGER/Line data is raster, and each feature (polygon, line,
> > circle, etc) doesn't exceed the block size, then postgresql should be able
> > to handle it.
> [snip]
>
> Vector not raster. Right?

Yes, the Tiger data is vector.

Peter

--
       Peter T Mount peter@retep.org.uk
      Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
 Java PDF Generator: http://www.retep.org.uk/pdf


Re: [GENERAL] GIS/GPS Experiences with pgsql?

From
Julian Scarfe
Date:
Bryan Mattern wrote:
>
> I'm working on a personal project to develop some sort of GPS software
> for Linux.  I was talking with a friend the other day and he let me
> borrow a "TIGER/Line CD" (!1990!) from the US Bureau of the Census.  I
> know the data is old, but I just wanted to test it with PostgreSQL.  I
> don't know all that much about GIS maps, there might be a better source
> I don't know about, but the data seems pretty easy to rip apart and
> pitch into PostgreSQL.
>
> Has anyone done anything like this?  If so, is there any info on the
> web?  I checked the old mailing list archives, but they were not much
> help.

I'm trying to do something similar with Digital Chart of the World, which is
in VPF format (binary not ASCII). The biggest problem that I've come across is
that some of the edges (lines) are > 8K, so I'll have to store them as blobs
rather than in tuples as arrays.  I'm still learning about blobs...

I'm happy to compare notes with anyone doing similar stuff.
--

Julian Scarfe