Developer's Guide > API Documentation > API Documentation PTV xDima > XDima

Component xdima

Diagrams

XDima

Exceptions

Operations

createDima

Creates a new Dima with the specified profile, no locations and an empty distance table.
The key input parameters are the Dima-ID (that must not yet exist) and the settings for the distance calculation for generating the profile object in the Dima- tuple.
Parameter Name Type Description
dimaID int The unique key to identify the new Dima (> 0).
dimaProfile DimaProfile Settings for distance calculations.
Return Type Description
Void Dummy value.
XDimaException Thrown if an xDima server exception such as an invalid request parameter occurs.
XServiceException Thrown if a PTV xServer framework exception occurs.

deleteDima

Deletes an entire Dima, that means the tuple containing the profile, locations and the distance table.
Parameter Name Type Description
dimaID int The unique key to identify the existing Dima (> 0).
Return Type Description
Void Dummy value.
XDimaException Thrown if an xDima server exception such as an invalid request parameter occurs.
XServiceException Thrown if a PTV xServer framework exception occurs.

calculateDistanceTable

Calculates the distance table for the passed locations using the profile of the related Dima.
The desired Dima is specified by the Dima-ID, which must refer to an existing Dima.
Parameter Name Type Description
dimaID int The unique key to identify the existing Dima (> 0).
locations Location[] The list of locations.
Return Type Description
Void Dummy value.
XDimaException Thrown if an xDima server exception such as an invalid request parameter occurs.
XServiceException Thrown if a PTV xServer framework exception occurs.

startCalculateDistanceTable

This is the asynchronous version of calculateDistanceTable. Calling this method will not block until the result has been calculated. Instead of a result object a Job object is returned which identifies the started calculation. To get status updates on a running job use the method watchJob and check the attribute status of type JobStatus. If it turns to SUCCEEDED, the calculation was successful and the result can be obtained using fetchVoid. If the job ended with status FAILED, fetchVoid throws the exception that occured during calculation.
Parameter Name Type Description
dimaID int The unique key to identify the existing Dima (> 0).
locations Location[] The list of locations.
Return Type Description
Job The Job reference.
XDimaException Thrown if an xDima server exception such as an invalid request parameter occurs.
XServiceException Thrown if a PTV xServer framework exception occurs.

fetchVoid

Fetches results of type Void for the given job id. If the calculation ended with an exception fetchVoid will rethrow it. If the id of the job is unknown a SystemException with message 'unknown id' is thrown.
Parameter Name Type Description
id String The id of the job.
Return Type Description
Void Dummy value.
XDimaException Thrown if an xDima server exception such as an invalid request parameter occurs.
XServiceException Thrown if a PTV xServer framework exception occurs.

deleteDistanceTable

Deletes the distance table of the specified Dima.
Parameter Name Type Description
dimaID int The unique key to identify the existing Dima (> 0).
Return Type Description
Void Dummy value.
XDimaException Thrown if an xDima server exception such as an invalid request parameter occurs.
XServiceException Thrown if a PTV xServer framework exception occurs.

cancelCalculation

Deprecated. Stops the calculation process of the distance table for the specified Dima. Please refer to the technical manual for more information on jobs.
Parameter Name Type Description
dimaID int The unique key to identify the existing Dima (> 0).
Return Type Description
Void Dummy value.
XDimaException Thrown if an xDima server exception such as an invalid request parameter occurs.
XServiceException Thrown if a PTV xServer framework exception occurs.

getCalculationProgress

Deprecated. Returns the current calculation progress of a Dima. Please refer to the technical manual for more information on jobs.
Parameter Name Type Description
dimaID int The unique key to identify the existing Dima (> 0).
Return Type Description
CalculationProgress Current calculation progress of the specified Dima.
XDimaException Thrown if an xDima server exception such as an invalid request parameter occurs.
XServiceException Thrown if a PTV xServer framework exception occurs.

getDimaProfile

If no Dima-ID (=0) is used, all profiles with their dedicated Dima-IDs for the existing Dimas under responsibility of this xDima-server are returned.
Otherwise the profile for one specific Dima is returned in the response.
Parameter Name Type Description
dimaID int The unique key to identify the existing Dima (> 0) or no key (= 0) for all Dima profiles.
Return Type Description
DimaProfileInfo[] Dima profile of all or one specific Dima.
XDimaException Thrown if an xDima server exception such as an invalid request parameter occurs.
XServiceException Thrown if a PTV xServer framework exception occurs.

getLocations

Returns a list with all locations in the belonging Dima.

