...
The basic spatial intersection data definition is something like the following:
Code Block |
---|
| xml |
---|
| xml |
---|
title | Table join with output rows pulled from child table | xml |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns = "urn:com.cohga.server.config#1.0" xmlns:data = "urn:com.cohga.server.data.database#1.0">
<data:datadefinition id="spatial.join">
<spatialintersectiondataconnection entity="parentEntityId" table="childTableName"/>
</data:datadefinition>
</config>
|
...
If you want to limit the columns returned then you can add "parameter" tags to describe the columns you want returned, e.g.
Code Block |
---|
| xml |
---|
| xml |
---|
title | Table join with output columns specified directly | xml |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns = "urn:com.cohga.server.config#1.0" xmlns:data = "urn:com.cohga.server.data.database#1.0">
<data:datadefinition id="spatial.join">
<spatialintersectiondataconnection entity="parentEntityId" table="childTableName">
<parameter name="childColumn1" label="Child Column 1" column="CHILD_COLUMN1"/>
<parameter name="childColumn2" label="Child Column 2" column="CHILD_COLUMN2"/>
</spatialintersectiondataconnection>
</data:datadefinition>
</config>
|
...
Additionally you can specify a child entity rather than a child table if you already have an entity that represents the table that you're trying to join with, e.g.
Code Block |
---|
| xml |
---|
| xml |
---|
title | Entity join with output columns pulled from child entityxml |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns = "urn:com.cohga.server.config#1.0" xmlns:data = "urn:com.cohga.server.data.database#1.0">
<data:datadefinition id="spatial.join">
<spatialintersectiondataconnection entity="parentEntityId" targetentity="childEntityId"/>
</data:datadefinition>
</config>
|
or with parameters also defined directly
Code Block |
---|
| xml |
---|
| xml |
---|
title | Entity join with output columns definedxml |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns = "urn:com.cohga.server.config#1.0" xmlns:data = "urn:com.cohga.server.data.database#1.0">
<data:datadefinition id="spatial.join">
<spatialintersectiondataconnection entity="parentEntityId" targetentity="childEntityId">
<parameter name="childColumn1" label="Child Column 1" column="CHILD_COLUMN1"/>
<parameter name="childColumn2" label="Child Column 2" column="CHILD_COLUMN2"/>
</spatialintersectiondataconnection>
</data:datadefinition>
</config>
|
Finally it's also possible to specify a buffer that can be applied to the parent geometry before using it to select the child rows, e.g.
Code Block |
---|
| xml |
---|
| xml |
---|
title | Table join with buffer specified for source geometryxml |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns = "urn:com.cohga.server.config#1.0" xmlns:data = "urn:com.cohga.server.data.database#1.0">
<data:datadefinition id="spatial.join">
<spatialintersectiondataconnection entity="parentEntityId" table="childTableName" buffer="10" bufferUnits="m"/>
</data:datadefinition>
</config>
|
...