public class ShapeFileReader extends Object
Copyright (c) 2013-2014 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights
reserved.
BSD-style license. See OpenTrafficSim License.
| Constructor and Description |
|---|
ShapeFileReader() |
| Modifier and Type | Method and Description |
|---|---|
static Long |
InspectNodeCentroid(String number) |
static Map<Long,Area> |
ReadAreas(String shapeFileName,
Map<Long,ShpNode> centroids) |
static void |
ReadLinks(String shapeFileName,
Map<Long,ShpLink> links,
Map<Long,ShpLink> connectors,
Map<Long,ShpNode> nodes,
Map<Long,ShpNode> centroids) |
static Map<Long,ShpNode> |
ReadNodes(String shapeFileName,
String numberType,
boolean returnCentroid,
boolean allCentroids) |
static void |
shapeFileInfo(String shapeFileName) |
static boolean |
testGeometry(com.vividsolutions.jts.geom.Coordinate coordinate,
com.vividsolutions.jts.geom.Point centroid) |
public static Map<Long,Area> ReadAreas(String shapeFileName, Map<Long,ShpNode> centroids) throws IOException
shapeFileName - the areas shapefile to readcentroids - the map of centroidsIOException - on errorpublic static Map<Long,ShpNode> ReadNodes(String shapeFileName, String numberType, boolean returnCentroid, boolean allCentroids) throws IOException
shapeFileName - the nodes shapefile to readnumberType - returnCentroid - if true only loop through the centroid/zones (in case of mixed nodes and centroids)allCentroids - if true: the file contains centroids (a centroid file)IOException - on errorpublic static Long InspectNodeCentroid(String number)
number - public static void ReadLinks(String shapeFileName, Map<Long,ShpLink> links, Map<Long,ShpLink> connectors, Map<Long,ShpNode> nodes, Map<Long,ShpNode> centroids) throws IOException
shapeFileName - the nodes shapefile to readlinks - : returns the file with real linksconnectors - returns the file with artificial links to a centroid/zonenodes - the map of nodes to retrieve start and end nodecentroids - the centroids to check start and end NodeIOException - on errorpublic static boolean testGeometry(com.vividsolutions.jts.geom.Coordinate coordinate,
com.vividsolutions.jts.geom.Point centroid)
coordinate - centroid - public static void shapeFileInfo(String shapeFileName) throws IOException
shapeFileName - the areas shapefile to readIOException - on errorCopyright © 2014 Delft University of Technology. All rights reserved.