Re: Geometric Data Type in PostgreSQL - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Re: Geometric Data Type in PostgreSQL
Date
Msg-id 3848209B.A543B73A@alumni.caltech.edu
Whole thread Raw
Responses Re: [HACKERS] Re: Geometric Data Type in PostgreSQL
List pgsql-hackers
> I'm a geographic information systems (GIS) professional and a (home)
> Linux user.  After reading the documentation for the Geometric data
> types in PostgreSQL, I'm excited about the possibilities.  Are you
> aware of any projects where the geometric data types in PostgreSQL are
> being used as the basis of a GIS or mapping package?

Not specifically, though I do know that folks have used it to do
GIS-like things (e.g. given a location on the earth surface, identify
satellite tracks which are visible).

The best place to ask is on the Postgres mailing list(s); I'm cc'ing
the hackers list and you may want to inquire on one or two of the
other lists too.

>  I'd like to know
> if anyone's doing this and, if not, what development language would
> you recommend for developing a mapping package using PostgreSQL.

Hmm. That's a hard one to answer without knowing more. If you need
compiled code, then C or C++ might be the best choice. But you might
find something like java or itcl lets you build a GUI app faster and
easier.

An interesting possibility if you are developing in C or C++ is to
consider developing as a "gnome-enabled" app, which presumably gives
you a bunch of high level widgets to work with. It would also allow
you to Corba-ize your app to decouple the backend from the GUI.

>  Also, how difficult would it be to add a Z value to the X and Y
> values to the data types' basic structure?  This would allow the
> storage of height data along with the coordinates.

It would be easy; you just need to figure out how you will be able to
use it. Things like comparison operators have a less intuitive meaning
once you go to 3D.

Look at src/backend/utils/adt/geo.c for hints on how to deal with a
geometric data type. Also, look at contrib/ to see how to add a
datatype.

> I use GRASS on my Linux system at home.  GRASS is a (GPL'd) raster GIS
> package.  Open source vector GIS packages for Linux are, as far as I
> know, nonexistent.  Several commercial packages are available,
> including ESRI's Arc/Info and ArcView (which I use at work).  I'd like
> to see an open source vector GIS package developed, perhaps based on
> PostgreSQL's geometric data types.

You might also consider using something like ApplixWare, which has
hooks into Postgres (via ODBC) and might have enough features and
power to allow developing a package. The per-seat cost of ApplixWare
is pretty low. It may be ODBC gets in the way of exposing the extended
features of Postgres though.

Good luck.
                        - Thomas

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California


pgsql-hackers by date:

Previous
From: Andy Lewis
Date:
Subject: Re: Datetime operators (was: Re: [SQL] Another Date question)
Next
From: Thomas Lockhart
Date:
Subject: Re: Datetime operators (was: Re: [SQL] Another Date question)