sim.io.geo
Class ShapeFileImporter

java.lang.Object
  extended by sim.io.geo.ShapeFileImporter

public class ShapeFileImporter
extends java.lang.Object

A native Java importer to read ERSI shapefile data into the GeomVectorField. We assume the input file follows the standard ESRI shapefile format.


Method Summary
static boolean isSupported(int shapeType)
           
static void read(java.net.URL shpFile, GeomVectorField field)
          Populate field from the shape file given in fileName
static void read(java.net.URL shpFile, GeomVectorField field, sim.util.Bag masked)
          Populate field from the shape file given in fileName
static void read(java.net.URL shpFile, GeomVectorField field, sim.util.Bag masked, java.lang.Class<?> masonGeometryClass)
          Populate field from the shape file given in fileName
static void read(java.net.URL shpFile, GeomVectorField field, java.lang.Class<?> masonGeometryClass)
          Populate field from the shape file given in fileName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isSupported

public static boolean isSupported(int shapeType)

read

public static void read(java.net.URL shpFile,
                        GeomVectorField field)
                 throws java.io.FileNotFoundException
Populate field from the shape file given in fileName

Parameters:
shpFile - to be read from
field - to contain read in data
Throws:
java.io.FileNotFoundException

read

public static void read(java.net.URL shpFile,
                        GeomVectorField field,
                        sim.util.Bag masked)
                 throws java.io.FileNotFoundException
Populate field from the shape file given in fileName

Parameters:
shpFile - to be read from
field - to contain read in data
masked - dictates the subset of attributes we want
Throws:
java.io.FileNotFoundException

read

public static void read(java.net.URL shpFile,
                        GeomVectorField field,
                        java.lang.Class<?> masonGeometryClass)
                 throws java.io.FileNotFoundException
Populate field from the shape file given in fileName

Parameters:
shpFile - to be read from
field - to contain read in data
masonGeometryClass - allows us to over-ride the default MasonGeometry wrapper
Throws:
java.io.FileNotFoundException

read

public static void read(java.net.URL shpFile,
                        GeomVectorField field,
                        sim.util.Bag masked,
                        java.lang.Class<?> masonGeometryClass)
                 throws java.io.FileNotFoundException
Populate field from the shape file given in fileName

Parameters:
shpFile - to be read from
field - is GeomVectorField that will contain the ShapeFile's contents
masked - dictates the subset of attributes we want
masonGeometryClass - allows us to over-ride the default MasonGeometry wrapper
Throws:
java.io.FileNotFoundException