|
enum | CRS_mode { ACCEPT_CRS
, REMOVE_CRS
, FORCE_CRS
} |
|
enum | PROJDEF_variant {
ORIG
, MODIFIED
, PROJ4
, PROJ5
,
SIMPLE
} |
| Each projector has three (3) versions of project definition.
|
|
typedef drain::Dictionary< std::string, std::string > | ProjDef |
|
|
| Projector (const std::string &projDef="", CRS_mode crs=ACCEPT_CRS) |
|
| Projector (PJ_CONTEXT *pjContext, const std::string &projDef="", CRS_mode crs=ACCEPT_CRS) |
|
| Projector (const Projector &pr) |
|
const std::string & | getProjDef (PROJDEF_variant v=SIMPLE) const |
|
void | clear () |
| Deletes projection object and clears all the metadata.
|
|
void | setProjection (const std::string &str, CRS_mode crs=FORCE_CRS) |
| Sets projection defined as Proj string.
|
|
void | setProjection (int epsg, CRS_mode crs=FORCE_CRS) |
| Sets projection defined as EPSG code.
|
|
void | createProjection (CRS_mode crs) |
|
bool | isSet () const |
| Returns true, if PJ object has been set.
|
|
bool | isLongLat () const |
|
int | getEPSG () const |
|
void | info (std::ostream &ostr=std::cout, int wkt=-1) |
| Prunes "+init=epsg:<...>" and optionally "+type=crs" codes.
|
|
std::string | getErrorString () const |
|
void | info (PJ *pj, std::ostream &ostr=std::cout, int wkt=-1) |
| Dump misc information, for debugging.
|
|
|
static int | extractEPSG (const std::string &projDef) |
|
|
static const std::string | proj4version = drain::StringBuilder<'.'>(PROJ_VERSION_MAJOR, PROJ_VERSION_MINOR, PROJ_VERSION_PATCH) |
|
|
void | storeProjDef (const std::string &str) |
|
|
static void | getProjDefStr (const ProjDef &dict, std::stringstream &sstr, const std::set< std::string > &excludeKeys={"+type"}) |
|
static bool | isLongLat (const PJ *prj) |
| For setting projection. More...
|
|
|
PJ_CONTEXT * | pjContext |
| Metadata for PROJ (introduced in latest versions, currently not used by Drain & Rack )
|
|
PJ * | pj |
| Essential member: the pointer to a PJ object. This is the primary description of state.
|
|
ProjDef | projDefDict |
| Secondary description of state.
|
|
int | epsg = 0 |
|
std::map< PROJDEF_variant, std::string > | projDefs |
|
◆ isLongLat()
bool isLongLat |
( |
const PJ * |
prj | ) |
|
|
staticprotected |
For setting projection.
- Parameters
-
projStr | - string in Proj format |
CRS | - set or unset |
The documentation for this class was generated from the following files:
- src/drain/util/Projector.h
- src/drain/util/Projector.cpp