public class Shapefile extends Object
You construct it with a file name, and later you can read the file's propertys, i.e. Sizes, Types, and the data itself.
Copyright 1998 by James Macgill.
Version 1.0beta1.1 (added construct with inputstream)
1.0beta1.2 (made Shape type constants public 18/Aug/98)
This class supports the Shape file as set out in :-
"ESRI(r) Shapefile - A Technical Description"
'An ESRI White Paper . May 1997'
This code is coverd by the LGPL. Mail the Author
| Modifier and Type | Field and Description |
|---|---|
static int |
ARC |
static int |
ARCM |
static int |
ARCZ |
static int |
MULTIPOINT |
static int |
MULTIPOINTM |
static int |
MULTIPOINTZ |
static int |
NULL |
static int |
POINT |
static int |
POINTM |
static int |
POINTZ |
static int |
POLYGON |
static int |
POLYGONM |
static int |
POLYGONZ |
static int |
UNDEFINED |
| Constructor and Description |
|---|
Shapefile(InputStream IS) |
Shapefile(URL url)
Creates and initialises a shapefile from a url
|
| Modifier and Type | Method and Description |
|---|---|
static ShapeHandler |
getShapeHandler(com.vividsolutions.jts.geom.Geometry geom,
int ShapeFileDimentions) |
static ShapeHandler |
getShapeHandler(int type) |
static int |
getShapeType(com.vividsolutions.jts.geom.Geometry geom,
int ShapeFileDimentions) |
static String |
getShapeTypeDescription(int index)
Returns a string for the shape type of index.
|
com.vividsolutions.jts.geom.GeometryCollection |
read(com.vividsolutions.jts.geom.GeometryFactory geometryFactory)
Initialises a shapefile from disk.
|
void |
readIndex(InputStream is) |
void |
write(com.vividsolutions.jts.geom.GeometryCollection geometries,
int ShapeFileDimentions)
Saves a shapefile to and output stream.
|
void |
writeIndex(com.vividsolutions.jts.geom.GeometryCollection geometries,
EndianDataOutputStream file,
int ShapeFileDimentions) |
public static final int NULL
public static final int POINT
public static final int POINTZ
public static final int POINTM
public static final int ARC
public static final int ARCM
public static final int ARCZ
public static final int POLYGON
public static final int POLYGONM
public static final int POLYGONZ
public static final int MULTIPOINT
public static final int MULTIPOINTM
public static final int MULTIPOINTZ
public static final int UNDEFINED
public Shapefile(URL url)
url - The url of the shapefilepublic Shapefile(InputStream IS)
public com.vividsolutions.jts.geom.GeometryCollection read(com.vividsolutions.jts.geom.GeometryFactory geometryFactory)
throws IOException,
ShapefileException,
Exception
file - A LEDataInputStream that conects to the shapefile to readIOExceptionShapefileExceptionExceptionpublic void write(com.vividsolutions.jts.geom.GeometryCollection geometries,
int ShapeFileDimentions)
throws IOException,
Exception
file - A LEDataInputStream that conects to the shapefile to readIOExceptionExceptionpublic void writeIndex(com.vividsolutions.jts.geom.GeometryCollection geometries,
EndianDataOutputStream file,
int ShapeFileDimentions)
throws IOException,
Exception
IOExceptionExceptionpublic static String getShapeTypeDescription(int index)
index - An int coresponding to the shape type to be describedpublic static ShapeHandler getShapeHandler(com.vividsolutions.jts.geom.Geometry geom, int ShapeFileDimentions) throws Exception
Exceptionpublic static ShapeHandler getShapeHandler(int type) throws Exception
Exceptionpublic static int getShapeType(com.vividsolutions.jts.geom.Geometry geom,
int ShapeFileDimentions)
throws ShapefileException
ShapefileExceptionpublic void readIndex(InputStream is) throws IOException
IOExceptionCopyright © 2015. All rights reserved.