Rogue Wave Views 5.6 |
Rogue Wave Views |
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, 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. | |
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. | |
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. | |
IlInt | getCurrentCount () const |
Returns the number of objects currently processed. | |
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. | |
IlvCoordinate * | getOrigin () const |
Returns the origin of the tile grid. | |
IlInt | getRowCount () const |
Returns the number of rows. | |
IlvMapsError | getStatus () const |
Returns the status of this tiler. | |
IlDouble | getTileHeight () const |
Returns the height of a tile in manager coordinates. | |
IlDouble | getTileWidth () const |
Returns the width of a tile in manager coordinates. | |
IlBoolean | getUpperLeftCorner (IlvCoordinate &c) const |
Static Public Member Functions | |
static IlvMapsError | CreateShapeSpatialIndex (const char *shpFilename, const char *targetFileName, IlDouble tileWidth, IlDouble tileHeight) |
Creates a shape spatial index in one call. | |
static IlvMapsError | CreateShapeSpatialIndex (const char *shpFilename, const char *targetFileName, IlInt numColumns, IlInt numRows) |
Creates a shape spatial index in one call. | |
Protected Member Functions | |
void | setStatus (IlvMapsError status) |
Sets the error status of the tiler. |
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 IlvMapsError IlvShapeFileTiler::CreateShapeSpatialIndex | ( | const char * | shpFilename, | |
const char * | targetFileName, | |||
IlDouble | tileWidth, | |||
IlDouble | tileHeight | |||
) | [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. |
static IlvMapsError IlvShapeFileTiler::CreateShapeSpatialIndex | ( | const char * | shpFilename, | |
const char * | targetFileName, | |||
IlInt | numColumns, | |||
IlInt | numRows | |||
) | [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. |
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.
void IlvShapeFileTiler::setStatus | ( | IlvMapsError | status | ) | [protected] |
Sets the error status of the tiler.
status | The error code. |
© 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.