Skip to main content
Skip table of contents

Geo Calculation

The adapter converts polylines or polygons, whose waypoints are defined in the formats GeoDecimal, GeoE5, GooglePoint, GoogleLine, PtvLine or PtvPoint into the formats GeoDecimal, GeoE5, GooglePoint or GoogleLine, it calculates the line (route) length and edge length of polygones, (edge) intersections between polylines/polygons for calcutions of territory boundaries, and it calculates bounding boxes for one or multiple polygons/polylines.

For a line that intersects a polygon, the line segments inside and outside of the polygon can be calculated, e. g. to differentiate between trips inside and outside of a territory. In addition, polylines or polygons can be simplified in order to remove some waypoints that are not necessary for a map view.

Limitations

When calculating polygons that span more than an earth hemisphere (more than 180°), unexpected results may occur. Line segments cannot span more than 170°. If you need to perform such operations, contact the SoftProject support via support@softproject.de.

Properties

Operation

Defines the operation executed by the adapter

Possible values:

  • LineConversion: Convert polylines or polygons, whose waypoints are defined in the formats GeoDecimal, GeoE5, GooglePoint, GoogleLine, PtvLine or PtvPoint into the formats GeoDecimal, GeoE5, GooglePoint or GoogleLine

  • LineLength: Calculate the line (route) length and edge length of polygones in kilometers

  • LineIntersection: Calculate the (edge) intersections between polygons or polylines

  • BoundingBox: Calculate a bounding box (smallest possible rectangle according to the mercator cylinder projection in the plane) for polygons or polylines, and output each with the latitude/longitude of the corners

  • SegmentLineByPolygon: Calculate the line segments inside and outside of a polygon for a line that is intersected by a polyline

  • LineSimplificationPercent: Simplify polylines/polygons proportionally to the total route in order to remove waypoints not necessary for a map view

  • LineSimplificationKilometer: Simplify polylines/polygons in order to remove waypoints that are not necessary for a map view

Parameters

Adapter

Main adapter class (do not change!)

Possible values: de.softproject.integration.adapter. geo.calc.GeoCalculationsAdapter: Main class (Default)

outputFormat

The calculated geodata output format

Possible values:

  • GeoDecimal: Geodecimally-encoded coordinates with latitude/longitude (e.g. 48.952/8.391)

  • GeoE5: Geo E5-encoded coordinates with latitude/longitude (e.g 4895176/839096)

  • GooglePointGooglePoint-encoded coordinates (e.g. o{wiHozer@)

  • GoogleLineGoogleLine-encoded polyline consisting of GooglePoint waypoints (e.g. o{wiHozer@or@ow@_yF?)

percent

Only for operation LineSimplificationPercent: width of a corridor that is defined relatively to the total route length in percent divided by 100. Within this corridor, the polyline/polygon will be simplified.

Possible values:

  • Any number between 0 and 1 with a dot as decimal separator (e.g. 0.5)

  • 0.01: Remove all additional waypoints within a corridor that has a width equaling 1 percent (default)

kilometer

Only for operation LineSimplificationKilometer: width of a corridor in kilometers. Within this corridor, the polyline/polygon will be simplified.

Possible values:

  • Any positive integer number or 0 with a dot as decimal separator (e.g. 0.5)

  • 0.01: Remove all additional waypoints within a corridor that has a width of 10 meters (default)

Status values

1 (successful)

The adapter operation has been executed successfully

0 (empty)

For operation LineIntersection: the number of polylines is not 2;
For operation SegmentLineByPolygon: the input does not contains any element Polygon, Polyline or both elements are missing, or an geometrical error has occurred (polygon with less than tree points, polyline with less than tow points)

-1 (failed)

The adapter input is no well-formed XML document

Input

This adapter expects consistently specified geodata for points and lines within the input XML document. Geodecimally-encoded coordinates must be specified as follows:


HTML/XML
<GeoDecimal>
   <Latitude><!--Latitude with the format NN.NNNNN--></Latitude>
   <Longitude><!--Longitute with the format EE.EEEEE--></Longitude>
</GeoDecimal>

Geo E5-encoded coordinates must be specified as integer values (geodecimally-encoded coordinate value multiplied by 100.000):

HTML/XML
<GeoE5>
   <Latitude><!--Latitude with the format NNNNNNN--></Latitude>
   <Longitude><!--Longitute with the format EEEEEEE--></Longitude>
</GeoE5>

Google Point-encoded coordinates must be specified as follows:

HTML/XML
<GooglePoint><!--GooglePoint code--></GooglePoint>

Google Line-encoded polylines must be specified as follows:

HTML/XML
<GoogleLine><!--GoogleLine code--></GoogleLine>

PTV Point-encoded coordinates (in PTV Mercator projection) must be specified as follow:

HTML/XML
<PtvPoint>
   <X><!--Easting as number with optional comma separator--></X>
   <Y><!--Northing as number with optional comma separator--></Y>
</PtvPoint>

PTV Line-encoded polylines (in PTV Mercator projection) must be specified as follows. 1–n value pairs consisting of easting and northing are concatenated so that an even number of values is deposited. Each value must be separated by a comma.


HTML/XML
<PtvLine><!--Easting1,Northing1,Easting..,Northing...--></PtvLine>
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.