Rogue Wave Views Maps Package API Reference Guide |
Rogue Wave Views Documentation Home |
An IlvShapeSpatialIndex
is used to store and retrieve tile information for a given Shapefile.
More...
#include <ilviews/maps/format/shapefile/spindex.h>
Public Member Functions | |
IlvShapeSpatialIndex (IlInt columNum, IlInt rowNum, IlvCoordinate *origin, IlDouble tileWidth, IlDouble tileHeight) | |
Constructs an empty spatial index with the specified parameters. More... | |
IlvShapeSpatialIndex (const char *indexFilename) | |
Constructs a spatial index whose values are read from the specified file. More... | |
IlBoolean | add (IlInt c, IlInt r, IlInt id) |
Adds the object whose ID is specified in the spatial index, at the specified position. More... | |
IlInt | getColumnCount () const |
Returns the number of tile columns covered by this index. More... | |
IlvMapsError | getIdArray (IlInt column, IlInt row, IlInt *&ret, IlUInt &size) |
Returns an array containing the IDs of all the shape features contained within the specified tile. More... | |
IlvMapsError | getInitStatus () const |
Returns the status. More... | |
IlvCoordinate * | getOrigin () const |
Returns the origin of the tile grid. More... | |
IlInt | getRowCount () const |
Returns the number of tile rows covered by this index. More... | |
IlDouble | getTileHeight () const |
Returns the height of one tile. More... | |
IlDouble | getTileWidth () const |
Returns the width of one tile. More... | |
IlvMapsError | save (const char *filename) |
Writes this spatial index to the specified file. More... | |
An IlvShapeSpatialIndex
is used to store and retrieve tile information for a given Shapefile.
Library: ilvmaps
When an IlvShapeSpatialIndex
is written to a file, it uses a format that is internal to Rogue Wave Views Maps.
IlvShapeSpatialIndex::IlvShapeSpatialIndex | ( | IlInt | columNum, |
IlInt | rowNum, | ||
IlvCoordinate * | origin, | ||
IlDouble | tileWidth, | ||
IlDouble | tileHeight | ||
) |
Constructs an empty spatial index with the specified parameters.
columNum | The number of columns. |
rowNum | The number of rows. |
origin | The origin of the grid defined by this index. |
tileWidth | The width of one tile, in manager coordinates. |
tileHeight | The height of one tile, in manager coordinates. |
IlvShapeSpatialIndex::IlvShapeSpatialIndex | ( | const char * | indexFilename | ) |
Constructs a spatial index whose values are read from the specified file.
When a spatial index is created with this constructor, it is read-only, meaning that the add()
method does not work.
The specified file must have been written using the save()
method of an IlvShapeFileIndex
.
indexFilename | The name of the spatial index file. |
Adds the object whose ID is specified in the spatial index, at the specified position.
c | The column position. |
r | The row position. |
id | The ID to add. |
IlFalse
if the IlvShapeSpatialIndex
is read only, IlTrue
otherwise. IlInt IlvShapeSpatialIndex::getColumnCount | ( | ) | const |
Returns the number of tile columns covered by this index.
IlvMapsError IlvShapeSpatialIndex::getIdArray | ( | IlInt | column, |
IlInt | row, | ||
IlInt *& | ret, | ||
IlUInt & | size | ||
) |
Returns an array containing the IDs of all the shape features contained within the specified tile.
IDs are coded as IlInt
type and can be accessed using IlvShapeSHPReader::getFeatureAt()
.
column | The column of the tile. |
row | The row of the tile. |
ret | A returned array of IlInt containing the IDs of all the shape features contained within the specified tile. This array, if nonnull, must be deleted by the caller by using the delete[] operator. |
size | The size of the returned array of IDs. |
IlvMapsError
if the array cannot be read, IlvMaps::NoError()
otherwise. IlvMapsError IlvShapeSpatialIndex::getInitStatus | ( | ) | const |
Returns the status.
This status is set when constructing a IlvShapeSpatialIndex
with a file name.
IlvCoordinate* IlvShapeSpatialIndex::getOrigin | ( | ) | const |
Returns the origin of the tile grid.
IlInt IlvShapeSpatialIndex::getRowCount | ( | ) | const |
Returns the number of tile rows covered by this index.
IlDouble IlvShapeSpatialIndex::getTileHeight | ( | ) | const |
Returns the height of one tile.
IlDouble IlvShapeSpatialIndex::getTileWidth | ( | ) | const |
Returns the width of one tile.
IlvMapsError IlvShapeSpatialIndex::save | ( | const char * | filename | ) |
Writes this spatial index to the specified file.
filename | The name of the output file to write this spatial index to. |
© Copyright 2017, 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.