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) | |
Constructs a new IlvShapeFileTiler providing a Shapefile name, a .shx file name, a target index file name, and a tile size. More... | |
IlvShapeFileTiler (const char *shpFilename, const char *shxFileName, const char *targetFileName, IlInt numColumns, IlInt numRows) | |
Constructs a new IlvShapeFileTiler providing a Shapefile name, an .shx file name, a target index file name, the number of columns, and the number of rows. 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, or 0 if the index file could not be opened or if the tiler was constructed with a null .shx file. | |
IlBoolean | getLowerRightCorner (IlvCoordinate &c) const |
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 |
Static Public Member Functions | |
static IlvMapsError | CreateShapeSpatialIndex (const char *shpFilename, const char *targetFileName, IlInt numColumns, IlInt numRows) |
Creates a shape spatial index in one call. More... | |
static IlvMapsError | CreateShapeSpatialIndex (const char *shpFilename, const char *targetFileName, IlDouble tileWidth, IlDouble tileHeight) |
Creates a shape spatial index in one call. 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 | ||
) |
Constructs a new IlvShapeFileTiler
providing a Shapefile name, a .shx
file name, a target index file name, and a tile size.
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 | ||
) |
Constructs a new IlvShapeFileTiler
providing a Shapefile name, an .shx
file name, a target index file name, the number of columns, and the number of rows.
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 in one call.
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 in one call.
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.
IlBoolean IlvShapeFileTiler::getLowerRightCorner | ( | IlvCoordinate & | c | ) | const |
Returns the lower right coordinate of the bounding box that delimits the objects contained in the shape file.
const IlvMapFeature* IlvShapeFileTiler::getNextFeature | ( | ) |
Returns the next feature from the shape file.
IlvMapFeature
. 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.
|
protected |
Sets the error status of the tiler.
status | The error code. |
© Copyright 2016, 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.