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