Parameter Name Type Description
dimaID int The unique key to identify the existing Dima (> 0).
Return Type Description
Location[] The list of locations.
XDimaException Thrown if an xDima server exception such as an invalid request parameter occurs.
XServiceException Thrown if a PTV xServer framework exception occurs.

getDistPeriod

Returns the distances [in meter] and driving periods [in seconds] between the passed location pairs (start-location, destination-location) on the basis of the referenced Dima.
Three different modes for generating the return values are supported:
Parameter Name Type Description
dimaID int The unique key to identify the existing Dima (> 0).
mode DistPeriodMode Mode for generating the return values: ROAD (distances from the distance table), GEOMETRIC (geometric distances), REFPOINT (distances calculated via reference points)
relations Relation[] The list of location pairs.
Return Type Description
RelationValueResult[] The list of distances [in meter] and driving periods [in seconds] between the passed location pairs.
XDimaException Thrown if an xDima server exception such as an invalid request parameter occurs.
XServiceException Thrown if a PTV xServer framework exception occurs.

setDistPeriod

Sets the stated distances [in meter] and driving periods [in seconds] for the location pairs (start-location, destination-location) in the distance table of the specified Dima.
If there are already existing optional entries in the distance table, they will be overwritten.

Parameter Name Type Description
dimaID int The unique key to identify the existing Dima (> 0).
relationValues RelationValue[] The list of distances [in meter] and driving periods [in seconds] for the location pairs.
Return Type Description
Void Dummy value.
XDimaException Thrown if an xDima server exception such as an invalid request parameter occurs.
XServiceException Thrown if a PTV xServer framework exception occurs.

importDima

Generates a new Dima from specified import files. The import files contain the locations, the distances and driving periods for creating the distance table of the Dima. A profile file generated by exportDima can be used as import profile. It has to be located in the import folder and has to be named <locationFileName>.ini. If no import profile file is found, an appropriate profile object is generated by xDima-server itself with the defaults described in DimaProfile.
Parameter Name Type Description
dimaID int The unique key to identify the new Dima (> 0).
fileType FileType The file type of the import files: BINARY_LITTLE_ENDIAN (binary file in little endian byte order), BINARY_BIG_ENDIAN (binary file in big endian byte order), TEXT_ASCII (text file in ASCII format).
locationFileName String The name of the location file. Relative to the specified Dima import path (xdima.properties).
distancetableFileName String The name of the distance table file. Relative to the specified Dima import path (xdima.properties).
Return Type Description
Void Dummy value.
XDimaException Thrown if an xDima server exception such as an invalid request parameter occurs.
XServiceException Thrown if a PTV xServer framework exception occurs.

exportDima

Generates export files containing the locations and the distance table of the specified Dima.
The same file formats as in the import-function are used.
An export profile file is generated automatically into the export folder and can be used for import. The name pattern of the export profile file is <locationFileName>.ini.
Parameter Name Type Description
dimaID int The unique key to identify the existing Dima (> 0).
fileType FileType The file type of the export files: BINARY_LITTLE_ENDIAN (binary file in little endian byte order), BINARY_BIG_ENDIAN (binary file in big endian byte order), TEXT_ASCII (text file in ASCII format).
locationFileName String The name of the location file. Relative to the specified Dima export path (xdima.properties).
distancetableFileName String The name of the distance table file. Relative to the specified Dima export path (xdima.properties).
Return Type Description
Void Dummy value.
XDimaException Thrown if an xDima server exception such as an invalid request parameter occurs.
XServiceException Thrown if a PTV xServer framework exception occurs.

unlockDima

Deprecated: Due to improved locking mechanisms, unlocking a distance matrix using this method is not necessary, amymore. This method performs no operation.
Parameter Name Type Description
dimaID int The unique key to identify the existing Dima (> 0).
Return Type Description
Void Dummy value.
XDimaException Thrown if an xDima server exception such as an invalid request parameter occurs.
XServiceException Thrown if a PTV xServer framework exception occurs.

watchJob

Returns status information on jobs.
Parameter Name Type Description
id String The id of the job.
watchOptions WatchOptions The options to control job status and progress updates.
Return Type Description
Job The job reference.
SystemException Thrown if job management is not available, for example if it is misconfigured.

stopJob

Attempts to stop a running job. If the status of the job turns to SUCCEEDED, preliminary results can be fetched, if available.
Parameter Name Type Description
id String The id of the job to be stopped.
Return Type Description
Job The job reference.
SystemException Thrown if a preliminary result cannot be provided or job management in general is not available, for example if it is misconfigured.

