Zoning

public class Zoning

For mapping Tempro zones to the nodes of the road network.

Author:Milan Lovric

Fields

MAX_NEAREST_NODES

public static int MAX_NEAREST_NODES

TOP_LAD_NODES

public static int TOP_LAD_NODES

Constructors

Zoning

public Zoning(URL zonesUrl, URL nodesUrl, RoadNetwork rn, Properties params)

Constructor for the zoning system.

Parameters:
  • zonesUrl – Url for the zones shapefile.
  • nodesUrl – Url for the nodes shapefile.
  • rn – Road network.
  • paramas – Properties file with parameters.
Throws:
  • IOException – if any.

Methods

getAccessEgressFactor

public double getAccessEgressFactor()

Getter for access/egress scaling factor.

Returns:Access/egress scaling factor.

getLADToListOfContainedZones

public HashMap<String, List<String>> getLADToListOfContainedZones()

Getter for LAD to list of contained Tempro zones mapping.

Returns:LAD to list of contained zones.

getLADToName

public HashMap<String, String> getLADToName()

Getter for LAD code to LAD name mapping.

Returns:LAD code to LAD name mapping.

getLadCodeToIDMap

public HashMap<String, Integer> getLadCodeToIDMap()

Getter for LAD zone ONS code to ID.

Returns:LAD zone ONS code to LAD zone ID map.

getLadIDToCodeMap

public String[] getLadIDToCodeMap()

Getter for LAD zone ID to ONS code.

Returns:LAD zone ID to LAD zone ONS code.

getNodeToZoneMap

public HashMap<Integer, String> getNodeToZoneMap()

Getter for node to zone mapping (for each node gives the zone in which it is located).

Returns:Node to zone map.

getTemproCodeToIDMap

public HashMap<String, Integer> getTemproCodeToIDMap()

Getter for Tempro zone ONS code to ID.

Returns:Tempro zone code to Tempro zone ID map.

getTemproIDToCodeMap

public String[] getTemproIDToCodeMap()

Getter for LAD zone ID to ONS code.

Returns:Tempro zone ID to Tempro zone ONS code.

getZoneIDToLadID

public int[] getZoneIDToLadID()

Getter for Tempro zone ID to LAD zone ID mapping.

Returns:Tempro zone ID to LAD zone ID array.

getZoneIDToNearestNodeDistanceMap

public double[] getZoneIDToNearestNodeDistanceMap()

Getter for zone ID to nearest node distance mapping (in meters).

Returns:Zone to distance map.

getZoneIDToNearestNodeIDFromLADTopNodesMap

public int[] getZoneIDToNearestNodeIDFromLADTopNodesMap()

Getter for zone ID to nearest node ID among top LAD nodes mapping.

Returns:Zone to node map.

getZoneIDToNearestNodeIDMap

public int[] getZoneIDToNearestNodeIDMap()

Getter for Tempro zone ID to nearest node ID mapping.

Returns:Zone to node map.

getZoneToCentroid

public HashMap<String, Point> getZoneToCentroid()

Getter for Tempro zone to its centroid mapping.

Returns:Tempro zone to centroid mapping.

getZoneToLADMap

public HashMap<String, String> getZoneToLADMap()

Getter for Tempro zone to LAD zone mapping.

Returns:Tempro zone to LAD zone map.

getZoneToListOfContainedNodes

public HashMap<String, List<Integer>> getZoneToListOfContainedNodes()

Getter for Tempro zone to list of contained nodes mapping.

Returns:Zone to list of contained nodes.

getZoneToMinMaxDimension

public double[][] getZoneToMinMaxDimension()

Getter for Tempro zone ID to min [0] and max [1] dimension of the zone bounding box (envelope) [in km].

Returns:Zone min and max dimension (width or height).

getZoneToNearestNodeDistanceMap

public HashMap<String, Double> getZoneToNearestNodeDistanceMap()

Getter for zone centroid to nearest node distance mapping (in meters).

Returns:Zone to distance map.

getZoneToNearestNodeIDFromLADTopNodesMap

public HashMap<String, Integer> getZoneToNearestNodeIDFromLADTopNodesMap()

Getter for zone centroid to nearest node ID among top LAD nodes mapping.

Returns:Zone to node map.

getZoneToNearestNodeIDMap

public HashMap<String, Integer> getZoneToNearestNodeIDMap()

Getter for Tempro zone centroid to nearest node ID mapping.

Returns:Zone to node map.

getZoneToNodeDistanceMatrix

public double[][] getZoneToNodeDistanceMatrix()

Getter for Tempro zone to all nodes distance matrix [in metres].

Returns:Zone to node distance matrix.

getZoneToSortedListOfNodeAndDistancePairs

public HashMap<String, List<Pair<Integer, Double>>> getZoneToSortedListOfNodeAndDistancePairs()

Getter for Tempro zone to sorted node distances mapping (distances to ALL nodes in the network).

Returns:Zone to sorted list of nodes and distances.

getZoneToZoneDistanceMatrix

public double[][] getZoneToZoneDistanceMatrix()

Getter for Tempro zone (centroid) to Tempro zone (centroid) distance matrix [in metres].

Returns:Zone to node distance matrix.