Rogue Wave Views Maps Package API Reference Guide |
Rogue Wave Views Documentation Home |
A Shapefile tiler. More...
#include <ilviews/maps/format/shapefile/shptiler.h>
Public Member Functions | |
IlvShapeFileTiler (const char *shpFilename, const char *shxFileName, const char *targetFileName, IlDouble tileWidth, IlDouble tileHeight) | |
Initializes a new IlvShapeFileTiler from a set of files and tile dimensions. More... | |
IlvShapeFileTiler (const char *shpFilename, const char *shxFileName, const char *targetFileName, IlInt numColumns, IlInt numRows) | |
Initializes a new IlvShapeFileTiler from a set of files and the number of tiles. More... | |
void | addInfo () |
Adds a single object in the spatial index. | |
void | close () |
Saves the tiling information, and closes the readers. | |
IlInt | getColumnCount () const |
Returns the number of columns. More... | |
IlInt | getCurrentCount () const |
Returns the number of objects currently processed. More... | |
IlInt | getFeatureCount () const |
Returns the total number of objects to process. More... | |
IlBoolean | getLowerRightCorner (IlvCoordinate &c) const |
Returns the lower right coordinate of the bounding box that delimits the objects contained in the shape file. More... | |
const IlvMapFeature * | getNextFeature () |
Returns the next feature from the shape file. More... | |
IlvCoordinate * | getOrigin () const |
Returns the origin of the tile grid. More... | |
IlInt | getRowCount () const |
Returns the number of rows. More... | |
IlvMapsError | getStatus () const |
Returns the status of this tiler. More... | |
IlDouble | getTileHeight () const |
Returns the height of a tile in manager coordinates. More... | |
IlDouble | getTileWidth () const |
Returns the width of a tile in manager coordinates. More... | |
IlBoolean | getUpperLeftCorner (IlvCoordinate &c) const |
Returns the upper left coordinate of the bounding box that delimits the objects contained in the shape file. More... | |
Static Public Member Functions | |
static IlvMapsError | CreateShapeSpatialIndex (const char *shpFilename, const char *targetFileName, IlInt numColumns, IlInt numRows) |
Creates a shape spatial index. More... | |
static IlvMapsError | CreateShapeSpatialIndex (const char *shpFilename, const char *targetFileName, IlDouble tileWidth, IlDouble tileHeight) |
Creates a shape spatial index. More... | |
Protected Member Functions | |
void | setStatus (IlvMapsError status) |
Sets the error status of the tiler. More... | |
A Shapefile tiler.
Library: ilvmaps
An IlvShapeFileTiler
is used to generate and to save tile information for a given Shapefile.
There are two ways to use this class: A direct way, tile information is written in one call:
IlvShapeFileTiler::CreateShapeSpatialIndex(sourceFileName, targetFileName, tileWidth, tileHeight);
or a step by step way, allowing to update a progress bar,
IlvShapeFileTiler* tiler = new IlvShapeFileTiler(sourceFileName, shxFileName, targetFileName, tileWidth, tileHeight); while (tiler->getNextFeature()) { updateProgressBar(); tiler->addInfo(); } tiler->close();
IlvShapeFileTiler::IlvShapeFileTiler | ( | const char * | shpFilename, |
const char * | shxFileName, | ||
const char * | targetFileName, | ||
IlDouble | tileWidth, | ||
IlDouble | tileHeight | ||
) |
Initializes a new IlvShapeFileTiler
from a set of files and tile dimensions.
shpFilename | The source shape file name. |
shxFileName | The name of the .shx file, or 0 if no progress information is needed. |
targetFileName | The target spatial index file name. |
tileWidth | The width of one tile, in manager coordinates. |
tileHeight | The height of one tile, in manager coordinates. |
IlvShapeFileTiler::IlvShapeFileTiler | ( | const char * | shpFilename, |
const char * | shxFileName, | ||
const char * | targetFileName, | ||
IlInt | numColumns, | ||
IlInt | numRows | ||
) |
Initializes a new IlvShapeFileTiler
from a set of files and the number of tiles.
shpFilename | The source shape file name. |
shxFileName | The name of the .shx file, or null if no progress information is needed. |
targetFileName | The target spatial index file name. |
numColumns | The number of columns. |
numRows | The number of rows. |
|
static |
Creates a shape spatial index.
shpFilename | The source shape file name. |
targetFileName | The target spatial index file name. |
numColumns | The number of columns. |
numRows | The number of rows. |
|
static |
Creates a shape spatial index.
shpFilename | The source shape file name. |
targetFileName | The target spatial index file name. |
tileWidth | The width of the tiles. |
tileHeight | The height of the tiles. |
IlInt IlvShapeFileTiler::getColumnCount | ( | ) | const |
Returns the number of columns.
IlInt IlvShapeFileTiler::getCurrentCount | ( | ) | const |
Returns the number of objects currently processed.
IlInt IlvShapeFileTiler::getFeatureCount | ( | ) | const |
Returns the total number of objects to process.
0
if the index file could not be opened or if the tiler was constructed with no .shx
file. IlBoolean IlvShapeFileTiler::getLowerRightCorner | ( | IlvCoordinate & | c | ) | const |
Returns the lower right coordinate of the bounding box that delimits the objects contained in the shape file.
c | Set to the lower right coordinate of the bounding box that delimits the objects contained in the shape file on return. |
IlFalse
if the lower right corner is unknown. const IlvMapFeature* IlvShapeFileTiler::getNextFeature | ( | ) |
Returns the next feature from the shape file.
IlvMapFeature
or 0
if there is none. IlvCoordinate* IlvShapeFileTiler::getOrigin | ( | ) | const |
Returns the origin of the tile grid.
IlInt IlvShapeFileTiler::getRowCount | ( | ) | const |
Returns the number of rows.
IlvMapsError IlvShapeFileTiler::getStatus | ( | ) | const |
Returns the status of this tiler.
IlvMaps::NoError()
if no error occurred, an error code otherwise. IlDouble IlvShapeFileTiler::getTileHeight | ( | ) | const |
Returns the height of a tile in manager coordinates.
IlDouble IlvShapeFileTiler::getTileWidth | ( | ) | const |
Returns the width of a tile in manager coordinates.
IlBoolean IlvShapeFileTiler::getUpperLeftCorner | ( | IlvCoordinate & | c | ) | const |
Returns the upper left coordinate of the bounding box that delimits the objects contained in the shape file.
c | Set to the upper left coordinate of the bounding box that delimits the objects contained in the shape file on return. |
IlFalse
if the upper left corner is unknown.
|
protected |
Sets the error status of the tiler.
status | The error code. |
© 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.