#include <OSMData.h>
Class that hold Open Street Map Data.
Class that holds Open Street Map data, from https://openstreetmap.org
Objects from this class are typically not created by the user but retruned by bridges::DataSource::getOSMData()
- See also
- Check out how to use OSM data at: https://bridgesuncc.github.io/tutorials/Data_OSM.html
- Author
- Erik Saule, Kalpathi Subramanian
- Date
- 2/16/19, 12/28/20
◆ OSMData()
bridges::dataset::OSMData::OSMData |
( |
| ) |
|
|
inline |
◆ getCartesianCoordsRange()
void bridges::dataset::OSMData::getCartesianCoordsRange |
( |
double * |
xrange, |
|
|
double * |
yrange |
|
) |
| const |
|
inline |
get the range of dataset in Cartesian coords
- Parameters
-
[out] | xrange | (array of 2 for min and max) |
[out] | yrange | (array of 2 for min and max) |
◆ getEdges()
const vector<OSMEdge>& bridges::dataset::OSMData::getEdges |
( |
| ) |
const |
|
inline |
get edges.
Typically the roads
- Returns
- edges (std::vector)
◆ getGraph()
Construct a graph out of the vertex and edge data of the OSM object. The graph will associate the length of the edge to the graph edge. No data is bound to the vertices.
The vertices of the graph will be located at the location given in the data set converted to cartesian coordinate.
- Parameters
-
[out] | gr | constructed graph from the OSM data |
◆ getLatLongRange()
void bridges::dataset::OSMData::getLatLongRange |
( |
double * |
lat_range, |
|
|
double * |
longit_range |
|
) |
| const |
|
inline |
get the Latitude and Longitude range of the dataset
- Parameters
-
[out] | lat_range | latitude range |
[out] | longit_range | longitude range |
◆ getName()
const string& bridges::dataset::OSMData::getName |
( |
| ) |
const |
|
inline |
get the name of the dataset
- Returns
- name of the dataset
◆ getVertices()
const vector<OSMVertex>& bridges::dataset::OSMData::getVertices |
( |
| ) |
const |
|
inline |
get vertices
- Returns
- vertices (std::vector)
◆ setEdges()
void bridges::dataset::OSMData::setEdges |
( |
const vector< OSMEdge > & |
e | ) |
|
|
inline |
set edges
There is an assumption that the edges set have corresponding vertices.
- Parameters
-
◆ setLatLongRange() [1/2]
void bridges::dataset::OSMData::setLatLongRange |
( |
double * |
lat_range, |
|
|
double * |
longit_range |
|
) |
| |
|
inline |
set the latitude and longitude range of the dataset
- Parameters
-
[in] | lat_range | (array of 2 for min and max) |
[in] | longit_range | (array of 2 for min and max) |
◆ setLatLongRange() [2/2]
void bridges::dataset::OSMData::setLatLongRange |
( |
double |
lat_min, |
|
|
double |
lat_max, |
|
|
double |
long_min, |
|
|
double |
long_max |
|
) |
| |
|
inline |
set the range of the dataset
- Parameters
-
lat_min,long_min | lower left corner |
lat_max,long_max | upper right corner |
◆ setName()
void bridges::dataset::OSMData::setName |
( |
const string & |
n | ) |
|
|
inline |
change the name of the dataset
- Parameters
-
◆ setVertices()
void bridges::dataset::OSMData::setVertices |
( |
const vector< OSMVertex > & |
verts | ) |
|
|
inline |
replace the vertices stored by this new set.
This will adjust the lat/long range to the tightest box around the vertices
- Parameters
-
◆ toCartesianCoords()
static void bridges::dataset::OSMData::toCartesianCoords |
( |
double |
lat, |
|
|
double |
longit, |
|
|
double * |
coords |
|
) |
| |
|
inlinestatic |
convert lat/long coords to Cartesian
- Parameters
-
[in] | lat | latitude |
[in] | longit | longitude |
[out] | coords | computed cartesian coords |
The documentation for this class was generated from the following file:
- /home/erik/work/bridges/bridges-cxx/src/data_src/OSMData.h