deleteJob

Attempts to delete a running job. If successful the returned job will have state DELETED.
Parameter Name Type Description
id String The id of the job to be deleteed.
Return Type Description
Job The job reference.
SystemException Thrown if job management is not available, for example if it is misconfigured.

Classes

CalculationProgress

State of the calculation progress of a Dima.

Attribute Name Type Description
active boolean

If true, the distance table calculation of the Dima is in progress.

action CalculationAction

Currently performed distance table calculation action.

progressValue short

Progress value [per mille] of the currently performed distance table calculation.

userAborted boolean

If true, the user has aborted the progress.

CountryInfo

The list of countries to use exclusively or ban in route calculation

Attribute Name Type Description
exclude boolean

If true, the specified countries are used exclusively. Ohterwise the specified countries are banned in route calculation.

countryCodes short[]

The list of country codes to use exclusively or ban in route calculation.

DimaProfile

The parameter for route calculation and administration of the Dima.
Attribute Name Type Description
description String A text providing a short description.
vehicleType VehicleType Constraints are considered in route calculations (for example road blockings for the chosen vehicle type).
dimaCoordFormat DimaCoordFormat

The coordinate format of the Dima's locations.

All locations must have the specified coordinate format to access the Dima.

maxLocationCount Short

The maximum number of locations which may be contained in the distance table.

The default value is 18918, but this value can be much greater and depends on the available memory. As a rule of thumb the greatest value equals sqrt(memory in bytes / 6).

If the maximum number of locations is exceeded by extending the Dima, the location which has not been used for the longest amount of time for extensions will be removed from the Dima for each supernumerary new location.

linkType LinkType

The type of linking the locations to the road network.

routingType RoutingType

Decides if the distance table is calculated via single (1:1) or multi routings (1:n).

speedTable String

Specified as a string of 16 comma separated values.

These 8 pairs of speeds [in kilometers per hour] represent a speed range (fastest, slowest) for each network road class.

The network road classes are specified as follows:

1. motorway

2. highway

3. trunk roads

4. country roads

5. city streets

6. residential streets

7. drivable but normally blocked roads

8. cycle lanes and walkways

optimization short

Weights the routing calculation between distance and time, whereby 0 calculates the shortest and 100 calculates the fastest route.

highwayMalus Short

Malus for highways in route calculation.

The malus has to be described by a value which will be interpreted as a percentage value.

  • 0: No effect on the objective function
  • <0: The resulting cost-value for each highway segment will be decreased by the denoted percentage value
  • >0: The resulting cost-value for each highway segment will be increased by the denoted percentage value
  • >2500: Highways are banned

The default value might not be 0, so omit this value in order to leave it unchanged.

sideRoadMalus Short

Malus for side roads in route calculation.

The malus has to be described by a value which will be interpreted as a percentage value.

  • 0: No effect on the objective function
  • <0: The resulting cost-value for each side road segment will be decreased by the denoted percentage value
  • >0: The resulting cost-value for each side road segment will be increased by the denoted percentage value
  • >2500: Side roads are banned

The default value might not be 0, so omit this value in order to leave it unchanged.

ferryMalus Short

Malus for ferries in route calculation.

The malus has to be described by a value which will be interpreted as a percentage value.

  • 0: No effect on the objective function
  • <0: The resulting cost-value for each ferry segment will be decreased by the denoted percentage value
  • >0: The resulting cost-value for each ferry segment will be increased by the denoted percentage value
  • >2500: Ferries are banned

The default value might not be 0, so omit this value in order to leave it unchanged.

urbanAreaMalus Short

Malus for urban areas in route calculation.

The malus has to be described by a value which will be interpreted as a percentage value.

  • 0: No effect on the objective function
  • <0: The resulting cost-value for each urban area segment will be decreased by the denoted percentage value
  • >0: The resulting cost-value for each urban area segment will be increased by the denoted percentage value
  • >2500: Urban areas are banned

The default value might not be 0, so omit this value in order to leave it unchanged.

residentsOnlyMalus Short

Malus for residents only roads in route calculation.

The malus has to be described by a value which will be interpreted as a percentage value.

  • 0: No effect on the objective function
  • <0: The resulting cost-value for each residents only road segment will be decreased by the denoted percentage value
  • >0: The resulting cost-value for each residents only road segment will be increased by the denoted percentage value
  • >2500: Residents only roads are banned

The default value might not be 0, so omit this value in order to leave it unchanged.

rampMalus Short

Malus for ramps in route calculation.

