Bridges-Java  3.4.3
Bridges(Java API)
Public Member Functions | Package Attributes | List of all members
bridges.data_src_dependent.OsmData Class Reference

Detailed Description

Class that hold Open Street Map vertices.

This class holds Open Street Map data, from https://openstreetmap.org

Objects from this class are typically not created by the user but retruned by bridges::connect::DataSource::getOsmData()

Check out how to use OSM data at: https://bridgesuncc.github.io/tutorials/Data_OSM.html

Author
Kalpathi Subramanian, Erik Saule
Date
2/16/19, 12/26/20

Public Member Functions

 OsmData ()
 
 OsmData (OsmVertex[] vertices, OsmEdge[] edges, String name)
 
OsmVertex[] getVertices ()
 
void setVertices (OsmVertex[] vertices)
 
String getName ()
 
void setName (String name)
 
OsmEdge[] getEdges ()
 
void setEdges (OsmEdge[] edges)
 
double[] getCartesianRangeY ()
 
double[] getLatitudeRange ()
 
double[] getLongitudeRange ()
 
double[] getCartesianRangeX ()
 
void getLatLongRange (double[] latr, double[] lonr)
 
GraphAdjList< Integer, OsmVertex, Double > getGraph ()
 

Package Attributes

double[] longitude_range
 
double[] cartesian_range_x
 
double[] cartesian_range_y
 

Constructor & Destructor Documentation

◆ OsmData() [1/2]

bridges.data_src_dependent.OsmData.OsmData ( )

◆ OsmData() [2/2]

bridges.data_src_dependent.OsmData.OsmData ( OsmVertex[]  vertices,
OsmEdge[]  edges,
String  name 
)

Constructor

Parameters
verticesnodes of the map (array of OsmVertex)
edgeslinks between nodes (array of OsmEdge)
namedataset name (string)

Member Function Documentation

◆ getCartesianRangeX()

double [] bridges.data_src_dependent.OsmData.getCartesianRangeX ( )

get range of the x cartesian coordinates of vertex locations

Returns
double[]: {min_x, max_x}

◆ getCartesianRangeY()

double [] bridges.data_src_dependent.OsmData.getCartesianRangeY ( )

get range of the y cartesian coordinates of vertex locations

Returns
double[]: {min_y, max_y}

◆ getEdges()

OsmEdge [] bridges.data_src_dependent.OsmData.getEdges ( )

get edges of OsmData

Returns
edges: OsmEdge[]

◆ getGraph()

GraphAdjList<Integer, OsmVertex, Double> bridges.data_src_dependent.OsmData.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.

◆ getLatitudeRange()

double [] bridges.data_src_dependent.OsmData.getLatitudeRange ( )

get range of the latitude of vertex locations

Returns
double[]: {min_latitude, max_latitude}

◆ getLatLongRange()

void bridges.data_src_dependent.OsmData.getLatLongRange ( double[]  latr,
double[]  lonr 
)

get the range of dataset in Cartesian coords

Parameters
latrdouble[2]
lonrdouble[2]
Returns
none

◆ getLongitudeRange()

double [] bridges.data_src_dependent.OsmData.getLongitudeRange ( )

get range of longitude of vertex locations

Returns
double[]: {min_longitude, max_longitude}

◆ getName()

String bridges.data_src_dependent.OsmData.getName ( )

get name of OsmData

Returns
String

◆ getVertices()

OsmVertex [] bridges.data_src_dependent.OsmData.getVertices ( )

Gets the nodes of the dataset

Returns
the nodes of the dataset (array of OsmVertex)

◆ setEdges()

void bridges.data_src_dependent.OsmData.setEdges ( OsmEdge[]  edges)

set edges of OsmData

Parameters
edgesOsmEdge[]

◆ setName()

void bridges.data_src_dependent.OsmData.setName ( String  name)

set name of OsmData

Parameters
nameString

◆ setVertices()

void bridges.data_src_dependent.OsmData.setVertices ( OsmVertex[]  vertices)

Sets the nodes of the map

Parameters
verticesnodes of the map

Member Data Documentation

◆ cartesian_range_x

double [] bridges.data_src_dependent.OsmData.cartesian_range_x
package

◆ cartesian_range_y

double [] bridges.data_src_dependent.OsmData.cartesian_range_y
package

◆ longitude_range

double [] bridges.data_src_dependent.OsmData.longitude_range
package

The documentation for this class was generated from the following file: