Versions Compared

Key

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

...

A raster source is not a single “raster” but rather a table that contains multiple rasters layers, which individual raster layer(s) that are later used for calculations is determined by the calculation and my be based on thing like an overlap between the raster layer and some provided geometry, or a specific raster layer configured in the function.

source

Properties

Name

Type

Required

Description

id

string

yes

Unique identifier for this configuration

datasource

string

yes

The id of the datasource that contains the raster layer(s)

table

string

yes

The name of the raster layer table

column

string

yes

The name of the column withing the raster layer table that contains the raster

rasteridcolumn

string

no

The name of the column withing the raster layer table that contains the unique id of the raster. Default is “id”

crs

string

yes, unless srid is set

The Coordinate Reference System that the raster is using

srid

integer

yes, unless crs is set

The Spatial Reference ID that the raster is using

Sub-tags

None

Example

Define an Oracle raster source where the raster layers are stored in a GIS.FLOOD table

...

The two raster function have a number of required parameters, for example the id of the raster source that will be used to provide the data for the raster operation, by they can be supplemented with additional parameters, via the configuration, that can be used to determine which raster layers are used for the calculations. For example if you have multiple raster layers that cover the same area but represent different years and there is a column in the raster table that indicates which year the raster relates to they you can add a “year” parameter to the function configuration and then the caller of the function would need to provide the source geometry and the year value when calling the function, and Weave will then use the year parameter to find the matching raster(s) and only perform the calculation on those layers.

valuefunction

Properties

Name

Type

Required

Description

id

string

yes

Unique identifier for this configuration

name

string

no, uses id if not set

The name of the function that will be exposed, this is the name of the function that the caller will use when they want to execute this function

rasterid

string

no

If this function should always use a specific raster this is the id of the raster

Sub-tags

Name

Type

Cardinality

parameters

urn:com.cohga.weave.raster#1.0:parameters

0..n

summaryfunction

Properties

Name

Type

Required

Description

id

string

yes

Unique identifier for this configuration

name

string

no, uses id if not set

The name of the function that will be exposed, this is the name of the function that the caller will use when they want to execute this function

rasterid

string

no

If this function should always use a specific raster this is the id of the raster

bands

string

no

Which bands in the raster to perform the function on

geometryoverlap

“nothing”, “union” or “error”

no

What to do if the source geometry contains multiple polygons and there is an overlap between two or more polygons. Default is nothing.

nothing passes the geometry as is to the database

union generates a union of the geometry before passing it to the database

error throws an error if there are any overlaps

Sub-tags

Name

Type

Cardinality

parameters

urn:com.cohga.weave.raster#1.0:parameters

0..1

parameters

Properties

None

Sub-tags

Name

Type

Cardinality

parameter

urn:com.cohga.server.data.database#1.0:parameter

1..n

Note

The parameter tag has the same configuration as a data definition parameter, so it is linked to the existing documentation.

...

Create a raster value function that queries a specific raster layer

Code Block
breakoutModewide
languagexml
<config xmlns="urn:com.cohga.server.config#1.0" xmlns:raster="urn:com.cohga.weave.raster#1.0">

	<raster:valuefunction id="flood.value">
		<raster>flood.raster</raster>
		<rasterid>5</rasterid>
	</raster:valuefunction>

</config>

Create a raster value function that uses a year parameter to determine which raster to query

Code Block
breakoutModewide
languagexml
<config xmlns="urn:com.cohga.server.config#1.0" xmlns:raster="urn:com.cohga.weave.raster#1.0">

	<raster:valuefunction id="flood.value">
		<raster>flood.raster</raster>
		<parameters>
			<parameter name="year" column="YEAR" type="integer" required="true"/>
		<parameters>
	</raster:valuefunction>

</config>

Create a raster summary function that generates statistics for a specific raster layer and generates an error if any source geometries overlap

Code Block
breakoutModewide
languagexml
<config xmlns="urn:com.cohga.server.config#1.0" xmlns:raster="urn:com.cohga.weave.raster#1.0">

	<raster:summaryfunction id="flood.value">
		<raster>flood.raster</raster>
		<rasterid>5</rasterid>
		<geometryoverlap>error</geometryoverlap>
	</raster:summaryfunction>

</config>

...