ogr_srs_api.h 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763
  1. /******************************************************************************
  2. * $Id: ogr_srs_api.h 28972 2015-04-22 10:39:11Z rouault $
  3. *
  4. * Project: OpenGIS Simple Features Reference Implementation
  5. * Purpose: C API and constant declarations for OGR Spatial References.
  6. * Author: Frank Warmerdam, warmerdam@pobox.com
  7. *
  8. ******************************************************************************
  9. * Copyright (c) 2000, Frank Warmerdam
  10. * Copyright (c) 2008-2013, Even Rouault <even dot rouault at mines-paris dot org>
  11. *
  12. * Permission is hereby granted, free of charge, to any person obtaining a
  13. * copy of this software and associated documentation files (the "Software"),
  14. * to deal in the Software without restriction, including without limitation
  15. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  16. * and/or sell copies of the Software, and to permit persons to whom the
  17. * Software is furnished to do so, subject to the following conditions:
  18. *
  19. * The above copyright notice and this permission notice shall be included
  20. * in all copies or substantial portions of the Software.
  21. *
  22. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  23. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  24. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  25. * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  26. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  27. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  28. * DEALINGS IN THE SOFTWARE.
  29. ****************************************************************************/
  30. #ifndef _OGR_SRS_API_H_INCLUDED
  31. #define _OGR_SRS_API_H_INCLUDED
  32. #ifndef SWIG
  33. #include "ogr_core.h"
  34. CPL_C_START
  35. /**
  36. * \file ogr_srs_api.h
  37. *
  38. * C spatial reference system services and defines.
  39. *
  40. * See also: ogr_spatialref.h
  41. */
  42. /* -------------------------------------------------------------------- */
  43. /* Axis orientations (corresponds to CS_AxisOrientationEnum). */
  44. /* -------------------------------------------------------------------- */
  45. typedef enum {
  46. OAO_Other=0,
  47. OAO_North=1,
  48. OAO_South=2,
  49. OAO_East=3,
  50. OAO_West=4,
  51. OAO_Up=5,
  52. OAO_Down=6
  53. } OGRAxisOrientation;
  54. const char CPL_DLL *OSRAxisEnumToName( OGRAxisOrientation eOrientation );
  55. /* -------------------------------------------------------------------- */
  56. /* Datum types (corresponds to CS_DatumType). */
  57. /* -------------------------------------------------------------------- */
  58. typedef enum {
  59. ODT_HD_Min=1000,
  60. ODT_HD_Other=1000,
  61. ODT_HD_Classic=1001,
  62. ODT_HD_Geocentric=1002,
  63. ODT_HD_Max=1999,
  64. ODT_VD_Min=2000,
  65. ODT_VD_Other=2000,
  66. ODT_VD_Orthometric=2001,
  67. ODT_VD_Ellipsoidal=2002,
  68. ODT_VD_AltitudeBarometric=2003,
  69. ODT_VD_Normal=2004,
  70. ODT_VD_GeoidModelDerived=2005,
  71. ODT_VD_Depth=2006,
  72. ODT_VD_Max=2999,
  73. ODT_LD_Min=10000,
  74. ODT_LD_Max=32767
  75. } OGRDatumType;
  76. #endif // ndef SWIG
  77. /* ==================================================================== */
  78. /* Some standard WKT geographic coordinate systems. */
  79. /* ==================================================================== */
  80. #define SRS_WKT_WGS84 "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AUTHORITY[\"EPSG\",\"4326\"]]"
  81. /* ==================================================================== */
  82. /* Some "standard" strings. */
  83. /* ==================================================================== */
  84. #define SRS_PT_ALBERS_CONIC_EQUAL_AREA \
  85. "Albers_Conic_Equal_Area"
  86. #define SRS_PT_AZIMUTHAL_EQUIDISTANT "Azimuthal_Equidistant"
  87. #define SRS_PT_CASSINI_SOLDNER "Cassini_Soldner"
  88. #define SRS_PT_CYLINDRICAL_EQUAL_AREA "Cylindrical_Equal_Area"
  89. #define SRS_PT_BONNE "Bonne"
  90. #define SRS_PT_ECKERT_I "Eckert_I"
  91. #define SRS_PT_ECKERT_II "Eckert_II"
  92. #define SRS_PT_ECKERT_III "Eckert_III"
  93. #define SRS_PT_ECKERT_IV "Eckert_IV"
  94. #define SRS_PT_ECKERT_V "Eckert_V"
  95. #define SRS_PT_ECKERT_VI "Eckert_VI"
  96. #define SRS_PT_EQUIDISTANT_CONIC \
  97. "Equidistant_Conic"
  98. #define SRS_PT_EQUIRECTANGULAR "Equirectangular"
  99. #define SRS_PT_GALL_STEREOGRAPHIC \
  100. "Gall_Stereographic"
  101. #define SRS_PT_GAUSSSCHREIBERTMERCATOR \
  102. "Gauss_Schreiber_Transverse_Mercator"
  103. #define SRS_PT_GEOSTATIONARY_SATELLITE \
  104. "Geostationary_Satellite"
  105. #define SRS_PT_GOODE_HOMOLOSINE "Goode_Homolosine"
  106. #define SRS_PT_IGH "Interrupted_Goode_Homolosine"
  107. #define SRS_PT_GNOMONIC "Gnomonic"
  108. #define SRS_PT_HOTINE_OBLIQUE_MERCATOR_AZIMUTH_CENTER \
  109. "Hotine_Oblique_Mercator_Azimuth_Center"
  110. #define SRS_PT_HOTINE_OBLIQUE_MERCATOR \
  111. "Hotine_Oblique_Mercator"
  112. #define SRS_PT_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN \
  113. "Hotine_Oblique_Mercator_Two_Point_Natural_Origin"
  114. #define SRS_PT_LABORDE_OBLIQUE_MERCATOR \
  115. "Laborde_Oblique_Mercator"
  116. #define SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP \
  117. "Lambert_Conformal_Conic_1SP"
  118. #define SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP \
  119. "Lambert_Conformal_Conic_2SP"
  120. #define SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP_BELGIUM \
  121. "Lambert_Conformal_Conic_2SP_Belgium"
  122. #define SRS_PT_LAMBERT_AZIMUTHAL_EQUAL_AREA \
  123. "Lambert_Azimuthal_Equal_Area"
  124. #define SRS_PT_MERCATOR_1SP "Mercator_1SP"
  125. #define SRS_PT_MERCATOR_2SP "Mercator_2SP"
  126. // Mercator_Auxiliary_Sphere is used used by ESRI to mean EPSG:3875
  127. #define SRS_PT_MERCATOR_AUXILIARY_SPHERE \
  128. "Mercator_Auxiliary_Sphere"
  129. #define SRS_PT_MILLER_CYLINDRICAL "Miller_Cylindrical"
  130. #define SRS_PT_MOLLWEIDE "Mollweide"
  131. #define SRS_PT_NEW_ZEALAND_MAP_GRID \
  132. "New_Zealand_Map_Grid"
  133. #define SRS_PT_OBLIQUE_STEREOGRAPHIC \
  134. "Oblique_Stereographic"
  135. #define SRS_PT_ORTHOGRAPHIC "Orthographic"
  136. #define SRS_PT_POLAR_STEREOGRAPHIC \
  137. "Polar_Stereographic"
  138. #define SRS_PT_POLYCONIC "Polyconic"
  139. #define SRS_PT_ROBINSON "Robinson"
  140. #define SRS_PT_SINUSOIDAL "Sinusoidal"
  141. #define SRS_PT_STEREOGRAPHIC "Stereographic"
  142. #define SRS_PT_SWISS_OBLIQUE_CYLINDRICAL \
  143. "Swiss_Oblique_Cylindrical"
  144. #define SRS_PT_TRANSVERSE_MERCATOR \
  145. "Transverse_Mercator"
  146. #define SRS_PT_TRANSVERSE_MERCATOR_SOUTH_ORIENTED \
  147. "Transverse_Mercator_South_Orientated"
  148. /* special mapinfo variants on Transverse Mercator */
  149. #define SRS_PT_TRANSVERSE_MERCATOR_MI_21 \
  150. "Transverse_Mercator_MapInfo_21"
  151. #define SRS_PT_TRANSVERSE_MERCATOR_MI_22 \
  152. "Transverse_Mercator_MapInfo_22"
  153. #define SRS_PT_TRANSVERSE_MERCATOR_MI_23 \
  154. "Transverse_Mercator_MapInfo_23"
  155. #define SRS_PT_TRANSVERSE_MERCATOR_MI_24 \
  156. "Transverse_Mercator_MapInfo_24"
  157. #define SRS_PT_TRANSVERSE_MERCATOR_MI_25 \
  158. "Transverse_Mercator_MapInfo_25"
  159. #define SRS_PT_TUNISIA_MINING_GRID \
  160. "Tunisia_Mining_Grid"
  161. #define SRS_PT_TWO_POINT_EQUIDISTANT \
  162. "Two_Point_Equidistant"
  163. #define SRS_PT_VANDERGRINTEN "VanDerGrinten"
  164. #define SRS_PT_KROVAK "Krovak"
  165. #define SRS_PT_IMW_POLYCONIC "International_Map_of_the_World_Polyconic"
  166. #define SRS_PT_WAGNER_I "Wagner_I"
  167. #define SRS_PT_WAGNER_II "Wagner_II"
  168. #define SRS_PT_WAGNER_III "Wagner_III"
  169. #define SRS_PT_WAGNER_IV "Wagner_IV"
  170. #define SRS_PT_WAGNER_V "Wagner_V"
  171. #define SRS_PT_WAGNER_VI "Wagner_VI"
  172. #define SRS_PT_WAGNER_VII "Wagner_VII"
  173. #define SRS_PT_QSC "Quadrilateralized_Spherical_Cube"
  174. #define SRS_PT_AITOFF "Aitoff"
  175. #define SRS_PT_WINKEL_I "Winkel_I"
  176. #define SRS_PT_WINKEL_II "Winkel_II"
  177. #define SRS_PT_WINKEL_TRIPEL "Winkel_Tripel"
  178. #define SRS_PT_CRASTER_PARABOLIC "Craster_Parabolic"
  179. #define SRS_PT_LOXIMUTHAL "Loximuthal"
  180. #define SRS_PT_QUARTIC_AUTHALIC "Quartic_Authalic"
  181. #define SRS_PP_CENTRAL_MERIDIAN "central_meridian"
  182. #define SRS_PP_SCALE_FACTOR "scale_factor"
  183. #define SRS_PP_STANDARD_PARALLEL_1 "standard_parallel_1"
  184. #define SRS_PP_STANDARD_PARALLEL_2 "standard_parallel_2"
  185. #define SRS_PP_PSEUDO_STD_PARALLEL_1 "pseudo_standard_parallel_1"
  186. #define SRS_PP_LONGITUDE_OF_CENTER "longitude_of_center"
  187. #define SRS_PP_LATITUDE_OF_CENTER "latitude_of_center"
  188. #define SRS_PP_LONGITUDE_OF_ORIGIN "longitude_of_origin"
  189. #define SRS_PP_LATITUDE_OF_ORIGIN "latitude_of_origin"
  190. #define SRS_PP_FALSE_EASTING "false_easting"
  191. #define SRS_PP_FALSE_NORTHING "false_northing"
  192. #define SRS_PP_AZIMUTH "azimuth"
  193. #define SRS_PP_LONGITUDE_OF_POINT_1 "longitude_of_point_1"
  194. #define SRS_PP_LATITUDE_OF_POINT_1 "latitude_of_point_1"
  195. #define SRS_PP_LONGITUDE_OF_POINT_2 "longitude_of_point_2"
  196. #define SRS_PP_LATITUDE_OF_POINT_2 "latitude_of_point_2"
  197. #define SRS_PP_LONGITUDE_OF_POINT_3 "longitude_of_point_3"
  198. #define SRS_PP_LATITUDE_OF_POINT_3 "latitude_of_point_3"
  199. #define SRS_PP_RECTIFIED_GRID_ANGLE "rectified_grid_angle"
  200. #define SRS_PP_LANDSAT_NUMBER "landsat_number"
  201. #define SRS_PP_PATH_NUMBER "path_number"
  202. #define SRS_PP_PERSPECTIVE_POINT_HEIGHT "perspective_point_height"
  203. #define SRS_PP_SATELLITE_HEIGHT "satellite_height"
  204. #define SRS_PP_FIPSZONE "fipszone"
  205. #define SRS_PP_ZONE "zone"
  206. #define SRS_PP_LATITUDE_OF_1ST_POINT "Latitude_Of_1st_Point"
  207. #define SRS_PP_LONGITUDE_OF_1ST_POINT "Longitude_Of_1st_Point"
  208. #define SRS_PP_LATITUDE_OF_2ND_POINT "Latitude_Of_2nd_Point"
  209. #define SRS_PP_LONGITUDE_OF_2ND_POINT "Longitude_Of_2nd_Point"
  210. #define SRS_UL_METER "Meter"
  211. #define SRS_UL_FOOT "Foot (International)" /* or just "FOOT"? */
  212. #define SRS_UL_FOOT_CONV "0.3048"
  213. #define SRS_UL_US_FOOT "Foot_US" /* or "US survey foot" from EPSG */
  214. #define SRS_UL_US_FOOT_CONV "0.3048006096012192"
  215. #define SRS_UL_NAUTICAL_MILE "Nautical Mile"
  216. #define SRS_UL_NAUTICAL_MILE_CONV "1852.0"
  217. #define SRS_UL_LINK "Link" /* Based on US Foot */
  218. #define SRS_UL_LINK_CONV "0.20116684023368047"
  219. #define SRS_UL_CHAIN "Chain" /* based on US Foot */
  220. #define SRS_UL_CHAIN_CONV "20.116684023368047"
  221. #define SRS_UL_ROD "Rod" /* based on US Foot */
  222. #define SRS_UL_ROD_CONV "5.02921005842012"
  223. #define SRS_UL_LINK_Clarke "Link_Clarke"
  224. #define SRS_UL_LINK_Clarke_CONV "0.2011661949"
  225. #define SRS_UL_KILOMETER "Kilometer"
  226. #define SRS_UL_KILOMETER_CONV "1000."
  227. #define SRS_UL_DECIMETER "Decimeter"
  228. #define SRS_UL_DECIMETER_CONV "0.1"
  229. #define SRS_UL_CENTIMETER "Centimeter"
  230. #define SRS_UL_CENTIMETER_CONV "0.01"
  231. #define SRS_UL_MILLIMETER "Millimeter"
  232. #define SRS_UL_MILLIMETER_CONV "0.001"
  233. #define SRS_UL_INTL_NAUT_MILE "Nautical_Mile_International"
  234. #define SRS_UL_INTL_NAUT_MILE_CONV "1852.0"
  235. #define SRS_UL_INTL_INCH "Inch_International"
  236. #define SRS_UL_INTL_INCH_CONV "0.0254"
  237. #define SRS_UL_INTL_FOOT "Foot_International"
  238. #define SRS_UL_INTL_FOOT_CONV "0.3048"
  239. #define SRS_UL_INTL_YARD "Yard_International"
  240. #define SRS_UL_INTL_YARD_CONV "0.9144"
  241. #define SRS_UL_INTL_STAT_MILE "Statute_Mile_International"
  242. #define SRS_UL_INTL_STAT_MILE_CONV "1609.344"
  243. #define SRS_UL_INTL_FATHOM "Fathom_International"
  244. #define SRS_UL_INTL_FATHOM_CONV "1.8288"
  245. #define SRS_UL_INTL_CHAIN "Chain_International"
  246. #define SRS_UL_INTL_CHAIN_CONV "20.1168"
  247. #define SRS_UL_INTL_LINK "Link_International"
  248. #define SRS_UL_INTL_LINK_CONV "0.201168"
  249. #define SRS_UL_US_INCH "Inch_US_Surveyor"
  250. #define SRS_UL_US_INCH_CONV "0.025400050800101603"
  251. #define SRS_UL_US_YARD "Yard_US_Surveyor"
  252. #define SRS_UL_US_YARD_CONV "0.914401828803658"
  253. #define SRS_UL_US_CHAIN "Chain_US_Surveyor"
  254. #define SRS_UL_US_CHAIN_CONV "20.11684023368047"
  255. #define SRS_UL_US_STAT_MILE "Statute_Mile_US_Surveyor"
  256. #define SRS_UL_US_STAT_MILE_CONV "1609.347218694437"
  257. #define SRS_UL_INDIAN_YARD "Yard_Indian"
  258. #define SRS_UL_INDIAN_YARD_CONV "0.91439523"
  259. #define SRS_UL_INDIAN_FOOT "Foot_Indian"
  260. #define SRS_UL_INDIAN_FOOT_CONV "0.30479841"
  261. #define SRS_UL_INDIAN_CHAIN "Chain_Indian"
  262. #define SRS_UL_INDIAN_CHAIN_CONV "20.11669506"
  263. #define SRS_UA_DEGREE "degree"
  264. #define SRS_UA_DEGREE_CONV "0.0174532925199433"
  265. #define SRS_UA_RADIAN "radian"
  266. #define SRS_PM_GREENWICH "Greenwich"
  267. #define SRS_DN_NAD27 "North_American_Datum_1927"
  268. #define SRS_DN_NAD83 "North_American_Datum_1983"
  269. #define SRS_DN_WGS72 "WGS_1972"
  270. #define SRS_DN_WGS84 "WGS_1984"
  271. #define SRS_WGS84_SEMIMAJOR 6378137.0
  272. #define SRS_WGS84_INVFLATTENING 298.257223563
  273. #ifndef SWIG
  274. /* -------------------------------------------------------------------- */
  275. /* C Wrappers for C++ objects and methods. */
  276. /* -------------------------------------------------------------------- */
  277. #ifndef _DEFINED_OGRSpatialReferenceH
  278. #define _DEFINED_OGRSpatialReferenceH
  279. #ifdef DEBUG
  280. typedef struct OGRSpatialReferenceHS *OGRSpatialReferenceH;
  281. typedef struct OGRCoordinateTransformationHS *OGRCoordinateTransformationH;
  282. #else
  283. typedef void *OGRSpatialReferenceH;
  284. typedef void *OGRCoordinateTransformationH;
  285. #endif
  286. #endif
  287. OGRSpatialReferenceH CPL_DLL CPL_STDCALL
  288. OSRNewSpatialReference( const char * /* = NULL */);
  289. OGRSpatialReferenceH CPL_DLL CPL_STDCALL OSRCloneGeogCS( OGRSpatialReferenceH );
  290. OGRSpatialReferenceH CPL_DLL CPL_STDCALL OSRClone( OGRSpatialReferenceH );
  291. void CPL_DLL CPL_STDCALL OSRDestroySpatialReference( OGRSpatialReferenceH );
  292. int CPL_DLL OSRReference( OGRSpatialReferenceH );
  293. int CPL_DLL OSRDereference( OGRSpatialReferenceH );
  294. void CPL_DLL OSRRelease( OGRSpatialReferenceH );
  295. OGRErr CPL_DLL OSRValidate( OGRSpatialReferenceH );
  296. OGRErr CPL_DLL OSRFixupOrdering( OGRSpatialReferenceH );
  297. OGRErr CPL_DLL OSRFixup( OGRSpatialReferenceH );
  298. OGRErr CPL_DLL OSRStripCTParms( OGRSpatialReferenceH );
  299. OGRErr CPL_DLL CPL_STDCALL OSRImportFromEPSG( OGRSpatialReferenceH, int );
  300. OGRErr CPL_DLL CPL_STDCALL OSRImportFromEPSGA( OGRSpatialReferenceH, int );
  301. OGRErr CPL_DLL OSRImportFromWkt( OGRSpatialReferenceH, char ** );
  302. OGRErr CPL_DLL OSRImportFromProj4( OGRSpatialReferenceH, const char *);
  303. OGRErr CPL_DLL OSRImportFromESRI( OGRSpatialReferenceH, char **);
  304. OGRErr CPL_DLL OSRImportFromPCI( OGRSpatialReferenceH hSRS, const char *,
  305. const char *, double * );
  306. OGRErr CPL_DLL OSRImportFromUSGS( OGRSpatialReferenceH,
  307. long, long, double *, long);
  308. OGRErr CPL_DLL OSRImportFromXML( OGRSpatialReferenceH, const char * );
  309. OGRErr CPL_DLL OSRImportFromDict( OGRSpatialReferenceH, const char *,
  310. const char * );
  311. OGRErr CPL_DLL OSRImportFromPanorama( OGRSpatialReferenceH, long, long, long,
  312. double * );
  313. OGRErr CPL_DLL OSRImportFromOzi( OGRSpatialReferenceH , const char * const *);
  314. OGRErr CPL_DLL OSRImportFromMICoordSys( OGRSpatialReferenceH, const char *);
  315. OGRErr CPL_DLL OSRImportFromERM( OGRSpatialReferenceH,
  316. const char *, const char *, const char * );
  317. OGRErr CPL_DLL OSRImportFromUrl( OGRSpatialReferenceH, const char * );
  318. OGRErr CPL_DLL CPL_STDCALL OSRExportToWkt( OGRSpatialReferenceH, char ** );
  319. OGRErr CPL_DLL CPL_STDCALL OSRExportToPrettyWkt( OGRSpatialReferenceH, char **, int);
  320. OGRErr CPL_DLL CPL_STDCALL OSRExportToProj4( OGRSpatialReferenceH, char **);
  321. OGRErr CPL_DLL OSRExportToPCI( OGRSpatialReferenceH, char **, char **,
  322. double ** );
  323. OGRErr CPL_DLL OSRExportToUSGS( OGRSpatialReferenceH, long *, long *,
  324. double **, long * );
  325. OGRErr CPL_DLL OSRExportToXML( OGRSpatialReferenceH, char **, const char * );
  326. OGRErr CPL_DLL OSRExportToPanorama( OGRSpatialReferenceH, long *, long *,
  327. long *, long *, double * );
  328. OGRErr CPL_DLL OSRExportToMICoordSys( OGRSpatialReferenceH, char ** );
  329. OGRErr CPL_DLL OSRExportToERM( OGRSpatialReferenceH, char *, char *, char * );
  330. OGRErr CPL_DLL OSRMorphToESRI( OGRSpatialReferenceH );
  331. OGRErr CPL_DLL OSRMorphFromESRI( OGRSpatialReferenceH );
  332. OGRErr CPL_DLL CPL_STDCALL OSRSetAttrValue( OGRSpatialReferenceH hSRS,
  333. const char * pszNodePath,
  334. const char * pszNewNodeValue );
  335. const char CPL_DLL * CPL_STDCALL OSRGetAttrValue( OGRSpatialReferenceH hSRS,
  336. const char * pszName, int iChild /* = 0 */ );
  337. OGRErr CPL_DLL OSRSetAngularUnits( OGRSpatialReferenceH, const char *, double );
  338. double CPL_DLL OSRGetAngularUnits( OGRSpatialReferenceH, char ** );
  339. OGRErr CPL_DLL OSRSetLinearUnits( OGRSpatialReferenceH, const char *, double );
  340. OGRErr CPL_DLL OSRSetTargetLinearUnits( OGRSpatialReferenceH, const char *, const char *, double );
  341. OGRErr CPL_DLL OSRSetLinearUnitsAndUpdateParameters(
  342. OGRSpatialReferenceH, const char *, double );
  343. double CPL_DLL OSRGetLinearUnits( OGRSpatialReferenceH, char ** );
  344. double CPL_DLL OSRGetTargetLinearUnits( OGRSpatialReferenceH, const char *, char ** );
  345. double CPL_DLL OSRGetPrimeMeridian( OGRSpatialReferenceH, char ** );
  346. int CPL_DLL OSRIsGeographic( OGRSpatialReferenceH );
  347. int CPL_DLL OSRIsLocal( OGRSpatialReferenceH );
  348. int CPL_DLL OSRIsProjected( OGRSpatialReferenceH );
  349. int CPL_DLL OSRIsCompound( OGRSpatialReferenceH );
  350. int CPL_DLL OSRIsGeocentric( OGRSpatialReferenceH );
  351. int CPL_DLL OSRIsVertical( OGRSpatialReferenceH );
  352. int CPL_DLL OSRIsSameGeogCS( OGRSpatialReferenceH, OGRSpatialReferenceH );
  353. int CPL_DLL OSRIsSameVertCS( OGRSpatialReferenceH, OGRSpatialReferenceH );
  354. int CPL_DLL OSRIsSame( OGRSpatialReferenceH, OGRSpatialReferenceH );
  355. OGRErr CPL_DLL OSRSetLocalCS( OGRSpatialReferenceH hSRS, const char *pszName );
  356. OGRErr CPL_DLL OSRSetProjCS( OGRSpatialReferenceH hSRS, const char * pszName );
  357. OGRErr CPL_DLL OSRSetGeocCS( OGRSpatialReferenceH hSRS, const char * pszName );
  358. OGRErr CPL_DLL OSRSetWellKnownGeogCS( OGRSpatialReferenceH hSRS,
  359. const char * pszName );
  360. OGRErr CPL_DLL CPL_STDCALL OSRSetFromUserInput( OGRSpatialReferenceH hSRS,
  361. const char * );
  362. OGRErr CPL_DLL OSRCopyGeogCSFrom( OGRSpatialReferenceH hSRS,
  363. OGRSpatialReferenceH hSrcSRS );
  364. OGRErr CPL_DLL OSRSetTOWGS84( OGRSpatialReferenceH hSRS,
  365. double, double, double,
  366. double, double, double, double );
  367. OGRErr CPL_DLL OSRGetTOWGS84( OGRSpatialReferenceH hSRS, double *, int );
  368. OGRErr CPL_DLL OSRSetCompoundCS( OGRSpatialReferenceH hSRS,
  369. const char *pszName,
  370. OGRSpatialReferenceH hHorizSRS,
  371. OGRSpatialReferenceH hVertSRS );
  372. OGRErr CPL_DLL OSRSetGeogCS( OGRSpatialReferenceH hSRS,
  373. const char * pszGeogName,
  374. const char * pszDatumName,
  375. const char * pszEllipsoidName,
  376. double dfSemiMajor, double dfInvFlattening,
  377. const char * pszPMName /* = NULL */,
  378. double dfPMOffset /* = 0.0 */,
  379. const char * pszUnits /* = NULL */,
  380. double dfConvertToRadians /* = 0.0 */ );
  381. OGRErr CPL_DLL OSRSetVertCS( OGRSpatialReferenceH hSRS,
  382. const char * pszVertCSName,
  383. const char * pszVertDatumName,
  384. int nVertDatumType );
  385. double CPL_DLL OSRGetSemiMajor( OGRSpatialReferenceH, OGRErr * /* = NULL */ );
  386. double CPL_DLL OSRGetSemiMinor( OGRSpatialReferenceH, OGRErr * /* = NULL */ );
  387. double CPL_DLL OSRGetInvFlattening( OGRSpatialReferenceH, OGRErr * /*=NULL*/);
  388. OGRErr CPL_DLL OSRSetAuthority( OGRSpatialReferenceH hSRS,
  389. const char * pszTargetKey,
  390. const char * pszAuthority,
  391. int nCode );
  392. const char CPL_DLL *OSRGetAuthorityCode( OGRSpatialReferenceH hSRS,
  393. const char * pszTargetKey );
  394. const char CPL_DLL *OSRGetAuthorityName( OGRSpatialReferenceH hSRS,
  395. const char * pszTargetKey );
  396. OGRErr CPL_DLL OSRSetProjection( OGRSpatialReferenceH, const char * );
  397. OGRErr CPL_DLL OSRSetProjParm( OGRSpatialReferenceH, const char *, double );
  398. double CPL_DLL OSRGetProjParm( OGRSpatialReferenceH hSRS,
  399. const char * pszParmName,
  400. double dfDefault /* = 0.0 */,
  401. OGRErr * /* = NULL */ );
  402. OGRErr CPL_DLL OSRSetNormProjParm( OGRSpatialReferenceH, const char *, double);
  403. double CPL_DLL OSRGetNormProjParm( OGRSpatialReferenceH hSRS,
  404. const char * pszParmName,
  405. double dfDefault /* = 0.0 */,
  406. OGRErr * /* = NULL */ );
  407. OGRErr CPL_DLL OSRSetUTM( OGRSpatialReferenceH hSRS, int nZone, int bNorth );
  408. int CPL_DLL OSRGetUTMZone( OGRSpatialReferenceH hSRS, int *pbNorth );
  409. OGRErr CPL_DLL OSRSetStatePlane( OGRSpatialReferenceH hSRS,
  410. int nZone, int bNAD83 );
  411. OGRErr CPL_DLL OSRSetStatePlaneWithUnits( OGRSpatialReferenceH hSRS,
  412. int nZone, int bNAD83,
  413. const char *pszOverrideUnitName,
  414. double dfOverrideUnit );
  415. OGRErr CPL_DLL OSRAutoIdentifyEPSG( OGRSpatialReferenceH hSRS );
  416. int CPL_DLL OSREPSGTreatsAsLatLong( OGRSpatialReferenceH hSRS );
  417. int CPL_DLL OSREPSGTreatsAsNorthingEasting( OGRSpatialReferenceH hSRS );
  418. const char CPL_DLL *OSRGetAxis( OGRSpatialReferenceH hSRS,
  419. const char *pszTargetKey, int iAxis,
  420. OGRAxisOrientation *peOrientation );
  421. OGRErr CPL_DLL OSRSetAxes( const char *pszTargetKey,
  422. const char *pszXAxisName,
  423. OGRAxisOrientation eXAxisOrientation,
  424. const char *pszYAxisName,
  425. OGRAxisOrientation eYAxisOrientation );
  426. /** Albers Conic Equal Area */
  427. OGRErr CPL_DLL OSRSetACEA( OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2,
  428. double dfCenterLat, double dfCenterLong,
  429. double dfFalseEasting, double dfFalseNorthing );
  430. /** Azimuthal Equidistant */
  431. OGRErr CPL_DLL OSRSetAE( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
  432. double dfFalseEasting, double dfFalseNorthing );
  433. /** Bonne */
  434. OGRErr CPL_DLL OSRSetBonne(OGRSpatialReferenceH hSRS,
  435. double dfStandardParallel, double dfCentralMeridian,
  436. double dfFalseEasting, double dfFalseNorthing );
  437. /** Cylindrical Equal Area */
  438. OGRErr CPL_DLL OSRSetCEA( OGRSpatialReferenceH hSRS, double dfStdP1, double dfCentralMeridian,
  439. double dfFalseEasting, double dfFalseNorthing );
  440. /** Cassini-Soldner */
  441. OGRErr CPL_DLL OSRSetCS( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
  442. double dfFalseEasting, double dfFalseNorthing );
  443. /** Equidistant Conic */
  444. OGRErr CPL_DLL OSRSetEC( OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2,
  445. double dfCenterLat, double dfCenterLong,
  446. double dfFalseEasting, double dfFalseNorthing );
  447. /** Eckert I-VI */
  448. OGRErr CPL_DLL OSRSetEckert( OGRSpatialReferenceH hSRS, int nVariation,
  449. double dfCentralMeridian,
  450. double dfFalseEasting, double dfFalseNorthing );
  451. /** Eckert IV */
  452. OGRErr CPL_DLL OSRSetEckertIV( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
  453. double dfFalseEasting, double dfFalseNorthing );
  454. /** Eckert VI */
  455. OGRErr CPL_DLL OSRSetEckertVI( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
  456. double dfFalseEasting, double dfFalseNorthing );
  457. /** Equirectangular */
  458. OGRErr CPL_DLL OSRSetEquirectangular(OGRSpatialReferenceH hSRS,
  459. double dfCenterLat, double dfCenterLong,
  460. double dfFalseEasting, double dfFalseNorthing );
  461. /** Equirectangular generalized form */
  462. OGRErr CPL_DLL OSRSetEquirectangular2( OGRSpatialReferenceH hSRS,
  463. double dfCenterLat, double dfCenterLong,
  464. double dfPseudoStdParallel1,
  465. double dfFalseEasting,
  466. double dfFalseNorthing );
  467. /** Gall Stereograpic */
  468. OGRErr CPL_DLL OSRSetGS( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
  469. double dfFalseEasting, double dfFalseNorthing );
  470. /** Goode Homolosine */
  471. OGRErr CPL_DLL OSRSetGH( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
  472. double dfFalseEasting, double dfFalseNorthing );
  473. /** Interrupted Goode Homolosine */
  474. OGRErr CPL_DLL OSRSetIGH( OGRSpatialReferenceH hSRS );
  475. /** GEOS - Geostationary Satellite View */
  476. OGRErr CPL_DLL OSRSetGEOS( OGRSpatialReferenceH hSRS,
  477. double dfCentralMeridian, double dfSatelliteHeight,
  478. double dfFalseEasting, double dfFalseNorthing );
  479. /** Gauss Schreiber Transverse Mercator */
  480. OGRErr CPL_DLL OSRSetGaussSchreiberTMercator( OGRSpatialReferenceH hSRS,
  481. double dfCenterLat, double dfCenterLong,
  482. double dfScale,
  483. double dfFalseEasting,
  484. double dfFalseNorthing );
  485. /** Gnomonic */
  486. OGRErr CPL_DLL OSRSetGnomonic(OGRSpatialReferenceH hSRS,
  487. double dfCenterLat, double dfCenterLong,
  488. double dfFalseEasting, double dfFalseNorthing );
  489. /** Oblique Mercator (aka HOM (variant B) */
  490. OGRErr CPL_DLL OSRSetOM( OGRSpatialReferenceH hSRS,
  491. double dfCenterLat, double dfCenterLong,
  492. double dfAzimuth, double dfRectToSkew,
  493. double dfScale,
  494. double dfFalseEasting, double dfFalseNorthing );
  495. /** Hotine Oblique Mercator using azimuth angle */
  496. OGRErr CPL_DLL OSRSetHOM( OGRSpatialReferenceH hSRS,
  497. double dfCenterLat, double dfCenterLong,
  498. double dfAzimuth, double dfRectToSkew,
  499. double dfScale,
  500. double dfFalseEasting, double dfFalseNorthing );
  501. /** Hotine Oblique Mercator using two points on centerline */
  502. OGRErr CPL_DLL OSRSetHOM2PNO( OGRSpatialReferenceH hSRS, double dfCenterLat,
  503. double dfLat1, double dfLong1,
  504. double dfLat2, double dfLong2,
  505. double dfScale,
  506. double dfFalseEasting, double dfFalseNorthing );
  507. /** International Map of the World Polyconic */
  508. OGRErr CPL_DLL OSRSetIWMPolyconic( OGRSpatialReferenceH hSRS,
  509. double dfLat1, double dfLat2,
  510. double dfCenterLong,
  511. double dfFalseEasting,
  512. double dfFalseNorthing );
  513. /** Krovak Oblique Conic Conformal */
  514. OGRErr CPL_DLL OSRSetKrovak( OGRSpatialReferenceH hSRS,
  515. double dfCenterLat, double dfCenterLong,
  516. double dfAzimuth, double dfPseudoStdParallelLat,
  517. double dfScale,
  518. double dfFalseEasting, double dfFalseNorthing );
  519. /** Lambert Azimuthal Equal-Area */
  520. OGRErr CPL_DLL OSRSetLAEA( OGRSpatialReferenceH hSRS,
  521. double dfCenterLat, double dfCenterLong,
  522. double dfFalseEasting, double dfFalseNorthing );
  523. /** Lambert Conformal Conic */
  524. OGRErr CPL_DLL OSRSetLCC( OGRSpatialReferenceH hSRS,
  525. double dfStdP1, double dfStdP2,
  526. double dfCenterLat, double dfCenterLong,
  527. double dfFalseEasting, double dfFalseNorthing );
  528. /** Lambert Conformal Conic 1SP */
  529. OGRErr CPL_DLL OSRSetLCC1SP( OGRSpatialReferenceH hSRS,
  530. double dfCenterLat, double dfCenterLong,
  531. double dfScale,
  532. double dfFalseEasting, double dfFalseNorthing );
  533. /** Lambert Conformal Conic (Belgium) */
  534. OGRErr CPL_DLL OSRSetLCCB( OGRSpatialReferenceH hSRS,
  535. double dfStdP1, double dfStdP2,
  536. double dfCenterLat, double dfCenterLong,
  537. double dfFalseEasting, double dfFalseNorthing );
  538. /** Miller Cylindrical */
  539. OGRErr CPL_DLL OSRSetMC( OGRSpatialReferenceH hSRS,
  540. double dfCenterLat, double dfCenterLong,
  541. double dfFalseEasting, double dfFalseNorthing );
  542. /** Mercator */
  543. OGRErr CPL_DLL OSRSetMercator( OGRSpatialReferenceH hSRS,
  544. double dfCenterLat, double dfCenterLong,
  545. double dfScale,
  546. double dfFalseEasting, double dfFalseNorthing );
  547. /** Mollweide */
  548. OGRErr CPL_DLL OSRSetMollweide( OGRSpatialReferenceH hSRS,
  549. double dfCentralMeridian,
  550. double dfFalseEasting,
  551. double dfFalseNorthing );
  552. /** New Zealand Map Grid */
  553. OGRErr CPL_DLL OSRSetNZMG( OGRSpatialReferenceH hSRS,
  554. double dfCenterLat, double dfCenterLong,
  555. double dfFalseEasting, double dfFalseNorthing );
  556. /** Oblique Stereographic */
  557. OGRErr CPL_DLL OSRSetOS( OGRSpatialReferenceH hSRS,
  558. double dfOriginLat, double dfCMeridian,
  559. double dfScale,
  560. double dfFalseEasting,double dfFalseNorthing);
  561. /** Orthographic */
  562. OGRErr CPL_DLL OSRSetOrthographic( OGRSpatialReferenceH hSRS,
  563. double dfCenterLat, double dfCenterLong,
  564. double dfFalseEasting,
  565. double dfFalseNorthing);
  566. /** Polyconic */
  567. OGRErr CPL_DLL OSRSetPolyconic( OGRSpatialReferenceH hSRS,
  568. double dfCenterLat, double dfCenterLong,
  569. double dfFalseEasting, double dfFalseNorthing );
  570. /** Polar Stereographic */
  571. OGRErr CPL_DLL OSRSetPS( OGRSpatialReferenceH hSRS,
  572. double dfCenterLat, double dfCenterLong,
  573. double dfScale,
  574. double dfFalseEasting, double dfFalseNorthing);
  575. /** Robinson */
  576. OGRErr CPL_DLL OSRSetRobinson( OGRSpatialReferenceH hSRS,
  577. double dfCenterLong,
  578. double dfFalseEasting, double dfFalseNorthing );
  579. /** Sinusoidal */
  580. OGRErr CPL_DLL OSRSetSinusoidal( OGRSpatialReferenceH hSRS,
  581. double dfCenterLong,
  582. double dfFalseEasting,
  583. double dfFalseNorthing );
  584. /** Stereographic */
  585. OGRErr CPL_DLL OSRSetStereographic( OGRSpatialReferenceH hSRS,
  586. double dfCenterLat, double dfCenterLong,
  587. double dfScale,
  588. double dfFalseEasting,
  589. double dfFalseNorthing);
  590. /** Swiss Oblique Cylindrical */
  591. OGRErr CPL_DLL OSRSetSOC( OGRSpatialReferenceH hSRS,
  592. double dfLatitudeOfOrigin, double dfCentralMeridian,
  593. double dfFalseEasting, double dfFalseNorthing );
  594. /** Transverse Mercator
  595. *
  596. * Special processing available for Transverse Mercator with GDAL &gt;= 1.10 and PROJ &gt;= 4.8 :
  597. * see OGRSpatialReference::exportToProj4().
  598. */
  599. OGRErr CPL_DLL OSRSetTM( OGRSpatialReferenceH hSRS,
  600. double dfCenterLat, double dfCenterLong,
  601. double dfScale,
  602. double dfFalseEasting, double dfFalseNorthing );
  603. /** Transverse Mercator variant */
  604. OGRErr CPL_DLL OSRSetTMVariant(
  605. OGRSpatialReferenceH hSRS, const char *pszVariantName,
  606. double dfCenterLat, double dfCenterLong,
  607. double dfScale,
  608. double dfFalseEasting, double dfFalseNorthing );
  609. /** Tunesia Mining Grid */
  610. OGRErr CPL_DLL OSRSetTMG( OGRSpatialReferenceH hSRS,
  611. double dfCenterLat, double dfCenterLong,
  612. double dfFalseEasting, double dfFalseNorthing );
  613. /** Transverse Mercator (South Oriented) */
  614. OGRErr CPL_DLL OSRSetTMSO( OGRSpatialReferenceH hSRS,
  615. double dfCenterLat, double dfCenterLong,
  616. double dfScale,
  617. double dfFalseEasting, double dfFalseNorthing );
  618. /** VanDerGrinten */
  619. OGRErr CPL_DLL OSRSetVDG( OGRSpatialReferenceH hSRS,
  620. double dfCenterLong,
  621. double dfFalseEasting, double dfFalseNorthing );
  622. /** Wagner I -- VII */
  623. OGRErr CPL_DLL OSRSetWagner( OGRSpatialReferenceH hSRS, int nVariation,
  624. double dfFalseEasting,
  625. double dfFalseNorthing );
  626. /** Quadrilateralized Spherical Cube */
  627. OGRErr CPL_DLL OSRSetQSC( OGRSpatialReferenceH hSRS,
  628. double dfCenterLat, double dfCenterLong );
  629. double CPL_DLL OSRCalcInvFlattening( double dfSemiMajor, double dfSemiMinor );
  630. double CPL_DLL OSRCalcSemiMinorFromInvFlattening( double dfSemiMajor, double dfInvFlattening );
  631. void CPL_DLL OSRCleanup( void );
  632. /* -------------------------------------------------------------------- */
  633. /* OGRCoordinateTransform C API. */
  634. /* -------------------------------------------------------------------- */
  635. OGRCoordinateTransformationH CPL_DLL CPL_STDCALL
  636. OCTNewCoordinateTransformation( OGRSpatialReferenceH hSourceSRS,
  637. OGRSpatialReferenceH hTargetSRS );
  638. void CPL_DLL CPL_STDCALL
  639. OCTDestroyCoordinateTransformation( OGRCoordinateTransformationH );
  640. int CPL_DLL CPL_STDCALL
  641. OCTTransform( OGRCoordinateTransformationH hCT,
  642. int nCount, double *x, double *y, double *z );
  643. int CPL_DLL CPL_STDCALL
  644. OCTTransformEx( OGRCoordinateTransformationH hCT,
  645. int nCount, double *x, double *y, double *z,
  646. int *pabSuccess );
  647. /* this is really private to OGR. */
  648. char *OCTProj4Normalize( const char *pszProj4Src );
  649. void OCTCleanupProjMutex( void );
  650. /* -------------------------------------------------------------------- */
  651. /* Projection transform dictionary query. */
  652. /* -------------------------------------------------------------------- */
  653. char CPL_DLL ** OPTGetProjectionMethods( void );
  654. char CPL_DLL ** OPTGetParameterList( const char * pszProjectionMethod,
  655. char ** ppszUserName );
  656. int CPL_DLL OPTGetParameterInfo( const char * pszProjectionMethod,
  657. const char * pszParameterName,
  658. char ** ppszUserName,
  659. char ** ppszType,
  660. double *pdfDefaultValue );
  661. CPL_C_END
  662. #endif /* ndef SWIG */
  663. #endif /* ndef _OGR_SRS_API_H_INCLUDED */