|
| Proj6 (const Proj6 &p) |
|
void | setProjectionSrc (const std::string &projDef, Projector::CRS_mode crs=Projector::FORCE_CRS) |
| Sets source projection.
|
|
void | setProjectionDst (const std::string &projDef, Projector::CRS_mode crs=Projector::FORCE_CRS) |
| Sets destination projection.
|
|
void | setProjections (const std::string &projDefSrc, const std::string &projDefDst) |
| Sets source and destination projection.
|
|
const std::string & | getProjectionSrc () const |
| Returns the projection std::string applied by the last setProjection call. More...
|
|
const std::string & | getProjectionDst () const |
|
const Projector & | getSrc () const |
|
const Projector & | getDst () const |
|
void | projectFwd (double &x, double &y) const |
| Forward projection (in-place)
|
|
void | projectFwd (double x, double y, double &x2, double &y2) const |
| Forward projection.
|
|
void | projectFwd (drain::Point2D< double > &point) const |
| Forward projection. Example implementation of project<>() .
|
|
void | projectInv (double &x, double &y) const |
|
void | projectInv (double x, double y, double &x2, double &y2) const |
|
void | projectInv (drain::Point2D< double > &point) const |
|
void | debug (std::ostream &ostr=std::cout, int wkt=-1) |
| Forward projection. More...
|
|
bool | isLongLat () const |
| Check if destination projection is longitude-latitude degrees.
|
|
bool | isSet () const |
|
std::string | getErrorString () const |
|
A wrapper for the famous Proj6 class.
proj_context_errno(PJ_CONTEXT *ctx) -> const char *proj_errno_string(int err)
IMPORTANT:
https://proj.org/development/reference/functions.html#c.proj_create If a proj-string contains a +type=crs option, then it is interpreted as a CRS definition. In particular geographic CRS are assumed to have axis in the longitude, latitude order and with degree angular unit. The use of proj-string to describe a CRS is discouraged. It is a legacy means of conveying CRS descriptions: use of object codes (EPSG:XXXX typically) or WKT description is recommended for better expressivity.
PJ_CONTEXT* pjContext = nullptr |
|
protected |
Detect EPSG code from "+init=epsg:EPSG" argument.
\param projDef – PROJ.4 projection definition string
\return – EPSG code, if found, else 0.
\see getEpsgDict()
static inline short int pickEpsgCodeOLD(const std::string & projDef){ std::list<std::string> projArgs; return pickEpsgCodeOLD(projDef, projArgs); }