The malus has to be described by a value which will be interpreted as a percentage value.

  • 0: No effect on the objective function
  • <0: The resulting cost-value for each ramp segment will be decreased by the denoted percentage value
  • >0: The resulting cost-value for each ramp segment will be increased by the denoted percentage value
  • >2500: Ramps are banned

The default value might not be 0, so omit this value in order to leave it unchanged.

tollRoadMalus Short

Malus for toll roads in route calculation.

The malus has to be described by a value which will be interpreted as a percentage value.

  • 0: No effect on the objective function
  • <0: The resulting cost-value for each toll road segment will be decreased by the denoted percentage value
  • >0: The resulting cost-value for each toll road segment will be increased by the denoted percentage value
  • >2500: Toll roads are banned

The default value might not be 0, so omit this value in order to leave it unchanged.

vignetteRoadMalus Short

Malus for vignette roads in route calculation.

The malus has to be described by a value which will be interpreted as a percentage value.

  • 0: No effect on the objective function
  • <0: The resulting cost-value for each vignette road segment will be decreased by the denoted percentage value
  • >0: The resulting cost-value for each vignette road segment will be increased by the denoted percentage value
  • >2500: Vignette roads are banned

The default value might not be 0, so omit this value in order to leave it unchanged.

countryInfo CountryInfo

The list of countries to use exclusively or ban in route calculation

referenceTime Calendar

Reference time for time-dependent feature layers. Each route in the distance matrix contains this time as start time.

DimaProfileInfo

Information about the Dima and its profile

Attribute Name Type Description
dimaID int

The unique key to identify the Dima.

dimaProfile DimaProfile

The parameter for route calculation and administration of the Dima.

DistPeriod

Distance [in meter] and driving period [in seconds] between two locations.

Attribute Name Type Description
dist int

Distance [in meter] between two locations.

period int

Driving period [in seconds] between two locations.

Location

A geographical point specified by X and Y coordinate.

Attribute Name Type Description
x int

The X coordinate of the location.

y int

The Y coordinate of the location.

Relation

The definition of a relation between a start-location and a destination-location.

Attribute Name Type Description
startLocation Location

Start-location of the relation.

destinationLocation Location

Destination-location of the relation.

RelationValue

Aggregation of a relation an it's distance and driving period.

Attribute Name Type Description
relation Relation

Start-location and destination-location.

distPeriod DistPeriod

Distance and driving period between the start-location and the destination-location.

RelationValueResult

Extends RelationValue

Extends the class RelationValue with the status of the DistPeriod attribute.

Attribute Name Type Description
status DistPeriodStatus

Status of a DistPeriod object.

Possible values are:

  • OK: Distance and driving period for the associated relation is calculated.
  • WAYNOTFOUND: The route between the locations of the associated relation could not been found.
  • WAYNOTCALCULATED: Distance and driving period for the associated relation is not calculated yet.
  • INVALIDSTARTLOCATION: The Dima doesn't contain the start-location of the relation.
  • INVALIDDESTINATIONLOCATION: The Dima doesn't contain the destination-location of the relation.

Void

Dummy value.

No attributes defined.

Enumerations

CalculationAction

Distance table calculation action.

Enumerator Name Value Description
LINKLOCATIONS 0

Linking locations to the road network.

ROUTING 1

Route calculations.

DimaCoordFormat

The coordinate format of the Dima's locations.

All locations must have the specified coordinate format to access the Dima.

Enumerator Name Value Description
MERCATOR 0

Mercator.

GEODECIMAL 1

Geodecimal (WGS84).

Example: 8° 15' 30" corresponds to 825833

SUPERCONFORM 2

Super conform.

GEOMINSEC 3

Degrees, minutes and seconds (WGS84).

Example: 8° 15' 30" corresponds to 815300

GAUSSKRUEGER 4

Gauss Krueger

UTM 5

UTM.

CONFORM 6

Conform.

SMARTUNITS 7

Smart units.

DistPeriodMode

Mode for getting distances and driving periods.

Enumerator Name Value Description
ROAD 0

Distances and driving periods from the distance table of the Dima.

GEOMETRIC 1

Geometric distances (without driving periods).

REFPOINT 2

Distances and driving periods are calculated via reference points, that means the xDima searches the nearest neighbor location in the distance table of the Dima for each denoted location and calculates approximated distances.

DistPeriodStatus

Status of a DistPeriod object.

Enumerator Name Value Description
OK 0

Distance and driving period for the associated relation is calculated.

WAYNOTFOUND 1

The route between the locations of the associated relation could not been found.

