OTB
9.0.0
Orfeo Toolbox
|
#include <otbOSMDataToVectorDataGenerator.h>
Public Types | |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef std::map< int, VertexType > | ContainerType |
typedef VectorDataType::DataNodeType | DataNodeType |
typedef std::pair< std::string, std::string > | ElementPairType |
typedef std::map< std::string, StringVectorType > | KeyMapType |
typedef DataNodeType::LineType | LineType |
typedef itk::SmartPointer< Self > | Pointer |
typedef std::vector< VertexType > | PointTypeList |
typedef DataNodeType::PolygonType | PolygonType |
typedef OSMDataToVectorDataGenerator | Self |
typedef std::vector< std::string > | StringVectorType |
typedef VectorDataSource< otb::VectorData<> > | Superclass |
typedef std::vector< VectorDataElementType > | VectorDataElementListType |
typedef std::pair< ElementPairType, PointTypeList > | VectorDataElementType |
typedef Superclass::OutputVectorDataType | VectorDataType |
typedef LineType::VertexType | VertexType |
Public Types inherited from otb::VectorDataSource< otb::VectorData<> > | |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef itk::ProcessObject::DataObjectPointerArraySizeType | DataObjectPointerArraySizeType |
typedef otb::VectorData<> ::Pointer | OutputVectorDataPointer |
typedef otb::VectorData<> | OutputVectorDataType |
typedef itk::SmartPointer< Self > | Pointer |
typedef VectorDataSource | Self |
typedef itk::ProcessObject | Superclass |
Public Member Functions | |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
virtual const char * | GetNameOfClass () const |
Public Member Functions inherited from otb::VectorDataSource< otb::VectorData<> > | |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
virtual const char * | GetNameOfClass () 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 Public Member Functions inherited from otb::VectorDataSource< otb::VectorData<> > | |
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 | |
Protected Member Functions inherited from otb::VectorDataSource< otb::VectorData<> > | |
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 78 of file otbOSMDataToVectorDataGenerator.h.
typedef itk::SmartPointer<const Self> otb::OSMDataToVectorDataGenerator::ConstPointer |
Definition at line 85 of file otbOSMDataToVectorDataGenerator.h.
typedef std::map<int, VertexType> otb::OSMDataToVectorDataGenerator::ContainerType |
Definition at line 94 of file otbOSMDataToVectorDataGenerator.h.
typedef VectorDataType::DataNodeType otb::OSMDataToVectorDataGenerator::DataNodeType |
Definition at line 88 of file otbOSMDataToVectorDataGenerator.h.
typedef std::pair<std::string, std::string> otb::OSMDataToVectorDataGenerator::ElementPairType |
Definition at line 97 of file otbOSMDataToVectorDataGenerator.h.
typedef std::map<std::string, StringVectorType> otb::OSMDataToVectorDataGenerator::KeyMapType |
Definition at line 106 of file otbOSMDataToVectorDataGenerator.h.
typedef DataNodeType::LineType otb::OSMDataToVectorDataGenerator::LineType |
Definition at line 89 of file otbOSMDataToVectorDataGenerator.h.
typedef itk::SmartPointer<Self> otb::OSMDataToVectorDataGenerator::Pointer |
Definition at line 84 of file otbOSMDataToVectorDataGenerator.h.
typedef std::vector<VertexType> otb::OSMDataToVectorDataGenerator::PointTypeList |
Definition at line 100 of file otbOSMDataToVectorDataGenerator.h.
typedef DataNodeType::PolygonType otb::OSMDataToVectorDataGenerator::PolygonType |
Definition at line 90 of file otbOSMDataToVectorDataGenerator.h.
Standard class typedefs
Definition at line 82 of file otbOSMDataToVectorDataGenerator.h.
typedef std::vector<std::string> otb::OSMDataToVectorDataGenerator::StringVectorType |
Definition at line 105 of file otbOSMDataToVectorDataGenerator.h.
Definition at line 83 of file otbOSMDataToVectorDataGenerator.h.
typedef std::vector<VectorDataElementType> otb::OSMDataToVectorDataGenerator::VectorDataElementListType |
Definition at line 102 of file otbOSMDataToVectorDataGenerator.h.
typedef std::pair<ElementPairType, PointTypeList> otb::OSMDataToVectorDataGenerator::VectorDataElementType |
Definition at line 101 of file otbOSMDataToVectorDataGenerator.h.
Definition at line 87 of file otbOSMDataToVectorDataGenerator.h.
typedef LineType::VertexType otb::OSMDataToVectorDataGenerator::VertexType |
Definition at line 91 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 146 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 155 of file otbOSMDataToVectorDataGenerator.h.
|
virtual |
Run-time type information (and related methods).
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 229 of file otbOSMDataToVectorDataGenerator.h.
|
private |
the url in OSM API format
Definition at line 230 of file otbOSMDataToVectorDataGenerator.h.
|
private |
Curl object to get the XML file
Definition at line 220 of file otbOSMDataToVectorDataGenerator.h.
|
private |
the url in OSM API format
Definition at line 204 of file otbOSMDataToVectorDataGenerator.h.
|
private |
Variable used in to store the result of the parsing
Definition at line 215 of file otbOSMDataToVectorDataGenerator.h.
|
private |
the url in OSM API format
Definition at line 216 of file otbOSMDataToVectorDataGenerator.h.
|
private |
List to store keys to search
Definition at line 212 of file otbOSMDataToVectorDataGenerator.h.
|
private |
container to store the keys and their types found
Definition at line 226 of file otbOSMDataToVectorDataGenerator.h.
|
private |
the url in OSM API format
Definition at line 202 of file otbOSMDataToVectorDataGenerator.h.
|
private |
Output VectorData requested with the method GetVectorDataByName
Definition at line 223 of file otbOSMDataToVectorDataGenerator.h.
|
private |
the url in OSM API format
Definition at line 203 of file otbOSMDataToVectorDataGenerator.h.
|
private |
the url in OSM API format
Definition at line 208 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 217 of file otbOSMDataToVectorDataGenerator.h.
|
private |
the url in OSM API format
Definition at line 205 of file otbOSMDataToVectorDataGenerator.h.