[postgis] The Next Level
Dave Blasby
dblasby at refractions.net
Fri Jul 27 11:51:14 PDT 2001
> In this area, there is a broad set of work on supporting tables for spatial
> data referencing spatial tables, spatial columns within those tables, and
> coordinates systems associated with those columns that hasn't been done in
> PostGIS. In fact I am not quite sure how we would do it. I see this as
> more important to building an interoperable SFSQL solution than adding support
> for exotic spatial operators (though they would be nice).
Frank,
I've spent the last few days reading the OpenGIS Simple Features
Specification for SQL, with special regard to the metadata tables. I
dont think it would be all the difficult to actually implement it. It
would, unfortunately, complicate using PostGIS. But, it could be much
easier to maintain more complex installations. I'm using section 3.2 of
the spec, "Components - SQL92 with Geometry Type Implementation of
Feature Tables".
The hard part is figuring out (1) what the spec is really saying and (2)
how that translates into postgresql. The spec isnt externally
consistent between the various possible implementations.
(1) For example, you used to do a
"create table geom_table (gid integer, desc varchar(100), mygeom
geometry);"
Now, you'll have to do (according to the spec):
"create table geom_table (gid integer, desc varchar(100));
AddGeometryColumn(<database name>,'','geom_table','mygeom',<SRID>) ;"
AddGeometryColumn( <catalog>, <schema>, <table>, <geom column>, <SRID>)
is defined in section 2.3.8.
Unfortunately, the spec indicates that the metatable should contain
COORD_DIMENSION, even though the AddGeometryColumn() doesnt specify it.
The AddGeometryColumn() function also doesnt specify what geometry
sub-type (ie. POINT or LINESTRING) the column should be. Its all a bit
confusing.
I suppose there should be an SQL function that looks more like;
AddGeometryColumn(<database name>, <table name>, <column name>, <geom
type>, <geom dim>, <SRID>)
(2) I think a 'catalog' is equivelent to a postgresql 'database', but I
cannot find an equivelent to 'schema'.
Hopefully I'll start adding the metadata and Spatial Reference
metatables to PostGIS next week.
Comments?
dave
ps. the spec I'm refering to is at
"http://www.opengis.org/techno/specs/99-049.pdf".
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Small business owners...
Tell us what you think!
http://us.click.yahoo.com/vO1FAB/txzCAA/ySSFAA/PhFolB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
postgis-unsubscribe at yahoogroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the postgis-users
mailing list