WAYNOTCALCULATED 2

Distance and driving period for the associated relation is not calculated yet.

INVALIDSTARTLOCATION 3

The Dima does not contain the start-location of the relation.

INVALIDDESTINATIONLOCATION 4

The Dima does not contain the destination-location of the relation.

ErrorCode

Error codes of the xDima.
Enumerator Name Value Description
LICENSE_ERROR 10000

License is not valid or has expired.

PROFILESETTINGS_ERROR 10001

Invalid profile settings.

MODULE_ERROR 10002

General error code of the xdima module.

ENGINE_ERROR 10003

General error code of the xdima's calculation and administration engine.

REQUIREDPARAMETER_ERROR 10004

A required input parameter is missing.

INVALIDPARAMETER_ERROR 10005

Invalid input parameter.

FileType

The file type of the input files and export files.

Enumerator Name Value Description
BINARY_LITTLE_ENDIAN 0

Binary files in little endian byte order..

BINARY_BIG_ENDIAN 1

Binary files in little endian byte order.

TEXT_ASCII 2

Text files in ASCII format.

LinkType

Type of linking the locations to the road network.

Enumerator Name Value Description
LTSEGMENT 0

The location has to be linked to the geographically nearest valid segment.

LTNODE 1

The location has to be linked to the geographically nearest valid node.

LTMAINNODE 2

The location has to be linked to the geographically nearest valid main node

RoutingType

Decides if the distance table is calculated via single (1:1) or multi routings (1:n).

Enumerator Name Value Description
RT1TON 0

The distance table is calculated via multi (1:n) routings.

RT1TO1 1

The distance table is calculated via single (1:1) routings.

VehicleType

Type of vehicle for the route calculation.

Enumerator Name Value Description
VTCAR 0

Car.

VTTRUCK 1

Truck.

Exceptions

XDimaException

Exception thrown on module specific problems such as wrong parameters or engine errors.

Component common

Diagrams

basetypes

opengis-geometry

Exceptions

Asynchronous Requests

Classes

BoundingBox

A bounding box, definded by its left top corner point and right bottom corner point.
Attribute Name Type Description
leftTop Point

The left top corner point.

rightBottom Point

The right bottom corner point.

BulkProgress

Extends JobProgress

Default implementation for bulk jobs.
Attribute Name Type Description
remaining int

Specifies how many requests have still to be calculated.

successful int

The number of successful calculations so far.

failed int

The number of failed computations so far.

ClusterProgress

Extends JobProgress

Implementation of JobProgress for cluster planning.
Attribute Name Type Description
action String

The current action being executed. For more information on progress see About Asynchronous Protocol.

distanceMatrixProgress DistanceMatrixProgress

The progress of the distance matrix calculation, available only if action equals "DistanceMatrix.Calculation".

optimizationProgress OptimizationProgress

The progress of the optimization, available only if action starts with "Optimization.".

DistanceMatrixCalculationProgress

Progress information of the currently active distance matrix calculation
Attribute Name Type Description
dimaId int

The unique key to identify the distance matrix currently being calculated.

currentDimaIndex int

The 1-based index of the distance matrix currently being calculated. Depending on the number of different vehicles in the request the number of distance matrices to be calculated can be greater than

lastDimaIndex int

The index of the last distance matrix to be calculated, that is the total number of distance matrices.

currentDistanceMatrixProgress DistanceMatrixProgress

The progress of the distance matrix currently being processed, available only if action equals "DistanceMatrix.Calculation".

DistanceMatrixProgress

Extends JobProgress

Default implementation for distance matrix calculation jobs.
Attribute Name Type Description
currentRowIndex int

The 1-based index of the current row of the current distance matrix being calculated.

lastRowIndex int

The index of the last row of the current distance matrix to be calculated.

EncodedGeometry

Extends EncodedGeometryBase

The abstract base class for geometry objects used in a geographical PTV xServer. Contains the attributes to represent openGIS conform encodings with a specific coordinate format. The actual representation is defined by the CallerContext ResponseGeometry property (GeometryEncoding) and the CallerContext CoordFormat property (CoordFormat).

Attribute Name Type Description
wkb byte[]

If not null, this attribute contains the well-known binary encoded form of the geometry

wkt String

If not null, this attribute contains the well-known text encoded form of the geometry

kml KML

If not null, this attribute contains the well-known text encoded form of the geometry

EncodedGeometryBase

The abstract base class for geometry objects.
No attributes defined.

GeometryCollection

Extends EncodedGeometry

