|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.maps.format.shapefile.IlvShapeFileIndex
public class IlvShapeFileIndex
This class allows applications to take advantage of ESRI Shapefile
index files (.shx files).
Index files allow direct access to geometries in the main Shapefile
(.shp file). Index files map record indexes to file offsets.
Index files are typically used to load geometries on demand.
| Constructor Summary | |
|---|---|
IlvShapeFileIndex(DataInput dataInput)
Initializes an IlvShapeFileIndex from the specified
DataInput. |
|
IlvShapeFileIndex(String filename)
Initializes an IlvShapeFileIndex from the .shx
file specified. |
|
IlvShapeFileIndex(URL url)
Initializes an IlvShapeFileIndex from the specified URL. |
|
| Method Summary | |
|---|---|
void |
dispose()
Disposes of this object. |
void |
finalize()
Called by the Java Garbage Collector to release the resources allocated to the reader. |
IlvCoordinate |
getLowerRightCorner()
Returns the lower-right corner of the bounding box that delimits the objects read from the file. |
double |
getMaxMeasure()
Returns the maximum value of the measurements. |
double |
getMinMeasure()
Returns the minimum value of the measurements. |
int |
getRecordCount()
Returns the number of objects in this index. |
int |
getRecordLength(int index)
Returns the record length (in bytes) of the object at the specified index. |
long |
getRecordOffset(int index)
Returns the file offset of the object at the specified index. |
IlvCoordinate |
getUpperLeftCorner()
Returns the upper-left corner of the bounding box that delimits the objects read from the file. |
double |
getZMax()
Returns the maximum elevation. |
double |
getZMin()
Returns the minimum elevation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IlvShapeFileIndex(String filename)
throws IOException,
IlvMapFormatException
IlvShapeFileIndex from the .shx
file specified.
filename - The name of the .shx file.
IOException - if an error occurs while opening the file.
IlvMapFormatException - if the file contains a format error.
public IlvShapeFileIndex(DataInput dataInput)
throws IOException,
IlvMapFormatException
IlvShapeFileIndex from the specified
DataInput.
dataInput - The data input containing the shape data.
IOException - if an error occurs while reading the input stream.
IlvMapFormatException - if the file contains a format error.
public IlvShapeFileIndex(URL url)
throws IOException,
IlvMapFormatException
IlvShapeFileIndex from the specified URL.
url - The data url pointing to the shape data.
IlvMapFormatException - if the file contains a format error.
IOException| Method Detail |
|---|
public void dispose()
public void finalize()
dispose method
was not called, it releases the resources used by the reader.
finalize in class Objectdispose()
public long getRecordOffset(int index)
throws IOException,
UnsupportedOperationException
100 bytes header in the .shp file, the index of the first object
is at offset 100.
index - The index of the object.
IOException - if an error occurs when reading from the file.
UnsupportedOperationException - if index leads to a negative
skip in the input file and the input file is not a random access file.
public int getRecordLength(int index)
throws IOException,
UnsupportedOperationException
index - The index of the object.
IOException - if an error occurs when reading from the file.
UnsupportedOperationException - if index leads to a negative
skip in the input file and the input file is not a random access file.public IlvCoordinate getUpperLeftCorner()
public IlvCoordinate getLowerRightCorner()
public double getZMin()
public double getZMax()
public double getMinMeasure()
public double getMaxMeasure()
public int getRecordCount()
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||