Re: Help with storing spatial (map coordinates) data? - Mailing list pgsql-general

From Brent Wood
Subject Re: Help with storing spatial (map coordinates) data?
Date
Msg-id 20060613150615.X43593@storm-user.niwa.co.nz
Whole thread Raw
In response to Re: Help with storing spatial (map coordinates) data?  (John Tregea <john@debraneys.com>)
List pgsql-general

On Tue, 13 Jun 2006, John Tregea wrote:

> Thanks Brent,
>
> I will be cautious in my approach. The public schema is the place that I
> wanted to use to store the geometry attributes, so from your points,
> that sounds like the best place. The other schemas contain controlled
> (security) information in proprietary data structures so I that was my
> reluctance to modify those tables with the necessary geometry functions,
> types etc.
>

Sounds eminently sensible :-)

One point you might note, the AddGeometryColumn() function does two
things. It adds a geometry column of the appropriate projection & type to
the specified table. It also writes a metadata record to the
geometry_columns table. This is where many application look to find tables
with geometries.

If you create a view on a table with a geometry column, or create a table
with a geometry column without using the AddGeometryColumn() function (eg:
create table foo1 as select * from foo0;), then some applications will not
recognise the table or view as a "GIS" table.

If you are adding geometries to tables via views, which it sounds like you
may be doing, you may need to manually insert the appropriate data into
the geometry_columns table to be fully compliant with the OGC specs &
PostGIS implementation.

If you create such a geometry table or view & the GIS package you are
using fails to make it available as a data source, this is almost
certainly why :-)

Cheers,

  Brent

pgsql-general by date:

Previous
From: Brent Wood
Date:
Subject: Re: Help with storing spatial (map coordinates) data?
Next
From: "Florian G. Pflug"
Date:
Subject: Re: Searching BLOB