A geometry collection as specified by the openGIS standard.
Attribute Name Type Description
geometryCollection PlainGeometryCollection

If not null, this attribute contains the explicit form of the geometry

ImprovementProgress

Progress information of the currently active improvement step of the optimization.
Attribute Name Type Description
availableMachineTime int

The available machine time stated in the request in [s]. This value is 0 if available machine time is not set in the request.

usedMachineTime int

The machine time already used in [s].

iterationIndex int

The index of this iteration. Index 0 denotes the initial plan directly after construction or the input plan.

numberOfImprovements int

The number of improvements the algorithm has already achieved. In other words, this is the number of tour plans with a smaller value of costOfObjectiveFunction than the best one at that time.

currentPlan KeyFigures

The key figures characterizing the current tour plan.

bestPlan KeyFigures

The key figures characterizing the currently best tour plan.

initialPlan KeyFigures

The key figures characterizing the initial tour plan. The initial tour plan is the input plan, if available, or the first tour plan after the construction step.

Job

Reference to jobs running in the background.
Attribute Name Type Description
id String

This id references the background job on the server.

status JobStatus

The current status of the job.

progress JobProgress

The current progress of the job. Can be null at the very beginning or very end of the request execution.

elapsedTime int

Elapsed time since this job has been queued.

JobProgress

Abstract base class for progresses. An individual PTV xServer might define its own implementations.
No attributes defined.

KML

Represents a KML geometry.
Attribute Name Type Description
kml String

The KML string itself.

placemarks String[]

The placemarks of the KML. If empty, all placemarks will be used. This will result in a GeometryCollection, if more than one exists.

KeyFigures

These key figures characterize a tour plan.
Attribute Name Type Description
costOfObjectiveFunction int

The optimization aims at minimizing the objective function. This value contains its arithmetical cost.

The significance of this value is not the value itself, but rather if and how fast it decreases during the calculation. The faster the value decreases the better the tour plans become according to the GoalImportance which defines what "better" means, at all.

numberOfScheduledOrders int

The number of orders already being scheduled.

numberOfUnscheduledOrders int

The number of orders not being scheduled, yet. These orders are feasible and can be scheduled during further improvement iterations.

numberOfInfeasibleOrders int

The number of orders not being scheduled. These orders are infeasible and will not be scheduled during further improvement iterations.

numberOfScheduledVehicles int

The number of vehicles being scheduled.

totalTourCount int

The number of all planned tours.

totalTourPeriod int

The sum of the tour periods for all planned tours ([sec]).

totalTourDrivingPeriod int

The sum of the tour driving periods for all planned tours ([sec]).

totalTourWaitingPeriod int

The sum of the tour waiting periods for all planned tours ([sec]).

totalTourDistance int

The sum of the tour distances for all planned tours ([m]).

totalTourCost int

The sum of the tour costs for all planned tours ([MU]). The costs per chain will not be included, see attribute totalChainCosts.

totalChainCost int

The sum of the costs per chain of all planned chains ([MU]). See VehicleCosts.

totalChainPeriod int

The sum of the chain periods of all planned chains ([sec]). The chain period is defined as the period between the start of the first tour and the end of the last tour. This period is greater than the sum of the periods of all tours if two subsequent tours do not start right after the other.

LineString

Extends EncodedGeometry

A line string as specified by the openGIS standard.

See EncodedGeometry for possible representations.

Attribute Name Type Description
lineString PlainLineString

If not null, this attribute contains the explicit form of the geometry.

ATTENTION: Filled with requested EncodedGeometry representation (not necessarily a plain geometry).

LinearRing

Extends EncodedGeometry

A linear ring as specified by the openGIS standard.

See EncodedGeometry for possible representations.

Attribute Name Type Description
linearRing PlainLinearRing

If not null, this attribute contains the explicit form of the geometry.

ATTENTION: Filled with requested EncodedGeometry representation (not necessarily a plain geometry).

MultiLineString

Extends EncodedGeometry

A multi line string as specified by the openGIS standard.

See EncodedGeometry for possible representations.

Attribute Name Type Description
multiLineString PlainMultiLineString

If not null, this attribute contains the explicit form of the geometry.

ATTENTION: Filled with requested EncodedGeometry representation (not necessarily a plain geometry).

MultiPoint

Extends EncodedGeometry

A multi point as specified by the openGIS standard.

See EncodedGeometry for possible representations.

Attribute Name Type Description
multiPoint PlainMultiPoint

If not null, this attribute contains the explicit form of the geometry.

ATTENTION: Filled with requested EncodedGeometry representation (not necessarily a plain geometry).

