GDAL
Classes | Macros | Typedefs | Enumerations | Functions
ogr_srs_api.h File Reference

C spatial reference system services and defines. More...

#include <stdbool.h>
#include "ogr_core.h"

Go to the source code of this file.

Classes

struct  OSRCRSInfo
 Structure given overall description of a CRS. More...
 

Macros

#define SRS_WKT_WGS84_LAT_LONG
 WGS 84 geodetic (lat/long) WKT / EPSG:4326 with lat,long ordering.
 
#define SRS_PT_ALBERS_CONIC_EQUAL_AREA   "Albers_Conic_Equal_Area"
 Albers_Conic_Equal_Area projection.
 
#define SRS_PT_AZIMUTHAL_EQUIDISTANT   "Azimuthal_Equidistant"
 Azimuthal_Equidistant projection.
 
#define SRS_PT_CASSINI_SOLDNER   "Cassini_Soldner"
 Cassini_Soldner projection.
 
#define SRS_PT_CYLINDRICAL_EQUAL_AREA   "Cylindrical_Equal_Area"
 Cylindrical_Equal_Area projection.
 
#define SRS_PT_BONNE   "Bonne"
 Cylindrical_Equal_Area projection.
 
#define SRS_PT_ECKERT_I   "Eckert_I"
 Eckert_I projection.
 
#define SRS_PT_ECKERT_II   "Eckert_II"
 Eckert_II projection.
 
#define SRS_PT_ECKERT_III   "Eckert_III"
 Eckert_III projection.
 
#define SRS_PT_ECKERT_IV   "Eckert_IV"
 Eckert_IV projection.
 
#define SRS_PT_ECKERT_V   "Eckert_V"
 Eckert_V projection.
 
#define SRS_PT_ECKERT_VI   "Eckert_VI"
 Eckert_VI projection.
 
#define SRS_PT_EQUIDISTANT_CONIC   "Equidistant_Conic"
 Equidistant_Conic projection.
 
#define SRS_PT_EQUIRECTANGULAR   "Equirectangular"
 Equirectangular projection.
 
#define SRS_PT_GALL_STEREOGRAPHIC   "Gall_Stereographic"
 Gall_Stereographic projection.
 
#define SRS_PT_GAUSSSCHREIBERTMERCATOR   "Gauss_Schreiber_Transverse_Mercator"
 Gauss_Schreiber_Transverse_Mercator projection.
 
#define SRS_PT_GEOSTATIONARY_SATELLITE   "Geostationary_Satellite"
 Geostationary_Satellite projection.
 
#define SRS_PT_GOODE_HOMOLOSINE   "Goode_Homolosine"
 Goode_Homolosine projection.
 
#define SRS_PT_IGH   "Interrupted_Goode_Homolosine"
 Interrupted_Goode_Homolosine projection.
 
#define SRS_PT_GNOMONIC   "Gnomonic"
 Gnomonic projection.
 
#define SRS_PT_HOTINE_OBLIQUE_MERCATOR_AZIMUTH_CENTER    "Hotine_Oblique_Mercator_Azimuth_Center"
 Hotine_Oblique_Mercator_Azimuth_Center projection.
 
#define SRS_PT_HOTINE_OBLIQUE_MERCATOR   "Hotine_Oblique_Mercator"
 Hotine_Oblique_Mercator projection.
 
#define SRS_PT_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN    "Hotine_Oblique_Mercator_Two_Point_Natural_Origin"
 Hotine_Oblique_Mercator_Two_Point_Natural_Origin projection.
 
#define SRS_PT_LABORDE_OBLIQUE_MERCATOR   "Laborde_Oblique_Mercator"
 Laborde_Oblique_Mercator projection.
 
#define SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP   "Lambert_Conformal_Conic_1SP"
 Lambert_Conformal_Conic_1SP projection.
 
#define SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP   "Lambert_Conformal_Conic_2SP"
 Lambert_Conformal_Conic_2SP projection.
 
#define SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP_BELGIUM    "Lambert_Conformal_Conic_2SP_Belgium"
 Lambert_Conformal_Conic_2SP_Belgium projection.
 
#define SRS_PT_LAMBERT_AZIMUTHAL_EQUAL_AREA   "Lambert_Azimuthal_Equal_Area"
 Lambert_Azimuthal_Equal_Area projection.
 
#define SRS_PT_MERCATOR_1SP   "Mercator_1SP"
 Mercator_1SP projection.
 
#define SRS_PT_MERCATOR_2SP   "Mercator_2SP"
 Mercator_2SP projection.
 
#define SRS_PT_MERCATOR_AUXILIARY_SPHERE   "Mercator_Auxiliary_Sphere"
 Mercator_Auxiliary_Sphere is used used by ESRI to mean EPSG:3875.
 
#define SRS_PT_MILLER_CYLINDRICAL   "Miller_Cylindrical"
 Miller_Cylindrical projection.
 
#define SRS_PT_MOLLWEIDE   "Mollweide"
 Mollweide projection.
 
#define SRS_PT_NEW_ZEALAND_MAP_GRID   "New_Zealand_Map_Grid"
 New_Zealand_Map_Grid projection.
 
#define SRS_PT_OBLIQUE_STEREOGRAPHIC   "Oblique_Stereographic"
 Oblique_Stereographic projection.
 
#define SRS_PT_ORTHOGRAPHIC   "Orthographic"
 Orthographic projection.
 
#define SRS_PT_POLAR_STEREOGRAPHIC   "Polar_Stereographic"
 Polar_Stereographic projection.
 
#define SRS_PT_POLYCONIC   "Polyconic"
 Polyconic projection.
 
#define SRS_PT_ROBINSON   "Robinson"
 Robinson projection.
 
#define SRS_PT_SINUSOIDAL   "Sinusoidal"
 Sinusoidal projection.
 
#define SRS_PT_STEREOGRAPHIC   "Stereographic"
 Stereographic projection.
 
#define SRS_PT_SWISS_OBLIQUE_CYLINDRICAL   "Swiss_Oblique_Cylindrical"
 Swiss_Oblique_Cylindrical projection.
 
#define SRS_PT_TRANSVERSE_MERCATOR   "Transverse_Mercator"
 Transverse_Mercator projection.
 
#define SRS_PT_TRANSVERSE_MERCATOR_SOUTH_ORIENTED    "Transverse_Mercator_South_Orientated"
 Transverse_Mercator_South_Orientated projection.
 
#define SRS_PT_TRANSVERSE_MERCATOR_MI_21   "Transverse_Mercator_MapInfo_21"
 Transverse_Mercator_MapInfo_21 projection.
 
#define SRS_PT_TRANSVERSE_MERCATOR_MI_22   "Transverse_Mercator_MapInfo_22"
 Transverse_Mercator_MapInfo_22 projection.
 
#define SRS_PT_TRANSVERSE_MERCATOR_MI_23   "Transverse_Mercator_MapInfo_23"
 Transverse_Mercator_MapInfo_23 projection.
 
#define SRS_PT_TRANSVERSE_MERCATOR_MI_24   "Transverse_Mercator_MapInfo_24"
 Transverse_Mercator_MapInfo_24 projection.
 
#define SRS_PT_TRANSVERSE_MERCATOR_MI_25   "Transverse_Mercator_MapInfo_25"
 Transverse_Mercator_MapInfo_25 projection.
 
#define SRS_PT_TUNISIA_MINING_GRID   "Tunisia_Mining_Grid"
 Tunisia_Mining_Grid projection.
 
#define SRS_PT_TWO_POINT_EQUIDISTANT   "Two_Point_Equidistant"
 Two_Point_Equidistant projection.
 
#define SRS_PT_VANDERGRINTEN   "VanDerGrinten"
 VanDerGrinten projection.
 
#define SRS_PT_KROVAK   "Krovak"
 Krovak projection.
 
#define SRS_PT_IMW_POLYCONIC   "International_Map_of_the_World_Polyconic"
 International_Map_of_the_World_Polyconic projection.
 
#define SRS_PT_WAGNER_I   "Wagner_I"
 Wagner_I projection.
 
#define SRS_PT_WAGNER_II   "Wagner_II"
 Wagner_II projection.
 
#define SRS_PT_WAGNER_III   "Wagner_III"
 Wagner_III projection.
 
#define SRS_PT_WAGNER_IV   "Wagner_IV"
 Wagner_IV projection.
 
#define SRS_PT_WAGNER_V   "Wagner_V"
 Wagner_V projection.
 
#define SRS_PT_WAGNER_VI   "Wagner_VI"
 Wagner_VI projection.
 
#define SRS_PT_WAGNER_VII   "Wagner_VII"
 Wagner_VII projection.
 
#define SRS_PT_QSC   "Quadrilateralized_Spherical_Cube"
 Quadrilateralized_Spherical_Cube projection.
 
#define SRS_PT_AITOFF   "Aitoff"
 Aitoff projection.
 
#define SRS_PT_WINKEL_I   "Winkel_I"
 Winkel_I projection.
 
#define SRS_PT_WINKEL_II   "Winkel_II"
 Winkel_II projection.
 
#define SRS_PT_WINKEL_TRIPEL   "Winkel_Tripel"
 Winkel_Tripel projection.
 
#define SRS_PT_CRASTER_PARABOLIC   "Craster_Parabolic"
 Craster_Parabolic projection.
 
#define SRS_PT_LOXIMUTHAL   "Loximuthal"
 Loximuthal projection.
 
#define SRS_PT_QUARTIC_AUTHALIC   "Quartic_Authalic"
 Quartic_Authalic projection.
 
#define SRS_PT_SCH   "Spherical_Cross_Track_Height"
 Spherical_Cross_Track_Height projection.
 
#define SRS_PP_CENTRAL_MERIDIAN   "central_meridian"
 central_meridian projection parameter
 
#define SRS_PP_SCALE_FACTOR   "scale_factor"
 scale_factor projection parameter
 
#define SRS_PP_STANDARD_PARALLEL_1   "standard_parallel_1"
 standard_parallel_1 projection parameter
 
#define SRS_PP_STANDARD_PARALLEL_2   "standard_parallel_2"
 standard_parallel_2 projection parameter
 
#define SRS_PP_PSEUDO_STD_PARALLEL_1   "pseudo_standard_parallel_1"
 pseudo_standard_parallel_1 projection parameter
 
#define SRS_PP_LONGITUDE_OF_CENTER   "longitude_of_center"
 longitude_of_center projection parameter
 
#define SRS_PP_LATITUDE_OF_CENTER   "latitude_of_center"
 latitude_of_center projection parameter
 
#define SRS_PP_LONGITUDE_OF_ORIGIN   "longitude_of_origin"
 longitude_of_origin projection parameter
 
#define SRS_PP_LATITUDE_OF_ORIGIN   "latitude_of_origin"
 latitude_of_origin projection parameter
 
#define SRS_PP_FALSE_EASTING   "false_easting"
 false_easting projection parameter
 
#define SRS_PP_FALSE_NORTHING   "false_northing"
 false_northing projection parameter
 
#define SRS_PP_AZIMUTH   "azimuth"
 azimuth projection parameter
 
#define SRS_PP_LONGITUDE_OF_POINT_1   "longitude_of_point_1"
 longitude_of_point_1 projection parameter
 
#define SRS_PP_LATITUDE_OF_POINT_1   "latitude_of_point_1"
 latitude_of_point_1 projection parameter
 
#define SRS_PP_LONGITUDE_OF_POINT_2   "longitude_of_point_2"
 longitude_of_point_2 projection parameter
 
#define SRS_PP_LATITUDE_OF_POINT_2   "latitude_of_point_2"
 latitude_of_point_2 projection parameter
 
#define SRS_PP_LONGITUDE_OF_POINT_3   "longitude_of_point_3"
 longitude_of_point_3 projection parameter
 
#define SRS_PP_LATITUDE_OF_POINT_3   "latitude_of_point_3"
 latitude_of_point_3 projection parameter
 
#define SRS_PP_RECTIFIED_GRID_ANGLE   "rectified_grid_angle"
 rectified_grid_angle projection parameter
 
#define SRS_PP_LANDSAT_NUMBER   "landsat_number"
 landsat_number projection parameter
 
#define SRS_PP_PATH_NUMBER   "path_number"
 path_number projection parameter
 
#define SRS_PP_PERSPECTIVE_POINT_HEIGHT   "perspective_point_height"
 perspective_point_height projection parameter
 
#define SRS_PP_SATELLITE_HEIGHT   "satellite_height"
 satellite_height projection parameter
 
#define SRS_PP_FIPSZONE   "fipszone"
 fipszone projection parameter
 
#define SRS_PP_ZONE   "zone"
 zone projection parameter
 
#define SRS_PP_LATITUDE_OF_1ST_POINT   "Latitude_Of_1st_Point"
 Latitude_Of_1st_Point projection parameter.
 
#define SRS_PP_LONGITUDE_OF_1ST_POINT   "Longitude_Of_1st_Point"
 Longitude_Of_1st_Point projection parameter.
 
#define SRS_PP_LATITUDE_OF_2ND_POINT   "Latitude_Of_2nd_Point"
 Latitude_Of_2nd_Point projection parameter.
 
#define SRS_PP_LONGITUDE_OF_2ND_POINT   "Longitude_Of_2nd_Point"
 Longitude_Of_2nd_Point projection parameter.
 
