Geography Reference
In-Depth Information
What's Actually in the Metadata Tables?
The geometry_columns table holds data pertaining to your data and has the following
fields:
f_table_catalog
The database name the table is defined in.
f_table_schema
The schema space the table is defined in.
f_table_name
The name of the table holding the data.
f_geometry_column
The name of the column holding the actual data.
coord_dimension
The coordinate dimension.
srid
The spatial reference ID of the coordinate system in use.
type
The type of geometry data stored in this table.
The catalog , schema , and name fields are used in different ways by different databases.
Oracle Spatial, for example, has a single geometry_columns table used for the entire
server, so the catalog field is used to name the actual database. Postgres, however, stores
one geometry_columns table per database, so the catalog field will usually be empty. On
the other hand, the schema field is used in both Postgres and MS SQL. In Postgres, the
field is usually set to public , whereas in MS SQL it's normally set to dbo for the publicly
accessible table set.
The table name and column name are pretty self-explanatory. The coordinate dimension in
most cases will be 2 , meaning that the coordinate system has only x-coordinates and y-
coordinates. Postgres and Oracle Spatial do have 3-D capabilities, but I've yet to see them
used very much outside of very specific circumstances, and I've never seen a
coord_dimension field set to anything other than 2 .
We'll cover the srid field in just a moment. The type , however, needs further explanation.
Database Geometry Types
Any OGC-compliant database has to be able to store three different types of primitives. They
are:
point
line
polygon
The names themselves are fairly explanatory. A point is a single x , y location. A line is a
single segment connected by two x , y end points. A polygon is an enclosed area where a
number of x , y points form a closed perimeter.
 
 
Search WWH ::




Custom Search