Rogue Wave Views 5.5.1 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
This class allows applications to take advantage of ESRI Shapefile index files (.shx
files).
.
More...
#include <ilviews/maps/format/shapefile/shpindex.h>
Public Member Functions | |
IlvShapeFileIndex (istream &stream) | |
Initializes an IlvShapeFileIndex from the specified istream . | |
IlvShapeFileIndex (const char *shxFileName) | |
Initializes an IlvShapeFileIndex from the .shx file specified. | |
IlvMapsError | getInitStatus () const |
Checks the initialization status of this reader. | |
IlBoolean | getLowerRightCorner (IlvCoordinate &result) const |
Returns the lower right corner of the rectangle containing all the map features of the shape file corresponding to this index reader. | |
IlInt | getRecordCount () const |
Returns the number of objects in this index. | |
IlvMapsError | getRecordLength (IlInt index, IlInt &length) |
Retrieves the record length (in bytes) of the object at the specified index. | |
IlvMapsError | getRecordOffset (IlInt index, IlInt &offset) |
Retrieves the file offset of the object at the specified index. | |
IlBoolean | getUpperLeftCorner (IlvCoordinate &result) const |
Returns the upper left corner of the rectangle containing all the map features of this iterator. | |
Protected Member Functions | |
const IlvMapInput & | getInput () const |
Returns the map input of this reader. | |
virtual void | setInitStatus (IlvMapsError status) |
Sets the initialization status of this reader. |
This class allows applications to take advantage of ESRI Shapefile index files (.shx
files).
.
Library: ilvmaps
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.
IlvShapeFileIndex::IlvShapeFileIndex | ( | const char * | shxFileName | ) |
Initializes an IlvShapeFileIndex
from the .shx
file specified.
shxFileName | The name of the .shx file. |
IlvShapeFileIndex::IlvShapeFileIndex | ( | istream & | stream | ) |
Initializes an IlvShapeFileIndex
from the specified istream
.
dataInputFile | The stream opened on the shape data. |
IlvMapsError IlvShapeFileIndex::getInitStatus | ( | ) | const |
Checks the initialization status of this reader.
IlvMaps::NoError()
if the initialization of this reader is successful, or an error if an error occurred during the initialization. const IlvMapInput& IlvShapeFileIndex::getInput | ( | ) | const [protected] |
Returns the map input of this reader.
IlvMapInput
of the reader. IlBoolean IlvShapeFileIndex::getLowerRightCorner | ( | IlvCoordinate & | result | ) | const |
Returns the lower right corner of the rectangle containing all the map features of the shape file corresponding to this index reader.
result | An IlvCoordinate to store the result. |
IlFalse
if the lower right corner is unknown. IlInt IlvShapeFileIndex::getRecordCount | ( | ) | const |
Returns the number of objects in this index.
Retrieves the record length (in bytes) of the object at the specified index.
The index of objects is in the range [0,getRecordCount()].
index | The index of objects. | |
length | The returned length. |
IlvMaps::NoError()
if no error occurs. Retrieves the file offset of the object at the specified index.
The index of objects is in the range [0,getRecordCount()].
The file offset is expressed in bytes, from the start of the files. As there is a 100
bytes header in the .shx
file, the index of the first object is at offset 100
.
index | The index of objects. | |
offset | The returned offset. |
IlBoolean IlvShapeFileIndex::getUpperLeftCorner | ( | IlvCoordinate & | result | ) | const |
Returns the upper left corner of the rectangle containing all the map features of this iterator.
result | An IlvCoordinate to store the result. |
IlFalse
if the upper left corner is unknown. virtual void IlvShapeFileIndex::setInitStatus | ( | IlvMapsError | status | ) | [protected, virtual] |
Sets the initialization status of this reader.
status | The new initialization status. |
© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.