Rogue Wave Views Maps Package API Reference Guide |
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 (const char *shxFileName) | |
Initializes an IlvShapeFileIndex from the .shx file specified. More... | |
IlvShapeFileIndex (istream &istr) | |
Initializes an IlvShapeFileIndex from an istream . More... | |
IlvMapsError | getInitStatus () const |
Checks the initialization status of this reader. More... | |
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. More... | |
IlInt | getRecordCount () const |
Returns the number of objects in this index. More... | |
IlvMapsError | getRecordLength (IlInt index, IlInt &length) |
Retrieves the record length of the object at the specified index. More... | |
IlvMapsError | getRecordOffset (IlInt index, IlInt &offset) |
Retrieves the file offset of the object at the specified index. More... | |
IlBoolean | getUpperLeftCorner (IlvCoordinate &result) const |
Returns the upper left corner of the rectangle containing all the map features of the shape file corresponding to this index reader. More... | |
Protected Member Functions | |
const IlvMapInput & | getInput () const |
Returns the map input of this reader. More... | |
virtual void | setInitStatus (IlvMapsError status) |
Sets the initialization status of this reader. More... | |
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 file name of the .shx file. |
IlvShapeFileIndex::IlvShapeFileIndex | ( | istream & | istr | ) |
Initializes an IlvShapeFileIndex
from an istream
.
istr | The input 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.
|
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 | Set to the result on return. |
IlFalse
if the lower right corner is unknown. IlInt IlvShapeFileIndex::getRecordCount | ( | ) | const |
Returns the number of objects in this index.
Retrieves the record length 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, in bytes. |
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 the 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 the shape file corresponding to this index reader.
result | Set to the result on return. |
IlFalse
if the upper left corner is unknown.
|
protectedvirtual |
Sets the initialization status of this reader.
status | The new initialization status. |
© Copyright 2018, 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.