Re: [GENERAL] Postgres && GIS

From: Peter T Mount <peter(at)retep(dot)org(dot)uk>
To: Paul Ramsey <pramsey(at)refractions(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Postgres && GIS
Date: 1998-08-23 18:36:30
Message-ID: Pine.LNX.3.96.980823193035.493A-100000@maidast.retep.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Just clearing a small backlog of email, and found this...

On Sun, 9 Aug 1998, Paul Ramsey wrote:

> I am exploring the possibility of using PostGreSQL for GIS applications
> (as I am sure many have before me) and am wondering if there are ready
> answers to a few simple questions (the FAQ seems still in it's infancy):
>
> - there are geometric types described in the documentation, is anyone
> making substantial use of them and the query tools described also? if
> so, for what purpose and using what as an interface layer?

I don't use them as much as I'd like (yet), but I tend to use them for
storing Astronomical Data (think GIS but looking upwards rather than
downwards).

> - is the JDBC interface compatible with the geometric types? could it
> return a polygon if that was the result of a query, and what would it
> look like when returned? conversely, how would one insert a polygon into
> a database? it is something I haven't wrapped my head around yet, how
> one would insert several hundred vertices of data into a dbase using
> standard SQL. Just a great big well formatted text string?

Since 6.2, the Geometric types have been supported with a set of classes.
In 6.3, these were split from the main package, and now the
postgresql.geometric package handles them.

To read a geometric type, use the getObject() method which will return the
appropriate class for the type.

To set, you have two methods:
* PreparedStatement allows you to use the setObject() method
* Statement can support the geometric types. The toString() method of
each class will return the correct SQL value for inserting into a
query.

> Thanks for your help, I'll try and compile for future generations, of
> course.
>
> Paul Ramsey
>

--
Peter T Mount peter(at)retep(dot)org(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rostislav Matl 1998-08-23 19:40:48 inserting 3D objects/scenes into PostgreSQL
Previous Message Christopher S. Weimann 1998-08-23 16:36:44 Re: [GENERAL] PostgreSQL's stability,