MultiPolygon

Extends EncodedGeometry

A multi polygon as specified by the openGIS standard.

See EncodedGeometry for possible representations.

Attribute Name Type Description
multiPolygon PlainMultiPolygon

If not null, this attribute contains the explicit form of the geometry.

ATTENTION: Filled with requested EncodedGeometry representation (not necessarily a plain geometry).

OptimizationProgress

The progress information of the currently active step of the optimization.
Attribute Name Type Description
currentLoopIndex int

The index of the current loop being calculated.

lastLoopIndex int

The index of the last loop being calculated. The calculation will automatically be finished by the algorithm before reaching this index when no improvement could be reached, anymore. The total number of loops can be set for the improvement step, only (see Params).

progress int

The progress in % of the current loop being calculated.

PlainGeometryBase

The abstract base class for the structured representation of geometry objects.
No attributes defined.

PlainGeometryCollection

Extends PlainGeometryBase

A plain structured polygon consisting of a set geometries.
Attribute Name Type Description
geometries PlainGeometryBase[]

The set of geometries making up the geometry collection.

PlainLineString

Extends PlainGeometryBase

A plain structured line string consisting of a set of points.

Attribute Name Type Description
points PlainPoint[]

The set of points defining the line string.

PlainLinearRing

Extends PlainGeometryBase

A plain structured linear ring consisting of a set of points

Attribute Name Type Description
points PlainPoint[]

The set of points defining the linear ring.

PlainMultiLineString

Extends PlainGeometryBase

A plain structured polygon consisting of a set of line strings.
Attribute Name Type Description
lineStrings PlainLineString[]

The set of line strings making up the multi line string.

PlainMultiPoint

Extends PlainGeometryBase

A plain structured polygon consisting of a set of points.
Attribute Name Type Description
points PlainPoint[]

The set of points making up the multi point.

PlainMultiPolygon

Extends PlainGeometryBase

A plain structured polygon consisting of a set of polygons.
Attribute Name Type Description
polygons PlainPolygon[]

The set of polygons making up the multi polygon.

PlainPoint

Extends PlainGeometryBase

A plain structured point consisting of two floating point attributes for the coordinates. In contrast to Point it is never transformed.

Attribute Name Type Description
x double

The x coordinate

y double

The y coordinate

z Double

The z coordinate (optional, only if requested)

PlainPolygon

Extends PlainGeometryBase

A plain structured polygon consisting of a set of linear rings.

Attribute Name Type Description
linearRings PlainLinearRing[]

The set of linear rings making up the polygon.

PlanProgress

Extends JobProgress

Implementation of JobProgress for tour planning.
Attribute Name Type Description
action String

The current action being executed. For more information on progress information see About Asynchronous Protocol.

distanceMatrixCalculationProgress DistanceMatrixCalculationProgress

The progress of the distance matrix calculation, available only if action starts with "DistanceMatrix.".

improvementProgress ImprovementProgress

The progress of the improvement step during the tour plan optimization, available only if action equals "Optimization.Improvement".

Point

Extends EncodedGeometry

Represents a single coordinate (point). Do not use this type for other points (e.g. pixel in an image), the coordinates are automatically transformed. Instead use PlainPoint.

See EncodedGeometry for possible representations.

Attribute Name Type Description
point PlainPoint

If not null, this attribute contains the explicit form of the geometry.

ATTENTION: Filled with requested EncodedGeometry representation (not necessarily a plain geometry).

Polygon

Extends EncodedGeometry

A polygon as specified by the openGIS standard.

See EncodedGeometry for possible representations.

Attribute Name Type Description
polygon PlainPolygon

If not null, this attribute contains the explicit form of the geometry.

ATTENTION: Filled with requested EncodedGeometry representation (not necessarily a plain geometry).

RequestOptions

General options for requests

Attribute Name Type Description
coordFormat CoordFormat

The coordinate format used in the request/response.

responseGeometry GeometryEncoding[]

The geometry encoding for the response.

profile String

The name of the parameter profile to be used.

profileXMLSnippet String

For internal use only.

srId String

If the coordFormat equals to 'OG_SRID', this attribute contains the Spatial Reference Identifier as specified by the Open Geospatial Consortium (OGC), otherwise it is null. All codes of the EPSG Geodetic Parameter Dataset V7.9 maintained by the EPSG.

TerritoryProgress

Extends JobProgress

Implementation of JobProgress for territory planning.

Attribute Name Type Description
action String

The current action being executed. For more information on progress with territory planning see the use case documentation.