#define SRS_PP_PEG_POINT_LATITUDE   "peg_point_latitude"
 peg_point_latitude projection parameter
 
#define SRS_PP_PEG_POINT_LONGITUDE   "peg_point_longitude"
 peg_point_longitude projection parameter
 
#define SRS_PP_PEG_POINT_HEADING   "peg_point_heading"
 peg_point_heading projection parameter
 
#define SRS_PP_PEG_POINT_HEIGHT   "peg_point_height"
 peg_point_height projection parameter
 
#define SRS_UL_METER   "Meter"
 Linear unit Meter.
 
#define SRS_UL_FOOT   "Foot (International)" /* or just "FOOT"? */
 Linear unit Foot (International)
 
#define SRS_UL_FOOT_CONV   "0.3048"
 Linear unit Foot (International) conversion factor to meter.
 
#define SRS_UL_US_FOOT   "Foot_US" /* or "US survey foot" from EPSG */
 Linear unit Foot.
 
#define SRS_UL_US_FOOT_CONV   "0.3048006096012192"
 Linear unit Foot conversion factor to meter.
 
#define SRS_UL_NAUTICAL_MILE   "Nautical Mile"
 Linear unit Nautical Mile.
 
#define SRS_UL_NAUTICAL_MILE_CONV   "1852.0"
 Linear unit Nautical Mile conversion factor to meter.
 
#define SRS_UL_LINK   "Link" /* Based on US Foot */
 Linear unit Link.
 
#define SRS_UL_LINK_CONV   "0.20116684023368047"
 Linear unit Link conversion factor to meter.
 
#define SRS_UL_CHAIN   "Chain" /* based on US Foot */
 Linear unit Chain.
 
#define SRS_UL_CHAIN_CONV   "20.116684023368047"
 Linear unit Chain conversion factor to meter.
 
#define SRS_UL_ROD   "Rod" /* based on US Foot */
 Linear unit Rod.
 
#define SRS_UL_ROD_CONV   "5.02921005842012"
 Linear unit Rod conversion factor to meter.
 
#define SRS_UL_LINK_Clarke   "Link_Clarke"
 Linear unit Link_Clarke.
 
#define SRS_UL_LINK_Clarke_CONV   "0.2011661949"
 Linear unit Link_Clarke conversion factor to meter.
 
#define SRS_UL_KILOMETER   "Kilometer"
 Linear unit Kilometer.
 
#define SRS_UL_KILOMETER_CONV   "1000."
 Linear unit Kilometer conversion factor to meter.
 
#define SRS_UL_DECIMETER   "Decimeter"
 Linear unit Decimeter.
 
#define SRS_UL_DECIMETER_CONV   "0.1"
 Linear unit Decimeter conversion factor to meter.
 
#define SRS_UL_CENTIMETER   "Centimeter"
 Linear unit Decimeter.
 
#define SRS_UL_CENTIMETER_CONV   "0.01"
 Linear unit Decimeter conversion factor to meter.
 
#define SRS_UL_MILLIMETER   "Millimeter"
 Linear unit Millimeter.
 
#define SRS_UL_MILLIMETER_CONV   "0.001"
 Linear unit Millimeter conversion factor to meter.
 
#define SRS_UL_INTL_NAUT_MILE   "Nautical_Mile_International"
 Linear unit Nautical_Mile_International.
 
#define SRS_UL_INTL_NAUT_MILE_CONV   "1852.0"
 Linear unit Nautical_Mile_International conversion factor to meter.
 
#define SRS_UL_INTL_INCH   "Inch_International"
 Linear unit Inch_International.
 
#define SRS_UL_INTL_INCH_CONV   "0.0254"
 Linear unit Inch_International conversion factor to meter.
 
#define SRS_UL_INTL_FOOT   "Foot_International"
 Linear unit Foot_International.
 
#define SRS_UL_INTL_FOOT_CONV   "0.3048"
 Linear unit Foot_International conversion factor to meter.
 
#define SRS_UL_INTL_YARD   "Yard_International"
 Linear unit Yard_International.
 
#define SRS_UL_INTL_YARD_CONV   "0.9144"
 Linear unit Yard_International conversion factor to meter.
 
#define SRS_UL_INTL_STAT_MILE   "Statute_Mile_International"
 Linear unit Statute_Mile_International.
 
#define SRS_UL_INTL_STAT_MILE_CONV   "1609.344"
 Linear unit Statute_Mile_Internationalconversion factor to meter.
 
#define SRS_UL_INTL_FATHOM   "Fathom_International"
 Linear unit Fathom_International.
 
#define SRS_UL_INTL_FATHOM_CONV   "1.8288"
 Linear unit Fathom_International conversion factor to meter.
 
#define SRS_UL_INTL_CHAIN   "Chain_International"
 Linear unit Chain_International.
 
#define SRS_UL_INTL_CHAIN_CONV   "20.1168"
 Linear unit Chain_International conversion factor to meter.
 
#define SRS_UL_INTL_LINK   "Link_International"
 Linear unit Link_International.
 
#define SRS_UL_INTL_LINK_CONV   "0.201168"
 Linear unit Link_International conversion factor to meter.
 
#define SRS_UL_US_INCH   "Inch_US_Surveyor"
 Linear unit Inch_US_Surveyor.
 
#define SRS_UL_US_INCH_CONV   "0.025400050800101603"
 Linear unit Inch_US_Surveyor conversion factor to meter.
 
#define SRS_UL_US_YARD   "Yard_US_Surveyor"
 Linear unit Yard_US_Surveyor.
 
#define SRS_UL_US_YARD_CONV   "0.914401828803658"
 Linear unit Yard_US_Surveyor conversion factor to meter.
 
#define SRS_UL_US_CHAIN   "Chain_US_Surveyor"
 Linear unit Chain_US_Surveyor.
 
#define SRS_UL_US_CHAIN_CONV   "20.11684023368047"
 Linear unit Chain_US_Surveyor conversion factor to meter.
 
#define SRS_UL_US_STAT_MILE   "Statute_Mile_US_Surveyor"
 Linear unit Statute_Mile_US_Surveyor.
 
#define SRS_UL_US_STAT_MILE_CONV   "1609.347218694437"
 Linear unit Statute_Mile_US_Surveyor conversion factor to meter.
 
#define SRS_UL_INDIAN_YARD   "Yard_Indian"
 Linear unit Yard_Indian.
 
#define SRS_UL_INDIAN_YARD_CONV   "0.91439523"
 Linear unit Yard_Indian conversion factor to meter.
 
#define SRS_UL_INDIAN_FOOT   "Foot_Indian"
 Linear unit Foot_Indian.
 
#define SRS_UL_INDIAN_FOOT_CONV   "0.30479841"
 Linear unit Foot_Indian conversion factor to meter.
 
#define SRS_UL_INDIAN_CHAIN   "Chain_Indian"
 Linear unit Chain_Indian.
 
#define SRS_UL_INDIAN_CHAIN_CONV   "20.11669506"
 Linear unit Chain_Indian conversion factor to meter.
 
#define SRS_UA_DEGREE   "degree"
 Angular unit degree.
 
#define SRS_UA_DEGREE_CONV   "0.0174532925199433"
 Angular unit degree conversion factor to radians.
 
#define SRS_UA_RADIAN   "radian"
 Angular unit radian.
 
#define SRS_PM_GREENWICH   "Greenwich"
 Prime meridian Greenwich.
 
#define SRS_DN_NAD27   "North_American_Datum_1927"
 North_American_Datum_1927 datum name.
 
#define SRS_DN_NAD83   "North_American_Datum_1983"
 North_American_Datum_1983 datum name.
 
#define SRS_DN_WGS72   "WGS_1972"
 WGS_1972 datum name.
 
#define SRS_DN_WGS84   "WGS_1984"
 WGS_1984 datum name.
 
#define SRS_WGS84_SEMIMAJOR   6378137.0
 Semi-major axis of the WGS84 ellipsoid.
 
#define SRS_WGS84_INVFLATTENING   298.257223563
 Inverse flattening of the WGS84 ellipsoid.
 

Typedefs

typedef void * OGRSpatialReferenceH
 Opaque type for a Spatial Reference object.
 
typedef void * OGRCoordinateTransformationH
 Opaque type for a coordinate transformation object.
 
typedef struct OSRCRSListParameters OSRCRSListParameters
 Structure to describe optional parameters to OSRGetCRSInfoListFromDatabase()
 
typedef struct OGRCoordinateTransformationOptionsOGRCoordinateTransformationOptionsH
 Coordinate transformation options.
 

Enumerations

enum  OGRAxisOrientation {
  OAO_Other = 0 , OAO_North = 1 , OAO_South = 2 , OAO_East = 3 ,
  OAO_West = 4 , OAO_Up = 5 , OAO_Down = 6
}
 Axis orientations (corresponds to CS_AxisOrientationEnum). More...
 
enum  OSRAxisMappingStrategy { OAMS_TRADITIONAL_GIS_ORDER , OAMS_AUTHORITY_COMPLIANT , OAMS_CUSTOM }
 Data axis to CRS axis mapping strategy. More...
 
enum  OSRCRSType {
  OSR_CRS_TYPE_GEOGRAPHIC_2D , OSR_CRS_TYPE_GEOGRAPHIC_3D , OSR_CRS_TYPE_GEOCENTRIC , OSR_CRS_TYPE_PROJECTED ,
  OSR_CRS_TYPE_VERTICAL , OSR_CRS_TYPE_COMPOUND , OSR_CRS_TYPE_OTHER
}
 Type of Coordinate Reference System (CRS). More...
 

Functions

const char * OSRAxisEnumToName (OGRAxisOrientation eOrientation)
 Return the string representation for the OGRAxisOrientation enumeration.
 
void OSRSetPROJSearchPaths (const char *const *papszPaths)
 Set the search path(s) for PROJ resource files.
 
char ** OSRGetPROJSearchPaths (void)
 Get the search path(s) for PROJ resource files.
 
void OSRSetPROJAuxDbPaths (const char *const *papszPaths)
 Set list of PROJ auxiliary database filenames.
 
char ** OSRGetPROJAuxDbPaths (void)
 Get PROJ auxiliary database filenames.
 
void OSRSetPROJEnableNetwork (int enabled)
 Enable or disable PROJ networking capabilities.
 
int OSRGetPROJEnableNetwork (void)
 Get whether PROJ networking capabilities are enabled.
 
void OSRGetPROJVersion (int *pnMajor, int *pnMinor, int *pnPatch)
 Get the PROJ version.
 
OGRSpatialReferenceH OSRNewSpatialReference (const char *)
 Constructor.
 
OGRSpatialReferenceH OSRCloneGeogCS (OGRSpatialReferenceH)
 Make a duplicate of the GEOGCS node of this OGRSpatialReference object.
 
OGRSpatialReferenceH OSRClone (OGRSpatialReferenceH)
 Make a duplicate of this OGRSpatialReference.
 
void OSRDestroySpatialReference (OGRSpatialReferenceH)
 OGRSpatialReference destructor.
 
int OSRReference (OGRSpatialReferenceH)
 Increments the reference count by one.
 
int OSRDereference (OGRSpatialReferenceH)
 Decrements the reference count by one.
 
void OSRRelease (OGRSpatialReferenceH)
 Decrements the reference count by one, and destroy if zero.
 
OGRErr OSRValidate (OGRSpatialReferenceH)
 Validate SRS tokens.
 
OGRErr OSRImportFromEPSG (OGRSpatialReferenceH, int)
 Initialize SRS based on EPSG geographic, projected or vertical CRS code.
 
OGRErr OSRImportFromEPSGA (OGRSpatialReferenceH, int)
 Initialize SRS based on EPSG geographic, projected or vertical CRS code.
 
OGRErr OSRImportFromWkt (OGRSpatialReferenceH, char **)
 Import from WKT string.
 
OGRErr OSRImportFromProj4 (OGRSpatialReferenceH, const char *)
 Import PROJ coordinate string.
 
OGRErr OSRImportFromESRI (OGRSpatialReferenceH, char **)
 Import coordinate system from ESRI .prj format(s).
 
OGRErr OSRImportFromPCI (OGRSpatialReferenceH hSRS, const char *, const char *, double *)
 Import coordinate system from PCI projection definition.
 
OGRErr OSRImportFromUSGS (OGRSpatialReferenceH, long, long, double *, long)
 Import coordinate system from USGS projection definition.
 
OGRErr OSRImportFromXML (OGRSpatialReferenceH, const char *)
 Import coordinate system from XML format (GML only currently).
 
OGRErr OSRImportFromDict (OGRSpatialReferenceH, const char *, const char *)
 Read SRS from WKT dictionary.
 
OGRErr OSRImportFromPanorama (OGRSpatialReferenceH, long, long, long, double *)
 Import coordinate system from "Panorama" GIS projection definition.
 
OGRErr OSRImportFromOzi (OGRSpatialReferenceH, const char *const *)
 Import coordinate system from OziExplorer projection definition.
 
OGRErr OSRImportFromMICoordSys (OGRSpatialReferenceH, const char *)
 Import Mapinfo style CoordSys definition.
 
OGRErr OSRImportFromERM (OGRSpatialReferenceH, const char *, const char *, const char *)
 Create OGR WKT from ERMapper projection definitions.
 
OGRErr OSRImportFromUrl (OGRSpatialReferenceH, const char *)
 Set spatial reference from a URL.
 
