pj_datums.hpp 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. // Boost.Geometry (aka GGL, Generic Geometry Library)
  2. // This file is manually converted from PROJ4
  3. // Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
  4. // This file was modified by Oracle on 2017, 2018.
  5. // Modifications copyright (c) 2017-2018, Oracle and/or its affiliates.
  6. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
  7. // Use, modification and distribution is subject to the Boost Software License,
  8. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  9. // http://www.boost.org/LICENSE_1_0.txt)
  10. // This file is converted from PROJ4, http://trac.osgeo.org/proj
  11. // PROJ4 is originally written by Gerald Evenden (then of the USGS)
  12. // PROJ4 is maintained by Frank Warmerdam
  13. // PROJ4 is converted to Geometry Library by Barend Gehrels (Geodan, Amsterdam)
  14. // Original copyright notice:
  15. // Permission is hereby granted, free of charge, to any person obtaining a
  16. // copy of this software and associated documentation files (the "Software"),
  17. // to deal in the Software without restriction, including without limitation
  18. // the rights to use, copy, modify, merge, publish, distribute, sublicense,
  19. // and/or sell copies of the Software, and to permit persons to whom the
  20. // Software is furnished to do so, subject to the following conditions:
  21. // The above copyright notice and this permission notice shall be included
  22. // in all copies or substantial portions of the Software.
  23. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  24. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  25. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  26. // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  27. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  28. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  29. // DEALINGS IN THE SOFTWARE.
  30. #ifndef BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_DATUMS_HPP
  31. #define BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_DATUMS_HPP
  32. #include <boost/geometry/srs/projections/impl/projects.hpp>
  33. #include <string>
  34. namespace boost { namespace geometry { namespace projections {
  35. namespace detail {
  36. // Originally defined in projects.h
  37. struct pj_datums_type
  38. {
  39. std::string id; /* datum keyword */
  40. std::string defn_n; /* e.g. "to_wgs84" */
  41. std::string defn_v; /* e.g. "0,0,0" */
  42. std::string ellipse_id; /* ie from ellipse table */
  43. std::string comments; /* EPSG code, etc */
  44. };
  45. // Originally defined in projects.h
  46. struct pj_prime_meridians_type
  47. {
  48. std::string id; /* prime meridian keyword */
  49. std::string defn; /* offset from greenwich in DMS format. */
  50. };
  51. /*
  52. * The ellipse code must match one from pj_ellps.c. The datum id should
  53. * be kept to 12 characters or less if possible. Use the official OGC
  54. * datum name for the comments if available.
  55. */
  56. static const pj_datums_type pj_datums[] =
  57. {
  58. {"WGS84", "towgs84", "0,0,0",
  59. "WGS84", ""},
  60. {"GGRS87", "towgs84", "-199.87,74.79,246.62",
  61. "GRS80", "Greek_Geodetic_Reference_System_1987"},
  62. {"NAD83", "towgs84", "0,0,0",
  63. "GRS80", "North_American_Datum_1983"},
  64. {"NAD27", "nadgrids", "@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",
  65. "clrk66", "North_American_Datum_1927"},
  66. {"potsdam", "towgs84", "598.1,73.7,418.2,0.202,0.045,-2.455,6.7",
  67. "bessel", "Potsdam Rauenberg 1950 DHDN"},
  68. {"carthage", "towgs84", "-263.0,6.0,431.0",
  69. "clrk80ign", "Carthage 1934 Tunisia"},
  70. {"hermannskogel", "towgs84", "577.326,90.129,463.919,5.137,1.474,5.297,2.4232",
  71. "bessel", "Hermannskogel"},
  72. {"ire65", "towgs84", "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",
  73. "mod_airy", "Ireland 1965"},
  74. {"nzgd49", "towgs84", "59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",
  75. "intl", "New Zealand Geodetic Datum 1949"},
  76. {"OSGB36", "towgs84", "446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",
  77. "airy", "Airy 1830"}
  78. };
  79. static const pj_prime_meridians_type pj_prime_meridians[] =
  80. {
  81. /* id definition */
  82. /* -- ---------- */
  83. { "greenwich", "0dE" },
  84. { "lisbon", "9d07'54.862\"W" },
  85. { "paris", "2d20'14.025\"E" },
  86. { "bogota", "74d04'51.3\"W" },
  87. { "madrid", "3d41'16.58\"W" },
  88. { "rome", "12d27'8.4\"E" },
  89. { "bern", "7d26'22.5\"E" },
  90. { "jakarta", "106d48'27.79\"E" },
  91. { "ferro", "17d40'W" },
  92. { "brussels", "4d22'4.71\"E" },
  93. { "stockholm", "18d3'29.8\"E" },
  94. { "athens", "23d42'58.815\"E" },
  95. { "oslo", "10d43'22.5\"E" }
  96. };
  97. } // namespace detail
  98. }}} // namespace boost::geometry::projections
  99. #endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_DATUMS_HPP