distanceMatrixProgress DistanceMatrixProgress

The progress of the distance matrix calculation, available only if action equals "DistanceMatrix.Calculation".

optimizationProgress int

The progress of the optimization, available only if action starts with "TerritoryOptimization.".

WatchOptions

This class includes options to control job status and progress updates. All parameters are optional.
Attribute Name Type Description
progressUpdatePeriod Integer

If defined this optional parameter enables additional progress updates with the specified interval. If no new progress update arrives during the specified period, watchJob will wait for and return with the next available progress update. Important updates such as terminal states will always return immediately. The minimum period must be at least 250ms. If no progress waiting period is defined, progress will only be sent as part of status updates.

maximumPollingPeriod Integer

Specifies the timeout after which watchJob will report the last status even if no further updates are available.If not specified a configured default is used.

ZoneLoadingProgress

Extends JobProgress

Attribute Name Type Description
action String

The current action being executed.

optimizationProgress int

The progress of the optimization, available only if action starts with "LoadingSpaceOptimization.".

Enumerations

CoordFormat

The CoordFormat enumeration contains all coordinate types supported by the PTV xServer. All examples represent the same geographic location.

Enumerator Name Value Description
OG_GEODECIMAL None

OpenGIS representation of WGS 84 coordinates. Example x=8.2505556, y=48.7627778.

PTV_MERCATOR None Mercator projection. Example x=917420, y=6227729.
PTV_GEOMINSEC None

PTV representation of coordinates by degree, minute, and second. Example x=815020, y=4845460.

PTV_GEODECIMAL None

PTV representation of WGS 84 coordinates. Example x=825056, y=4876278.

PTV_CONFORM None

PTV representation of conform coordinates. Example x=1672358, y=1620743.

PTV_SUPERCONFORM None

PTV representation of super-conform coordinates. Example x=5072358, y=3320743.

PTV_SMARTUNITS None

PTV internal coordinate format. Example x=4352286, y=5456405.

OG_SRID None

This format is set implicitly, if a Spatial Reference Identifier as specified by the Open Geospatial Consortium (OGC) is set in the CallerContext. All codes of the EPSG Geodetic Parameter Dataset V7.9 maintained by the EPSG..
Note: The coordinate format 'OG_GEODECIMAL' and the SRID code 'EPSG:4326' are equivalent.

ErrorCode

Enumerator Name Value Description
REQUEST_INVALID_WKT 10

The specified WKT in the request is invalid. It should a well-known text representation of a geometry from a string (see the OpenGIS simple features specification).

REQUEST_INVALID_WKB 11

The specified WKB in the request is invalid. It should be a geometry from a byte stream in well-known binary format.

REQUEST_INVALID_KML 12

The specified KML in the request is invalid.

KML_PLACEMARK_NOT_FOUND 13

Thrown, if requested placemark name is not found in the KML

CONVERT_GEOMETRY_OBJECT 20

One or more geometry objects in the request are invalid. There are problems to convert a geometry object to a plain geometry object. Also used for retrieving the plain geometry object from a geometry object.

CONVERT_COORDINATE_FORMAT 21

There are problems to convert a CoordFormat of the request to a coordinate type.

GEOMETRY_ENCODING 22

Geometry objects cannot be encoded.

GeometryEncoding

Defines encoding options for geometry parameters and results.

Plain indicates that geometry objects should be transmitted in plain object form, WKB indicates that openGIS well-known binary format should be used, WKT represents the openGIS well-known text format. KML represents the Keyhole Markup Language.

Enumerator Name Value Description
PLAIN None

Plain geometry encoding using structured objects and according network presentation.

WKB None

Geometry should be represented by well-known binaries.

WKT None

Use well-known texts to encode geometry objects.

KML None

Use Keyhole Markup Language to encode geometry objects.

JobStatus

Specifies different job status values.
Enumerator Name Value Description
QUEUING None

Job has been enqueued.

RUNNING None

Job is currently running.

STOPPING None

Stop has been requested, the job will terminate its calculation as soon as possible.

SUCCEEDED None

Job has completed successfully.

FAILED None

Job has failed with an exception.

DELETED None

The job was deleted by the user.

UNKNOWN None

The job is in an unknown state. For example a given id is unknown or the job has already been fetched and has thus been deleted from the underlying persistent store.

Exceptions

XServiceException

XServiceException is used for all exceptions which can occur in the PTV xServer framework.

SystemException (from package com.ptvag.jabba.core.exception)

This is the base class for all system relevant exceptions. It is thrown for example if a request has timed out or if a request has been rejected.