gooderp18绿色标准版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1063 line
49KB

  1. /******************************************************************************
  2. * $Id: ogr_srs_api.h 70b1f396c006e30cf25557ad21f4c193e24cd4ff 2019-06-18 20:10:58 +0200 Even 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. /** Axis orientations (corresponds to CS_AxisOrientationEnum). */
  43. typedef enum {
  44. OAO_Other=0, /**< Other */
  45. OAO_North=1, /**< North */
  46. OAO_South=2, /**< South */
  47. OAO_East=3, /**< East */
  48. OAO_West=4, /**< West */
  49. OAO_Up=5, /**< Up (to space) */
  50. OAO_Down=6 /**< Down (to Earth center) */
  51. } OGRAxisOrientation;
  52. const char CPL_DLL *OSRAxisEnumToName( OGRAxisOrientation eOrientation );
  53. #endif // ndef SWIG
  54. /* ==================================================================== */
  55. /* Some standard WKT geographic coordinate systems. */
  56. /* ==================================================================== */
  57. #ifdef USE_DEPRECATED_SRS_WKT_WGS84
  58. #define SRS_WKT_WGS84 "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\"]],AUTHORITY[\"EPSG\",\"4326\"]]"
  59. #endif
  60. /** WGS 84 geodetic (lat/long) WKT / EPSG:4326 with lat,long ordering */
  61. #define SRS_WKT_WGS84_LAT_LONG "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\"]]"
  62. /* ==================================================================== */
  63. /* Some "standard" strings. */
  64. /* ==================================================================== */
  65. /** Albers_Conic_Equal_Area projection */
  66. #define SRS_PT_ALBERS_CONIC_EQUAL_AREA \
  67. "Albers_Conic_Equal_Area"
  68. /** Azimuthal_Equidistant projection */
  69. #define SRS_PT_AZIMUTHAL_EQUIDISTANT "Azimuthal_Equidistant"
  70. /** Cassini_Soldner projection */
  71. #define SRS_PT_CASSINI_SOLDNER "Cassini_Soldner"
  72. /** Cylindrical_Equal_Area projection */
  73. #define SRS_PT_CYLINDRICAL_EQUAL_AREA "Cylindrical_Equal_Area"
  74. /** Cylindrical_Equal_Area projection */
  75. #define SRS_PT_BONNE "Bonne"
  76. /** Eckert_I projection */
  77. #define SRS_PT_ECKERT_I "Eckert_I"
  78. /** Eckert_II projection */
  79. #define SRS_PT_ECKERT_II "Eckert_II"
  80. /** Eckert_III projection */
  81. #define SRS_PT_ECKERT_III "Eckert_III"
  82. /** Eckert_IV projection */
  83. #define SRS_PT_ECKERT_IV "Eckert_IV"
  84. /** Eckert_V projection */
  85. #define SRS_PT_ECKERT_V "Eckert_V"
  86. /** Eckert_VI projection */
  87. #define SRS_PT_ECKERT_VI "Eckert_VI"
  88. /** Equidistant_Conic projection */
  89. #define SRS_PT_EQUIDISTANT_CONIC \
  90. "Equidistant_Conic"
  91. /** Equirectangular projection */
  92. #define SRS_PT_EQUIRECTANGULAR "Equirectangular"
  93. /** Gall_Stereographic projection */
  94. #define SRS_PT_GALL_STEREOGRAPHIC \
  95. "Gall_Stereographic"
  96. /** Gauss_Schreiber_Transverse_Mercator projection */
  97. #define SRS_PT_GAUSSSCHREIBERTMERCATOR \
  98. "Gauss_Schreiber_Transverse_Mercator"
  99. /** Geostationary_Satellite projection */
  100. #define SRS_PT_GEOSTATIONARY_SATELLITE \
  101. "Geostationary_Satellite"
  102. /** Goode_Homolosine projection */
  103. #define SRS_PT_GOODE_HOMOLOSINE "Goode_Homolosine"
  104. /** Interrupted_Goode_Homolosine projection */
  105. #define SRS_PT_IGH "Interrupted_Goode_Homolosine"
  106. /** Gnomonic projection */
  107. #define SRS_PT_GNOMONIC "Gnomonic"
  108. /** Hotine_Oblique_Mercator_Azimuth_Center projection */
  109. #define SRS_PT_HOTINE_OBLIQUE_MERCATOR_AZIMUTH_CENTER \
  110. "Hotine_Oblique_Mercator_Azimuth_Center"
  111. /** Hotine_Oblique_Mercator projection */
  112. #define SRS_PT_HOTINE_OBLIQUE_MERCATOR \
  113. "Hotine_Oblique_Mercator"
  114. /** Hotine_Oblique_Mercator_Two_Point_Natural_Origin projection */
  115. #define SRS_PT_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN \
  116. "Hotine_Oblique_Mercator_Two_Point_Natural_Origin"
  117. /** Laborde_Oblique_Mercator projection */
  118. #define SRS_PT_LABORDE_OBLIQUE_MERCATOR \
  119. "Laborde_Oblique_Mercator"
  120. /** Lambert_Conformal_Conic_1SP projection */
  121. #define SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP \
  122. "Lambert_Conformal_Conic_1SP"
  123. /** Lambert_Conformal_Conic_2SP projection */
  124. #define SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP \
  125. "Lambert_Conformal_Conic_2SP"
  126. /** Lambert_Conformal_Conic_2SP_Belgium projection */
  127. #define SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP_BELGIUM \
  128. "Lambert_Conformal_Conic_2SP_Belgium"
  129. /** Lambert_Azimuthal_Equal_Area projection */
  130. #define SRS_PT_LAMBERT_AZIMUTHAL_EQUAL_AREA \
  131. "Lambert_Azimuthal_Equal_Area"
  132. /** Mercator_1SP projection */
  133. #define SRS_PT_MERCATOR_1SP "Mercator_1SP"
  134. /** Mercator_2SP projection */
  135. #define SRS_PT_MERCATOR_2SP "Mercator_2SP"
  136. /** Mercator_Auxiliary_Sphere is used used by ESRI to mean EPSG:3875 */
  137. #define SRS_PT_MERCATOR_AUXILIARY_SPHERE \
  138. "Mercator_Auxiliary_Sphere"
  139. /** Miller_Cylindrical projection */
  140. #define SRS_PT_MILLER_CYLINDRICAL "Miller_Cylindrical"
  141. /** Mollweide projection */
  142. #define SRS_PT_MOLLWEIDE "Mollweide"
  143. /** New_Zealand_Map_Grid projection */
  144. #define SRS_PT_NEW_ZEALAND_MAP_GRID \
  145. "New_Zealand_Map_Grid"
  146. /** Oblique_Stereographic projection */
  147. #define SRS_PT_OBLIQUE_STEREOGRAPHIC \
  148. "Oblique_Stereographic"
  149. /** Orthographic projection */
  150. #define SRS_PT_ORTHOGRAPHIC "Orthographic"
  151. /** Polar_Stereographic projection */
  152. #define SRS_PT_POLAR_STEREOGRAPHIC \
  153. "Polar_Stereographic"
  154. /** Polyconic projection */
  155. #define SRS_PT_POLYCONIC "Polyconic"
  156. /** Robinson projection */
  157. #define SRS_PT_ROBINSON "Robinson"
  158. /** Sinusoidal projection */
  159. #define SRS_PT_SINUSOIDAL "Sinusoidal"
  160. /** Stereographic projection */
  161. #define SRS_PT_STEREOGRAPHIC "Stereographic"
  162. /** Swiss_Oblique_Cylindrical projection */
  163. #define SRS_PT_SWISS_OBLIQUE_CYLINDRICAL \
  164. "Swiss_Oblique_Cylindrical"
  165. /** Transverse_Mercator projection */
  166. #define SRS_PT_TRANSVERSE_MERCATOR \
  167. "Transverse_Mercator"
  168. /** Transverse_Mercator_South_Orientated projection */
  169. #define SRS_PT_TRANSVERSE_MERCATOR_SOUTH_ORIENTED \
  170. "Transverse_Mercator_South_Orientated"
  171. /* special mapinfo variants on Transverse Mercator */
  172. /** Transverse_Mercator_MapInfo_21 projection */
  173. #define SRS_PT_TRANSVERSE_MERCATOR_MI_21 \
  174. "Transverse_Mercator_MapInfo_21"
  175. /** Transverse_Mercator_MapInfo_22 projection */
  176. #define SRS_PT_TRANSVERSE_MERCATOR_MI_22 \
  177. "Transverse_Mercator_MapInfo_22"
  178. /** Transverse_Mercator_MapInfo_23 projection */
  179. #define SRS_PT_TRANSVERSE_MERCATOR_MI_23 \
  180. "Transverse_Mercator_MapInfo_23"
  181. /** Transverse_Mercator_MapInfo_24 projection */
  182. #define SRS_PT_TRANSVERSE_MERCATOR_MI_24 \
  183. "Transverse_Mercator_MapInfo_24"
  184. /** Transverse_Mercator_MapInfo_25 projection */
  185. #define SRS_PT_TRANSVERSE_MERCATOR_MI_25 \
  186. "Transverse_Mercator_MapInfo_25"
  187. /** Tunisia_Mining_Grid projection */
  188. #define SRS_PT_TUNISIA_MINING_GRID \
  189. "Tunisia_Mining_Grid"
  190. /** Two_Point_Equidistant projection */
  191. #define SRS_PT_TWO_POINT_EQUIDISTANT \
  192. "Two_Point_Equidistant"
  193. /** VanDerGrinten projection */
  194. #define SRS_PT_VANDERGRINTEN "VanDerGrinten"
  195. /** Krovak projection */
  196. #define SRS_PT_KROVAK "Krovak"
  197. /** International_Map_of_the_World_Polyconic projection */
  198. #define SRS_PT_IMW_POLYCONIC "International_Map_of_the_World_Polyconic"
  199. /** Wagner_I projection */
  200. #define SRS_PT_WAGNER_I "Wagner_I"
  201. /** Wagner_II projection */
  202. #define SRS_PT_WAGNER_II "Wagner_II"
  203. /** Wagner_III projection */
  204. #define SRS_PT_WAGNER_III "Wagner_III"
  205. /** Wagner_IV projection */
  206. #define SRS_PT_WAGNER_IV "Wagner_IV"
  207. /** Wagner_V projection */
  208. #define SRS_PT_WAGNER_V "Wagner_V"
  209. /** Wagner_VI projection */
  210. #define SRS_PT_WAGNER_VI "Wagner_VI"
  211. /** Wagner_VII projection */
  212. #define SRS_PT_WAGNER_VII "Wagner_VII"
  213. /** Quadrilateralized_Spherical_Cube projection */
  214. #define SRS_PT_QSC "Quadrilateralized_Spherical_Cube"
  215. /** Aitoff projection */
  216. #define SRS_PT_AITOFF "Aitoff"
  217. /** Winkel_I projection */
  218. #define SRS_PT_WINKEL_I "Winkel_I"
  219. /** Winkel_II projection */
  220. #define SRS_PT_WINKEL_II "Winkel_II"
  221. /** Winkel_Tripel projection */
  222. #define SRS_PT_WINKEL_TRIPEL "Winkel_Tripel"
  223. /** Craster_Parabolic projection */
  224. #define SRS_PT_CRASTER_PARABOLIC "Craster_Parabolic"
  225. /** Loximuthal projection */
  226. #define SRS_PT_LOXIMUTHAL "Loximuthal"
  227. /** Quartic_Authalic projection */
  228. #define SRS_PT_QUARTIC_AUTHALIC "Quartic_Authalic"
  229. /** Spherical_Cross_Track_Height projection */
  230. #define SRS_PT_SCH "Spherical_Cross_Track_Height"
  231. /** central_meridian projection parameter */
  232. #define SRS_PP_CENTRAL_MERIDIAN "central_meridian"
  233. /** scale_factor projection parameter */
  234. #define SRS_PP_SCALE_FACTOR "scale_factor"
  235. /** standard_parallel_1 projection parameter */
  236. #define SRS_PP_STANDARD_PARALLEL_1 "standard_parallel_1"
  237. /** standard_parallel_2 projection parameter */
  238. #define SRS_PP_STANDARD_PARALLEL_2 "standard_parallel_2"
  239. /** pseudo_standard_parallel_1 projection parameter */
  240. #define SRS_PP_PSEUDO_STD_PARALLEL_1 "pseudo_standard_parallel_1"
  241. /** longitude_of_center projection parameter */
  242. #define SRS_PP_LONGITUDE_OF_CENTER "longitude_of_center"
  243. /** latitude_of_center projection parameter */
  244. #define SRS_PP_LATITUDE_OF_CENTER "latitude_of_center"
  245. /** longitude_of_origin projection parameter */
  246. #define SRS_PP_LONGITUDE_OF_ORIGIN "longitude_of_origin"
  247. /** latitude_of_origin projection parameter */
  248. #define SRS_PP_LATITUDE_OF_ORIGIN "latitude_of_origin"
  249. /** false_easting projection parameter */
  250. #define SRS_PP_FALSE_EASTING "false_easting"
  251. /** false_northing projection parameter */
  252. #define SRS_PP_FALSE_NORTHING "false_northing"
  253. /** azimuth projection parameter */
  254. #define SRS_PP_AZIMUTH "azimuth"
  255. /** longitude_of_point_1 projection parameter */
  256. #define SRS_PP_LONGITUDE_OF_POINT_1 "longitude_of_point_1"
  257. /** latitude_of_point_1 projection parameter */
  258. #define SRS_PP_LATITUDE_OF_POINT_1 "latitude_of_point_1"
  259. /** longitude_of_point_2 projection parameter */
  260. #define SRS_PP_LONGITUDE_OF_POINT_2 "longitude_of_point_2"
  261. /** latitude_of_point_2 projection parameter */
  262. #define SRS_PP_LATITUDE_OF_POINT_2 "latitude_of_point_2"
  263. /** longitude_of_point_3 projection parameter */
  264. #define SRS_PP_LONGITUDE_OF_POINT_3 "longitude_of_point_3"
  265. /** latitude_of_point_3 projection parameter */
  266. #define SRS_PP_LATITUDE_OF_POINT_3 "latitude_of_point_3"
  267. /** rectified_grid_angle projection parameter */
  268. #define SRS_PP_RECTIFIED_GRID_ANGLE "rectified_grid_angle"
  269. /** landsat_number projection parameter */
  270. #define SRS_PP_LANDSAT_NUMBER "landsat_number"
  271. /** path_number projection parameter */
  272. #define SRS_PP_PATH_NUMBER "path_number"
  273. /** perspective_point_height projection parameter */
  274. #define SRS_PP_PERSPECTIVE_POINT_HEIGHT "perspective_point_height"
  275. /** satellite_height projection parameter */
  276. #define SRS_PP_SATELLITE_HEIGHT "satellite_height"
  277. /** fipszone projection parameter */
  278. #define SRS_PP_FIPSZONE "fipszone"
  279. /** zone projection parameter */
  280. #define SRS_PP_ZONE "zone"
  281. /** Latitude_Of_1st_Point projection parameter */
  282. #define SRS_PP_LATITUDE_OF_1ST_POINT "Latitude_Of_1st_Point"
  283. /** Longitude_Of_1st_Point projection parameter */
  284. #define SRS_PP_LONGITUDE_OF_1ST_POINT "Longitude_Of_1st_Point"
  285. /** Latitude_Of_2nd_Point projection parameter */
  286. #define SRS_PP_LATITUDE_OF_2ND_POINT "Latitude_Of_2nd_Point"
  287. /** Longitude_Of_2nd_Point projection parameter */
  288. #define SRS_PP_LONGITUDE_OF_2ND_POINT "Longitude_Of_2nd_Point"
  289. /** peg_point_latitude projection parameter */
  290. #define SRS_PP_PEG_POINT_LATITUDE "peg_point_latitude"
  291. /** peg_point_longitude projection parameter */
  292. #define SRS_PP_PEG_POINT_LONGITUDE "peg_point_longitude"
  293. /** peg_point_heading projection parameter */
  294. #define SRS_PP_PEG_POINT_HEADING "peg_point_heading"
  295. /** peg_point_height projection parameter */
  296. #define SRS_PP_PEG_POINT_HEIGHT "peg_point_height"
  297. /** Linear unit Meter */
  298. #define SRS_UL_METER "Meter"
  299. /** Linear unit Foot (International) */
  300. #define SRS_UL_FOOT "Foot (International)" /* or just "FOOT"? */
  301. /** Linear unit Foot (International) conversion factor to meter*/
  302. #define SRS_UL_FOOT_CONV "0.3048"
  303. /** Linear unit Foot */
  304. #define SRS_UL_US_FOOT "Foot_US" /* or "US survey foot" from EPSG */
  305. /** Linear unit Foot conversion factor to meter */
  306. #define SRS_UL_US_FOOT_CONV "0.3048006096012192"
  307. /** Linear unit Nautical Mile */
  308. #define SRS_UL_NAUTICAL_MILE "Nautical Mile"
  309. /** Linear unit Nautical Mile conversion factor to meter */
  310. #define SRS_UL_NAUTICAL_MILE_CONV "1852.0"
  311. /** Linear unit Link */
  312. #define SRS_UL_LINK "Link" /* Based on US Foot */
  313. /** Linear unit Link conversion factor to meter */
  314. #define SRS_UL_LINK_CONV "0.20116684023368047"
  315. /** Linear unit Chain */
  316. #define SRS_UL_CHAIN "Chain" /* based on US Foot */
  317. /** Linear unit Chain conversion factor to meter */
  318. #define SRS_UL_CHAIN_CONV "20.116684023368047"
  319. /** Linear unit Rod */
  320. #define SRS_UL_ROD "Rod" /* based on US Foot */
  321. /** Linear unit Rod conversion factor to meter */
  322. #define SRS_UL_ROD_CONV "5.02921005842012"
  323. /** Linear unit Link_Clarke */
  324. #define SRS_UL_LINK_Clarke "Link_Clarke"
  325. /** Linear unit Link_Clarke conversion factor to meter */
  326. #define SRS_UL_LINK_Clarke_CONV "0.2011661949"
  327. /** Linear unit Kilometer */
  328. #define SRS_UL_KILOMETER "Kilometer"
  329. /** Linear unit Kilometer conversion factor to meter */
  330. #define SRS_UL_KILOMETER_CONV "1000."
  331. /** Linear unit Decimeter */
  332. #define SRS_UL_DECIMETER "Decimeter"
  333. /** Linear unit Decimeter conversion factor to meter */
  334. #define SRS_UL_DECIMETER_CONV "0.1"
  335. /** Linear unit Decimeter */
  336. #define SRS_UL_CENTIMETER "Centimeter"
  337. /** Linear unit Decimeter conversion factor to meter */
  338. #define SRS_UL_CENTIMETER_CONV "0.01"
  339. /** Linear unit Millimeter */
  340. #define SRS_UL_MILLIMETER "Millimeter"
  341. /** Linear unit Millimeter conversion factor to meter */
  342. #define SRS_UL_MILLIMETER_CONV "0.001"
  343. /** Linear unit Nautical_Mile_International */
  344. #define SRS_UL_INTL_NAUT_MILE "Nautical_Mile_International"
  345. /** Linear unit Nautical_Mile_International conversion factor to meter */
  346. #define SRS_UL_INTL_NAUT_MILE_CONV "1852.0"
  347. /** Linear unit Inch_International */
  348. #define SRS_UL_INTL_INCH "Inch_International"
  349. /** Linear unit Inch_International conversion factor to meter */
  350. #define SRS_UL_INTL_INCH_CONV "0.0254"
  351. /** Linear unit Foot_International */
  352. #define SRS_UL_INTL_FOOT "Foot_International"
  353. /** Linear unit Foot_International conversion factor to meter */
  354. #define SRS_UL_INTL_FOOT_CONV "0.3048"
  355. /** Linear unit Yard_International */
  356. #define SRS_UL_INTL_YARD "Yard_International"
  357. /** Linear unit Yard_International conversion factor to meter */
  358. #define SRS_UL_INTL_YARD_CONV "0.9144"
  359. /** Linear unit Statute_Mile_International */
  360. #define SRS_UL_INTL_STAT_MILE "Statute_Mile_International"
  361. /** Linear unit Statute_Mile_Internationalconversion factor to meter */
  362. #define SRS_UL_INTL_STAT_MILE_CONV "1609.344"
  363. /** Linear unit Fathom_International */
  364. #define SRS_UL_INTL_FATHOM "Fathom_International"
  365. /** Linear unit Fathom_International conversion factor to meter */
  366. #define SRS_UL_INTL_FATHOM_CONV "1.8288"
  367. /** Linear unit Chain_International */
  368. #define SRS_UL_INTL_CHAIN "Chain_International"
  369. /** Linear unit Chain_International conversion factor to meter */
  370. #define SRS_UL_INTL_CHAIN_CONV "20.1168"
  371. /** Linear unit Link_International */
  372. #define SRS_UL_INTL_LINK "Link_International"
  373. /** Linear unit Link_International conversion factor to meter */
  374. #define SRS_UL_INTL_LINK_CONV "0.201168"
  375. /** Linear unit Inch_US_Surveyor */
  376. #define SRS_UL_US_INCH "Inch_US_Surveyor"
  377. /** Linear unit Inch_US_Surveyor conversion factor to meter */
  378. #define SRS_UL_US_INCH_CONV "0.025400050800101603"
  379. /** Linear unit Yard_US_Surveyor */
  380. #define SRS_UL_US_YARD "Yard_US_Surveyor"
  381. /** Linear unit Yard_US_Surveyor conversion factor to meter */
  382. #define SRS_UL_US_YARD_CONV "0.914401828803658"
  383. /** Linear unit Chain_US_Surveyor */
  384. #define SRS_UL_US_CHAIN "Chain_US_Surveyor"
  385. /** Linear unit Chain_US_Surveyor conversion factor to meter */
  386. #define SRS_UL_US_CHAIN_CONV "20.11684023368047"
  387. /** Linear unit Statute_Mile_US_Surveyor */
  388. #define SRS_UL_US_STAT_MILE "Statute_Mile_US_Surveyor"
  389. /** Linear unit Statute_Mile_US_Surveyor conversion factor to meter */
  390. #define SRS_UL_US_STAT_MILE_CONV "1609.347218694437"
  391. /** Linear unit Yard_Indian */
  392. #define SRS_UL_INDIAN_YARD "Yard_Indian"
  393. /** Linear unit Yard_Indian conversion factor to meter */
  394. #define SRS_UL_INDIAN_YARD_CONV "0.91439523"
  395. /** Linear unit Foot_Indian */
  396. #define SRS_UL_INDIAN_FOOT "Foot_Indian"
  397. /** Linear unit Foot_Indian conversion factor to meter */
  398. #define SRS_UL_INDIAN_FOOT_CONV "0.30479841"
  399. /** Linear unit Chain_Indian */
  400. #define SRS_UL_INDIAN_CHAIN "Chain_Indian"
  401. /** Linear unit Chain_Indian conversion factor to meter */
  402. #define SRS_UL_INDIAN_CHAIN_CONV "20.11669506"
  403. /** Angular unit degree */
  404. #define SRS_UA_DEGREE "degree"
  405. /** Angular unit degree conversion factor to radians */
  406. #define SRS_UA_DEGREE_CONV "0.0174532925199433"
  407. /** Angular unit radian */
  408. #define SRS_UA_RADIAN "radian"
  409. /** Prime meridian Greenwich */
  410. #define SRS_PM_GREENWICH "Greenwich"
  411. /** North_American_Datum_1927 datum name */
  412. #define SRS_DN_NAD27 "North_American_Datum_1927"
  413. /** North_American_Datum_1983 datum name */
  414. #define SRS_DN_NAD83 "North_American_Datum_1983"
  415. /** WGS_1972 datum name */
  416. #define SRS_DN_WGS72 "WGS_1972"
  417. /** WGS_1984 datum name */
  418. #define SRS_DN_WGS84 "WGS_1984"
  419. /** Semi-major axis of the WGS84 ellipsoid */
  420. #define SRS_WGS84_SEMIMAJOR 6378137.0
  421. /** Inverse flattening of the WGS84 ellipsoid */
  422. #define SRS_WGS84_INVFLATTENING 298.257223563
  423. #ifndef SWIG
  424. /* -------------------------------------------------------------------- */
  425. /* C Wrappers for C++ objects and methods. */
  426. /* -------------------------------------------------------------------- */
  427. #ifndef DEFINED_OGRSpatialReferenceH
  428. /*! @cond Doxygen_Suppress */
  429. #define DEFINED_OGRSpatialReferenceH
  430. /*! @endcond */
  431. #ifdef DEBUG
  432. typedef struct OGRSpatialReferenceHS *OGRSpatialReferenceH;
  433. typedef struct OGRCoordinateTransformationHS *OGRCoordinateTransformationH;
  434. #else
  435. /** Opaque type for a Spatial Reference object */
  436. typedef void *OGRSpatialReferenceH;
  437. /** Opaque type for a coordinate transformation object */
  438. typedef void *OGRCoordinateTransformationH;
  439. #endif
  440. #endif
  441. void CPL_DLL OSRSetPROJSearchPaths( const char* const * papszPaths );
  442. void CPL_DLL OSRGetPROJVersion( int* pnMajor, int* pnMinor, int* pnPatch );
  443. OGRSpatialReferenceH CPL_DLL CPL_STDCALL
  444. OSRNewSpatialReference( const char * /* = NULL */);
  445. OGRSpatialReferenceH CPL_DLL CPL_STDCALL OSRCloneGeogCS( OGRSpatialReferenceH );
  446. OGRSpatialReferenceH CPL_DLL CPL_STDCALL OSRClone( OGRSpatialReferenceH );
  447. void CPL_DLL CPL_STDCALL OSRDestroySpatialReference( OGRSpatialReferenceH );
  448. int CPL_DLL OSRReference( OGRSpatialReferenceH );
  449. int CPL_DLL OSRDereference( OGRSpatialReferenceH );
  450. void CPL_DLL OSRRelease( OGRSpatialReferenceH );
  451. OGRErr CPL_DLL OSRValidate( OGRSpatialReferenceH );
  452. OGRErr CPL_DLL CPL_STDCALL OSRImportFromEPSG( OGRSpatialReferenceH, int );
  453. OGRErr CPL_DLL CPL_STDCALL OSRImportFromEPSGA( OGRSpatialReferenceH, int );
  454. OGRErr CPL_DLL OSRImportFromWkt( OGRSpatialReferenceH, char ** );
  455. OGRErr CPL_DLL OSRImportFromProj4( OGRSpatialReferenceH, const char *);
  456. OGRErr CPL_DLL OSRImportFromESRI( OGRSpatialReferenceH, char **);
  457. OGRErr CPL_DLL OSRImportFromPCI( OGRSpatialReferenceH hSRS, const char *,
  458. const char *, double * );
  459. OGRErr CPL_DLL OSRImportFromUSGS( OGRSpatialReferenceH,
  460. long, long, double *, long);
  461. OGRErr CPL_DLL OSRImportFromXML( OGRSpatialReferenceH, const char * );
  462. OGRErr CPL_DLL OSRImportFromDict( OGRSpatialReferenceH, const char *,
  463. const char * );
  464. OGRErr CPL_DLL OSRImportFromPanorama( OGRSpatialReferenceH, long, long, long,
  465. double * );
  466. OGRErr CPL_DLL OSRImportFromOzi( OGRSpatialReferenceH , const char * const *);
  467. OGRErr CPL_DLL OSRImportFromMICoordSys( OGRSpatialReferenceH, const char *);
  468. OGRErr CPL_DLL OSRImportFromERM( OGRSpatialReferenceH,
  469. const char *, const char *, const char * );
  470. OGRErr CPL_DLL OSRImportFromUrl( OGRSpatialReferenceH, const char * );
  471. OGRErr CPL_DLL CPL_STDCALL OSRExportToWkt( OGRSpatialReferenceH, char ** );
  472. OGRErr CPL_DLL OSRExportToWktEx( OGRSpatialReferenceH, char ** ppszResult,
  473. const char* const* papszOptions );
  474. OGRErr CPL_DLL CPL_STDCALL OSRExportToPrettyWkt( OGRSpatialReferenceH, char **, int);
  475. OGRErr CPL_DLL CPL_STDCALL OSRExportToProj4( OGRSpatialReferenceH, char **);
  476. OGRErr CPL_DLL OSRExportToPCI( OGRSpatialReferenceH, char **, char **,
  477. double ** );
  478. OGRErr CPL_DLL OSRExportToUSGS( OGRSpatialReferenceH, long *, long *,
  479. double **, long * );
  480. OGRErr CPL_DLL OSRExportToXML( OGRSpatialReferenceH, char **, const char * );
  481. OGRErr CPL_DLL OSRExportToPanorama( OGRSpatialReferenceH, long *, long *,
  482. long *, long *, double * );
  483. OGRErr CPL_DLL OSRExportToMICoordSys( OGRSpatialReferenceH, char ** );
  484. OGRErr CPL_DLL OSRExportToERM( OGRSpatialReferenceH, char *, char *, char * );
  485. OGRErr CPL_DLL OSRMorphToESRI( OGRSpatialReferenceH );
  486. OGRErr CPL_DLL OSRMorphFromESRI( OGRSpatialReferenceH );
  487. OGRSpatialReferenceH CPL_DLL OSRConvertToOtherProjection(
  488. OGRSpatialReferenceH hSRS,
  489. const char* pszTargetProjection,
  490. const char* const* papszOptions );
  491. const char CPL_DLL* OSRGetName( OGRSpatialReferenceH hSRS );
  492. OGRErr CPL_DLL CPL_STDCALL OSRSetAttrValue( OGRSpatialReferenceH hSRS,
  493. const char * pszNodePath,
  494. const char * pszNewNodeValue );
  495. const char CPL_DLL * CPL_STDCALL OSRGetAttrValue( OGRSpatialReferenceH hSRS,
  496. const char * pszName, int iChild /* = 0 */ );
  497. OGRErr CPL_DLL OSRSetAngularUnits( OGRSpatialReferenceH, const char *, double );
  498. double CPL_DLL OSRGetAngularUnits( OGRSpatialReferenceH, char ** );
  499. OGRErr CPL_DLL OSRSetLinearUnits( OGRSpatialReferenceH, const char *, double );
  500. OGRErr CPL_DLL OSRSetTargetLinearUnits( OGRSpatialReferenceH, const char *, const char *, double );
  501. OGRErr CPL_DLL OSRSetLinearUnitsAndUpdateParameters(
  502. OGRSpatialReferenceH, const char *, double );
  503. double CPL_DLL OSRGetLinearUnits( OGRSpatialReferenceH, char ** );
  504. double CPL_DLL OSRGetTargetLinearUnits( OGRSpatialReferenceH, const char *, char ** );
  505. double CPL_DLL OSRGetPrimeMeridian( OGRSpatialReferenceH, char ** );
  506. int CPL_DLL OSRIsGeographic( OGRSpatialReferenceH );
  507. int CPL_DLL OSRIsLocal( OGRSpatialReferenceH );
  508. int CPL_DLL OSRIsProjected( OGRSpatialReferenceH );
  509. int CPL_DLL OSRIsCompound( OGRSpatialReferenceH );
  510. int CPL_DLL OSRIsGeocentric( OGRSpatialReferenceH );
  511. int CPL_DLL OSRIsVertical( OGRSpatialReferenceH );
  512. int CPL_DLL OSRIsSameGeogCS( OGRSpatialReferenceH, OGRSpatialReferenceH );
  513. int CPL_DLL OSRIsSameVertCS( OGRSpatialReferenceH, OGRSpatialReferenceH );
  514. int CPL_DLL OSRIsSame( OGRSpatialReferenceH, OGRSpatialReferenceH );
  515. int CPL_DLL OSRIsSameEx( OGRSpatialReferenceH, OGRSpatialReferenceH,
  516. const char* const *papszOptions );
  517. OGRErr CPL_DLL OSRSetLocalCS( OGRSpatialReferenceH hSRS, const char *pszName );
  518. OGRErr CPL_DLL OSRSetProjCS( OGRSpatialReferenceH hSRS, const char * pszName );
  519. OGRErr CPL_DLL OSRSetGeocCS( OGRSpatialReferenceH hSRS, const char * pszName );
  520. OGRErr CPL_DLL OSRSetWellKnownGeogCS( OGRSpatialReferenceH hSRS,
  521. const char * pszName );
  522. OGRErr CPL_DLL CPL_STDCALL OSRSetFromUserInput( OGRSpatialReferenceH hSRS,
  523. const char * );
  524. OGRErr CPL_DLL OSRCopyGeogCSFrom( OGRSpatialReferenceH hSRS,
  525. const OGRSpatialReferenceH hSrcSRS );
  526. OGRErr CPL_DLL OSRSetTOWGS84( OGRSpatialReferenceH hSRS,
  527. double, double, double,
  528. double, double, double, double );
  529. OGRErr CPL_DLL OSRGetTOWGS84( OGRSpatialReferenceH hSRS, double *, int );
  530. OGRErr CPL_DLL OSRSetCompoundCS( OGRSpatialReferenceH hSRS,
  531. const char *pszName,
  532. OGRSpatialReferenceH hHorizSRS,
  533. OGRSpatialReferenceH hVertSRS );
  534. OGRErr CPL_DLL OSRSetGeogCS( OGRSpatialReferenceH hSRS,
  535. const char * pszGeogName,
  536. const char * pszDatumName,
  537. const char * pszEllipsoidName,
  538. double dfSemiMajor, double dfInvFlattening,
  539. const char * pszPMName /* = NULL */,
  540. double dfPMOffset /* = 0.0 */,
  541. const char * pszUnits /* = NULL */,
  542. double dfConvertToRadians /* = 0.0 */ );
  543. OGRErr CPL_DLL OSRSetVertCS( OGRSpatialReferenceH hSRS,
  544. const char * pszVertCSName,
  545. const char * pszVertDatumName,
  546. int nVertDatumType );
  547. double CPL_DLL OSRGetSemiMajor( OGRSpatialReferenceH, OGRErr * /* = NULL */ );
  548. double CPL_DLL OSRGetSemiMinor( OGRSpatialReferenceH, OGRErr * /* = NULL */ );
  549. double CPL_DLL OSRGetInvFlattening( OGRSpatialReferenceH, OGRErr * /*=NULL*/);
  550. OGRErr CPL_DLL OSRSetAuthority( OGRSpatialReferenceH hSRS,
  551. const char * pszTargetKey,
  552. const char * pszAuthority,
  553. int nCode );
  554. const char CPL_DLL *OSRGetAuthorityCode( OGRSpatialReferenceH hSRS,
  555. const char * pszTargetKey );
  556. const char CPL_DLL *OSRGetAuthorityName( OGRSpatialReferenceH hSRS,
  557. const char * pszTargetKey );
  558. int CPL_DLL OSRGetAreaOfUse( OGRSpatialReferenceH hSRS,
  559. double* pdfWestLongitudeDeg,
  560. double* pdfSouthLatitudeDeg,
  561. double* pdfEastLongitudeDeg,
  562. double* pdfNorthLatitudeDeg,
  563. const char **ppszAreaName );
  564. OGRErr CPL_DLL OSRSetProjection( OGRSpatialReferenceH, const char * );
  565. OGRErr CPL_DLL OSRSetProjParm( OGRSpatialReferenceH, const char *, double );
  566. double CPL_DLL OSRGetProjParm( OGRSpatialReferenceH hSRS,
  567. const char * pszParmName,
  568. double dfDefault /* = 0.0 */,
  569. OGRErr * /* = NULL */ );
  570. OGRErr CPL_DLL OSRSetNormProjParm( OGRSpatialReferenceH, const char *, double);
  571. double CPL_DLL OSRGetNormProjParm( OGRSpatialReferenceH hSRS,
  572. const char * pszParmName,
  573. double dfDefault /* = 0.0 */,
  574. OGRErr * /* = NULL */ );
  575. OGRErr CPL_DLL OSRSetUTM( OGRSpatialReferenceH hSRS, int nZone, int bNorth );
  576. int CPL_DLL OSRGetUTMZone( OGRSpatialReferenceH hSRS, int *pbNorth );
  577. OGRErr CPL_DLL OSRSetStatePlane( OGRSpatialReferenceH hSRS,
  578. int nZone, int bNAD83 );
  579. OGRErr CPL_DLL OSRSetStatePlaneWithUnits( OGRSpatialReferenceH hSRS,
  580. int nZone, int bNAD83,
  581. const char *pszOverrideUnitName,
  582. double dfOverrideUnit );
  583. OGRErr CPL_DLL OSRAutoIdentifyEPSG( OGRSpatialReferenceH hSRS );
  584. OGRSpatialReferenceH CPL_DLL *OSRFindMatches( OGRSpatialReferenceH hSRS,
  585. char** papszOptions,
  586. int* pnEntries,
  587. int** ppanMatchConfidence );
  588. void CPL_DLL OSRFreeSRSArray(OGRSpatialReferenceH* pahSRS);
  589. int CPL_DLL OSREPSGTreatsAsLatLong( OGRSpatialReferenceH hSRS );
  590. int CPL_DLL OSREPSGTreatsAsNorthingEasting( OGRSpatialReferenceH hSRS );
  591. const char CPL_DLL *OSRGetAxis( OGRSpatialReferenceH hSRS,
  592. const char *pszTargetKey, int iAxis,
  593. OGRAxisOrientation *peOrientation );
  594. OGRErr CPL_DLL OSRSetAxes( OGRSpatialReferenceH hSRS,
  595. const char *pszTargetKey,
  596. const char *pszXAxisName,
  597. OGRAxisOrientation eXAxisOrientation,
  598. const char *pszYAxisName,
  599. OGRAxisOrientation eYAxisOrientation );
  600. /** Data axis to CRS axis mapping strategy. */
  601. typedef enum
  602. {
  603. OAMS_TRADITIONAL_GIS_ORDER, /**< Traditional GIS order */
  604. OAMS_AUTHORITY_COMPLIANT, /**< Compliant with the order mandated by the CRS authority */
  605. OAMS_CUSTOM /**< Custom */
  606. } OSRAxisMappingStrategy;
  607. OSRAxisMappingStrategy CPL_DLL OSRGetAxisMappingStrategy( OGRSpatialReferenceH hSRS );
  608. void CPL_DLL OSRSetAxisMappingStrategy( OGRSpatialReferenceH hSRS,
  609. OSRAxisMappingStrategy strategy );
  610. const int CPL_DLL *OSRGetDataAxisToSRSAxisMapping( OGRSpatialReferenceH hSRS, int* pnCount );
  611. /** Albers Conic Equal Area */
  612. OGRErr CPL_DLL OSRSetACEA( OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2,
  613. double dfCenterLat, double dfCenterLong,
  614. double dfFalseEasting, double dfFalseNorthing );
  615. /** Azimuthal Equidistant */
  616. OGRErr CPL_DLL OSRSetAE( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
  617. double dfFalseEasting, double dfFalseNorthing );
  618. /** Bonne */
  619. OGRErr CPL_DLL OSRSetBonne(OGRSpatialReferenceH hSRS,
  620. double dfStandardParallel, double dfCentralMeridian,
  621. double dfFalseEasting, double dfFalseNorthing );
  622. /** Cylindrical Equal Area */
  623. OGRErr CPL_DLL OSRSetCEA( OGRSpatialReferenceH hSRS, double dfStdP1, double dfCentralMeridian,
  624. double dfFalseEasting, double dfFalseNorthing );
  625. /** Cassini-Soldner */
  626. OGRErr CPL_DLL OSRSetCS( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
  627. double dfFalseEasting, double dfFalseNorthing );
  628. /** Equidistant Conic */
  629. OGRErr CPL_DLL OSRSetEC( OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2,
  630. double dfCenterLat, double dfCenterLong,
  631. double dfFalseEasting, double dfFalseNorthing );
  632. /** Eckert I-VI */
  633. OGRErr CPL_DLL OSRSetEckert( OGRSpatialReferenceH hSRS, int nVariation,
  634. double dfCentralMeridian,
  635. double dfFalseEasting, double dfFalseNorthing );
  636. /** Eckert IV */
  637. OGRErr CPL_DLL OSRSetEckertIV( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
  638. double dfFalseEasting, double dfFalseNorthing );
  639. /** Eckert VI */
  640. OGRErr CPL_DLL OSRSetEckertVI( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
  641. double dfFalseEasting, double dfFalseNorthing );
  642. /** Equirectangular */
  643. OGRErr CPL_DLL OSRSetEquirectangular(OGRSpatialReferenceH hSRS,
  644. double dfCenterLat, double dfCenterLong,
  645. double dfFalseEasting, double dfFalseNorthing );
  646. /** Equirectangular generalized form */
  647. OGRErr CPL_DLL OSRSetEquirectangular2( OGRSpatialReferenceH hSRS,
  648. double dfCenterLat, double dfCenterLong,
  649. double dfPseudoStdParallel1,
  650. double dfFalseEasting,
  651. double dfFalseNorthing );
  652. /** Gall Stereograpic */
  653. OGRErr CPL_DLL OSRSetGS( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
  654. double dfFalseEasting, double dfFalseNorthing );
  655. /** Goode Homolosine */
  656. OGRErr CPL_DLL OSRSetGH( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
  657. double dfFalseEasting, double dfFalseNorthing );
  658. /** Interrupted Goode Homolosine */
  659. OGRErr CPL_DLL OSRSetIGH( OGRSpatialReferenceH hSRS );
  660. /** GEOS - Geostationary Satellite View */
  661. OGRErr CPL_DLL OSRSetGEOS( OGRSpatialReferenceH hSRS,
  662. double dfCentralMeridian, double dfSatelliteHeight,
  663. double dfFalseEasting, double dfFalseNorthing );
  664. /** Gauss Schreiber Transverse Mercator */
  665. OGRErr CPL_DLL OSRSetGaussSchreiberTMercator( OGRSpatialReferenceH hSRS,
  666. double dfCenterLat, double dfCenterLong,
  667. double dfScale,
  668. double dfFalseEasting,
  669. double dfFalseNorthing );
  670. /** Gnomonic */
  671. OGRErr CPL_DLL OSRSetGnomonic(OGRSpatialReferenceH hSRS,
  672. double dfCenterLat, double dfCenterLong,
  673. double dfFalseEasting, double dfFalseNorthing );
  674. #ifdef undef
  675. /** Oblique Mercator (aka HOM (variant B) */
  676. OGRErr CPL_DLL OSRSetOM( OGRSpatialReferenceH hSRS,
  677. double dfCenterLat, double dfCenterLong,
  678. double dfAzimuth, double dfRectToSkew,
  679. double dfScale,
  680. double dfFalseEasting, double dfFalseNorthing );
  681. #endif
  682. /** Hotine Oblique Mercator using azimuth angle */
  683. OGRErr CPL_DLL OSRSetHOM( OGRSpatialReferenceH hSRS,
  684. double dfCenterLat, double dfCenterLong,
  685. double dfAzimuth, double dfRectToSkew,
  686. double dfScale,
  687. double dfFalseEasting, double dfFalseNorthing );
  688. OGRErr CPL_DLL OSRSetHOMAC( OGRSpatialReferenceH hSRS,
  689. double dfCenterLat, double dfCenterLong,
  690. double dfAzimuth, double dfRectToSkew,
  691. double dfScale,
  692. double dfFalseEasting,
  693. double dfFalseNorthing );
  694. /** Hotine Oblique Mercator using two points on centerline */
  695. OGRErr CPL_DLL OSRSetHOM2PNO( OGRSpatialReferenceH hSRS, double dfCenterLat,
  696. double dfLat1, double dfLong1,
  697. double dfLat2, double dfLong2,
  698. double dfScale,
  699. double dfFalseEasting, double dfFalseNorthing );
  700. /** International Map of the World Polyconic */
  701. OGRErr CPL_DLL OSRSetIWMPolyconic( OGRSpatialReferenceH hSRS,
  702. double dfLat1, double dfLat2,
  703. double dfCenterLong,
  704. double dfFalseEasting,
  705. double dfFalseNorthing );
  706. /** Krovak Oblique Conic Conformal */
  707. OGRErr CPL_DLL OSRSetKrovak( OGRSpatialReferenceH hSRS,
  708. double dfCenterLat, double dfCenterLong,
  709. double dfAzimuth, double dfPseudoStdParallelLat,
  710. double dfScale,
  711. double dfFalseEasting, double dfFalseNorthing );
  712. /** Lambert Azimuthal Equal-Area */
  713. OGRErr CPL_DLL OSRSetLAEA( OGRSpatialReferenceH hSRS,
  714. double dfCenterLat, double dfCenterLong,
  715. double dfFalseEasting, double dfFalseNorthing );
  716. /** Lambert Conformal Conic */
  717. OGRErr CPL_DLL OSRSetLCC( OGRSpatialReferenceH hSRS,
  718. double dfStdP1, double dfStdP2,
  719. double dfCenterLat, double dfCenterLong,
  720. double dfFalseEasting, double dfFalseNorthing );
  721. /** Lambert Conformal Conic 1SP */
  722. OGRErr CPL_DLL OSRSetLCC1SP( OGRSpatialReferenceH hSRS,
  723. double dfCenterLat, double dfCenterLong,
  724. double dfScale,
  725. double dfFalseEasting, double dfFalseNorthing );
  726. /** Lambert Conformal Conic (Belgium) */
  727. OGRErr CPL_DLL OSRSetLCCB( OGRSpatialReferenceH hSRS,
  728. double dfStdP1, double dfStdP2,
  729. double dfCenterLat, double dfCenterLong,
  730. double dfFalseEasting, double dfFalseNorthing );
  731. /** Miller Cylindrical */
  732. OGRErr CPL_DLL OSRSetMC( OGRSpatialReferenceH hSRS,
  733. double dfCenterLat, double dfCenterLong,
  734. double dfFalseEasting, double dfFalseNorthing );
  735. /** Mercator */
  736. OGRErr CPL_DLL OSRSetMercator( OGRSpatialReferenceH hSRS,
  737. double dfCenterLat, double dfCenterLong,
  738. double dfScale,
  739. double dfFalseEasting, double dfFalseNorthing );
  740. /** Mercator 2SP */
  741. OGRErr CPL_DLL OSRSetMercator2SP( OGRSpatialReferenceH hSRS,
  742. double dfStdP1,
  743. double dfCenterLat, double dfCenterLong,
  744. double dfFalseEasting, double dfFalseNorthing );
  745. /** Mollweide */
  746. OGRErr CPL_DLL OSRSetMollweide( OGRSpatialReferenceH hSRS,
  747. double dfCentralMeridian,
  748. double dfFalseEasting,
  749. double dfFalseNorthing );
  750. /** New Zealand Map Grid */
  751. OGRErr CPL_DLL OSRSetNZMG( OGRSpatialReferenceH hSRS,
  752. double dfCenterLat, double dfCenterLong,
  753. double dfFalseEasting, double dfFalseNorthing );
  754. /** Oblique Stereographic */
  755. OGRErr CPL_DLL OSRSetOS( OGRSpatialReferenceH hSRS,
  756. double dfOriginLat, double dfCMeridian,
  757. double dfScale,
  758. double dfFalseEasting,double dfFalseNorthing);
  759. /** Orthographic */
  760. OGRErr CPL_DLL OSRSetOrthographic( OGRSpatialReferenceH hSRS,
  761. double dfCenterLat, double dfCenterLong,
  762. double dfFalseEasting,
  763. double dfFalseNorthing);
  764. /** Polyconic */
  765. OGRErr CPL_DLL OSRSetPolyconic( OGRSpatialReferenceH hSRS,
  766. double dfCenterLat, double dfCenterLong,
  767. double dfFalseEasting, double dfFalseNorthing );
  768. /** Polar Stereographic */
  769. OGRErr CPL_DLL OSRSetPS( OGRSpatialReferenceH hSRS,
  770. double dfCenterLat, double dfCenterLong,
  771. double dfScale,
  772. double dfFalseEasting, double dfFalseNorthing);
  773. /** Robinson */
  774. OGRErr CPL_DLL OSRSetRobinson( OGRSpatialReferenceH hSRS,
  775. double dfCenterLong,
  776. double dfFalseEasting, double dfFalseNorthing );
  777. /** Sinusoidal */
  778. OGRErr CPL_DLL OSRSetSinusoidal( OGRSpatialReferenceH hSRS,
  779. double dfCenterLong,
  780. double dfFalseEasting,
  781. double dfFalseNorthing );
  782. /** Stereographic */
  783. OGRErr CPL_DLL OSRSetStereographic( OGRSpatialReferenceH hSRS,
  784. double dfCenterLat, double dfCenterLong,
  785. double dfScale,
  786. double dfFalseEasting,
  787. double dfFalseNorthing);
  788. /** Swiss Oblique Cylindrical */
  789. OGRErr CPL_DLL OSRSetSOC( OGRSpatialReferenceH hSRS,
  790. double dfLatitudeOfOrigin, double dfCentralMeridian,
  791. double dfFalseEasting, double dfFalseNorthing );
  792. /** Transverse Mercator
  793. *
  794. * Special processing available for Transverse Mercator with GDAL &gt;= 1.10 and PROJ &gt;= 4.8 :
  795. * see OGRSpatialReference::exportToProj4().
  796. */
  797. OGRErr CPL_DLL OSRSetTM( OGRSpatialReferenceH hSRS,
  798. double dfCenterLat, double dfCenterLong,
  799. double dfScale,
  800. double dfFalseEasting, double dfFalseNorthing );
  801. /** Transverse Mercator variant */
  802. OGRErr CPL_DLL OSRSetTMVariant(
  803. OGRSpatialReferenceH hSRS, const char *pszVariantName,
  804. double dfCenterLat, double dfCenterLong,
  805. double dfScale,
  806. double dfFalseEasting, double dfFalseNorthing );
  807. /** Tunesia Mining Grid */
  808. OGRErr CPL_DLL OSRSetTMG( OGRSpatialReferenceH hSRS,
  809. double dfCenterLat, double dfCenterLong,
  810. double dfFalseEasting, double dfFalseNorthing );
  811. /** Transverse Mercator (South Oriented) */
  812. OGRErr CPL_DLL OSRSetTMSO( OGRSpatialReferenceH hSRS,
  813. double dfCenterLat, double dfCenterLong,
  814. double dfScale,
  815. double dfFalseEasting, double dfFalseNorthing );
  816. /** TPED (Two Point Equi Distant) */
  817. OGRErr CPL_DLL OSRSetTPED( OGRSpatialReferenceH hSRS,
  818. double dfLat1, double dfLong1,
  819. double dfLat2, double dfLong2,
  820. double dfFalseEasting, double dfFalseNorthing );
  821. /** VanDerGrinten */
  822. OGRErr CPL_DLL OSRSetVDG( OGRSpatialReferenceH hSRS,
  823. double dfCenterLong,
  824. double dfFalseEasting, double dfFalseNorthing );
  825. /** Wagner I -- VII */
  826. OGRErr CPL_DLL OSRSetWagner( OGRSpatialReferenceH hSRS, int nVariation,
  827. double dfCenterLat,
  828. double dfFalseEasting,
  829. double dfFalseNorthing );
  830. /** Quadrilateralized Spherical Cube */
  831. OGRErr CPL_DLL OSRSetQSC( OGRSpatialReferenceH hSRS,
  832. double dfCenterLat, double dfCenterLong );
  833. /** Spherical, Cross-track, Height */
  834. OGRErr CPL_DLL OSRSetSCH( OGRSpatialReferenceH hSRS,
  835. double dfPegLat, double dfPegLong,
  836. double dfPegHeading, double dfPegHgt);
  837. double CPL_DLL OSRCalcInvFlattening( double dfSemiMajor, double dfSemiMinor );
  838. double CPL_DLL OSRCalcSemiMinorFromInvFlattening( double dfSemiMajor, double dfInvFlattening );
  839. void CPL_DLL OSRCleanup( void );
  840. /** \brief Type of Coordinate Reference System (CRS). */
  841. typedef enum
  842. {
  843. /** Geographic 2D CRS */
  844. OSR_CRS_TYPE_GEOGRAPHIC_2D,
  845. /** Geographic 3D CRS */
  846. OSR_CRS_TYPE_GEOGRAPHIC_3D,
  847. /** Geocentric CRS */
  848. OSR_CRS_TYPE_GEOCENTRIC,
  849. /** Projected CRS */
  850. OSR_CRS_TYPE_PROJECTED,
  851. /** Vertical CRS */
  852. OSR_CRS_TYPE_VERTICAL,
  853. /** Compound CRS */
  854. OSR_CRS_TYPE_COMPOUND,
  855. /** Other */
  856. OSR_CRS_TYPE_OTHER,
  857. } OSRCRSType;
  858. /** \brief Structure given overall description of a CRS.
  859. *
  860. * This structure may grow over time, and should not be directly allocated by
  861. * client code.
  862. */
  863. typedef struct
  864. {
  865. /** Authority name. */
  866. char* pszAuthName;
  867. /** Object code. */
  868. char* pszCode;
  869. /** Object name. */
  870. char* pszName;
  871. /** Object type. */
  872. OSRCRSType eType;
  873. /** Whether the object is deprecated */
  874. int bDeprecated;
  875. /** Whereas the west_lon_degree, south_lat_degree, east_lon_degree and
  876. * north_lat_degree fields are valid. */
  877. int bBboxValid;
  878. /** Western-most longitude of the area of use, in degrees. */
  879. double dfWestLongitudeDeg;
  880. /** Southern-most latitude of the area of use, in degrees. */
  881. double dfSouthLatitudeDeg;
  882. /** Eastern-most longitude of the area of use, in degrees. */
  883. double dfEastLongitudeDeg;
  884. /** Northern-most latitude of the area of use, in degrees. */
  885. double dfNorthLatitudeDeg;
  886. /** Name of the area of use. */
  887. char* pszAreaName;
  888. /** Name of the projection method for a projected CRS. Might be NULL even
  889. *for projected CRS in some cases. */
  890. char* pszProjectionMethod;
  891. } OSRCRSInfo;
  892. /** \brief Structure to describe optional parameters to OSRGetCRSInfoListFromDatabase()
  893. *
  894. * Unused for now.
  895. */
  896. typedef struct OSRCRSListParameters OSRCRSListParameters;
  897. OSRCRSInfo CPL_DLL **OSRGetCRSInfoListFromDatabase(
  898. const char *pszAuthName,
  899. const OSRCRSListParameters* params,
  900. int *pnOutResultCount);
  901. void CPL_DLL OSRDestroyCRSInfoList(OSRCRSInfo** list);
  902. /* -------------------------------------------------------------------- */
  903. /* OGRCoordinateTransform C API. */
  904. /* -------------------------------------------------------------------- */
  905. OGRCoordinateTransformationH CPL_DLL CPL_STDCALL
  906. OCTNewCoordinateTransformation( OGRSpatialReferenceH hSourceSRS,
  907. OGRSpatialReferenceH hTargetSRS );
  908. /** Coordinate transformation options. */
  909. typedef struct OGRCoordinateTransformationOptions *OGRCoordinateTransformationOptionsH;
  910. OGRCoordinateTransformationOptionsH CPL_DLL OCTNewCoordinateTransformationOptions(void);
  911. int CPL_DLL OCTCoordinateTransformationOptionsSetOperation(
  912. OGRCoordinateTransformationOptionsH hOptions,
  913. const char* pszCO, int bReverseCO);
  914. int CPL_DLL OCTCoordinateTransformationOptionsSetAreaOfInterest(
  915. OGRCoordinateTransformationOptionsH hOptions,
  916. double dfWestLongitudeDeg,
  917. double dfSouthLatitudeDeg,
  918. double dfEastLongitudeDeg,
  919. double dfNorthLatitudeDeg);
  920. void CPL_DLL OCTDestroyCoordinateTransformationOptions(OGRCoordinateTransformationOptionsH);
  921. OGRCoordinateTransformationH CPL_DLL
  922. OCTNewCoordinateTransformationEx( OGRSpatialReferenceH hSourceSRS,
  923. OGRSpatialReferenceH hTargetSRS,
  924. OGRCoordinateTransformationOptionsH hOptions );
  925. void CPL_DLL CPL_STDCALL
  926. OCTDestroyCoordinateTransformation( OGRCoordinateTransformationH );
  927. int CPL_DLL CPL_STDCALL
  928. OCTTransform( OGRCoordinateTransformationH hCT,
  929. int nCount, double *x, double *y, double *z );
  930. int CPL_DLL CPL_STDCALL
  931. OCTTransformEx( OGRCoordinateTransformationH hCT,
  932. int nCount, double *x, double *y, double *z,
  933. int *pabSuccess );
  934. int CPL_DLL
  935. OCTTransform4D( OGRCoordinateTransformationH hCT,
  936. int nCount, double *x, double *y, double *z, double *t,
  937. int *pabSuccess );
  938. CPL_C_END
  939. #endif /* ndef SWIG */
  940. #endif /* ndef OGR_SRS_API_H_INCLUDED */
上海开阖软件有限公司 沪ICP备12045867号-1