31 #include PROJ_API_FILE
32 #ifdef PROJ_VERSION_MAJOR
63 const Boundary& orig,
const Boundary& conv,
double scale = 1.0,
double rot = 0.0,
bool inverse =
false,
bool flatten =
false);
79 const Boundary& conv,
double scale = 1.0);
167 return !(*
this == o);
185 void initProj(
const std::string& proj);
191 projPJ myInverseProjection;
194 projPJ myGeoProjection;
235 static std::map<std::string, std::pair<std::string, Position> >
myLoadedPlain;
A class that stores a 2D geometrical boundary.
static methods for processing the coordinates conversion for the current net
static void resetLoaded()
resets loaded location elements
static GeoConvHelper & getProcessing()
the coordinate transformation to use for input conversion and processing
static void setLoadedPlain(const std::string &nodFile, const GeoConvHelper &loaded)
registers the coordinate transformation as having been loaded from the given file
const Position getOffset() const
Returns the network offset.
static void writeLocation(OutputDevice &into)
writes the location element
Boundary myOrigBoundary
The boundary before conversion (x2cartesian)
void setConvBoundary(const Boundary &boundary)
sets the converted boundary
ProjectionMethod
projection method
static void addProjectionOptions(OptionsCont &oc)
Adds projection options to the given container.
bool x2cartesian(Position &from, bool includeInBoundary=true)
Converts the given coordinate into a cartesian and optionally update myConvBoundary.
GeoConvHelper & operator=(const GeoConvHelper &)
make assignment operator private
ProjectionMethod myProjectionMethod
Information whether no projection shall be done.
void cartesian2geo(Position &cartesian) const
Converts the given cartesian (shifted) position to its geo (lat/long) representation.
GeoConvHelper(OptionsCont &oc)
Constructor based on the stored options.
Position myOffset
The offset to apply.
void moveConvertedBy(double x, double y)
Shifts the converted boundary by the given amounts.
static GeoConvHelper * getLoadedPlain(const std::string &edgFile)
bool usingInverseGeoProjection() const
Returns the information whether an inverse transformation will happen.
bool operator==(const GeoConvHelper &o) const
void resolveAbstractProjection()
init projString such as 'UTM' in loaded projection
const std::string & getProjString() const
Returns the original projection definition.
const Boundary & getOrigBoundary() const
Returns the original boundary.
double mySin
The rotation to apply to geo-coordinates.
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
static GeoConvHelper & getLoaded()
the coordinate transformation that was loaded fron an input file
static GeoConvHelper myLoaded
coordinate transformation loaded from a location element
static int getNumLoaded()
static GeoConvHelper myFinal
coordinate transformation to use for writing the location element and for tracking the original coord...
static void setLoaded(const GeoConvHelper &loaded)
sets the coordinate transformation loaded from a location element
double myGeoScale
The scaling to apply to geo-coordinates.
const Position getOffsetBase() const
Returns the network base.
GeoConvHelper(const GeoConvHelper &)=delete
invalidated copy constructor.
static bool init(OptionsCont &oc)
Initialises the processing and the final instance using the given options.
bool myFlatten
whether to discard z-data
bool myUseInverseProjection
Information whether inverse projection shall be used.
Boundary myConvBoundary
The boundary after conversion (x2cartesian)
static void computeFinal(bool lefthand=false)
compute the location attributes which will be used for output based on the loaded location data,...
bool usingGeoProjection() const
Returns whether a transformation from geo to metric coordinates will be performed.
const Boundary & getConvBoundary() const
Returns the converted boundary.
bool x2cartesian_const(Position &from) const
Converts the given coordinate into a cartesian using the previous initialisation.
~GeoConvHelper()
Destructor.
std::string myProjString
A proj options string describing the proj.4-projection to use.
bool operator!=(const GeoConvHelper &o) const
static int myNumLoaded
the numer of coordinate transformations loaded from location elements
static std::map< std::string, std::pair< std::string, Position > > myLoadedPlain
the projections loaded from .nod.xml (to be re-used when loading edg.xml)
static GeoConvHelper myProcessing
coordinate transformation to use for input conversion and processing
A storage for options typed value containers)
Static storage of an output device and its base (abstract) implementation.
A point in 2D or 3D with translation and scaling methods.