|
util::BaseObjectNNPtr | createObject (const std::string &code) const |
| Returns an arbitrary object from a code. More...
|
|
common::UnitOfMeasureNNPtr | createUnitOfMeasure (const std::string &code) const |
| Returns a common::UnitOfMeasure from the specified code. More...
|
|
metadata::ExtentNNPtr | createExtent (const std::string &code) const |
| Returns a metadata::Extent from the specified code. More...
|
|
datum::PrimeMeridianNNPtr | createPrimeMeridian (const std::string &code) const |
| Returns a datum::PrimeMeridian from the specified code. More...
|
|
std::string | identifyBodyFromSemiMajorAxis (double a, double tolerance) const |
| Identify a celestial body from an approximate radius. More...
|
|
datum::EllipsoidNNPtr | createEllipsoid (const std::string &code) const |
| Returns a datum::Ellipsoid from the specified code. More...
|
|
datum::DatumNNPtr | createDatum (const std::string &code) const |
| Returns a datum::Datum from the specified code. More...
|
|
datum::GeodeticReferenceFrameNNPtr | createGeodeticDatum (const std::string &code) const |
| Returns a datum::GeodeticReferenceFrame from the specified code. More...
|
|
datum::VerticalReferenceFrameNNPtr | createVerticalDatum (const std::string &code) const |
| Returns a datum::VerticalReferenceFrame from the specified code. More...
|
|
cs::CoordinateSystemNNPtr | createCoordinateSystem (const std::string &code) const |
| Returns a cs::CoordinateSystem from the specified code. More...
|
|
crs::GeodeticCRSNNPtr | createGeodeticCRS (const std::string &code) const |
| Returns a crs::GeodeticCRS from the specified code. More...
|
|
crs::GeographicCRSNNPtr | createGeographicCRS (const std::string &code) const |
| Returns a crs::GeographicCRS from the specified code. More...
|
|
crs::VerticalCRSNNPtr | createVerticalCRS (const std::string &code) const |
| Returns a crs::VerticalCRS from the specified code. More...
|
|
operation::ConversionNNPtr | createConversion (const std::string &code) const |
| Returns a operation::Conversion from the specified code. More...
|
|
crs::ProjectedCRSNNPtr | createProjectedCRS (const std::string &code) const |
| Returns a crs::ProjectedCRS from the specified code. More...
|
|
crs::CompoundCRSNNPtr | createCompoundCRS (const std::string &code) const |
| Returns a crs::CompoundCRS from the specified code. More...
|
|
crs::CRSNNPtr | createCoordinateReferenceSystem (const std::string &code) const |
| Returns a crs::CRS from the specified code. More...
|
|
operation::CoordinateOperationNNPtr | createCoordinateOperation (const std::string &code, bool usePROJAlternativeGridNames) const |
| Returns a operation::CoordinateOperation from the specified code. More...
|
|
std::vector< operation::CoordinateOperationNNPtr > | createFromCoordinateReferenceSystemCodes (const std::string &sourceCRSCode, const std::string &targetCRSCode) const |
| Returns a list operation::CoordinateOperation between two CRS. More...
|
|
const std::string & | getAuthority () PROJ_CONST_DECL |
| Returns the authority name associated to this factory. More...
|
|
std::set< std::string > | getAuthorityCodes (const ObjectType &type, bool allowDeprecated=true) const |
| Returns the set of authority codes of the given object type. More...
|
|
std::string | getDescriptionText (const std::string &code) const |
| Gets a description of the object corresponding to a code. More...
|
|
DatabaseContextNNPtr | databaseContext () const |
| Returns the database context.
|
|
std::vector< operation::CoordinateOperationNNPtr > | createFromCoordinateReferenceSystemCodes (const std::string &sourceCRSAuthName, const std::string &sourceCRSCode, const std::string &targetCRSAuthName, const std::string &targetCRSCode, bool usePROJAlternativeGridNames, bool discardIfMissingGrid) const |
| Returns a list operation::CoordinateOperation between two CRS. More...
|
|
std::vector< operation::CoordinateOperationNNPtr > | createFromCRSCodesWithIntermediates (const std::string &sourceCRSAuthName, const std::string &sourceCRSCode, const std::string &targetCRSAuthName, const std::string &targetCRSCode, bool usePROJAlternativeGridNames, bool discardIfMissingGrid, const std::vector< std::pair< std::string, std::string >> &intermediateCRSAuthCodes) const |
| Returns a list operation::CoordinateOperation between two CRS, using intermediate codes. More...
|
|
Builds object from an authority database.
A AuthorityFactory should be used only by one thread at a time.
std::vector< operation::CoordinateOperationNNPtr > osgeo::proj::io::AuthorityFactory::createFromCoordinateReferenceSystemCodes |
( |
const std::string & |
sourceCRSAuthName, |
|
|
const std::string & |
sourceCRSCode, |
|
|
const std::string & |
targetCRSAuthName, |
|
|
const std::string & |
targetCRSCode, |
|
|
bool |
usePROJAlternativeGridNames, |
|
|
bool |
discardIfMissingGrid |
|
) |
| const |
Returns a list operation::CoordinateOperation between two CRS.
The list is ordered with preferred operations first. No attempt is made at infering operations that are not explicitly in the database (see createFromCRSCodesWithIntermediates() for that), and only source -> target operations are searched (ie if target -> source is present, you need to call this method with the arguments reversed, and apply the reverse transformations).
Deprecated operations are rejected.
If getAuthority() returns empty, then coordinate operations from all authorities are considered.
- Parameters
-
sourceCRSAuthName | Authority name of sourceCRSCode |
sourceCRSCode | Source CRS code allocated by authority sourceCRSAuthName. |
targetCRSAuthName | Authority name of targetCRSCode |
targetCRSCode | Source CRS code allocated by authority targetCRSAuthName. |
usePROJAlternativeGridNames | Whether PROJ alternative grid names should be substituted to the official grid names. |
discardIfMissingGrid | Whether coordinate operations that reference missing grids should be removed from the result set. |
- Returns
- list of coordinate operations
- Exceptions
-
std::vector< operation::CoordinateOperationNNPtr > osgeo::proj::io::AuthorityFactory::createFromCRSCodesWithIntermediates |
( |
const std::string & |
sourceCRSAuthName, |
|
|
const std::string & |
sourceCRSCode, |
|
|
const std::string & |
targetCRSAuthName, |
|
|
const std::string & |
targetCRSCode, |
|
|
bool |
usePROJAlternativeGridNames, |
|
|
bool |
discardIfMissingGrid, |
|
|
const std::vector< std::pair< std::string, std::string >> & |
intermediateCRSAuthCodes |
|
) |
| const |
Returns a list operation::CoordinateOperation between two CRS, using intermediate codes.
The list is ordered with preferred operations first.
Deprecated operations are rejected.
The method will take care of considering all potential combinations (ie contrary to createFromCoordinateReferenceSystemCodes(), you do not need to call it with sourceCRS and targetCRS switched)
If getAuthority() returns empty, then coordinate operations from all authorities are considered.
- Parameters
-
sourceCRSAuthName | Authority name of sourceCRSCode |
sourceCRSCode | Source CRS code allocated by authority sourceCRSAuthName. |
targetCRSAuthName | Authority name of targetCRSCode |
targetCRSCode | Source CRS code allocated by authority targetCRSAuthName. |
usePROJAlternativeGridNames | Whether PROJ alternative grid names should be substituted to the official grid names. |
discardIfMissingGrid | Whether coordinate operations that reference missing grids should be removed from the result set. |
intermediateCRSAuthCodes | List of (auth_name, code) of CRS that can be used as potential intermediate CRS. If the list is empty, the database will be used to find common CRS in operations involving both the source and target CRS. |
- Returns
- list of coordinate operations
- Exceptions
-
Returns an arbitrary object from a code.
The returned object will typically be an instance of Datum, CoordinateSystem, ReferenceSystem or CoordinateOperation. If the type of the object is know at compile time, it is recommended to invoke the most precise method instead of this one (for example createCoordinateReferenceSystem(code) instead of createObject(code) if the caller know he is asking for a coordinate reference system).
If there are several objects with the same code, a FactoryException is thrown.
- Parameters
-
code | Object code allocated by authority. (e.g. "4326") |
- Returns
- object.
- Exceptions
-