OGRErr OSRImportFromCF1 (OGRSpatialReferenceH, CSLConstList papszKeyValues, const char *pszUnits)
 Import a CRS from netCDF CF-1 definitions.
 
OGRErr OSRExportToWkt (OGRSpatialReferenceH, char **)
 Convert this SRS into WKT 1 format.
 
OGRErr OSRExportToWktEx (OGRSpatialReferenceH, char **ppszResult, const char *const *papszOptions)
 Convert this SRS into WKT format.
 
OGRErr OSRExportToPrettyWkt (OGRSpatialReferenceH, char **, int)
 Convert this SRS into a nicely formatted WKT 1 string for display to a person.
 
OGRErr OSRExportToPROJJSON (OGRSpatialReferenceH hSRS, char **ppszReturn, const char *const *papszOptions)
 Convert this SRS into PROJJSON format.
 
OGRErr OSRExportToProj4 (OGRSpatialReferenceH, char **)
 Export coordinate system in PROJ.4 legacy format.
 
OGRErr OSRExportToPCI (OGRSpatialReferenceH, char **, char **, double **)
 Export coordinate system in PCI projection definition.
 
OGRErr OSRExportToUSGS (OGRSpatialReferenceH, long *, long *, double **, long *)
 Export coordinate system in USGS GCTP projection definition.
 
OGRErr OSRExportToXML (OGRSpatialReferenceH, char **, const char *)
 Export coordinate system in XML format.
 
OGRErr OSRExportToPanorama (OGRSpatialReferenceH, long *, long *, long *, long *, double *)
 Export coordinate system in "Panorama" GIS projection definition.
 
OGRErr OSRExportToMICoordSys (OGRSpatialReferenceH, char **)
 Export coordinate system in Mapinfo style CoordSys format.
 
OGRErr OSRExportToERM (OGRSpatialReferenceH, char *, char *, char *)
 Convert coordinate system to ERMapper format.
 
OGRErr OSRExportToCF1 (OGRSpatialReferenceH, char **ppszGridMappingName, char ***ppapszKeyValues, char **ppszUnits, CSLConstList papszOptions)
 Export a CRS to netCDF CF-1 definitions.
 
OGRErr OSRMorphToESRI (OGRSpatialReferenceH)
 Convert in place to ESRI WKT format.
 
OGRErr OSRMorphFromESRI (OGRSpatialReferenceH)
 Convert in place from ESRI WKT format.
 
OGRErr OSRStripVertical (OGRSpatialReferenceH)
 Convert a compound cs into a horizontal CS.
 
OGRSpatialReferenceH OSRConvertToOtherProjection (OGRSpatialReferenceH hSRS, const char *pszTargetProjection, const char *const *papszOptions)
 Convert to another equivalent projection.
 
const char * OSRGetName (OGRSpatialReferenceH hSRS)
 Return the CRS name.
 
OGRErr OSRSetAttrValue (OGRSpatialReferenceH hSRS, const char *pszNodePath, const char *pszNewNodeValue)
 Set attribute value in spatial reference.
 
const char * OSRGetAttrValue (OGRSpatialReferenceH hSRS, const char *pszName, int iChild)
 Fetch indicated attribute of named node.
 
OGRErr OSRSetAngularUnits (OGRSpatialReferenceH, const char *, double)
 Set the angular units for the geographic coordinate system.
 
double OSRGetAngularUnits (OGRSpatialReferenceH, char **)
 Fetch angular geographic coordinate system units.
 
OGRErr OSRSetLinearUnits (OGRSpatialReferenceH, const char *, double)
 Set the linear units for the projection.
 
OGRErr OSRSetTargetLinearUnits (OGRSpatialReferenceH, const char *, const char *, double)
 Set the linear units for the target node.
 
OGRErr OSRSetLinearUnitsAndUpdateParameters (OGRSpatialReferenceH, const char *, double)
 Set the linear units for the projection.
 
double OSRGetLinearUnits (OGRSpatialReferenceH, char **)
 Fetch linear projection units.
 
double OSRGetTargetLinearUnits (OGRSpatialReferenceH, const char *, char **)
 Fetch linear projection units.
 
double OSRGetPrimeMeridian (OGRSpatialReferenceH, char **)
 Fetch prime meridian info.
 
int OSRIsGeographic (OGRSpatialReferenceH)
 Check if geographic coordinate system.
 
int OSRIsDerivedGeographic (OGRSpatialReferenceH)
 Check if the CRS is a derived geographic coordinate system.
 
int OSRIsLocal (OGRSpatialReferenceH)
 Check if local coordinate system.
 
int OSRIsProjected (OGRSpatialReferenceH)
 Check if projected coordinate system.
 
int OSRIsDerivedProjected (OGRSpatialReferenceH)
 Check if the CRS is a derived projected coordinate system.
 
int OSRIsCompound (OGRSpatialReferenceH)
 Check if the coordinate system is compound.
 
int OSRIsGeocentric (OGRSpatialReferenceH)
 Check if geocentric coordinate system.
 
int OSRIsVertical (OGRSpatialReferenceH)
 Check if vertical coordinate system.
 
int OSRIsDynamic (OGRSpatialReferenceH)
 Check if a CRS is a dynamic CRS.
 
int OSRHasPointMotionOperation (OGRSpatialReferenceH)
 Check if a CRS has at least an associated point motion operation.
 
int OSRIsSameGeogCS (OGRSpatialReferenceH, OGRSpatialReferenceH)
 Do the GeogCS'es match?
 
int OSRIsSameVertCS (OGRSpatialReferenceH, OGRSpatialReferenceH)
 Do the VertCS'es match?
 
int OSRIsSame (OGRSpatialReferenceH, OGRSpatialReferenceH)
 Do these two spatial references describe the same system ?
 
int OSRIsSameEx (OGRSpatialReferenceH, OGRSpatialReferenceH, const char *const *papszOptions)
 Do these two spatial references describe the same system ?
 
void OSRSetCoordinateEpoch (OGRSpatialReferenceH hSRS, double dfCoordinateEpoch)
 Set the coordinate epoch, as decimal year.
 
double OSRGetCoordinateEpoch (OGRSpatialReferenceH hSRS)
 Get the coordinate epoch, as decimal year.
 
OGRErr OSRSetLocalCS (OGRSpatialReferenceH hSRS, const char *pszName)
 Set the user visible LOCAL_CS name.
 
OGRErr OSRSetProjCS (OGRSpatialReferenceH hSRS, const char *pszName)
 Set the user visible PROJCS name.
 
OGRErr OSRSetGeocCS (OGRSpatialReferenceH hSRS, const char *pszName)
 Set the user visible PROJCS name.
 
OGRErr OSRSetWellKnownGeogCS (OGRSpatialReferenceH hSRS, const char *pszName)
 Set a GeogCS based on well known name.
 
OGRErr OSRSetFromUserInput (OGRSpatialReferenceH hSRS, const char *)
 Set spatial reference from various text formats.
 
OGRErr OSRSetFromUserInputEx (OGRSpatialReferenceH hSRS, const char *, CSLConstList papszOptions)
 Set spatial reference from various text formats.
 
OGRErr OSRCopyGeogCSFrom (OGRSpatialReferenceH hSRS, const OGRSpatialReferenceH hSrcSRS)
 Copy GEOGCS from another OGRSpatialReference.
 
OGRErr OSRSetTOWGS84 (OGRSpatialReferenceH hSRS, double, double, double, double, double, double, double)
 Set the Bursa-Wolf conversion to WGS84.
 
OGRErr OSRGetTOWGS84 (OGRSpatialReferenceH hSRS, double *, int)
 Fetch TOWGS84 parameters, if available.
 
OGRErr OSRAddGuessedTOWGS84 (OGRSpatialReferenceH hSRS)
 Try to add a a 3-parameter or 7-parameter Helmert transformation to WGS84.
 
OGRErr OSRSetCompoundCS (OGRSpatialReferenceH hSRS, const char *pszName, OGRSpatialReferenceH hHorizSRS, OGRSpatialReferenceH hVertSRS)
 Setup a compound coordinate system.
 
OGRErr OSRPromoteTo3D (OGRSpatialReferenceH hSRS, const char *pszName)
 "Promotes" a 2D CRS to a 3D CRS one.
 
OGRErr OSRDemoteTo2D (OGRSpatialReferenceH hSRS, const char *pszName)
 "Demote" a 3D CRS to a 2D CRS one.
 
OGRErr OSRSetGeogCS (OGRSpatialReferenceH hSRS, const char *pszGeogName, const char *pszDatumName, const char *pszEllipsoidName, double dfSemiMajor, double dfInvFlattening, const char *pszPMName, double dfPMOffset, const char *pszUnits, double dfConvertToRadians)
 Set geographic coordinate system.
 
OGRErr OSRSetVertCS (OGRSpatialReferenceH hSRS, const char *pszVertCSName, const char *pszVertDatumName, int nVertDatumType)
 Setup the vertical coordinate system.
 
double OSRGetSemiMajor (OGRSpatialReferenceH, OGRErr *)
 Get spheroid semi major axis.
 
double OSRGetSemiMinor (OGRSpatialReferenceH, OGRErr *)
 Get spheroid semi minor axis.
 
double OSRGetInvFlattening (OGRSpatialReferenceH, OGRErr *)
 Get spheroid inverse flattening.
 
OGRErr OSRSetAuthority (OGRSpatialReferenceH hSRS, const char *pszTargetKey, const char *pszAuthority, int nCode)
 Set the authority for a node.
 
const char * OSRGetAuthorityCode (OGRSpatialReferenceH hSRS, const char *pszTargetKey)
 Get the authority code for a node.
 
const char * OSRGetAuthorityName (OGRSpatialReferenceH hSRS, const char *pszTargetKey)
 Get the authority name for a node.
 
int OSRGetAreaOfUse (OGRSpatialReferenceH hSRS, double *pdfWestLongitudeDeg, double *pdfSouthLatitudeDeg, double *pdfEastLongitudeDeg, double *pdfNorthLatitudeDeg, const char **ppszAreaName)
 Return the area of use of the CRS.
 
OGRErr OSRSetProjection (OGRSpatialReferenceH, const char *)
 Set a projection name.
 
OGRErr OSRSetProjParm (OGRSpatialReferenceH, const char *, double)
 Set a projection parameter value.
 
double OSRGetProjParm (OGRSpatialReferenceH hSRS, const char *pszParamName, double dfDefault, OGRErr *)
 Fetch a projection parameter value.
 
OGRErr OSRSetNormProjParm (OGRSpatialReferenceH, const char *, double)
 Set a projection parameter with a normalized value.
 
double OSRGetNormProjParm (OGRSpatialReferenceH hSRS, const char *pszParamName, double dfDefault, OGRErr *)
 This function is the same as OGRSpatialReference::
 
OGRErr OSRSetUTM (OGRSpatialReferenceH hSRS, int nZone, int bNorth)
 Set UTM projection definition.
 
int OSRGetUTMZone (OGRSpatialReferenceH hSRS, int *pbNorth)
 Get utm zone information.
 
OGRErr OSRSetStatePlane (OGRSpatialReferenceH hSRS, int nZone, int bNAD83)
 Set State Plane projection definition.
 
OGRErr OSRSetStatePlaneWithUnits (OGRSpatialReferenceH hSRS, int nZone, int bNAD83, const char *pszOverrideUnitName, double dfOverrideUnit)
 Set State Plane projection definition.
 
OGRErr OSRAutoIdentifyEPSG (OGRSpatialReferenceH hSRS)
 Set EPSG authority info if possible.
 
OGRSpatialReferenceHOSRFindMatches (OGRSpatialReferenceH hSRS, char **papszOptions, int *pnEntries, int **ppanMatchConfidence)
 Try to identify a match between the passed SRS and a related SRS in a catalog.
 
void OSRFreeSRSArray (OGRSpatialReferenceH *pahSRS)
 Free return of OSRIdentifyMatches()
 
int OSREPSGTreatsAsLatLong (OGRSpatialReferenceH hSRS)
 This function returns TRUE if this geographic coordinate system should be treated as having lat/long coordinate ordering.
 
int OSREPSGTreatsAsNorthingEasting (OGRSpatialReferenceH hSRS)
 This function returns TRUE if this projected coordinate system should be treated as having northing/easting coordinate ordering.
 
const char * OSRGetAxis (OGRSpatialReferenceH hSRS, const char *pszTargetKey, int iAxis, OGRAxisOrientation *peOrientation)
 Fetch the orientation of one axis.
 
int OSRGetAxesCount (OGRSpatialReferenceH hSRS)
 Return the number of axis of the coordinate system of the CRS.
 
OGRErr OSRSetAxes (OGRSpatialReferenceH hSRS, const char *pszTargetKey, const char *pszXAxisName, OGRAxisOrientation eXAxisOrientation, const char *pszYAxisName, OGRAxisOrientation eYAxisOrientation)
 Set the axes for a coordinate system.
 
OSRAxisMappingStrategy OSRGetAxisMappingStrategy (OGRSpatialReferenceH hSRS)
 Return the data axis to CRS axis mapping strategy.
 
void OSRSetAxisMappingStrategy (OGRSpatialReferenceH hSRS, OSRAxisMappingStrategy strategy)
 Set the data axis to CRS axis mapping strategy.
 
