Versions Compared

Key

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

...

Name

Type

Required

Description

entity

ref urn:com.cohga.server.entity#1.0:entity

yes

The identifier of the entity that this mapping applies to

spatialEngine

ref urn:com.cohga.server.spatial.geotools#1.0:spatialEngine

no

The identity of the spatial engine that this mapping applies to

table

string

yes

The name of the spatial item within the spatial engine that this mapping applies to

key

string

no

The attribute of the spatial item that uniquely identifies an entity

crs

string

no

Provide a Coordinate Reference System if the underlying spatial engine doesn't provide the correct information

filter

string

no

Provide a CQL formatted filter to apply when performing spatial operations with this mapping

dynamic

boolean

no

Should the key/fid transform be performed on each lookup

cache

boolean

no

Should dynamically looked up key/fid transforms be cached in memory

uniquebooleannoTells Weave that the key values will be unique, so that it doesn't have to check for itself. Weave can optimise the handling of spatial selections if the keys are unique, if you know the keys are unique you can set this to true and Weave will not need to pre-check for itself.

Sub-tags

Name

Type

Cardinality

Description

mapping

urn:com.cohga.server.spatial.mapper#1.0:mapping

0..n

If more that one underlying feature maps to the entity then multiple sub-mapping tags can be used to specify additional mappings

...

Code Block
xml
xml
titleBasic spatial mapping setup
linenumberstrue

<mapper:mapper id="mapper.main">
	<spatialEngine>spatialengine.arcsde</spatialEngine>
	<mapping>
		<entity>property</entity>
		<table>PROPERTY</table>
		<key>PID</key>
	</mapping>
	<mapping>
		<entity>roads</entity>
		<key>RD_NAME</key>
		<mapping>
			<table>MAJOR_ROADS</table>
		</mapping>
		<mapping>
			<table>MINOR_ROADS</table>
		</mapping>
	</mapping>
	<mapping>
		<entity>suburbs</entity>
		<table>SUBURBS</table>
		<key>LOC_NAME</key>
	</mapping>
	<mapping>
		<entity>council_buildings</entity>
		<table>BUILDINGS</table>
	</mapping>
	<mapping>
		<entity>drainage</entity>
		<spatialEngine>spatialengine.oracle</spatialEngine>
		<table>DRAINAGE</table>
	</mapping>
</mapper:mapper>
Code Block
xml
xml
titleSpatial mapping for dynamic data
linenumberstrue

<mapper:mapper id="mapper.edit">
	<spatialEngine>spatialengine.arcsde</spatialEngine>
	<mapping>
		<entity>grafitti</entity>
		<table>GRAFITTI</table>
		<key>PID</key>
		<dynamic/>
	</mapping>
</mapper:mapper>
Code Block
xml
xml
titleMapping with a filter
linenumberstrue

<mapper:mapper id="mapper.main">
	<spatialEngine>spatialengine.arcsde</spatialEngine>
	<mapping>
		<entity>property</entity>
		<table>PROPERTY</table>
		<key>PID</key>
		<filter><![CDATA[status = 'C']]></filter>
	</mapping>
</mapper:mapper>

...

Code Block
xml
xml
titleSimple filters
linenumberstrue

<filter>lga_code == 0</filter>

<filter><![CDATA[lga_code <> 0]]></filter>

<filter><![CDATA[planno = 'LP129263']]></filter>

<filter><![CDATA[planno LIKE 'LP%']]></filter>

<filter><![CDATA[planno NOT LIKE 'LP%']]></filter>

<filter>further_de IS NULL</filter>

<filter>further_de IS NOT NULL</filter>
Code Block
xml
xml
titleGeometry filters
linenumberstrue

<filter><![CDATA[CROSS(the_geom, LINESTRING(332312 5815856, 333688 5823904))]]></filter>

<filter><![CDATA[CROSS(the_geom, LINESTRING(332312 5815856, 333688 5823904)) OR CROSS(the_geom, LINESTRING(331312 5814856, 332688 5822904))]]></filter>

<filter><![CDATA[BBOX(the_geom, 332312,5815856,333688,5816856)]]></filter>

...

Code Block
xml
xml
titleGeometry filter, only works with units stored in the database
linenumberstrue

<filter><![CDATA[DWITHIN(the_geom, POINT(331899 5818553), 500, meters)]]></mapper:filter>
Code Block
xml
xml
titleGeometry filter, only works with units stored in the DB
linenumberstrue

<filter><![CDATA[BEYOND(the_geom, POINT(331899 5818553), 500, meters)]]></filter>
Code Block
xml
xml
titleGeometry filter with collection. Does not work in PostGis as it does not like geometry collections, not tested in other spatial engines
linenumberstrue

<filter><![CDATA[INTERSECT(the_geom, GEOMETRYCOLLECTION(LINESTRING(332312 5815856, 333688 5823904), LINESTRING(333312 5815856, 334688 5823904)))]]></filter>