Road Type Updates

HTTP POST URL Format

The following format is used for HTTP POST requests. HTTP POST is used to set a persistent update to a road type.


HTTP POST:  /rest/Spatial/erm/databases/dbsource/persistentUpdates/roadTypes/roadtype.json?query_parameters
			

Where dbsource is the name of the database to update the route data, and roadtype is the type of road to update. Use the database name specified in the Spatial Module Routing Database Resource tool.

HTTP GET URL Format

The following format is used for HTTP GET requests. HTTP GET is used to return a list of persistent updates for road types.


HTTP GET:  /rest/Spatial/erm/databases/dbsource/persistentUpdates/roadTypes/road_type.json

or

HTTP GET:  /rest/Spatial/erm/databases/dbsource/persistentUpdates/roadTypes.json?roadTypes=road_type
			

Where dbsource is the name of the database to return to persistent updates from, and roadtype is the type of road return updates.

Note: The first format is used to return the persistent update for only one road type. The second format is used to return either multiple road types or all road types. For multiple road types, use a comma separated list of road types. For all road types, use an empty roadtypes= parameter. See examples below.

HTTP DELETE URL Format

The following format is used for HTTP DELETE requests. HTTP DELETE is used to remove a specific persistent update to a road type.


HTTP DELETE:  /rest/Spatial/erm/databases/dbsource/persistentUpdates/roadTypes/roadtype
			

Where dbsource is the name of the database, and roadtype is the type of road that contains the persistent update to remove. Use the database name specified in the Spatial Module Routing Database Resource tool.

The roadtype can be one of the following for both the HTTP POST and HTTP DELETE:

  • access way
  • back road
  • connector
  • ferry
  • footpath
  • limited access dense urban
  • limited access rural
  • limited access suburban
  • limited access urban
  • local road dense urban
  • local road rural
  • local road suburban
  • local road urban
  • major local road dense urban
  • major local road rural
  • major local road suburban
  • major local road urban
  • major road dense urban
  • major road rural
  • major road suburban
  • major road urban
  • minor local road dense Urban
  • minor local road rural
  • minor local road suburban
  • minor local road urban
  • normal road dense urban
  • normal road rural
  • normal road rural
  • normal road urban
  • primary highway dense urban
  • primary highway rural
  • primary highway suburban
  • primary highway urban
  • ramp dense urban
  • ramp limited access
  • ramp major road
  • ramp primary highway
  • ramp rural
  • ramp secondary highway
  • ramp urban
  • ramp suburban
  • secondary highway dense urban
  • secondary highway rural
  • secondary highway suburban
  • secondary highway urban

Query Parameters

The HTTP POST operation takes the following query parameters.

Parameter Type Required Description
velocity String no This is a speed update where you define the new speed of the road type by specifying the new velocity. The default unit is mph (miles per hour) unless you specify the velocityUnit parameter.
velocityUnit String no

This is a unit of speed for the velocity or velocityAdjustment. For speed updates, the velocity unit can have one of the following values: mph (miles per hour) and kph (kilometers per hour). The default value is mph.

velocityAdjustment String no This is a speed update where you define a change in the speed of the road type by specifying the change in velocity (unit and value). Speed values can be increased (positive value) or decreases (negative value). The default unit is mph (miles per hour) unless you specify the velocityUnit parameter.
velocityPercentage Integer no This is a speed update where you define an increase in the speed of the road type by specifying a percentage to increase (positive value) or decrease (negative value) the speed.

Examples

Set a new velocity of a road type (HTTP POST)


http://<server>:<port>/rest/Spatial/erm/databases/usroutedatabase/persistentUpdates/roadTypes/ferry.json?velocity=5&velocityUnits=mph			
			

Return a list of updates for the ferry road type (HTTP GET)


http://<server>:<port>/rest/Spatial/erm/databases/US_NE/persistentUpdates/roadTypes/ferry.json?velocityUnit=kph
			

Return a list of all road type updates for the US_NE routing database resource (HTTP GET)


http://<server>:<port>/rest/Spatial/erm/databases/US_NE/persistentUpdates/roadTypes.json?roadTypes=
			

Return a list of updates for the ferry, connector, and normal road urban road types (HTTP GET)


http://<server>:<port>/rest/Spatial/erm/databases/US_NE/persistentUpdates/roadTypes.json?roadTypes=ferry,connector,normal road urban
			

Remove a road type persistent update (HTTP DELETE)


http://<server>:<port>/rest/Spatial/erm/databases/US_NE/persistentUpdates/roadTypes/back road