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 Enterprise Routing 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 Enterprise Routing Module Routing Database Resource tool.

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

Query Parameters

The HTTP POST operation takes the following query parameters.

Parameter Type Required Description
velocity Float 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 Float no

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

Note: Speed updates are always stored in mph in the routing data. Persistent updates in kph will be converted to mph by rounding to the nearest mph. For example, 4 kph will be rounded to 2 mph.
velocityAdjustment Float 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
			

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