#include <giscup.hpp>
Public Member Functions  
void  addPolygonalObstacle (polycollection::value_type &in) 
addPolygonalObstacle  
void  getMBR (double &l, double &r, double &b, double &t) 
getMBR returns the bounding box of the junctinos  
void  fillSpatialIndizes () 
fillSpatialIndizes()  
size_t  nearestJunction (double x, double y) 
nearestJunction returns the index of the nearest junction given coordinates  
std::vector< size_t >  nearestRoads (double x, double y, size_t k) 
nearestRoads returns the index of the k nearest road points  
void  LoadFiles (std::string roadfile, std::string junctionfile) 
LoadFiles loads road and node from file names.  
void  LoadDirectory (std::string filebase) 
LoadDirectory loads road and node files from a directory assuming default names.  
void  LoadRestrictions (std::string fname) 
LoadRestrictions. 
Public Attributes  
polycollection  roads 
The road geometry as an STL vector.  
newroadattribcollection  aroads 
The junction attributes.  
bgi::rtree< value, bgi::rstar< 16, 4 > >  roads_rtree 
An R* tree indexing roads.  
polycollection  junctions 
The junction geometry as an STL vector.  
newnodeattribcollection  ajunctions 
The junction attributes.  
bgi::rtree< value, bgi::rstar< 16, 4 > >  junction_rtree 
An A* tree indexing junctions.  
polycollection  polygons 
The polygons from the constraint file, as STL vectors.  
std::vector< polygon >  obstacles 
The polygons from the constraint file as boost::geometry polygons. 

inline 
addPolygonalObstacle
Adds a polygonal obstacle from the polycollection's valuetype (e.g., an STL vector<vector<double>> to a boost::geometry polygon (outer, the real polygon, counterclockwise oriented, and pushes it to obstacles.
In short: converts SHAPE data polygon to boost::geometry objects.

inline 
Takes all roads and junctions and fills the repspective Rtrees. The roads are indexed as points, that is nearest point from any road is directly answered as nearest predicate on road Rtree resulting in the road index to which the point belongs. Note that this is not actually nearest on the road given as a linestring.
Junctions are points and therefore obviously indexed as points.

inline 
getMBR returns the bounding box of the junctinos
This method returns the bounding rectangle of junctions into referenced parameters left, right, bottom and up. It is mainly used for OpenGL GUI zoomFit() functionality

inline 
LoadDirectory loads road and node files from a directory assuming default names.
First, loads sfo_roads.* SHP and DBF file into roads and aroads, Second, loads sfo_nodes.* into junctions and ajunctions Finally, creates spatial indizes

inline 
LoadFiles loads road and node from file names.
First, loads given roads file (removing extension, if present) Second, loads given junctions file (removing extension, if present) Finally, creates spatial indizes

inline 
LoadRestrictions.
Loads a file (extension is removed, if it was given) containing polygonal avoidance data and pushes these polygons using addPolygonalObstacles. Note that it clears polygons, the polygon set last read from a file. It does not remove polygons possibly contained in the obstacles geometry file. Therefore, several files can be loaded after each other. Polygons always contains the polygons from the file last loaded and obstacles contains all polygons that have been loaded or otherwise added to the document.

inline 
nearestJunction returns the index of the nearest junction given coordinates
The nearest junction is calculated using Euclidean geometry. Mainly used to support mouse clicking in the GUI, therefore Euclidean geometry is what users expect. This method interrupts with SEGFAULT, if junction_rtree should be empty.

inline 
nearestRoads returns the index of the k nearest road points
This method interrupts with SEGFAULT, if roads_rtree should be empty.
newnodeattribcollection NewShapeCollection::ajunctions 
The junction attributes.
newroadattribcollection NewShapeCollection::aroads 
The junction attributes.
bgi::rtree< value, bgi::rstar<16, 4> > NewShapeCollection::junction_rtree 
An A* tree indexing junctions.
polycollection NewShapeCollection::junctions 
The junction geometry as an STL vector.
std::vector<polygon> NewShapeCollection::obstacles 
The polygons from the constraint file as boost::geometry polygons.
polycollection NewShapeCollection::polygons 
The polygons from the constraint file, as STL vectors.
polycollection NewShapeCollection::roads 
The road geometry as an STL vector.
bgi::rtree< value, bgi::rstar<16, 4> > NewShapeCollection::roads_rtree 
An R* tree indexing roads.