...
For specifying primary key columns when Weave/GeoTools can not determine it directly
Code Block |
---|
CREATE TABLE gt_pk_metadata (
table_schema VARCHAR(32),
table_name VARCHAR(32) NOT NULL,
pk_column VARCHAR(32) NOT NULL,
pk_column_idx INTEGER,
pk_policy VARCHAR(32),
pk_sequence VARCHAR(64),
unique (table_schema, table_name, pk_column),
check (pk_policy in ('sequence', 'assigned', 'autogenerated'))
)
|
...
Code Block |
---|
|
<spatial:spatialengine id="postgis">
<dbtype>postgis</dbtype>
<host>mysqlhost</host>
<port>5432</port>
<database>spatial</database>
<user>gis</user>
<passwd>hak0rz</passwd>
</spatial:spatialengine>
|
Using geometry metadata configuration
As of Weave 2.5.16 it's possible to specify the information contained in the geometry metadata table directly in the spatial engine configuration.
Name | Description |
---|
name | The table name |
schema | The optional table schema |
type | The geometry type (point, linestring, polygon, multipoint, multilinestring, multipolygon) |
srid | The geometry srid |
dimension | The geometry dimension |
Code Block |
---|
|
<spatial:spatialengine id="postgis">
<dbtype>postgis</dbtype>
<host>mysqlhost</host>
<port>5432</port>
<database>spatial</database>
<user>gis</user>
<passwd>hak0rz</passwd>
<geometrymetadata>
<table schema="public" name="park" type="multipolygon" srid="28355" dimension="2"/>
<table schema="public" name="property" type="polygon" srid="28355" dimension="2"/>
<table schema="public" name="road" type="linestring" srid="28355" dimension="2"/>
</geometrymetadata>
</spatial:spatialengine>
|