public class ShapefileReaderJGeom
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
AV_MULTIPOINT |
static int |
AV_MULTIPOINTM |
static int |
AV_MULTIPOINTZ |
static int |
AV_NULL |
static int |
AV_POINT |
static int |
AV_POINTM |
static int |
AV_POINTZ |
static int |
AV_POLYGON |
static int |
AV_POLYGONM |
static int |
AV_POLYGONZ |
static int |
AV_POLYLINE |
static int |
AV_POLYLINEM |
static int |
AV_POLYLINEZ |
protected int |
bufferLen |
protected int |
cnt |
protected oracle.spatial.util.ShapefileHdr |
idxFileHdr |
protected java.io.RandomAccessFile |
idxFIS |
protected oracle.spatial.util.ShapefileHdr |
mainFileHdr |
protected java.io.RandomAccessFile |
mainFIS |
protected double |
measureMax |
protected double |
measureMin |
protected java.lang.String |
namePrefix |
protected int |
nRecords |
protected double[] |
partBuffer |
protected int |
partBufferLen |
protected byte[] |
recBuffer |
static boolean |
shpMval |
protected int |
type |
protected double |
xMax |
protected double |
xMin |
protected double |
yMax |
protected double |
yMin |
protected double |
zMax |
protected double |
zMin |
Constructor and Description |
---|
ShapefileReaderJGeom(java.lang.String name)
construct an object out of the specified shapefile name.
|
Modifier and Type | Method and Description |
---|---|
void |
closeShapefile()
close this shapefile.
|
static oracle.spatial.geometry.JGeometry |
getGeometry(byte[] recBuffer,
int srid) |
protected static oracle.spatial.geometry.JGeometry |
getGeometry(byte[] recBuffer,
int type,
int off,
int srid) |
byte[] |
getGeometryBytes(int nth)
retrieve nth shape record and return it as a byte array.
|
double |
getMaxMeasure()
return the maximum Measure value in file.
|
double |
getMaxX()
return the maximum X value in file.
|
double |
getMaxY()
return the maximum Y value in file.
|
double |
getMaxZ()
return the maximum Z value in file.
|
double |
getMinMeasure()
return the minimum Measure value in file.
|
double |
getMinX()
return the minimum X value in file.
|
double |
getMinY()
return the minimum Y value in file.
|
double |
getMinZ()
return the minimum Z value in file.
|
static int |
getShpDims(int type,
double maxM) |
int |
getShpFileType()
return the Shape Type in the file.
|
protected long |
idxRecordOffset(int nth)
make an double out of the byte array starting at offset 'off'.
|
protected boolean |
mainRecordOffset(int nth,
oracle.spatial.util.IndexRecord idxRec) |
protected static double |
makeDoubleBigEndian(byte[] b,
int off) |
protected static double |
makeDoubleLittleEndian(byte[] b,
int off) |
protected static int |
makeIntBigEndian(byte[] b,
int off) |
protected static int |
makeIntLittleEndian(byte[] b,
int off) |
protected static oracle.spatial.geometry.JGeometry |
makeMPoint(byte[] b,
int off,
int srid) |
protected static oracle.spatial.geometry.JGeometry |
makeMPointZ(byte[] b,
int off,
int srid) |
protected static oracle.spatial.geometry.JGeometry |
makePoint(byte[] b,
int off,
int srid) |
protected static oracle.spatial.geometry.JGeometry |
makePointM(byte[] b,
int off,
int srid) |
protected static oracle.spatial.geometry.JGeometry |
makePointZ(byte[] b,
int off,
int srid) |
protected static oracle.spatial.geometry.JGeometry |
makePoly(byte[] b,
int type,
int off,
int srid) |
protected static oracle.spatial.geometry.JGeometry |
makePolyM(byte[] b,
int type,
int off,
int srid) |
protected static oracle.spatial.geometry.JGeometry |
makePolyZ(byte[] b,
int type,
int off,
int srid) |
protected static oracle.spatial.geometry.JGeometry |
makePolyZM(byte[] b,
int type,
int off,
int srid,
int[] parts,
int numParts,
int numPoints,
int zArrayOff,
int mMaxOff) |
int |
numRecords()
return the number of shape records in the file.
|
protected void |
openShapefile(java.lang.String name)
open a shapefile with the given name.
|
static void |
swapBytes(byte[] buf,
int offset,
int len) |
public static final int AV_NULL
public static final int AV_POINT
public static final int AV_POLYLINE
public static final int AV_POLYGON
public static final int AV_MULTIPOINT
public static final int AV_POINTZ
public static final int AV_POLYLINEZ
public static final int AV_POLYGONZ
public static final int AV_MULTIPOINTZ
public static final int AV_POINTM
public static final int AV_POLYLINEM
public static final int AV_POLYGONM
public static final int AV_MULTIPOINTM
public static boolean shpMval
protected int nRecords
protected int type
protected double xMax
protected double xMin
protected double yMax
protected double yMin
protected double zMax
protected double zMin
protected double measureMax
protected double measureMin
protected byte[] recBuffer
protected double[] partBuffer
protected int bufferLen
protected int partBufferLen
protected int cnt
protected java.lang.String namePrefix
protected oracle.spatial.util.ShapefileHdr mainFileHdr
protected oracle.spatial.util.ShapefileHdr idxFileHdr
protected java.io.RandomAccessFile mainFIS
protected java.io.RandomAccessFile idxFIS
public ShapefileReaderJGeom(java.lang.String name) throws java.io.IOException
java.io.IOException
public static int getShpDims(int type, double maxM) throws java.lang.Exception
java.lang.Exception
public static oracle.spatial.geometry.JGeometry getGeometry(byte[] recBuffer, int srid) throws java.lang.Exception
java.lang.Exception
protected static oracle.spatial.geometry.JGeometry getGeometry(byte[] recBuffer, int type, int off, int srid) throws java.lang.Exception
java.lang.Exception
protected static oracle.spatial.geometry.JGeometry makePoint(byte[] b, int off, int srid) throws java.io.IOException
java.io.IOException
protected static oracle.spatial.geometry.JGeometry makePointZ(byte[] b, int off, int srid) throws java.io.IOException
java.io.IOException
protected static oracle.spatial.geometry.JGeometry makePointM(byte[] b, int off, int srid) throws java.io.IOException
java.io.IOException
protected static oracle.spatial.geometry.JGeometry makeMPoint(byte[] b, int off, int srid) throws java.io.IOException
java.io.IOException
protected static oracle.spatial.geometry.JGeometry makeMPointZ(byte[] b, int off, int srid) throws java.io.IOException
java.io.IOException
protected static oracle.spatial.geometry.JGeometry makePoly(byte[] b, int type, int off, int srid) throws java.io.IOException
java.io.IOException
protected static oracle.spatial.geometry.JGeometry makePolyZ(byte[] b, int type, int off, int srid) throws java.io.IOException
java.io.IOException
protected static oracle.spatial.geometry.JGeometry makePolyZM(byte[] b, int type, int off, int srid, int[] parts, int numParts, int numPoints, int zArrayOff, int mMaxOff) throws java.io.IOException
java.io.IOException
protected static oracle.spatial.geometry.JGeometry makePolyM(byte[] b, int type, int off, int srid) throws java.io.IOException
java.io.IOException
public static void swapBytes(byte[] buf, int offset, int len)
protected static int makeIntBigEndian(byte[] b, int off)
protected static int makeIntLittleEndian(byte[] b, int off)
protected static double makeDoubleBigEndian(byte[] b, int off)
protected static double makeDoubleLittleEndian(byte[] b, int off)
protected void openShapefile(java.lang.String name) throws java.io.IOException
java.io.IOException
public void closeShapefile() throws java.io.IOException
java.io.IOException
public byte[] getGeometryBytes(int nth) throws java.io.IOException
java.io.IOException
protected long idxRecordOffset(int nth)
protected boolean mainRecordOffset(int nth, oracle.spatial.util.IndexRecord idxRec)
public int numRecords()
public int getShpFileType()
public double getMaxMeasure()
public double getMinMeasure()
public double getMaxZ()
public double getMinZ()
public double getMaxX()
public double getMinX()
public double getMaxY()
public double getMinY()