...
The basic spatial intersection data definition is something like the following:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<?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 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 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 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 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>
|
Weave 2.6.10 it is possible to specify a bufferCrs
value when setting using a buffer to specify what CRS should be used to generate the buffer.
Info |
---|
In the above examples "parentEntityId" is the name of an entity that the data is being generated for, based on the selection for that entity, for example if it were "property" then the data will appear as though it's directly related to the "property" entity, even though it's coming from something different, for example a flood area polygon table. |
...