Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The basic spatial intersection data definition is something like the following:

Code Block
xml
xml
titleTable join with output rows pulled from child tablexml

<?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
titleTable join with output columns specified directlyxml

<?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
titleEntity 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
titleEntity 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
titleTable 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>

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.
The attributes that are returned come from the "childTableName" table or the table underlying the "childEntityId" entity (as specified by the spatial mapper associated with the child entity).

...