const int * OSRGetDataAxisToSRSAxisMapping (OGRSpatialReferenceH hSRS, int *pnCount)
 Return the data axis to SRS axis mapping.
 
OGRErr OSRSetDataAxisToSRSAxisMapping (OGRSpatialReferenceH hSRS, int nMappingSize, const int *panMapping)
 Set a custom data axis to CRS axis mapping.
 
OGRErr OSRSetACEA (OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
 Albers Conic Equal Area.
 
OGRErr OSRSetAE (OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
 Azimuthal Equidistant.
 
OGRErr OSRSetBonne (OGRSpatialReferenceH hSRS, double dfStandardParallel, double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing)
 Bonne.
 
OGRErr OSRSetCEA (OGRSpatialReferenceH hSRS, double dfStdP1, double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing)
 Cylindrical Equal Area.
 
OGRErr OSRSetCS (OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
 Cassini-Soldner.
 
OGRErr OSRSetEC (OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
 Equidistant Conic.
 
OGRErr OSRSetEckert (OGRSpatialReferenceH hSRS, int nVariation, double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing)
 Eckert I-VI.
 
OGRErr OSRSetEckertIV (OGRSpatialReferenceH hSRS, double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing)
 Eckert IV.
 
OGRErr OSRSetEckertVI (OGRSpatialReferenceH hSRS, double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing)
 Eckert VI.
 
OGRErr OSRSetEquirectangular (OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
 Equirectangular.
 
OGRErr OSRSetEquirectangular2 (OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfPseudoStdParallel1, double dfFalseEasting, double dfFalseNorthing)
 Equirectangular generalized form.
 
OGRErr OSRSetGS (OGRSpatialReferenceH hSRS, double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing)
 Gall Stereograpic.
 
OGRErr OSRSetGH (OGRSpatialReferenceH hSRS, double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing)
 Goode Homolosine.
 
OGRErr OSRSetIGH (OGRSpatialReferenceH hSRS)
 Interrupted Goode Homolosine.
 
OGRErr OSRSetGEOS (OGRSpatialReferenceH hSRS, double dfCentralMeridian, double dfSatelliteHeight, double dfFalseEasting, double dfFalseNorthing)
 GEOS - Geostationary Satellite View.
 
OGRErr OSRSetGaussSchreiberTMercator (OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing)
 Gauss Schreiber Transverse Mercator.
 
OGRErr OSRSetGnomonic (OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
 Gnomonic.
 
OGRErr OSRSetHOM (OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfAzimuth, double dfRectToSkew, double dfScale, double dfFalseEasting, double dfFalseNorthing)
 Hotine Oblique Mercator using azimuth angle.
 
OGRErr OSRSetHOMAC (OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfAzimuth, double dfRectToSkew, double dfScale, double dfFalseEasting, double dfFalseNorthing)
 Set an Oblique Mercator projection using azimuth angle.
 
OGRErr OSRSetHOM2PNO (OGRSpatialReferenceH hSRS, double dfCenterLat, double dfLat1, double dfLong1, double dfLat2, double dfLong2, double dfScale, double dfFalseEasting, double dfFalseNorthing)
 Hotine Oblique Mercator using two points on centerline.
 
OGRErr OSRSetIWMPolyconic (OGRSpatialReferenceH hSRS, double dfLat1, double dfLat2, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
 International Map of the World Polyconic.
 
OGRErr OSRSetKrovak (OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfAzimuth, double dfPseudoStdParallelLat, double dfScale, double dfFalseEasting, double dfFalseNorthing)
 Krovak Oblique Conic Conformal.
 
OGRErr OSRSetLAEA (OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
 Lambert Azimuthal Equal-Area.
 
OGRErr OSRSetLCC (OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
 Lambert Conformal Conic.
 
OGRErr OSRSetLCC1SP (OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing)
 Lambert Conformal Conic 1SP.
 
OGRErr OSRSetLCCB (OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
 Lambert Conformal Conic (Belgium)
 
OGRErr OSRSetMC (OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
 Miller Cylindrical.
 
OGRErr OSRSetMercator (OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing)
 Mercator.
 
OGRErr OSRSetMercator2SP (OGRSpatialReferenceH hSRS, double dfStdP1, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
 Mercator 2SP.
 
OGRErr OSRSetMollweide (OGRSpatialReferenceH hSRS, double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing)
 Mollweide.
 
OGRErr OSRSetNZMG (OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
 New Zealand Map Grid.
 
OGRErr OSRSetOS (OGRSpatialReferenceH hSRS, double dfOriginLat, double dfCMeridian, double dfScale, double dfFalseEasting, double dfFalseNorthing)
 Oblique Stereographic.
 
OGRErr OSRSetOrthographic (OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
 Orthographic.
 
OGRErr OSRSetPolyconic (OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
 Polyconic.
 
OGRErr OSRSetPS (OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing)
 Polar Stereographic.
 
OGRErr OSRSetRobinson (OGRSpatialReferenceH hSRS, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
 Robinson.
 
OGRErr OSRSetSinusoidal (OGRSpatialReferenceH hSRS, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
 Sinusoidal.
 
OGRErr OSRSetStereographic (OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing)
 Stereographic.
 
OGRErr OSRSetSOC (OGRSpatialReferenceH hSRS, double dfLatitudeOfOrigin, double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing)
 Swiss Oblique Cylindrical.
 
OGRErr OSRSetTM (OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing)
 Transverse Mercator.
 
OGRErr OSRSetTMVariant (OGRSpatialReferenceH hSRS, const char *pszVariantName, double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing)
 Transverse Mercator variant.
 
OGRErr OSRSetTMG (OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
 Tunesia Mining Grid

 
OGRErr OSRSetTMSO (OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing)
 Transverse Mercator (South Oriented)
 
OGRErr OSRSetTPED (OGRSpatialReferenceH hSRS, double dfLat1, double dfLong1, double dfLat2, double dfLong2, double dfFalseEasting, double dfFalseNorthing)
 TPED (Two Point Equi Distant)
 
OGRErr OSRSetVDG (OGRSpatialReferenceH hSRS, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing)
 VanDerGrinten.
 
OGRErr OSRSetWagner (OGRSpatialReferenceH hSRS, int nVariation, double dfCenterLat, double dfFalseEasting, double dfFalseNorthing)
 Wagner I – VII.
 
OGRErr OSRSetQSC (OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong)
 Quadrilateralized Spherical Cube.
 
OGRErr OSRSetSCH (OGRSpatialReferenceH hSRS, double dfPegLat, double dfPegLong, double dfPegHeading, double dfPegHgt)
 Spherical, Cross-track, Height.
 
OGRErr OSRSetVerticalPerspective (OGRSpatialReferenceH hSRS, double dfTopoOriginLat, double dfTopoOriginLon, double dfTopoOriginHeight, double dfViewPointHeight, double dfFalseEasting, double dfFalseNorthing)
 Vertical Perspective / Near-sided Perspective.
 
double OSRCalcInvFlattening (double dfSemiMajor, double dfSemiMinor)
 Compute inverse flattening from semi-major and semi-minor axis.
 
double OSRCalcSemiMinorFromInvFlattening (double dfSemiMajor, double dfInvFlattening)
 Compute semi-minor axis from semi-major axis and inverse flattening.
 
void OSRCleanup (void)
 Cleanup cached SRS related memory.
 
OSRCRSInfo ** OSRGetCRSInfoListFromDatabase (const char *pszAuthName, const OSRCRSListParameters *params, int *pnOutResultCount)
 Enumerate CRS objects from the database.
 
void OSRDestroyCRSInfoList (OSRCRSInfo **list)
 Destroy the result returned by OSRGetCRSInfoListFromDatabase().
 
OGRCoordinateTransformationH OCTNewCoordinateTransformation (OGRSpatialReferenceH hSourceSRS, OGRSpatialReferenceH hTargetSRS)
 Create transformation object.
 
OGRCoordinateTransformationOptionsH OCTNewCoordinateTransformationOptions (void)
 Create coordinate transformation options.
 
int OCTCoordinateTransformationOptionsSetOperation (OGRCoordinateTransformationOptionsH hOptions, const char *pszCO, int bReverseCO)
 Sets a coordinate operation.
 
int OCTCoordinateTransformationOptionsSetAreaOfInterest (OGRCoordinateTransformationOptionsH hOptions, double dfWestLongitudeDeg, double dfSouthLatitudeDeg, double dfEastLongitudeDeg, double dfNorthLatitudeDeg)
 Sets an area of interest.
 
int OCTCoordinateTransformationOptionsSetDesiredAccuracy (OGRCoordinateTransformationOptionsH hOptions, double dfAccuracy)
 Sets the desired accuracy for coordinate operations.
 
int OCTCoordinateTransformationOptionsSetBallparkAllowed (OGRCoordinateTransformationOptionsH hOptions, int bAllowBallpark)
 Sets whether ballpark transformations are allowed.
 
int OCTCoordinateTransformationOptionsSetOnlyBest (OGRCoordinateTransformationOptionsH hOptions, bool bOnlyBest)
 Sets whether only the "best" operation(s) should be used.
 
void OCTDestroyCoordinateTransformationOptions (OGRCoordinateTransformationOptionsH)
 Destroy coordinate transformation options.
 
OGRCoordinateTransformationH OCTNewCoordinateTransformationEx (OGRSpatialReferenceH hSourceSRS, OGRSpatialReferenceH hTargetSRS, OGRCoordinateTransformationOptionsH hOptions)
 Create transformation object.
 
OGRCoordinateTransformationH OCTClone (OGRCoordinateTransformationH hTransform)
 Clone transformation object.
 
OGRSpatialReferenceH OCTGetSourceCS (OGRCoordinateTransformationH hTransform)
 Transformation's source coordinate system reference.
 
OGRSpatialReferenceH OCTGetTargetCS (OGRCoordinateTransformationH hTransform)
 Transformation's target coordinate system reference.
 
OGRCoordinateTransformationH OCTGetInverse (OGRCoordinateTransformationH hTransform)
 Inverse transformation object.
 
void OCTDestroyCoordinateTransformation (OGRCoordinateTransformationH)
 OGRCoordinateTransformation destructor.
 
int OCTTransform (OGRCoordinateTransformationH hCT, int nCount, double *x, double *y, double *z)
 Transform an array of points.
 
int OCTTransformEx (OGRCoordinateTransformationH hCT, int nCount, double *x, double *y, double *z, int *pabSuccess)
 Transform an array of points.
 
int OCTTransform4D (OGRCoordinateTransformationH hCT, int nCount, double *x, double *y, double *z, double *t, int *pabSuccess)
 Transform an array of points.
 
int OCTTransform4DWithErrorCodes (OGRCoordinateTransformationH hCT, int nCount, double *x, double *y, double *z, double *t, int *panErrorCodes)
 Transform an array of points.
 
int OCTTransformBounds (OGRCoordinateTransformationH hCT, const double xmin, const double ymin, const double xmax, const double ymax, double *out_xmin, double *out_ymin, double *out_xmax, double *out_ymax, const int densify_pts)
 Transform boundary.
 

Detailed Description

C spatial reference system services and defines.

See also: ogr_spatialref.h

Macro Definition Documentation

◆ SRS_WKT_WGS84_LAT_LONG

#define SRS_WKT_WGS84_LAT_LONG
Value:
"GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS " \
"84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[" \
"\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]]" \
",UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[" \
"\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\"," \
"\"4326\"]]"

WGS 84 geodetic (lat/long) WKT / EPSG:4326 with lat,long ordering.

Typedef Documentation

◆ OSRCRSListParameters

Structure to describe optional parameters to OSRGetCRSInfoListFromDatabase()

Unused for now.

Enumeration Type Documentation

◆ OGRAxisOrientation

Axis orientations (corresponds to CS_AxisOrientationEnum).

Enumerator
OAO_Other 

Other.

OAO_North 

North.

OAO_South 

South.

OAO_East 

East.

OAO_West 

West.

OAO_Up 

Up (to space)

OAO_Down 

Down (to Earth center)

◆ OSRAxisMappingStrategy

Data axis to CRS axis mapping strategy.

Enumerator
OAMS_TRADITIONAL_GIS_ORDER 

Traditional GIS order.

OAMS_AUTHORITY_COMPLIANT 

Compliant with the order mandated by the CRS authority.

OAMS_CUSTOM 

Custom.

◆ OSRCRSType

enum OSRCRSType

Type of Coordinate Reference System (CRS).

Enumerator
OSR_CRS_TYPE_GEOGRAPHIC_2D 

Geographic 2D CRS.

OSR_CRS_TYPE_GEOGRAPHIC_3D 

Geographic 3D CRS.

OSR_CRS_TYPE_GEOCENTRIC 

Geocentric CRS.

OSR_CRS_TYPE_PROJECTED 

Projected CRS.

OSR_CRS_TYPE_VERTICAL 

Vertical CRS.

OSR_CRS_TYPE_COMPOUND 

Compound CRS.

OSR_CRS_TYPE_OTHER 

Other.

Function Documentation

◆ OCTClone()

Clone transformation object.

This is the same as the C++ function OGRCreateCoordinateTransformation::Clone

Returns
handle to transformation's clone or NULL on error, must be freed with OCTDestroyCoordinateTransformation
Since
GDAL 3.4

◆ OCTCoordinateTransformationOptionsSetAreaOfInterest()

int OCTCoordinateTransformationOptionsSetAreaOfInterest ( OGRCoordinateTransformationOptionsH  hOptions,
double  dfWestLongitudeDeg,
double  dfSouthLatitudeDeg,
double  dfEastLongitudeDeg,
double  dfNorthLatitudeDeg 
)

Sets an area of interest.

See OGRCoordinateTransformationOptions::SetAreaOfInterest()

Since
GDAL 3.0

◆ OCTCoordinateTransformationOptionsSetBallparkAllowed()

int OCTCoordinateTransformationOptionsSetBallparkAllowed ( OGRCoordinateTransformationOptionsH  hOptions,
int  bAllowBallpark 
)

Sets whether ballpark transformations are allowed.

See OGRCoordinateTransformationOptions::SetDesiredAccuracy()

Since
GDAL 3.3 and PROJ 8

◆ OCTCoordinateTransformationOptionsSetDesiredAccuracy()

int OCTCoordinateTransformationOptionsSetDesiredAccuracy ( OGRCoordinateTransformationOptionsH  hOptions,
double  dfAccuracy 
)

Sets the desired accuracy for coordinate operations.

See OGRCoordinateTransformationOptions::SetDesiredAccuracy()

Since
GDAL 3.3

◆ OCTCoordinateTransformationOptionsSetOnlyBest()

int OCTCoordinateTransformationOptionsSetOnlyBest ( OGRCoordinateTransformationOptionsH  hOptions,
bool  bOnlyBest 
)

Sets whether only the "best" operation(s) should be used.

See OGRCoordinateTransformationOptions::SetOnlyBest()

Since
GDAL 3.8 and PROJ 9.2

◆ OCTCoordinateTransformationOptionsSetOperation()

int OCTCoordinateTransformationOptionsSetOperation ( OGRCoordinateTransformationOptionsH  hOptions,
const char *  pszCO,
int  bReverseCO 
)

Sets a coordinate operation.

See OGRCoordinateTransformationOptions::SetCoordinateTransformation()

Since
GDAL 3.0

◆ OCTDestroyCoordinateTransformation()

void OCTDestroyCoordinateTransformation ( OGRCoordinateTransformationH  hCT)

OGRCoordinateTransformation destructor.

This function is the same as OGRCoordinateTransformation::DestroyCT()

Parameters
hCTthe object to delete

◆ OCTDestroyCoordinateTransformationOptions()

void OCTDestroyCoordinateTransformationOptions ( OGRCoordinateTransformationOptionsH  hOptions)

Destroy coordinate transformation options.

Since
GDAL 3.0

◆ OCTGetInverse()

Inverse transformation object.

This is the same as the C++ function OGRCreateCoordinateTransformation::GetInverse

Returns
handle to inverse transformation or NULL on error, must be freed with OCTDestroyCoordinateTransformation
Since
GDAL 3.4

◆ OCTGetSourceCS()

OGRSpatialReferenceH OCTGetSourceCS ( OGRCoordinateTransformationH  hTransform)

Transformation's source coordinate system reference.

This is the same as the C++ function OGRCreateCoordinateTransformation::GetSourceCS

Returns
handle to transformation's source coordinate system or NULL if not present.

The ownership of the returned SRS belongs to the transformation object, and the returned SRS should not be modified.

Since
GDAL 3.4

◆ OCTGetTargetCS()

OGRSpatialReferenceH OCTGetTargetCS ( OGRCoordinateTransformationH  hTransform)

Transformation's target coordinate system reference.

This is the same as the C++ function OGRCreateCoordinateTransformation::GetTargetCS

Returns
handle to transformation's target coordinate system or NULL if not present.

The ownership of the returned SRS belongs to the transformation object, and the returned SRS should not be modified.

Since
GDAL 3.4

◆ OCTNewCoordinateTransformation()

OGRCoordinateTransformationH OCTNewCoordinateTransformation ( OGRSpatialReferenceH  hSourceSRS,
OGRSpatialReferenceH  hTargetSRS 
)

Create transformation object.

This is the same as the C++ function OGRCreateCoordinateTransformation(const OGRSpatialReference *, const OGRSpatialReference *)

Input spatial reference system objects are assigned by copy (calling clone() method) and no ownership transfer occurs.

OCTDestroyCoordinateTransformation() should be used to destroy transformation objects.

This will honour the axis order advertized by the source and target SRS, as well as their "data axis to SRS axis mapping". To have a behavior similar to GDAL < 3.0, the OGR_CT_FORCE_TRADITIONAL_GIS_ORDER configuration option can be set to YES.

Parameters
hSourceSRSsource spatial reference system.
hTargetSRStarget spatial reference system.
Returns
NULL on failure or a ready to use transformation object.

◆ OCTNewCoordinateTransformationEx()

OGRCoordinateTransformationH OCTNewCoordinateTransformationEx ( OGRSpatialReferenceH  hSourceSRS,
OGRSpatialReferenceH  hTargetSRS,
OGRCoordinateTransformationOptionsH  hOptions 
)

Create transformation object.

This is the same as the C++ function OGRCreateCoordinateTransformation(const OGRSpatialReference *, const OGRSpatialReference *, const OGRCoordinateTransformationOptions& )

Input spatial reference system objects are assigned by copy (calling clone() method) and no ownership transfer occurs.

OCTDestroyCoordinateTransformation() should be used to destroy transformation objects.

The source SRS and target SRS should generally not be NULL. This is only allowed if a custom coordinate operation is set through the hOptions argument.

This will honour the axis order advertized by the source and target SRS, as well as their "data axis to SRS axis mapping". To have a behavior similar to GDAL < 3.0, the OGR_CT_FORCE_TRADITIONAL_GIS_ORDER configuration option can be set to YES.

If options contains a user defined coordinate transformation pipeline, it will be unconditionally used. If options has an area of interest defined, it will be used to research the best fitting coordinate transformation (which will be used for all coordinate transformations, even if they don't fall into the declared area of interest) If no options are set, then a list of candidate coordinate operations will be researched, and at each call to Transform(), the best of those candidate regarding the centroid of the coordinate set will be dynamically selected.

Parameters
hSourceSRSsource spatial reference system.
hTargetSRStarget spatial reference system.
hOptionsCoordinate transformation options.
Returns
NULL on failure or a ready to use transformation object.
Since
GDAL 3.0

◆ OCTNewCoordinateTransformationOptions()

OGRCoordinateTransformationOptionsH OCTNewCoordinateTransformationOptions ( void  )

Create coordinate transformation options.

To be freed with OCTDestroyCoordinateTransformationOptions()

Since
GDAL 3.0

◆ OCTTransform()

int OCTTransform ( OGRCoordinateTransformationH  hTransform,
int  nCount,
double *  x,
double *  y,
double *  z 
)

Transform an array of points.

Parameters
hTransformTransformation object
nCountNumber of points
xArray of nCount x values.
yArray of nCount y values.
zArray of nCount z values.
Returns
TRUE if a transformation could be found (but not all points may have necessarily succeed to transform), otherwise FALSE.

◆ OCTTransform4D()

int OCTTransform4D ( OGRCoordinateTransformationH  hTransform,
int  nCount,
double *  x,
double *  y,
double *  z,
double *  t,
int *  pabSuccess 
)

Transform an array of points.

Parameters
hTransformTransformation object
nCountNumber of points
xArray of nCount x values. Should not be NULL
yArray of nCount y values. Should not be NULL
zArray of nCount z values. Might be NULL
tArray of nCount time values. Might be NULL
pabSuccessOutput array of nCount value that will be set to TRUE/FALSE. Might be NULL.
Since
GDAL 3.0
Returns
TRUE if a transformation could be found (but not all points may have necessarily succeed to transform), otherwise FALSE.

◆ OCTTransform4DWithErrorCodes()

int OCTTransform4DWithErrorCodes ( OGRCoordinateTransformationH  hTransform,
int  nCount,
double *  x,
double *  y,
double *  z,
double *  t,
int *  panErrorCodes 
)

Transform an array of points.

Parameters
hTransformTransformation object
nCountNumber of points
xArray of nCount x values. Should not be NULL
yArray of nCount y values. Should not be NULL
zArray of nCount z values. Might be NULL
tArray of nCount time values. Might be NULL
panErrorCodesOutput array of nCount value that will be set to 0 for success, or a non-zero value for failure. Refer to PROJ 8 public error codes. Might be NULL
Since
GDAL 3.3, and PROJ 8 to be able to use PROJ public error codes
Returns
TRUE if a transformation could be found (but not all points may have necessarily succeed to transform), otherwise FALSE.

◆ OCTTransformBounds()

int OCTTransformBounds ( OGRCoordinateTransformationH  hTransform,
const double  xmin,
const double  ymin,
const double  xmax,
const double  ymax,
double *  out_xmin,
double *  out_ymin,
double *  out_xmax,
double *  out_ymax,
int  densify_pts 
)

Transform boundary.

Transform boundary densifying the edges to account for nonlinear transformations along these edges and extracting the outermost bounds.

If the destination CRS is geographic, the first axis is longitude, and xmax < xmin then the bounds crossed the antimeridian. In this scenario there are two polygons, one on each side of the antimeridian. The first polygon should be constructed with (xmin, ymin, 180, ymax) and the second with (-180, ymin, xmax, ymax).

If the destination CRS is geographic, the first axis is latitude, and ymax < ymin then the bounds crossed the antimeridian. In this scenario there are two polygons, one on each side of the antimeridian. The first polygon should be constructed with (ymin, xmin, ymax, 180) and the second with (ymin, -180, ymax, xmax).

Parameters
hTransformTransformation object
xminMinimum bounding coordinate of the first axis in source CRS.
yminMinimum bounding coordinate of the second axis in source CRS.
xmaxMaximum bounding coordinate of the first axis in source CRS.
ymaxMaximum bounding coordinate of the second axis in source CRS.
out_xminMinimum bounding coordinate of the first axis in target CRS
out_yminMinimum bounding coordinate of the second axis in target CRS.
out_xmaxMaximum bounding coordinate of the first axis in target CRS.
out_ymaxMaximum bounding coordinate of the second axis in target CRS.
densify_ptsRecommended to use 21. This is the number of points to use to densify the bounding polygon in the transformation.
Returns
TRUE if successful. FALSE if failures encountered.
Since
3.4

◆ OCTTransformEx()

int OCTTransformEx ( OGRCoordinateTransformationH  hTransform,
int  nCount,
double *  x,
double *  y,
double *  z,
int *  pabSuccess 
)

Transform an array of points.

Parameters
hTransformTransformation object
nCountNumber of points
xArray of nCount x values.
yArray of nCount y values.
zArray of nCount z values.
pabSuccessOutput array of nCount value that will be set to TRUE/FALSE
Returns
TRUE if a transformation could be found (but not all points may have necessarily succeed to transform), otherwise FALSE.

◆ OSRAddGuessedTOWGS84()

OGRErr OSRAddGuessedTOWGS84 ( OGRSpatialReferenceH  hSRS)

Try to add a a 3-parameter or 7-parameter Helmert transformation to WGS84.

This function is the same as OGRSpatialReference::AddGuessedTOWGS84().

Since
GDAL 3.0.3

◆ OSRAutoIdentifyEPSG()

OGRErr OSRAutoIdentifyEPSG ( OGRSpatialReferenceH  hSRS)

Set EPSG authority info if possible.

This function is the same as OGRSpatialReference::AutoIdentifyEPSG().

Since GDAL 2.3, the OSRFindMatches() function can also be used for improved matching by researching the EPSG catalog.

◆ OSRAxisEnumToName()

const char * OSRAxisEnumToName ( OGRAxisOrientation  eOrientation)

Return the string representation for the OGRAxisOrientation enumeration.

For example "NORTH" for OAO_North.

Returns
an internal string

◆ OSRCalcInvFlattening()

double OSRCalcInvFlattening ( double  dfSemiMajor,
double  dfSemiMinor 
)

Compute inverse flattening from semi-major and semi-minor axis.

Parameters
dfSemiMajorSemi-major axis length.
dfSemiMinorSemi-minor axis length.
Returns
inverse flattening, or 0 if both axis are equal.
Since
GDAL 2.0

◆ OSRCalcSemiMinorFromInvFlattening()

double OSRCalcSemiMinorFromInvFlattening ( double  dfSemiMajor,
double  dfInvFlattening 
)

Compute semi-minor axis from semi-major axis and inverse flattening.

Parameters
dfSemiMajorSemi-major axis length.
dfInvFlatteningInverse flattening or 0 for sphere.
Returns
semi-minor axis
Since
GDAL 2.0

◆ OSRCleanup()

void OSRCleanup ( void  )

Cleanup cached SRS related memory.

This function will attempt to cleanup any cache spatial reference related information, such as cached tables of coordinate systems.

This function should not be called concurrently with any other GDAL/OGR function. It is meant at being called once before process termination (typically from the main thread). CPLCleanupTLS() might be used to clean thread-specific resources before thread termination.

◆ OSRClone()

Make a duplicate of this OGRSpatialReference.

This function is the same as OGRSpatialReference::Clone()

◆ OSRCloneGeogCS()

OGRSpatialReferenceH OSRCloneGeogCS ( OGRSpatialReferenceH  hSource)

Make a duplicate of the GEOGCS node of this OGRSpatialReference object.

This function is the same as OGRSpatialReference::CloneGeogCS().

◆ OSRConvertToOtherProjection()

OGRSpatialReferenceH OSRConvertToOtherProjection ( OGRSpatialReferenceH  hSRS,
const char *  pszTargetProjection,
const char *const *  papszOptions 
)

Convert to another equivalent projection.

Currently implemented:

  • SRS_PT_MERCATOR_1SP to SRS_PT_MERCATOR_2SP
  • SRS_PT_MERCATOR_2SP to SRS_PT_MERCATOR_1SP
  • SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP to SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP
  • SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP to SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP
Parameters
hSRSsource SRS
pszTargetProjectiontarget projection.
papszOptionslists of options. None supported currently.
Returns
a new SRS, or NULL in case of error.
Since
GDAL 2.3

◆ OSRCopyGeogCSFrom()

OGRErr OSRCopyGeogCSFrom ( OGRSpatialReferenceH  hSRS,
const OGRSpatialReferenceH  hSrcSRS 
)

Copy GEOGCS from another OGRSpatialReference.

This function is the same as OGRSpatialReference::CopyGeogCSFrom()

◆ OSRDemoteTo2D()

OGRErr OSRDemoteTo2D ( OGRSpatialReferenceH  hSRS,
const char *  pszName 
)

"Demote" a 3D CRS to a 2D CRS one.

See OGRSpatialReference::DemoteTo2D()

Since
GDAL 3.2 and PROJ 6.3

◆ OSRDereference()

int OSRDereference ( OGRSpatialReferenceH  hSRS)

Decrements the reference count by one.

This function is the same as OGRSpatialReference::Dereference()

◆ OSRDestroyCRSInfoList()

void OSRDestroyCRSInfoList ( OSRCRSInfo **  list)

Destroy the result returned by OSRGetCRSInfoListFromDatabase().

Since
GDAL 3.0

◆ OSRDestroySpatialReference()

void OSRDestroySpatialReference ( OGRSpatialReferenceH  hSRS)

OGRSpatialReference destructor.

This function is the same as OGRSpatialReference::~OGRSpatialReference() and OGRSpatialReference::DestroySpatialReference()

Parameters
hSRSthe object to delete

◆ OSREPSGTreatsAsLatLong()

int OSREPSGTreatsAsLatLong ( OGRSpatialReferenceH  hSRS)

This function returns TRUE if this geographic coordinate system should be treated as having lat/long coordinate ordering.

This function is the same as OGRSpatialReference::OSREPSGTreatsAsLatLong().

◆ OSREPSGTreatsAsNorthingEasting()

int OSREPSGTreatsAsNorthingEasting ( OGRSpatialReferenceH  hSRS)

This function returns TRUE if this projected coordinate system should be treated as having northing/easting coordinate ordering.

This function is the same as OGRSpatialReference::EPSGTreatsAsNorthingEasting().

Since
OGR 1.10.0

◆ OSRExportToCF1()

OGRErr OSRExportToCF1 ( OGRSpatialReferenceH  hSRS,
char **  ppszGridMappingName,
char ***  ppapszKeyValues,
char **  ppszUnits,
CSLConstList  papszOptions 
)

Export a CRS to netCDF CF-1 definitions.

This function is the same as OGRSpatialReference::exportToCF1().

◆ OSRExportToERM()

OGRErr OSRExportToERM ( OGRSpatialReferenceH  hSRS,
char *  pszProj,
char *  pszDatum,
char *  pszUnits 
)

Convert coordinate system to ERMapper format.

This function is the same as OGRSpatialReference::exportToERM().

◆ OSRExportToMICoordSys()

OGRErr OSRExportToMICoordSys ( OGRSpatialReferenceH  hSRS,
char **  ppszReturn 
)

Export coordinate system in Mapinfo style CoordSys format.

This method is the equivalent of the C++ method OGRSpatialReference::exportToMICoordSys

◆ OSRExportToPanorama()

OGRErr OSRExportToPanorama ( OGRSpatialReferenceH  hSRS,
long *  piProjSys,
long *  piDatum,
long *  piEllips,
long *  piZone,
double *  padfPrjParams 
)

Export coordinate system in "Panorama" GIS projection definition.

See OGRSpatialReference::exportToPanorama()

◆ OSRExportToPCI()

OGRErr OSRExportToPCI ( OGRSpatialReferenceH  hSRS,
char **  ppszProj,
char **  ppszUnits,
double **  ppadfPrjParams 
)

Export coordinate system in PCI projection definition.

This function is the same as OGRSpatialReference::exportToPCI().

◆ OSRExportToPrettyWkt()

OGRErr OSRExportToPrettyWkt ( OGRSpatialReferenceH  hSRS,
char **  ppszReturn,
int  bSimplify 
)

Convert this SRS into a nicely formatted WKT 1 string for display to a person.

The WKT version can be overridden by using the OSR_WKT_FORMAT configuration option. Valid values are the one of the FORMAT option of exportToWkt( char ** ppszResult, const char* const* papszOptions ) const

This function is the same as OGRSpatialReference::exportToPrettyWkt().

◆ OSRExportToProj4()

OGRErr OSRExportToProj4 ( OGRSpatialReferenceH  hSRS,
char **  ppszReturn 
)

Export coordinate system in PROJ.4 legacy format.

Warning
Use of this function is discouraged. Its behavior in GDAL >= 3 / PROJ >= 6 is significantly different from earlier versions. In particular +datum will only encode WGS84, NAD27 and NAD83, and +towgs84/+nadgrids terms will be missing most of the time. PROJ strings to encode CRS should be considered as a legacy solution. Using a AUTHORITY:CODE or WKT representation is the recommended way.

This function is the same as OGRSpatialReference::exportToProj4().

◆ OSRExportToPROJJSON()

OGRErr OSRExportToPROJJSON ( OGRSpatialReferenceH  hSRS,
char **  ppszReturn,
const char *const *  papszOptions 
)

Convert this SRS into PROJJSON format.

This function is the same as OGRSpatialReference::exportToPROJJSON() const

Since
GDAL 3.1 and PROJ 6.2

◆ OSRExportToUSGS()

OGRErr OSRExportToUSGS ( OGRSpatialReferenceH  hSRS,
long *  piProjSys,
long *  piZone,
double **  ppadfPrjParams,
long *  piDatum 
)

Export coordinate system in USGS GCTP projection definition.

This function is the same as OGRSpatialReference::exportToUSGS().

◆ OSRExportToWkt()

OGRErr OSRExportToWkt ( OGRSpatialReferenceH  hSRS,
char **  ppszReturn 
)

Convert this SRS into WKT 1 format.

Consult also the OGC WKT Coordinate System Issues page for implementation details of WKT in OGR.

The WKT version can be overridden by using the OSR_WKT_FORMAT configuration option. Valid values are the one of the FORMAT option of exportToWkt( char ** ppszResult, const char* const* papszOptions ) const

This function is the same as OGRSpatialReference::exportToWkt().

◆ OSRExportToWktEx()

OGRErr OSRExportToWktEx ( OGRSpatialReferenceH  hSRS,
char **  ppszReturn,
const char *const *  papszOptions 
)

Convert this SRS into WKT format.

This function is the same as OGRSpatialReference::exportToWkt(char ** ppszResult,const char* const* papszOptions ) const

Since
GDAL 3.0

◆ OSRExportToXML()

OGRErr OSRExportToXML ( OGRSpatialReferenceH  hSRS,
char **  ppszRawXML,
const char *  pszDialect 
)

Export coordinate system in XML format.

This function is the same as OGRSpatialReference::exportToXML().

◆ OSRFindMatches()

OGRSpatialReferenceH * OSRFindMatches ( OGRSpatialReferenceH  hSRS,
char **  papszOptions,
int *  pnEntries,
int **  ppanMatchConfidence 
)

Try to identify a match between the passed SRS and a related SRS in a catalog.

Matching may be partial, or may fail. Returned entries will be sorted by decreasing match confidence (first entry has the highest match confidence).

The exact way matching is done may change in future versions. Starting with GDAL 3.0, it relies on PROJ' proj_identify() function.

This function is the same as OGRSpatialReference::FindMatches().

Parameters
hSRSSRS to match
papszOptionsNULL terminated list of options or NULL
pnEntriesOutput parameter. Number of values in the returned array.
ppanMatchConfidenceOutput parameter (or NULL). *ppanMatchConfidence will be allocated to an array of *pnEntries whose values between 0 and 100 indicate the confidence in the match. 100 is the highest confidence level. The array must be freed with CPLFree().
Returns
an array of SRS that match the passed SRS, or NULL. Must be freed with OSRFreeSRSArray()
Since
GDAL 2.3

◆ OSRFreeSRSArray()

void OSRFreeSRSArray ( OGRSpatialReferenceH pahSRS)

Free return of OSRIdentifyMatches()

Parameters
pahSRSarray of SRS (must be NULL terminated)
Since
GDAL 2.3

◆ OSRGetAngularUnits()

double OSRGetAngularUnits ( OGRSpatialReferenceH  hSRS,
char **  ppszName 
)

Fetch angular geographic coordinate system units.

This function is the same as OGRSpatialReference::GetAngularUnits()

◆ OSRGetAreaOfUse()

int OSRGetAreaOfUse ( OGRSpatialReferenceH  hSRS,
double *  pdfWestLongitudeDeg,
double *  pdfSouthLatitudeDeg,
double *  pdfEastLongitudeDeg,
double *  pdfNorthLatitudeDeg,
const char **  ppszAreaName 
)

Return the area of use of the CRS.

This function is the same as the OGRSpatialReference::GetAreaOfUse() method.

Since
GDAL 3.0

◆ OSRGetAttrValue()

const char * OSRGetAttrValue ( OGRSpatialReferenceH  hSRS,
const char *  pszKey,
int  iChild 
)

Fetch indicated attribute of named node.

This function is the same as OGRSpatialReference::GetAttrValue()

◆ OSRGetAuthorityCode()

const char * OSRGetAuthorityCode ( OGRSpatialReferenceH  hSRS,
const char *  pszTargetKey 
)

Get the authority code for a node.

This function is the same as OGRSpatialReference::GetAuthorityCode().

◆ OSRGetAuthorityName()

const char * OSRGetAuthorityName ( OGRSpatialReferenceH  hSRS,
const char *  pszTargetKey 
)

Get the authority name for a node.

This function is the same as OGRSpatialReference::GetAuthorityName().

◆ OSRGetAxesCount()

int OSRGetAxesCount ( OGRSpatialReferenceH  hSRS)

Return the number of axis of the coordinate system of the CRS.

This method is the equivalent of the C++ method OGRSpatialReference::GetAxesCount()

Since
GDAL 3.1

◆ OSRGetAxis()

const char * OSRGetAxis ( OGRSpatialReferenceH  hSRS,
const char *  pszTargetKey,
int  iAxis,
OGRAxisOrientation peOrientation 
)

Fetch the orientation of one axis.

This method is the equivalent of the C++ method OGRSpatialReference::GetAxis

◆ OSRGetAxisMappingStrategy()

OSRAxisMappingStrategy OSRGetAxisMappingStrategy ( OGRSpatialReferenceH  hSRS)

Return the data axis to CRS axis mapping strategy.

See OGRSpatialReference::GetAxisMappingStrategy()

Since
GDAL 3.0

◆ OSRGetCoordinateEpoch()

double OSRGetCoordinateEpoch ( OGRSpatialReferenceH  hSRS)

Get the coordinate epoch, as decimal year.

See OGRSpatialReference::GetCoordinateEpoch()

Since
OGR 3.4

◆ OSRGetCRSInfoListFromDatabase()

OSRCRSInfo ** OSRGetCRSInfoListFromDatabase ( const char *  pszAuthName,
const OSRCRSListParameters params,
int *  pnOutResultCount 
)

Enumerate CRS objects from the database.

The returned object is an array of OSRCRSInfo* pointers, whose last entry is NULL. This array should be freed with OSRDestroyCRSInfoList()

Parameters
pszAuthNameAuthority name, used to restrict the search. Or NULL for all authorities.
paramsAdditional criteria. Must be set to NULL for now.
pnOutResultCountOutput parameter pointing to an integer to receive the size of the result list. Might be NULL
Returns
an array of OSRCRSInfo* pointers to be freed with OSRDestroyCRSInfoList(), or NULL in case of error.
Since
GDAL 3.0

◆ OSRGetDataAxisToSRSAxisMapping()

const int * OSRGetDataAxisToSRSAxisMapping ( OGRSpatialReferenceH  hSRS,
int *  pnCount 
)

Return the data axis to SRS axis mapping.

See OGRSpatialReference::GetDataAxisToSRSAxisMapping()

Since
GDAL 3.0

◆ OSRGetInvFlattening()

double OSRGetInvFlattening ( OGRSpatialReferenceH  hSRS,
OGRErr pnErr 
)

Get spheroid inverse flattening.

This function is the same as OGRSpatialReference::GetInvFlattening()

◆ OSRGetLinearUnits()

double OSRGetLinearUnits ( OGRSpatialReferenceH  hSRS,
char **  ppszName 
)

Fetch linear projection units.

This function is the same as OGRSpatialReference::GetLinearUnits()

◆ OSRGetName()

const char * OSRGetName ( OGRSpatialReferenceH  hSRS)

Return the CRS name.

The returned value is only short lived and should not be used after other calls to methods on this object.

Since
GDAL 3.0

◆ OSRGetNormProjParm()

double OSRGetNormProjParm ( OGRSpatialReferenceH  hSRS,
const char *  pszName,
double  dfDefaultValue,
OGRErr pnErr 
)

This function is the same as OGRSpatialReference::

This function is the same as OGRSpatialReference::GetNormProjParm()

◆ OSRGetPrimeMeridian()

double OSRGetPrimeMeridian ( OGRSpatialReferenceH  hSRS,
char **  ppszName 
)

Fetch prime meridian info.

This function is the same as OGRSpatialReference::GetPrimeMeridian()

◆ OSRGetPROJAuxDbPaths()

char ** OSRGetPROJAuxDbPaths ( void  )

Get PROJ auxiliary database filenames.

Returns
NULL terminated list of PROJ auxiliary database filenames. To be freed with CSLDestroy()
Since
GDAL 3.3.0
See also
OSRSetPROJAuxDbPaths, proj_context_set_database_path

◆ OSRGetPROJEnableNetwork()

int OSRGetPROJEnableNetwork ( void  )

Get whether PROJ networking capabilities are enabled.

Returns
TRUE if PROJ networking capabilities are enabled.
Since
GDAL 3.4 and PROJ 7
See also
OSRSetPROJEnableNetwork, proj_context_is_network_enabled

◆ OSRGetProjParm()

double OSRGetProjParm ( OGRSpatialReferenceH  hSRS,
const char *  pszName,
double  dfDefaultValue,
OGRErr pnErr 
)

Fetch a projection parameter value.

This function is the same as OGRSpatialReference::GetProjParm()

◆ OSRGetPROJSearchPaths()

char ** OSRGetPROJSearchPaths ( void  )

Get the search path(s) for PROJ resource files.

Returns
NULL terminated list of directory paths. To be freed with CSLDestroy()
Since
GDAL 3.0.3

◆ OSRGetPROJVersion()

void OSRGetPROJVersion ( int *  pnMajor,
int *  pnMinor,
int *  pnPatch 
)

Get the PROJ version.

Parameters
pnMajorPointer to major version number, or NULL
pnMinorPointer to minor version number, or NULL
pnPatchPointer to patch version number, or NULL
Since
GDAL 3.0.1

◆ OSRGetSemiMajor()

double OSRGetSemiMajor ( OGRSpatialReferenceH  hSRS,
OGRErr pnErr 
)

Get spheroid semi major axis.

This function is the same as OGRSpatialReference::GetSemiMajor()

◆ OSRGetSemiMinor()

double OSRGetSemiMinor ( OGRSpatialReferenceH  hSRS,
OGRErr pnErr 
)

Get spheroid semi minor axis.

This function is the same as OGRSpatialReference::GetSemiMinor()

◆ OSRGetTargetLinearUnits()

double OSRGetTargetLinearUnits ( OGRSpatialReferenceH  hSRS,
const char *  pszTargetKey,
char **  ppszName 
)

Fetch linear projection units.

This function is the same as OGRSpatialReference::GetTargetLinearUnits()

Since
OGR 1.9.0

◆ OSRGetTOWGS84()

OGRErr OSRGetTOWGS84 ( OGRSpatialReferenceH  hSRS,
double *  padfCoeff,
int  nCoeffCount 
)

Fetch TOWGS84 parameters, if available.

This function is the same as OGRSpatialReference::GetTOWGS84().

◆ OSRGetUTMZone()

int OSRGetUTMZone ( OGRSpatialReferenceH  hSRS,
int *  pbNorth 
)

Get utm zone information.

This is the same as the C++ method OGRSpatialReference::GetUTMZone()

◆ OSRHasPointMotionOperation()

int OSRHasPointMotionOperation ( OGRSpatialReferenceH  hSRS)

Check if a CRS has at least an associated point motion operation.

Some CRS are not formally declared as dynamic, but may behave as such in practice due to the prsence of point motion operation, to perform coordinate epoch changes within the CRS. Typically NAD83(CSRS)v7

This function is the same as OGRSpatialReference::HasPointMotionOperation().

Since
OGR 3.8.0 and PROJ 9.4.0

◆ OSRImportFromCF1()

OGRErr OSRImportFromCF1 ( OGRSpatialReferenceH  hSRS,
CSLConstList  papszKeyValues,
const char *  pszUnits 
)

Import a CRS from netCDF CF-1 definitions.

This function is the same as OGRSpatialReference::importFromCF1().

Since
3.9

◆ OSRImportFromDict()

OGRErr OSRImportFromDict ( OGRSpatialReferenceH  hSRS,
const char *  pszDictFile,
const char *  pszCode 
)

Read SRS from WKT dictionary.

This method will attempt to find the indicated coordinate system identity in the indicated dictionary file. If found, the WKT representation is imported and used to initialize this OGRSpatialReference.

More complete information on the format of the dictionary files can be found in the epsg.wkt file in the GDAL data tree. The dictionary files are searched for in the "GDAL" domain using CPLFindFile(). Normally this results in searching /usr/local/share/gdal or somewhere similar.

This method is the same as the C++ method OGRSpatialReference::importFromDict().

Parameters
hSRSspatial reference system handle.
pszDictFilethe name of the dictionary file to load.
pszCodethe code to lookup in the dictionary.
Returns
OGRERR_NONE on success, or OGRERR_SRS_UNSUPPORTED if the code isn't found, and OGRERR_SRS_FAILURE if something more dramatic goes wrong.

◆ OSRImportFromEPSG()

OGRErr OSRImportFromEPSG ( OGRSpatialReferenceH  hSRS,
int  nCode 
)

Initialize SRS based on EPSG geographic, projected or vertical CRS code.

This function is the same as OGRSpatialReference::importFromEPSG().

◆ OSRImportFromEPSGA()

OGRErr OSRImportFromEPSGA ( OGRSpatialReferenceH  hSRS,
int  nCode 
)

Initialize SRS based on EPSG geographic, projected or vertical CRS code.

This function is the same as OGRSpatialReference::importFromEPSGA().

◆ OSRImportFromERM()

OGRErr OSRImportFromERM ( OGRSpatialReferenceH  hSRS,
const char *  pszProj,
const char *  pszDatum,
const char *  pszUnits 
)

Create OGR WKT from ERMapper projection definitions.

This function is the same as OGRSpatialReference::importFromERM().

◆ OSRImportFromESRI()

OGRErr OSRImportFromESRI ( OGRSpatialReferenceH  hSRS,
char **  papszPrj 
)

Import coordinate system from ESRI .prj format(s).

This function is the same as the C++ method OGRSpatialReference::importFromESRI().

◆ OSRImportFromMICoordSys()

OGRErr OSRImportFromMICoordSys ( OGRSpatialReferenceH  hSRS,
const char *  pszCoordSys 
)

Import Mapinfo style CoordSys definition.

This method is the equivalent of the C++ method OGRSpatialReference::importFromMICoordSys

◆ OSRImportFromOzi()

OGRErr OSRImportFromOzi ( OGRSpatialReferenceH  hSRS,
const char *const *  papszLines 
)

Import coordinate system from OziExplorer projection definition.

This function will import projection definition in style, used by OziExplorer software.

Note: another version of this function with a different signature existed in GDAL 1.X.

Parameters
hSRSspatial reference object.
papszLinesMap file lines. This is an array of strings containing the whole OziExplorer .MAP file. The array is terminated by a NULL pointer.
Returns
OGRERR_NONE on success or an error code in case of failure.
Since
OGR 2.0

◆ OSRImportFromPanorama()

OGRErr OSRImportFromPanorama ( OGRSpatialReferenceH  hSRS,
long  iProjSys,
long  iDatum,
long  iEllips,
double *  padfPrjParams 
)

Import coordinate system from "Panorama" GIS projection definition.

See OGRSpatialReference::importFromPanorama()

◆ OSRImportFromPCI()

OGRErr OSRImportFromPCI ( OGRSpatialReferenceH  hSRS,
const char *  pszProj,
const char *  pszUnits,
double *  padfPrjParams 
)

Import coordinate system from PCI projection definition.

This function is the same as OGRSpatialReference::importFromPCI().

◆ OSRImportFromProj4()

OGRErr OSRImportFromProj4 ( OGRSpatialReferenceH  hSRS,
const char *  pszProj4 
)

Import PROJ coordinate string.

This function is the same as OGRSpatialReference::importFromProj4().

◆ OSRImportFromUrl()

OGRErr OSRImportFromUrl ( OGRSpatialReferenceH  hSRS,
const char *  pszUrl 
)

Set spatial reference from a URL.

This function is the same as OGRSpatialReference::importFromUrl()

◆ OSRImportFromUSGS()

OGRErr OSRImportFromUSGS ( OGRSpatialReferenceH  hSRS,
long  iProjsys,
long  iZone,
double *  padfPrjParams,
long  iDatum 
)

Import coordinate system from USGS projection definition.

This function is the same as OGRSpatialReference::importFromUSGS().

◆ OSRImportFromWkt()

OGRErr OSRImportFromWkt ( OGRSpatialReferenceH  hSRS,
char **  ppszInput 
)

Import from WKT string.

Consult also the OGC WKT Coordinate System Issues page for implementation details of WKT in OGR.

This function is the same as OGRSpatialReference::importFromWkt().

◆ OSRImportFromXML()

OGRErr OSRImportFromXML ( OGRSpatialReferenceH  hSRS,
const char *  pszXML 
)

Import coordinate system from XML format (GML only currently).

This function is the same as OGRSpatialReference::importFromXML().

◆ OSRIsCompound()

int OSRIsCompound ( OGRSpatialReferenceH  hSRS)

Check if the coordinate system is compound.

This function is the same as OGRSpatialReference::IsCompound().

◆ OSRIsDerivedGeographic()

int OSRIsDerivedGeographic ( OGRSpatialReferenceH  hSRS)

Check if the CRS is a derived geographic coordinate system.

(for example a rotated long/lat grid)

This function is the same as OGRSpatialReference::IsDerivedGeographic().

◆ OSRIsDerivedProjected()

int OSRIsDerivedProjected ( OGRSpatialReferenceH  hSRS)

Check if the CRS is a derived projected coordinate system.

This function is the same as OGRSpatialReference::IsDerivedProjected().

Since
GDAL 3.9.0 (and may only return non-zero starting with PROJ 9.2.0)

◆ OSRIsDynamic()

int OSRIsDynamic ( OGRSpatialReferenceH  hSRS)

Check if a CRS is a dynamic CRS.

A dynamic CRS relies on a dynamic datum, that is a datum that is not plate-fixed.

This function is the same as OGRSpatialReference::IsDynamic().

Since
OGR 3.4.0

◆ OSRIsGeocentric()

int OSRIsGeocentric ( OGRSpatialReferenceH  hSRS)

Check if geocentric coordinate system.

This function is the same as OGRSpatialReference::IsGeocentric().

Since
OGR 1.9.0

◆ OSRIsGeographic()

int OSRIsGeographic ( OGRSpatialReferenceH  hSRS)

Check if geographic coordinate system.

This function is the same as OGRSpatialReference::IsGeographic().

◆ OSRIsLocal()

int OSRIsLocal ( OGRSpatialReferenceH  hSRS)

Check if local coordinate system.

This function is the same as OGRSpatialReference::IsLocal().

◆ OSRIsProjected()

int OSRIsProjected ( OGRSpatialReferenceH  hSRS)

Check if projected coordinate system.

This function is the same as OGRSpatialReference::IsProjected().

◆ OSRIsSame()

int OSRIsSame ( OGRSpatialReferenceH  hSRS1,
OGRSpatialReferenceH  hSRS2 
)

Do these two spatial references describe the same system ?

This function is the same as OGRSpatialReference::IsSame().

◆ OSRIsSameEx()

int OSRIsSameEx ( OGRSpatialReferenceH  hSRS1,
OGRSpatialReferenceH  hSRS2,
const char *const *  papszOptions 
)

Do these two spatial references describe the same system ?

This function is the same as OGRSpatialReference::IsSame().

◆ OSRIsSameGeogCS()

int OSRIsSameGeogCS ( OGRSpatialReferenceH  hSRS1,
OGRSpatialReferenceH  hSRS2 
)

Do the GeogCS'es match?

This function is the same as OGRSpatialReference::IsSameGeogCS().

◆ OSRIsSameVertCS()

int OSRIsSameVertCS ( OGRSpatialReferenceH  hSRS1,
OGRSpatialReferenceH  hSRS2 
)

Do the VertCS'es match?

This function is the same as OGRSpatialReference::IsSameVertCS().

◆ OSRIsVertical()

int OSRIsVertical ( OGRSpatialReferenceH  hSRS)

Check if vertical coordinate system.

This function is the same as OGRSpatialReference::IsVertical().

Since
OGR 1.8.0

◆ OSRMorphFromESRI()

OGRErr OSRMorphFromESRI ( OGRSpatialReferenceH  hSRS)

Convert in place from ESRI WKT format.

This function is the same as the C++ method OGRSpatialReference::morphFromESRI().

◆ OSRMorphToESRI()

OGRErr OSRMorphToESRI ( OGRSpatialReferenceH  hSRS)

Convert in place to ESRI WKT format.

This function is the same as the C++ method OGRSpatialReference::morphToESRI().

◆ OSRNewSpatialReference()

OGRSpatialReferenceH OSRNewSpatialReference ( const char *  pszWKT)

Constructor.

Starting with GDAL 3.0, coordinates associated with a OGRSpatialReference object are assumed to be in the order of the axis of the CRS definition (which for example means latitude first, longitude second for geographic CRS belonging to the EPSG authority). It is possible to define a data axis to CRS axis mapping strategy with the SetAxisMappingStrategy() method.

Starting with GDAL 3.5, the OSR_DEFAULT_AXIS_MAPPING_STRATEGY configuration option can be set to "TRADITIONAL_GIS_ORDER" / "AUTHORITY_COMPLIANT" (the later being the default value when the option is not set) to control the value of the data axis to CRS axis mapping strategy when a OSRSpatialReference object is created. Calling SetAxisMappingStrategy() will override this default value.

This function is the same as OGRSpatialReference::OGRSpatialReference()

◆ OSRPromoteTo3D()

OGRErr OSRPromoteTo3D ( OGRSpatialReferenceH  hSRS,
const char *  pszName 
)

"Promotes" a 2D CRS to a 3D CRS one.

See OGRSpatialReference::PromoteTo3D()

Since
GDAL 3.1 and PROJ 6.3

◆ OSRReference()

int OSRReference ( OGRSpatialReferenceH  hSRS)

Increments the reference count by one.

This function is the same as OGRSpatialReference::Reference()

◆ OSRRelease()

void OSRRelease ( OGRSpatialReferenceH  hSRS)

Decrements the reference count by one, and destroy if zero.

This function is the same as OGRSpatialReference::Release()

◆ OSRSetAngularUnits()

OGRErr OSRSetAngularUnits ( OGRSpatialReferenceH  hSRS,
const char *  pszUnits,
double  dfInRadians 
)

Set the angular units for the geographic coordinate system.

This function is the same as OGRSpatialReference::SetAngularUnits()

◆ OSRSetAttrValue()

OGRErr OSRSetAttrValue ( OGRSpatialReferenceH  hSRS,
const char *  pszPath,
const char *  pszValue 
)

Set attribute value in spatial reference.

This function is the same as OGRSpatialReference::SetNode()

◆ OSRSetAuthority()

OGRErr OSRSetAuthority ( OGRSpatialReferenceH  hSRS,
const char *  pszTargetKey,
const char *  pszAuthority,
int  nCode 
)

Set the authority for a node.

This function is the same as OGRSpatialReference::SetAuthority().

◆ OSRSetAxes()

OGRErr OSRSetAxes ( OGRSpatialReferenceH  hSRS,
const char *  pszTargetKey,
const char *  pszXAxisName,
OGRAxisOrientation  eXAxisOrientation,
const char *  pszYAxisName,
OGRAxisOrientation  eYAxisOrientation 
)

Set the axes for a coordinate system.

This method is the equivalent of the C++ method OGRSpatialReference::SetAxes

◆ OSRSetAxisMappingStrategy()

void OSRSetAxisMappingStrategy ( OGRSpatialReferenceH  hSRS,
OSRAxisMappingStrategy  strategy 
)

Set the data axis to CRS axis mapping strategy.

See OGRSpatialReference::SetAxisMappingStrategy()

Since
GDAL 3.0

◆ OSRSetCompoundCS()

OGRErr OSRSetCompoundCS ( OGRSpatialReferenceH  hSRS,
const char *  pszName,
OGRSpatialReferenceH  hHorizSRS,
OGRSpatialReferenceH  hVertSRS 
)

Setup a compound coordinate system.

This function is the same as OGRSpatialReference::SetCompoundCS()

◆ OSRSetCoordinateEpoch()

void OSRSetCoordinateEpoch ( OGRSpatialReferenceH  hSRS,
double  dfCoordinateEpoch 
)

Set the coordinate epoch, as decimal year.

See OGRSpatialReference::SetCoordinateEpoch()

Since
OGR 3.4

◆ OSRSetDataAxisToSRSAxisMapping()

OGRErr OSRSetDataAxisToSRSAxisMapping ( OGRSpatialReferenceH  hSRS,
int  nMappingSize,
const int *  panMapping 
)

Set a custom data axis to CRS axis mapping.

Automatically implies SetAxisMappingStrategy(OAMS_CUSTOM)

This is the same as the C++ method OGRSpatialReference::SetDataAxisToSRSAxisMapping()

Since
GDAL 3.1

◆ OSRSetFromUserInput()

OGRErr OSRSetFromUserInput ( OGRSpatialReferenceH  hSRS,
const char *  pszDef 
)

Set spatial reference from various text formats.

This function is the same as OGRSpatialReference::SetFromUserInput()

See also
OSRSetFromUserInputEx() for a variant allowing to pass options.

◆ OSRSetFromUserInputEx()

OGRErr OSRSetFromUserInputEx ( OGRSpatialReferenceH  hSRS,
const char *  pszDef,
CSLConstList  papszOptions 
)

Set spatial reference from various text formats.

This function is the same as OGRSpatialReference::SetFromUserInput().

Since
GDAL 3.9

◆ OSRSetGeocCS()

OGRErr OSRSetGeocCS ( OGRSpatialReferenceH  hSRS,
const char *  pszName 
)

Set the user visible PROJCS name.

This function is the same as OGRSpatialReference::SetGeocCS()

Since
OGR 1.9.0

◆ OSRSetGeogCS()

OGRErr OSRSetGeogCS ( OGRSpatialReferenceH  hSRS,
const char *  pszGeogName,
const char *  pszDatumName,
const char *  pszSpheroidName,
double  dfSemiMajor,
double  dfInvFlattening,
const char *  pszPMName,
double  dfPMOffset,
const char *  pszAngularUnits,
double  dfConvertToRadians 
)

Set geographic coordinate system.

This function is the same as OGRSpatialReference::SetGeogCS()

◆ OSRSetHOM()

OGRErr OSRSetHOM ( OGRSpatialReferenceH  hSRS,
double  dfCenterLat,
double  dfCenterLong,
double  dfAzimuth,
double  dfRectToSkew,
double  dfScale,
double  dfFalseEasting,
double  dfFalseNorthing 
)

Hotine Oblique Mercator using azimuth angle.

Hotine Oblique Mercator using azimuth angle.

This is the same as the C++ method OGRSpatialReference::SetHOM()

◆ OSRSetHOM2PNO()

OGRErr OSRSetHOM2PNO ( OGRSpatialReferenceH  hSRS,
double  dfCenterLat,
double  dfLat1,
double  dfLong1,
double  dfLat2,
double  dfLong2,
double  dfScale,
double  dfFalseEasting,
double  dfFalseNorthing 
)

Hotine Oblique Mercator using two points on centerline.

Hotine Oblique Mercator using two points on centerline.

This is the same as the C++ method OGRSpatialReference::SetHOM2PNO()

◆ OSRSetHOMAC()

OGRErr OSRSetHOMAC ( OGRSpatialReferenceH  hSRS,
double  dfCenterLat,
double  dfCenterLong,
double  dfAzimuth,
double  dfRectToSkew,
double  dfScale,
double  dfFalseEasting,
double  dfFalseNorthing 
)

Set an Oblique Mercator projection using azimuth angle.

This is the same as the C++ method OGRSpatialReference::SetHOMAC()

◆ OSRSetLinearUnits()

OGRErr OSRSetLinearUnits ( OGRSpatialReferenceH  hSRS,
const char *  pszUnits,
double  dfInMeters 
)

Set the linear units for the projection.

This function is the same as OGRSpatialReference::SetLinearUnits()

◆ OSRSetLinearUnitsAndUpdateParameters()

OGRErr OSRSetLinearUnitsAndUpdateParameters ( OGRSpatialReferenceH  hSRS,
const char *  pszUnits,
double  dfInMeters 
)

Set the linear units for the projection.

This function is the same as OGRSpatialReference::SetLinearUnitsAndUpdateParameters()

◆ OSRSetLocalCS()

OGRErr OSRSetLocalCS ( OGRSpatialReferenceH  hSRS,
const char *  pszName 
)

Set the user visible LOCAL_CS name.

This function is the same as OGRSpatialReference::SetLocalCS()

◆ OSRSetNormProjParm()

OGRErr OSRSetNormProjParm ( OGRSpatialReferenceH  hSRS,
const char *  pszParamName,
double  dfValue 
)

Set a projection parameter with a normalized value.

This function is the same as OGRSpatialReference::SetNormProjParm()

◆ OSRSetPROJAuxDbPaths()

void OSRSetPROJAuxDbPaths ( const char *const *  papszAux)

Set list of PROJ auxiliary database filenames.

Parameters
papszAuxNULL-terminated list of auxiliary database filenames, or NULL
Since
GDAL 3.3
See also
OSRGetPROJAuxDbPaths, proj_context_set_database_path

◆ OSRSetProjCS()

OGRErr OSRSetProjCS ( OGRSpatialReferenceH  hSRS,
const char *  pszName 
)

Set the user visible PROJCS name.

This function is the same as OGRSpatialReference::SetProjCS()

◆ OSRSetProjection()

OGRErr OSRSetProjection ( OGRSpatialReferenceH  hSRS,
const char *  pszProjection 
)

Set a projection name.

This function is the same as OGRSpatialReference::SetProjection()

◆ OSRSetPROJEnableNetwork()

void OSRSetPROJEnableNetwork ( int  enabled)

Enable or disable PROJ networking capabilities.

Parameters
enabledSet to TRUE to enable networking capabilities.
Since
GDAL 3.4 and PROJ 7
See also
OSRGetPROJEnableNetwork, proj_context_set_enable_network

◆ OSRSetProjParm()

OGRErr OSRSetProjParm ( OGRSpatialReferenceH  hSRS,
const char *  pszParamName,
double  dfValue 
)

Set a projection parameter value.

This function is the same as OGRSpatialReference::SetProjParm()

◆ OSRSetPROJSearchPaths()

void OSRSetPROJSearchPaths ( const char *const *  papszPaths)

Set the search path(s) for PROJ resource files.

Note: starting with GDAL 3.7, CPLSetConfigOption("PROJ_DATA", ...) can also been used for the same effect.

Parameters
papszPathsNULL terminated list of directory paths.
Since
GDAL 3.0

◆ OSRSetStatePlane()

OGRErr OSRSetStatePlane ( OGRSpatialReferenceH  hSRS,
int  nZone,
int  bNAD83 
)

Set State Plane projection definition.

This function is the same as OGRSpatialReference::SetStatePlane().

◆ OSRSetStatePlaneWithUnits()

OGRErr OSRSetStatePlaneWithUnits ( OGRSpatialReferenceH  hSRS,
int  nZone,
int  bNAD83,
const char *  pszOverrideUnitName,
double  dfOverrideUnit 
)

Set State Plane projection definition.

This function is the same as OGRSpatialReference::SetStatePlane().

◆ OSRSetTargetLinearUnits()

OGRErr OSRSetTargetLinearUnits ( OGRSpatialReferenceH  hSRS,
const char *  pszTargetKey,
const char *  pszUnits,
double  dfInMeters 
)

Set the linear units for the target node.

This function is the same as OGRSpatialReference::SetTargetLinearUnits()

Since
OGR 1.9.0

◆ OSRSetTM()

OGRErr OSRSetTM ( OGRSpatialReferenceH  hSRS,
double  dfCenterLat,
double  dfCenterLong,
double  dfScale,
double  dfFalseEasting,
double  dfFalseNorthing 
)

Transverse Mercator.

Special processing available for Transverse Mercator with GDAL >= 1.10 and PROJ >= 4.8 : see OGRSpatialReference::exportToProj4().

◆ OSRSetTOWGS84()

OGRErr OSRSetTOWGS84 ( OGRSpatialReferenceH  hSRS,
double  dfDX,
double  dfDY,
double  dfDZ,
double  dfEX,
double  dfEY,
double  dfEZ,
double  dfPPM 
)

Set the Bursa-Wolf conversion to WGS84.

This function is the same as OGRSpatialReference::SetTOWGS84().

◆ OSRSetUTM()

OGRErr OSRSetUTM ( OGRSpatialReferenceH  hSRS,
int  nZone,
int  bNorth 
)

Set UTM projection definition.

This is the same as the C++ method OGRSpatialReference::SetUTM()

◆ OSRSetVertCS()

OGRErr OSRSetVertCS ( OGRSpatialReferenceH  hSRS,
const char *  pszVertCSName,
const char *  pszVertDatumName,
int  nVertDatumType 
)

Setup the vertical coordinate system.

This function is the same as OGRSpatialReference::SetVertCS()

Since
OGR 1.9.0

◆ OSRSetWellKnownGeogCS()

OGRErr OSRSetWellKnownGeogCS ( OGRSpatialReferenceH  hSRS,
const char *  pszName 
)

Set a GeogCS based on well known name.

This function is the same as OGRSpatialReference::SetWellKnownGeogCS()

◆ OSRStripVertical()

OGRErr OSRStripVertical ( OGRSpatialReferenceH  hSRS)

Convert a compound cs into a horizontal CS.

This function is the same as the C++ method OGRSpatialReference::StripVertical().

◆ OSRValidate()

OGRErr OSRValidate ( OGRSpatialReferenceH  hSRS)

Validate SRS tokens.

This function is the same as the C++ method OGRSpatialReference::Validate().