 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
18 #ifndef GeoConvHelper_h
19 #define GeoConvHelper_h
33 #include PROJ_API_FILE
34 #ifdef PROJ_VERSION_MAJOR
65 const Boundary& orig,
const Boundary& conv,
double scale = 1.0,
double rot = 0.0,
bool inverse =
false,
bool flatten =
false);
81 const Boundary& conv,
double scale = 1.0);
161 return !(*
this == o);
183 projPJ myInverseProjection;
186 projPJ myGeoProjection;
static void writeLocation(OutputDevice &into)
writes the location element
bool operator!=(const GeoConvHelper &o) const
const Boundary & getConvBoundary() const
Returns the converted boundary.
GeoConvHelper & operator=(const GeoConvHelper &)
make assignment operator private
bool x2cartesian_const(Position &from) const
Converts the given coordinate into a cartesian using the previous initialisation.
Static storage of an output device and its base (abstract) implementation.
ProjectionMethod
projection method
void setConvBoundary(const Boundary &boundary)
sets the converted boundary
static void setLoaded(const GeoConvHelper &loaded)
sets the coordinate transformation loaded from a location element
static GeoConvHelper & getProcessing()
the coordinate transformation to use for input conversion and processing
static GeoConvHelper myLoaded
coordinate transformation loaded from a location element
const Position getOffset() const
Returns the network offset.
static GeoConvHelper & getLoaded()
the coordinate transformation that was loaded fron an input file
static methods for processing the coordinates conversion for the current net
static bool init(OptionsCont &oc)
Initialises the processing and the final instance using the given options.
bool x2cartesian(Position &from, bool includeInBoundary=true)
Converts the given coordinate into a cartesian and optionally update myConvBoundary.
bool usingGeoProjection() const
Returns whether a transformation from geo to metric coordinates will be performed.
const std::string & getProjString() const
Returns the original projection definition.
Boundary myOrigBoundary
The boundary before conversion (x2cartesian)
void moveConvertedBy(double x, double y)
Shifts the converted boundary by the given amounts.
~GeoConvHelper()
Destructor.
Boundary myConvBoundary
The boundary after conversion (x2cartesian)
bool myUseInverseProjection
Information whether inverse projection shall be used.
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
GeoConvHelper(OptionsCont &oc)
Constructor based on the stored options.
A class that stores a 2D geometrical boundary.
static void addProjectionOptions(OptionsCont &oc)
Adds projection options to the given container.
std::string myProjString
A proj options string describing the proj.4-projection to use.
const Boundary & getOrigBoundary() const
Returns the original boundary.
void cartesian2geo(Position &cartesian) const
Converts the given cartesian (shifted) position to its geo (lat/long) representation.
A point in 2D or 3D with translation and scaling methods.
const Position getOffsetBase() const
Returns the network base.
A storage for options typed value containers)
bool myFlatten
whether to discard z-data
bool operator==(const GeoConvHelper &o) const
GeoConvHelper(const GeoConvHelper &)=delete
invalidated copy constructor.
static int myNumLoaded
the numer of coordinate transformations loaded from location elements
double myGeoScale
The scaling to apply to geo-coordinates.
Position myOffset
The offset to apply.
static void computeFinal(bool lefthand=false)
compute the location attributes which will be used for output based on the loaded location data,...
bool usingInverseGeoProjection() const
Returns the information whether an inverse transformation will happen.
static GeoConvHelper myFinal
coordinate transformation to use for writing the location element and for tracking the original coord...
ProjectionMethod myProjectionMethod
Information whether no projection shall be done.
static void resetLoaded()
resets loaded location elements
double mySin
The rotation to apply to geo-coordinates.
static GeoConvHelper myProcessing
coordinate transformation to use for input conversion and processing
static int getNumLoaded()