Inherits vector< vtStructure * >.
Public Member Functions | |
void | DestructItems () |
void | SetFilename (const vtString &str) |
vtString | GetFilename () |
int | GetFirstSelected () |
int | GetNextSelected () |
vtStructure * | GetFirstSelectedStructure () const |
int | DeleteSelected () |
virtual void | DestroyStructure (int i) |
bool | ReadSHP (const char *pathname, StructImportOptions &opt, bool progress_callback(int)=NULL) |
void | AddElementsFromOGR (class GDALDataset *datasource, StructImportOptions &opt, bool progress_callback(int)=NULL) |
void | AddElementsFromOGR_SDTS (class GDALDataset *datasource, bool progress_callback(int)=NULL) |
void | AddElementsFromOGR_RAW (class GDALDataset *datasource, StructImportOptions &opt, bool progress_callback(int)=NULL) |
void | AddBuildingsFromOGR (class OGRLayer *pLayer, StructImportOptions &opt, bool progress_callback(int)=NULL) |
void | AddLinearsFromOGR (class OGRLayer *pLayer, StructImportOptions &opt, bool progress_callback(int)=NULL) |
void | AddInstancesFromOGR (class OGRLayer *pLayer, StructImportOptions &opt, bool progress_callback(int)=NULL) |
bool | ReadBCF (const char *pathname) |
bool | ReadBCF_Old (FILE *fp) |
bool | ReadXML (const char *pathname, bool progress_callback(int)=NULL) |
bool | WriteXML (const char *pathname, bool bGZip=false) const |
bool | WriteFootprintsToSHP (const char *pathname) |
bool | WriteFootprintsToCanoma3DV (const char *pathname, const DRECT *area, const vtHeightField *pHF) |
bool | FindClosestBuildingCorner (const DPoint2 &point, double epsilon, int &building, int &corner, double &distance) |
bool | FindClosestBuildingCenter (const DPoint2 &point, double epsilon, int &building, double &distance) |
bool | FindClosestLinearCorner (const DPoint2 &point, double epsilon, int &structure, int &corner, double &distance) |
bool | FindClosestStructure (const DPoint2 &point, double epsilon, int &structure, double &distance, float fMaxInstRadius=1E9f, float fLinearWidthBuffer=0.0f) |
bool | FindClosestBuilding (const DPoint2 &point, double epsilon, int &structure, double &closest) |
bool | IsEmpty () |
void | GetExtents (DRECT &ext) const |
void | Offset (const DPoint2 &delta) |
int | AddFoundations (vtHeightField *pHF, bool progress_callback(int)=NULL) |
void | RemoveFoundations () |
int | NumSelected () |
int | NumSelectedOfType (vtStructureType t) |
void | DeselectAll () |
virtual vtBuilding * | NewBuilding () |
virtual vtFence * | NewFence () |
virtual vtStructInstance * | NewInstance () |
vtBuilding * | AddNewBuilding () |
vtFence * | AddNewFence () |
vtStructInstance * | AddNewInstance () |
vtBuilding * | AddBuildingFromLineString (class OGRLineString *pLineString) |
virtual void | SetEditedEdge (vtBuilding *bld, int lev, int edge) |
Public Attributes | |
vtCRS | m_proj |
Protected Attributes | |
vtString | m_strFilename |
vtBuilding * | m_pEditBuilding |
int | m_iEditLevel |
int | m_iEditEdge |
int | m_iLastSelected |
The vtStructureArray class contains a list of Built Structures (vtStructure objects). It can be loaded and saved to VTST files with the ReadXML and WriteXML methods.
int vtStructureArray::DeleteSelected | ( | ) |
Delete any structures which are selected.
bool vtStructureArray::FindClosestBuilding | ( | const DPoint2 & | point, |
double | epsilon, | ||
int & | structure, | ||
double & | closest | ||
) |
Find the building which is closest to the given point, if it is within 'epsilon' distance. The structure index and distance are returned by reference.
bool vtStructureArray::FindClosestBuildingCenter | ( | const DPoint2 & | point, |
double | epsilon, | ||
int & | building, | ||
double & | closest | ||
) |
Find the building center closest to the given point, if it is within 'epsilon' distance. The building index, and distance from the given point are returned by reference.
bool vtStructureArray::FindClosestBuildingCorner | ( | const DPoint2 & | point, |
double | epsilon, | ||
int & | building, | ||
int & | corner, | ||
double & | closest | ||
) |
Find the building corner closest to the given point, if it is within 'epsilon' distance. The building index, corner index, and distance from the given point are all returned by reference.
bool vtStructureArray::FindClosestStructure | ( | const DPoint2 & | point, |
double | epsilon, | ||
int & | structure, | ||
double & | closest, | ||
float | fMaxInstRadius = 1E9f , |
||
float | fLinearWidthBuffer = 0.0f |
||
) |
Find the structure which is closest to the given point, if it is within 'epsilon' distance. The structure index and distance are returned by reference.
int vtStructureArray::GetFirstSelected | ( | ) |
Return the index of the first selected structure, or -1 if no structure is selected.
bool vtStructureArray::ReadSHP | ( | const char * | pathname, |
StructImportOptions & | opt, | ||
bool | progress_callbackint = NULL |
||
) |
Import structure information from a Shapefile.
pathname | A resolvable filename of a Shapefile (.shp) |
opt | Options which specify how to import structures from the file. |
progress_callback | If supplied, this function will be called back with a value of 0 to 100 as the operation progresses. |
bool vtStructureArray::WriteFootprintsToCanoma3DV | ( | const char * | filename, |
const DRECT * | area, | ||
const vtHeightField * | pHF | ||
) |
Write footprints to a Canoma file. Author of this code: BobMaX (Roberto Angeletti)