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

[GENERAL] GIS/GPS Experiences with pgsql?

From
Bryan Mattern
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?

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
Maarten Boekhold
Date:
> > 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

I assume this describes a vector....

> 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?

IIRC he bought the copyrights to the TIGER map and released it under GPL
or something like that.

Maarten

ps. How much 'pgsql-space (ie. megabytes)' would 600M of a textual
description like the above take? I assume pgsql can store this more
efficiently in its tables using these geometric types.

--

Maarten Boekhold, boekhold@tibco.com
TIBCO Finance Technology Inc.
The Atrium
Strawinskylaan 3051
1077 ZX Amsterdam, The Netherlands
tel: +31 20 3012158, fax: +31 20 3012358
http://www.tibco.com

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

From
Jeff Hoffmann
Date:
> 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.

i never looked at the tiger that was that old, but i know that the new
ones fill five discs (and all the data is zipped, so i'm thinking its in
the order of at 10 GB).  anyway, on to the topic at hand...

i've done some of this for work, so i don't think i can release any of
the source for importing tiger, plus i know that the tiger format has
changed since 92 (and 95), so you might have to do quite a bit of work
on it anyway.  all my comments are based on the data structure of the
tiger 95/97, so YMMV.

the data on the discs are pretty clean (normalized and logically
organized, with tlids and polyids as a primary key), so the biggest
chore is to convert the appropriate data into native geometric data
types.  essentially, convert all nodes into a point type, chains into a
path (open path), and polygons into polygons. then select out what parts
you want.  index the chains and polygons based on the bounding box using
rtrees, and you'll be pretty well set.  depending on your desired
accuracy (and the zoom of your map) you may want to look into using
different map projections to flatten out the data due to the earth's
curvature.  it shouldn't be bad if you're only drawing a map of 1 or 2
miles, though.  there are a couple of different free libraries to do
that sort of thing.

what i did was write a little c program to import the data as it was,
then another c program for each of the data conversions.  for example,
one of these programs was to make a chain into a native path type, so i
selected the beginning and ending points from type one, matched the tlid
to type 2, and created an insert statement with the coordinates
formatted properly to make a path (insert into chains (tlid, chain_path)
values ('12738127231',
'[(-90.1234,45.12342),(-90.34545,45.3984)]::path')

it's really pretty simple once you dive into the tiger structures
(there's a huge 250 page PDF that gives you all the necessary info, but
it's darn dry reading.)

>
> 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?

he bought the tiger97 cds to donate to public, opensource software
projects (for example, one person that got them with the intent to build
a GPS navigation system on linux to use on an auto-pc).  i think you
have to explain to him a good reason for him to give you a copy.   they
are public domain, so once you have them, you can do anything you want
with them, it's just a matter of the $1500 to get them to start with.

jeff

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

From
shields@msrl.com (Michael Shields)
Date:
In article <36CD2060.452BE176@cc.gatech.edu>,
Bryan Mattern <bm@cc.gatech.edu> wrote:
> 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?

http://www.slashdot.org/articles/99/01/06/1630245.shtml

It's debatable whether this means anything, since the TIGER data is in
the public domain.
--
Shields.