![]() |
OTB
10.0.0
Orfeo Toolbox
|
#include <otbOSMDataToVectorDataGenerator.h>
Public Member Functions | |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
virtual const char * | GetNameOfClass () const |
![]() | |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
virtual void | GraftOutput (itk::DataObject *output) |
virtual void | GraftNthOutput (unsigned int idx, itk::DataObject *output) |
virtual OutputVectorDataType * | GetOutput (void) |
virtual OutputVectorDataType * | GetOutput (DataObjectPointerArraySizeType idx) |
Static Public Member Functions | |
static Pointer | New () |
![]() | |
static Pointer | New () |
double | m_North |
double | m_South |
double | m_East |
double | m_West |
std::string | m_Url |
bool | m_UseUrl |
std::vector< std::string > | m_KeyList |
std::string | m_FileName |
ContainerType | m_GeoPointContainer |
VectorDataElementListType | m_VectorDataElementList |
CurlHelper::Pointer | m_Curl |
VectorDataType::Pointer | m_OutputVectorData |
KeyMapType | m_KeysMap |
std::string | m_ClassKey |
int | m_ClassKeyValue |
virtual void | SetFileName (const char *_arg) |
virtual const char * | GetFileName () const |
virtual void | SetNorth (double _arg) |
virtual void | SetSouth (double _arg) |
virtual void | SetEast (double _arg) |
virtual void | SetWest (double _arg) |
virtual double | GetNorth () |
virtual double | GetSouth () |
virtual double | GetEast () |
virtual double | GetWest () |
virtual std::string | GetClassKey () const |
virtual void | SetClassKey (std::string _arg) |
virtual int | GetClassKeyValue () const |
virtual void | SetClassKeyValue (int _arg) |
virtual void | SetUseUrl (bool _arg) |
void | AddKey (const std::string &key) |
const KeyMapType | GetKeysMap () const |
const VectorDataType * | GetVectorDataByName (const std::string &key) |
const VectorDataType * | GetVectorDataByName (const std::string &key, const std::string &value) |
void | GenerateData () override |
void | ParseXmlFile () |
void | ProcessVectorData (const std::string &key, const std::string &value) |
bool | IsKeyPresent (const std::string &key) |
OSMDataToVectorDataGenerator () | |
~OSMDataToVectorDataGenerator () override | |
OSMDataToVectorDataGenerator (const Self &)=delete | |
void | operator= (const Self &)=delete |
void | AddKeyTypeToMap (const std::string &key, const std::string &value) |
Additional Inherited Members | |
![]() | |
VectorDataSource () | |
~VectorDataSource () override | |
void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
virtual void | AllocateOutputs () |
Request OSM Server using the OSM API 0.6 to get the xml file storing the vector elements available.
This class request the OSM server using a bbox. The bbox parameters can be set using the methods Set{North, South, East, West}. Thus, only the vector elements that are within this bbox are returned in the Xml file.
The class parse the XML file for certain keys by default, the class allow adding key to be searched in the XML file. Use AddKey(const std::string& key) to add it to the search list. Here is a link to the OSM wiki where all the keys are listed : http://wiki.openstreetmap.org/wiki/Map_Features.
Adding a field and its integer value is possible through the methods SetClassKey(const std::string&) and SetClassKeyValue() The field is retrieved by GetFieldAsInt(), thus must be int-compatible
Getting output VectorData is possible via two methods :
1: Get all the features of key in a vector data via GetVectorDataByName(const std::string& key) For instance : GetVectorDataByName("highway")
2: Get only the features for a key that match a given value via GetVectorDataByName(const std::string& key, const std::string& value) For instance : GetVectorDataByName("highway", "motorway")
All the keys and their relative values are stored in a map. To get this map use the method GetKeysMap().
Note that if one of the server limits are crossed node/way/relation or area requested, an exception is raised.
Definition at line 79 of file otbOSMDataToVectorDataGenerator.h.
typedef itk::SmartPointer<const Self> otb::OSMDataToVectorDataGenerator::ConstPointer |
Definition at line 86 of file otbOSMDataToVectorDataGenerator.h.
typedef std::map<int, VertexType> otb::OSMDataToVectorDataGenerator::ContainerType |
Definition at line 95 of file otbOSMDataToVectorDataGenerator.h.
Definition at line 89 of file otbOSMDataToVectorDataGenerator.h.
typedef std::pair<std::string, std::string> otb::OSMDataToVectorDataGenerator::ElementPairType |
Definition at line 98 of file otbOSMDataToVectorDataGenerator.h.
typedef std::map<std::string, StringVectorType> otb::OSMDataToVectorDataGenerator::KeyMapType |
Definition at line 107 of file otbOSMDataToVectorDataGenerator.h.
Definition at line 90 of file otbOSMDataToVectorDataGenerator.h.
typedef itk::SmartPointer<Self> otb::OSMDataToVectorDataGenerator::Pointer |
Definition at line 85 of file otbOSMDataToVectorDataGenerator.h.
typedef std::vector<VertexType> otb::OSMDataToVectorDataGenerator::PointTypeList |
Definition at line 101 of file otbOSMDataToVectorDataGenerator.h.
Definition at line 91 of file otbOSMDataToVectorDataGenerator.h.
Standard class typedefs
Definition at line 83 of file otbOSMDataToVectorDataGenerator.h.
typedef std::vector<std::string> otb::OSMDataToVectorDataGenerator::StringVectorType |
Definition at line 106 of file otbOSMDataToVectorDataGenerator.h.
Definition at line 84 of file otbOSMDataToVectorDataGenerator.h.
typedef std::vector<VectorDataElementType> otb::OSMDataToVectorDataGenerator::VectorDataElementListType |
Definition at line 103 of file otbOSMDataToVectorDataGenerator.h.
typedef std::pair<ElementPairType, PointTypeList> otb::OSMDataToVectorDataGenerator::VectorDataElementType |
Definition at line 102 of file otbOSMDataToVectorDataGenerator.h.
Definition at line 88 of file otbOSMDataToVectorDataGenerator.h.
Definition at line 92 of file otbOSMDataToVectorDataGenerator.h.
|
protected |
the url in OSM API format
|
overrideprotected |
the url in OSM API format
|
privatedelete |
the url in OSM API format
|
inline |
Add a key to search into the list
Definition at line 147 of file otbOSMDataToVectorDataGenerator.h.
|
private |
the url in OSM API format
virtual::itk::LightObject::Pointer otb::OSMDataToVectorDataGenerator::CreateAnother | ( | void | ) | const |
|
overrideprotected |
Generate Data method : launch the process
|
virtual |
Field name containing the class identifier
|
virtual |
Field name containing the class identifier
|
virtual |
the url in OSM API format
|
virtual |
the url in OSM API format
|
inline |
Method to get the map where are stored the keys and their value found when parsing the osm file.
Definition at line 156 of file otbOSMDataToVectorDataGenerator.h.
|
virtual |
Run-time type information (and related methods).
Reimplemented from otb::VectorDataSource< otb::VectorData<> >.
Reimplemented in otb::ImageToOSMVectorDataGenerator< TImage >.
|
virtual |
the url in OSM API format
|
virtual |
the url in OSM API format
const VectorDataType* otb::OSMDataToVectorDataGenerator::GetVectorDataByName | ( | const std::string & | key | ) |
Method to get a VectorData where are stored elements corresponding the key
const VectorDataType* otb::OSMDataToVectorDataGenerator::GetVectorDataByName | ( | const std::string & | key, |
const std::string & | value | ||
) |
Method to get a VectorData where are stored elements corresponding the key and the value
|
virtual |
the url in OSM API format
|
protected |
internal convenient method to search if a key was already added
|
static |
Method for creation through the object factory.
|
privatedelete |
the url in OSM API format
|
protected |
Parse the xml file get from OSM to compose the requested vector data
|
protected |
Compose the vector data
|
virtual |
the url in OSM API format
|
virtual |
the url in OSM API format
|
virtual |
the url in OSM API format
|
virtual |
Set/Get FileName
|
virtual |
Macro to Set/GEt the extent
|
virtual |
the url in OSM API format
|
virtual |
the url in OSM API format
|
virtual |
the url in OSM API format
|
private |
Class key and its value
Definition at line 230 of file otbOSMDataToVectorDataGenerator.h.
|
private |
the url in OSM API format
Definition at line 231 of file otbOSMDataToVectorDataGenerator.h.
|
private |
Curl object to get the XML file
Definition at line 221 of file otbOSMDataToVectorDataGenerator.h.
|
private |
the url in OSM API format
Definition at line 205 of file otbOSMDataToVectorDataGenerator.h.
|
private |
Variable used in to store the result of the parsing
Definition at line 216 of file otbOSMDataToVectorDataGenerator.h.
|
private |
the url in OSM API format
Definition at line 217 of file otbOSMDataToVectorDataGenerator.h.
|
private |
List to store keys to search
Definition at line 213 of file otbOSMDataToVectorDataGenerator.h.
|
private |
container to store the keys and their types found
Definition at line 227 of file otbOSMDataToVectorDataGenerator.h.
|
private |
the url in OSM API format
Definition at line 203 of file otbOSMDataToVectorDataGenerator.h.
|
private |
Output VectorData requested with the method GetVectorDataByName
Definition at line 224 of file otbOSMDataToVectorDataGenerator.h.
|
private |
the url in OSM API format
Definition at line 204 of file otbOSMDataToVectorDataGenerator.h.
|
private |
the url in OSM API format
Definition at line 209 of file otbOSMDataToVectorDataGenerator.h.
|
private |
the url in OSM API format
Definition at line 210 of file otbOSMDataToVectorDataGenerator.h.
|
private |
the url in OSM API format
Definition at line 218 of file otbOSMDataToVectorDataGenerator.h.
|
private |
the url in OSM API format
Definition at line 206 of file otbOSMDataToVectorDataGenerator.h.