-- CarstenPriess - 19 Jul 2006

Inverse Distance Weighting Extension

This page is about the Inverse Distance Weighting Extension for the 52nWebProcessingService. Inverse distance weighting is a simple interpolation method. A neighborhood about the interpolated point is identified and a weighted average is taken of the observation values within this neighbourhood. The weights are a decreasing function of distance.

The process uses a lattice to define positions of the points that should be interpolated for. The lattice is defined by it's anchor, number of rows, number of columns, the resolution and optional it's orientation and the number of decimal places. It can be set using the Input-Parameters.

Installation and Configuration

Get the sources from the 52n incubator and copy them to the path of your running WPS installation.

  • host: incubator52n.de
  • repository path: /export/cvs/incubator52n
  • module: WPS-IDWExtension

Following the configuration manual at 52n Web Geoprocessing Service, you have to add the process' implementation (org.n52.wps.server.IDWAlgorithm in the comma-seperated list at the registeredProcesses property in the wps.properties file to enable this Extension. In addition the outputmodules also should be configured. See 52nWebGeoprocessingService-IDWExtension .

Howto use

Input-Parameters

Identifier Multiplicity and use Description Type Example
OBSERVATIONS one (mandatory) This parameter contains the process' input. An O&M ObservationCollection is the only supported datainput at the moment. An example can be found here: ObservationCollectionExample. The process ignores different TimeInstants; (if different times are provided, the process grabs the first time and computes only entrys with the same time). *ComplexValueReference: reference to xml-document containing the input *ComplexValue: xml containing the input
<Input>
<ows:Identifier>OBSERVATIONS</ows:Identifier>   
<ows:Title>input</ows:Title>   
<ComplexValueReference ows:reference="http://localhost:8080/wps/sos.xml" schema="http://www.opengeospatial.org/om.xsd"/>
</Input>
NumberofROWS one (mandatory) This parameter defines the number of rows the lattice should consist of. LiteralValue of type xs:int
<Input>
<ows:Identifier>NumberOfROWS</ows:Identifier>
   <ows:Title>Number of rows</ows:Title>
   <LiteralValue dataType="xs:int">
      10
   </LiteralValue>
</Input>
NumberofCOLS one (mandatory) This parameter defines the number of columns the lattice should consist of. LiteralValue of type xs:int
<Input>
<ows:Identifier>NumberOfCOLS</ows:Identifier>
   <ows:Title>Number of columns</ows:Title>
   <LiteralValue dataType="xs:int">
      10
   </LiteralValue>
</Input>
ANCHOR one (mandatory) This parameter sets the anchor of the lattice. The anchor is 0,0 of a cartesian coordinate system. That means 0,0 is bottom-left. gml:Point
<Input>
   <ows:Identifier>ANCHOR</ows:Identifier>
   <ows:Title>ANCHOR</ows:Title>
   <ComplexValue schema="http://www.opengeospatial.org/gml.xsd">
      <gml:Point srsName="EPSG:31467">
               <gml:coordinates>342539 573506</gml:coordinates>
           </gml:Point>
   </ComplexValue>
</Input>
Resolution one (mandatory) This parameter sets the resolution of the lattice. LiteralValue of type: xs:double with uom=meters
<Input>
   <ows:Identifier>Resolution</ows:Identifier>
   <ows:Title>Resolution</ows:Title>
        <LiteralValue dataType="xs:double" uom="meters">
           0.5
        </LiteralValue>
</Input>
Orientation one (optional) This parameter sets the orientation of the lattice. This value is used to rotate the lattice. At the moment the angle is given in rad, however, later this should be changed to deg LiteralValue of type: xs:double
<Input>
   <ows:Identifier>Orientation</ows:Identifier>
   <ows:Title>Orientation</ows:Title>
   <LiteralValue dataType="xs:double">
      0
   </LiteralValue>      
</Input>
DecimalPlaces one (optional) Defines the number of decimal places that should be used for the result's output. A value of -1 means full precision. LiteralValue of type: xs:int
<Input>
   <ows:Identifier>DecimalPlaces</ows:Identifier>
   <ows:Title>DecimalPlaces</ows:Title>
   <LiteralValue dataType="xs:int">
      2
   </LiteralValue>
</Input>

Example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Execute service="WPS" version="0.4.0" store="true" status="false" xmlns="http://www.opengeospatial.net/wps" xmlns:ows="http://www.opengeospatial.net/ows" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengeospatial.net/wps 
..\wpsExecute.xsd" xmlns:om="http://www.opengis.net/om" xmlns:gml="http://www.opengis.net/gml">
   <ows:Identifier>org.n52.wps.server.algorithm.IDWAlgorithm</ows:Identifier>
   <DataInputs>
      <Input>
         <ows:Identifier>OBSERVATIONS</ows:Identifier>
         <ows:Title>input</ows:Title>
         <ComplexValueReference ows:reference="http://localhost:8080/wps/Sample-LTERM.xml" schema="http://www.opengeospatial.org/om.xsd"/>
      </Input>
      <Input>
         <ows:Identifier>NumberOfROWS</ows:Identifier>
         <ows:Title>Number of rows</ows:Title>
         <LiteralValue dataType="xs:int">
            196
         </LiteralValue>
      </Input>
      <Input>
         <ows:Identifier>NumberOfCOLS</ows:Identifier>
         <ows:Title>Number of cols</ows:Title>
         <LiteralValue dataType="xs:int">
            175
         </LiteralValue>      
      </Input>
      <Input>
         <ows:Identifier>ANCHOR</ows:Identifier>
         <ows:Title>ANCHOR</ows:Title>
         <ComplexValue schema="http://www.opengeospatial.org/gml.xsd">
            <gml:Point srsName="EPSG:31467">
                  <gml:coordinates>2506670 5778925</gml:coordinates>
               </gml:Point>
         </ComplexValue>
      </Input>
      <Input>
         <ows:Identifier>Resolution</ows:Identifier>
         <ows:Title>Resolution</ows:Title>
         <LiteralValue dataType="xs:double" uom="meters">
            1000
         </LiteralValue>      
      </Input>
      <Input>
         <ows:Identifier>Orientation</ows:Identifier>
         <ows:Title>Orientation</ows:Title>
         <LiteralValue dataType="xs:double">
            0
         </LiteralValue>      
      </Input>
      <Input>
         <ows:Identifier>DecimalPlaces</ows:Identifier>
         <ows:Title>DecimalPlaces</ows:Title>
         <LiteralValue dataType="xs:int">
            2
         </LiteralValue>      
      </Input>
   </DataInputs>
   <OutputDefinitions>
      <Output>
         <ows:Identifier>RectifiedGridCoverage</ows:Identifier>
         <ows:Title>Test Output</ows:Title>
         <ows:Abstract>.</ows:Abstract>
      </Output>
   </OutputDefinitions>
</Execute>

Output

supportedOutputs

Topic revision: r5 - 28 Jan 2014, EikeJuerrens
Legal Notice | Privacy Statement


This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Wiki? Send feedback