mirror of
https://github.com/boostorg/geometry.git
synced 2026-01-31 08:12:13 +00:00
Merge pull request #394 from awulkiew/feature/projections
Move projections from extensions.
This commit is contained in:
@@ -5,11 +5,14 @@
|
||||
# Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
# Copyright (c) 2015 Adam Wulkiewicz, Lodz, Poland.
|
||||
#
|
||||
# This file was modified by Oracle on 2017.
|
||||
# Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
#
|
||||
# Use, modification and distribution is subject to the Boost Software License,
|
||||
# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
build-project io ;
|
||||
build-project latlong ;
|
||||
build-project projections ;
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
# Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
#
|
||||
# Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
# Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
# Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
#
|
||||
# Use, modification and distribution is subject to the Boost Software License,
|
||||
# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
test-suite boost-geometry-extensions-gis-projections
|
||||
:
|
||||
[ run projection.cpp ]
|
||||
[ run projections.cpp ]
|
||||
[ run projections_combined.cpp ]
|
||||
[ run projections_static.cpp ]
|
||||
[ run projection_epsg.cpp ]
|
||||
;
|
||||
@@ -1,121 +0,0 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning( disable : 4305 ) // truncation double -> float
|
||||
#endif // defined(_MSC_VER)
|
||||
|
||||
#include <geometry_test_common.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/parameters.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/projection.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/factory.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/igh.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/ob_tran.hpp>
|
||||
|
||||
|
||||
#include <boost/geometry/core/coordinate_type.hpp>
|
||||
#include <boost/geometry/algorithms/make.hpp>
|
||||
|
||||
#include <boost/geometry.hpp>
|
||||
#include <boost/geometry/geometries/geometries.hpp>
|
||||
#include <boost/geometry/geometries/point_xy.hpp>
|
||||
#include <boost/geometry/extensions/gis/latlong/point_ll.hpp>
|
||||
|
||||
|
||||
template <template <typename, typename, typename> class Projection, typename GeoPoint>
|
||||
void test_forward(GeoPoint const& geo_point1, GeoPoint const& geo_point2,
|
||||
std::string const& parameters, int deviation = 1)
|
||||
{
|
||||
typedef typename bg::coordinate_type<GeoPoint>::type coordinate_type;
|
||||
typedef bg::model::d2::point_xy<coordinate_type> cartesian_point_type;
|
||||
typedef Projection<GeoPoint, cartesian_point_type, bg::projections::parameters> projection_type;
|
||||
|
||||
try
|
||||
{
|
||||
bg::projections::parameters par = bg::projections::detail::pj_init_plus(parameters);
|
||||
|
||||
projection_type prj(par);
|
||||
|
||||
cartesian_point_type xy1, xy2;
|
||||
prj.forward(geo_point1, xy1);
|
||||
prj.forward(geo_point2, xy2);
|
||||
|
||||
// Calculate distances in KM
|
||||
int const distance_expected = static_cast<int>(bg::distance(geo_point1, geo_point2) / 1000.0);
|
||||
int const distance_found = static_cast<int>(bg::distance(xy1, xy2) / 1000.0);
|
||||
|
||||
int const difference = std::abs(distance_expected - distance_found);
|
||||
BOOST_CHECK_MESSAGE(difference <= 1 || difference == deviation,
|
||||
" projection: " << projection_type::get_name()
|
||||
<< " distance found: " << distance_found
|
||||
<< " expected: " << distance_expected);
|
||||
|
||||
// For debug:
|
||||
// std::cout << projection_type::get_name() << " " << distance_expected
|
||||
// << " " << distance_found
|
||||
// << " " << (difference > 1 && difference != deviation ? " *** WRONG ***" : "")
|
||||
// << " " << difference
|
||||
// << std::endl;
|
||||
}
|
||||
catch(bg::projections::proj_exception const& e)
|
||||
{
|
||||
std::cout << "Exception in " << projection_type::get_name() << " : " << e.code() << std::endl;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
std::cout << "Exception (unknown) in " << projection_type::get_name() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void test_all()
|
||||
{
|
||||
typedef bg::model::ll::point<bg::degree, T> geo_point_type;
|
||||
|
||||
geo_point_type amsterdam = bg::make<geo_point_type>(4.8925, 52.3731);
|
||||
geo_point_type utrecht = bg::make<geo_point_type>(5.1213, 52.0907);
|
||||
|
||||
geo_point_type anchorage = bg::make<geo_point_type>(-149.90, 61.22);
|
||||
geo_point_type juneau = bg::make<geo_point_type>(-134.42, 58.30);
|
||||
|
||||
geo_point_type auckland = bg::make<geo_point_type>(174.74, -36.84);
|
||||
geo_point_type wellington = bg::make<geo_point_type>(177.78, -41.29);
|
||||
|
||||
geo_point_type aspen = bg::make<geo_point_type>(-106.84, 39.19);
|
||||
geo_point_type denver = bg::make<geo_point_type>(-104.88, 39.76);
|
||||
|
||||
// IGH (internally using moll/sinu)
|
||||
test_forward<bg::projections::igh_spheroid>(amsterdam, utrecht, "+ellps=sphere +units=m", 5);
|
||||
test_forward<bg::projections::igh_spheroid>(aspen, denver, "+ellps=sphere +units=m", 3);
|
||||
test_forward<bg::projections::igh_spheroid>(auckland, wellington, "+ellps=sphere +units=m", 152);
|
||||
test_forward<bg::projections::igh_spheroid>(anchorage, juneau, "+ellps=sphere +units=m", 28);
|
||||
|
||||
// Using moll
|
||||
test_forward<bg::projections::ob_tran_oblique>(amsterdam, utrecht, "+ellps=WGS84 +units=m +o_proj=moll +o_lat_p=10 +o_lon_p=90 +o_lon_o=11.50", 4);
|
||||
test_forward<bg::projections::ob_tran_transverse>(amsterdam, utrecht, "+ellps=WGS84 +units=m +o_proj=moll +o_lat_p=10 +o_lon_p=90 +o_lon_o=11.50", 5);
|
||||
test_forward<bg::projections::ob_tran_oblique>(aspen, denver, "+ellps=WGS84 +units=m +o_proj=moll +o_lat_p=10 +o_lon_p=90 +o_lon_o=11.50", 19);
|
||||
test_forward<bg::projections::ob_tran_transverse>(aspen, denver, "+ellps=WGS84 +units=m +o_proj=moll +o_lat_p=10 +o_lon_p=90 +o_lon_o=11.50", 19);
|
||||
|
||||
// Using sinu
|
||||
test_forward<bg::projections::ob_tran_oblique>(amsterdam, utrecht, "+ellps=WGS84 +units=m +o_proj=sinu +o_lat_p=10 +o_lon_p=90 +o_lon_o=11.50", 5);
|
||||
test_forward<bg::projections::ob_tran_transverse>(amsterdam, utrecht, "+ellps=WGS84 +units=m +o_proj=sinu +o_lat_p=10 +o_lon_p=90 +o_lon_o=11.50", 4);
|
||||
test_forward<bg::projections::ob_tran_oblique>(aspen, denver, "+ellps=WGS84 +units=m +o_proj=sinu +o_lat_p=10 +o_lon_p=90 +o_lon_o=11.50", 14);
|
||||
test_forward<bg::projections::ob_tran_transverse>(aspen, denver, "+ellps=WGS84 +units=m +o_proj=sinu +o_lat_p=10 +o_lon_p=90 +o_lon_o=11.50", 6);
|
||||
|
||||
}
|
||||
|
||||
int test_main(int, char* [])
|
||||
{
|
||||
test_all<double>();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -5,6 +5,10 @@
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
// Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
|
||||
@@ -29,10 +33,8 @@
|
||||
|
||||
#include <boost/geometry/arithmetic/arithmetic.hpp>
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
#include <boost/geometry/algorithms/append.hpp>
|
||||
#include <boost/geometry/algorithms/clear.hpp>
|
||||
#include <boost/geometry/algorithms/for_each.hpp>
|
||||
#include <boost/geometry/algorithms/detail/assign_values.hpp>
|
||||
#include <boost/geometry/algorithms/detail/assign_box_corners.hpp>
|
||||
#include <boost/geometry/algorithms/detail/assign_indexed_point.hpp>
|
||||
#include <boost/geometry/algorithms/detail/convert_point_to_point.hpp>
|
||||
@@ -153,7 +155,23 @@ struct range_to_range
|
||||
geometry::closure<Range1>::value
|
||||
>::type view_type;
|
||||
|
||||
struct default_policy
|
||||
{
|
||||
template <typename Point1, typename Point2>
|
||||
static inline void apply(Point1 const& point1, Point2 & point2)
|
||||
{
|
||||
geometry::detail::conversion::convert_point_to_point(point1, point2);
|
||||
}
|
||||
};
|
||||
|
||||
static inline void apply(Range1 const& source, Range2& destination)
|
||||
{
|
||||
apply(source, destination, default_policy());
|
||||
}
|
||||
|
||||
template <typename ConvertPointPolicy>
|
||||
static inline ConvertPointPolicy apply(Range1 const& source, Range2& destination,
|
||||
ConvertPointPolicy convert_point)
|
||||
{
|
||||
geometry::clear(destination);
|
||||
|
||||
@@ -179,8 +197,12 @@ struct range_to_range
|
||||
it != boost::end(view) && i < n;
|
||||
++it, ++i)
|
||||
{
|
||||
geometry::append(destination, *it);
|
||||
typename boost::range_value<Range2>::type point;
|
||||
convert_point.apply(*it, point);
|
||||
range::push_back(destination, point);
|
||||
}
|
||||
|
||||
return convert_point;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -15,18 +15,22 @@
|
||||
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_AZIMUTH_HPP
|
||||
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_AZIMUTH_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
#include <boost/geometry/core/access.hpp>
|
||||
#include <boost/geometry/core/radian_access.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/geometry/algorithms/not_implemented.hpp>
|
||||
|
||||
#include <boost/geometry/formulas/spherical.hpp>
|
||||
#include <boost/geometry/formulas/vincenty_inverse.hpp>
|
||||
|
||||
#include <boost/geometry/srs/spheroid.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <boost/geometry/core/coordinate_system.hpp>
|
||||
#include <boost/geometry/core/coordinate_type.hpp>
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
#include <boost/geometry/core/srs.hpp>
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
#include <boost/geometry/core/radian_access.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
@@ -223,8 +223,8 @@ template <typename Geometry, std::size_t Dimension>
|
||||
struct radius_access<srs_sphere_tag, Geometry, Dimension, boost::false_type>
|
||||
: detail::radius_access<srs_sphere_tag, Geometry, Dimension>
|
||||
{
|
||||
BOOST_STATIC_ASSERT(Dimension == 0);
|
||||
//BOOST_STATIC_ASSERT(Dimension < 3);
|
||||
//BOOST_STATIC_ASSERT(Dimension == 0);
|
||||
BOOST_STATIC_ASSERT(Dimension < 3);
|
||||
};
|
||||
|
||||
template <typename Geometry>
|
||||
@@ -237,8 +237,8 @@ template <typename Geometry, std::size_t Dimension>
|
||||
struct radius_access<srs_spheroid_tag, Geometry, Dimension, boost::false_type>
|
||||
: detail::radius_access<srs_spheroid_tag, Geometry, Dimension>
|
||||
{
|
||||
BOOST_STATIC_ASSERT(Dimension == 0 || Dimension == 2);
|
||||
//BOOST_STATIC_ASSERT(Dimension < 3);
|
||||
//BOOST_STATIC_ASSERT(Dimension == 0 || Dimension == 2);
|
||||
BOOST_STATIC_ASSERT(Dimension < 3);
|
||||
};
|
||||
|
||||
} // namespace core_dispatch
|
||||
|
||||
@@ -1,278 +0,0 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_EXTENSIONS_GIS_GEOGRAPHIC_STRATEGIES_DMS_PARSER_HPP
|
||||
#define BOOST_GEOMETRY_EXTENSIONS_GIS_GEOGRAPHIC_STRATEGIES_DMS_PARSER_HPP
|
||||
|
||||
// This file is totally revised from PROJ4 dmstor.c
|
||||
|
||||
// PROJ4 is originally written by Gerald Evenden (then of the USGS)
|
||||
// PROJ4 is maintained by Frank Warmerdam
|
||||
// PROJ4 is converted to Geometry Library by Barend Gehrels (Geodan, Amsterdam)
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
#if !defined(BOOST_GEOMETRY_NO_LEXICAL_CAST)
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#endif // !defined(BOOST_GEOMETRY_NO_LEXICAL_CAST)
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
#include <boost/geometry/extensions/strategies/parse.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
struct dms_result
|
||||
{
|
||||
enum axis_selector {axis_lat = 1, axis_lon = 0};
|
||||
|
||||
private :
|
||||
typedef double T;
|
||||
T m_angle;
|
||||
axis_selector m_axis;
|
||||
|
||||
public :
|
||||
|
||||
explicit dms_result(T const& v, axis_selector ax)
|
||||
: m_angle(v)
|
||||
, m_axis(ax)
|
||||
{}
|
||||
|
||||
inline axis_selector axis() const { return m_axis; }
|
||||
|
||||
inline operator double() const { return m_angle; }
|
||||
|
||||
template <typename CH, typename TR>
|
||||
inline friend std::basic_ostream<CH, TR>& operator<<(std::basic_ostream<CH, TR>& os,
|
||||
const dms_result& d)
|
||||
{
|
||||
os << d.m_angle;
|
||||
return os;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
namespace strategy
|
||||
{
|
||||
|
||||
template <bool as_radian = true
|
||||
, char N = 'N', char E = 'E', char S = 'S', char W = 'W' // translatable
|
||||
, char MIN = '\'', char SEC = '"' // other char's possible
|
||||
, char D = 'D', char R = 'R' // degree sign might be small o
|
||||
>
|
||||
struct dms_parser
|
||||
{
|
||||
|
||||
|
||||
// Question from Barend: can we compile-time select that it is case-sensitive/case-insensitive?
|
||||
// We have to change the switch then -> specializations
|
||||
|
||||
// For now: make it (compile-time) case sensitive
|
||||
static const int diff = 'a' - 'A';
|
||||
#ifndef __GNUC__
|
||||
BOOST_STATIC_ASSERT((diff > 0)); // make sure we've the right assumption. GCC does not accept this here.
|
||||
#endif
|
||||
static const char n_alter = N <= 'Z' ? N + diff : N - diff;
|
||||
static const char e_alter = E <= 'Z' ? E + diff : E - diff;
|
||||
static const char s_alter = S <= 'Z' ? S + diff : S - diff;
|
||||
static const char w_alter = W <= 'Z' ? W + diff : W - diff;
|
||||
|
||||
static const char r_alter = R <= 'Z' ? R + diff : R - diff;
|
||||
|
||||
// degree is normally D (proj4) but might be superscript o
|
||||
// Note d_alter is not correct then, so map it to NULL now, guarded by the while
|
||||
static const char d_alter =
|
||||
((D >= 'A' && D <= 'Z') || (D >= 'a' && D <= 'z')) ? (D <= 'Z' ? D + diff : D - diff) : '\0';
|
||||
|
||||
|
||||
struct dms_value
|
||||
{
|
||||
double dms[3];
|
||||
bool has_dms[3];
|
||||
|
||||
dms_value()
|
||||
{
|
||||
memset(this, 0, sizeof(dms_value));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template <size_t I>
|
||||
static inline void assign_dms(dms_value& dms, std::string& value, bool& has_value)
|
||||
{
|
||||
#if !defined(BOOST_GEOMETRY_NO_LEXICAL_CAST)
|
||||
dms.dms[I] = boost::lexical_cast<double>(value.c_str());
|
||||
#else // !defined(BOOST_GEOMETRY_NO_LEXICAL_CAST)
|
||||
dms.dms[I] = std::atof(value.c_str());
|
||||
#endif // !defined(BOOST_GEOMETRY_NO_LEXICAL_CAST)
|
||||
dms.has_dms[I] = true;
|
||||
has_value = false;
|
||||
value.clear();
|
||||
}
|
||||
|
||||
static inline void process(dms_value& dms, std::string& value, bool& has_value)
|
||||
{
|
||||
if (has_value)
|
||||
{
|
||||
// Assign last one, sequentially
|
||||
if (! dms.has_dms[0]) assign_dms<0>(dms, value, has_value);
|
||||
else if (! dms.has_dms[1]) assign_dms<1>(dms, value, has_value);
|
||||
else if (! dms.has_dms[2]) assign_dms<2>(dms, value, has_value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
dms_result operator()(const char* is) const
|
||||
{
|
||||
dms_value dms;
|
||||
bool has_value = false;
|
||||
std::string value;
|
||||
|
||||
double factor = 1.0; // + denotes N/E values, -1 denotes S/W values
|
||||
dms_result::axis_selector axis = dms_result::axis_lon; // true denotes N/S values
|
||||
bool in_radian = false; // true denotes values as "0.1R"
|
||||
|
||||
while(*is)
|
||||
{
|
||||
switch(*is)
|
||||
{
|
||||
case '-' :
|
||||
if (! has_value && ! dms.has_dms[0])
|
||||
{
|
||||
factor = -factor;
|
||||
}
|
||||
break;
|
||||
case N :
|
||||
case n_alter :
|
||||
axis = dms_result::axis_lat;
|
||||
break;
|
||||
case S :
|
||||
case s_alter :
|
||||
axis = dms_result::axis_lat;
|
||||
factor = -factor;
|
||||
break;
|
||||
case E :
|
||||
case e_alter :
|
||||
axis = dms_result::axis_lon;
|
||||
break;
|
||||
case W :
|
||||
case w_alter :
|
||||
axis = dms_result::axis_lon;
|
||||
factor = -factor;
|
||||
break;
|
||||
case D :
|
||||
case d_alter :
|
||||
if (! dms.has_dms[0] && has_value)
|
||||
{
|
||||
assign_dms<0>(dms, value, has_value);
|
||||
}
|
||||
break;
|
||||
case R :
|
||||
case r_alter :
|
||||
if (! dms.has_dms[0] && has_value)
|
||||
{
|
||||
// specified value is in radian!
|
||||
in_radian = true;
|
||||
assign_dms<0>(dms, value, has_value);
|
||||
}
|
||||
break;
|
||||
case MIN:
|
||||
if (! dms.has_dms[1] && has_value)
|
||||
{
|
||||
assign_dms<1>(dms, value, has_value);
|
||||
}
|
||||
break;
|
||||
case SEC :
|
||||
if (! dms.has_dms[2] && has_value)
|
||||
{
|
||||
assign_dms<2>(dms, value, has_value);
|
||||
}
|
||||
break;
|
||||
case ' ' :
|
||||
case '\t' :
|
||||
case '\n' :
|
||||
process(dms, value, has_value);
|
||||
break;
|
||||
default :
|
||||
value += *is;
|
||||
has_value = true;
|
||||
break;
|
||||
}
|
||||
is++;
|
||||
}
|
||||
|
||||
// Assign last one, if any
|
||||
process(dms, value, has_value);
|
||||
|
||||
double const d2r = math::d2r<double>();
|
||||
double const r2d = math::r2d<double>();
|
||||
|
||||
return dms_result(factor *
|
||||
(in_radian && as_radian
|
||||
? dms.dms[0]
|
||||
: in_radian && ! as_radian
|
||||
? dms.dms[0] * r2d
|
||||
: ! in_radian && as_radian
|
||||
? dms.dms[0] * d2r + dms.dms[1] * d2r / 60.0 + dms.dms[2] * d2r / 3600.0
|
||||
: dms.dms[0] + dms.dms[1] / 60.0 + dms.dms[2] / 3600.0)
|
||||
, axis);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
|
||||
|
||||
template <template<typename> class CoordinateSystem>
|
||||
struct strategy_parse<geographic_tag, CoordinateSystem<degree> >
|
||||
{
|
||||
typedef strategy::dms_parser<false> type;
|
||||
};
|
||||
|
||||
|
||||
template <template<typename> class CoordinateSystem>
|
||||
struct strategy_parse<geographic_tag, CoordinateSystem<radian> >
|
||||
{
|
||||
typedef strategy::dms_parser<true> type;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_EXTENSIONS_GIS_GEOGRAPHIC_STRATEGIES_DMS_PARSER_HPP
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,43 +0,0 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_EPSG_TRAITS_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_EPSG_TRAITS_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
/*!
|
||||
\brief EPSG traits
|
||||
\details With help of the EPSG traits library users can statically use projections
|
||||
or coordinate systems specifying an EPSG code. The correct projections for transformations
|
||||
are used automically then, still keeping static polymorphism.
|
||||
\ingroup projection
|
||||
\tparam EPSG epsg code
|
||||
\tparam LL latlong point type
|
||||
\tparam XY xy point type
|
||||
\tparam PAR parameter type, normally not specified
|
||||
*/
|
||||
template <size_t EPSG, typename LLR, typename XY, typename PAR = parameters>
|
||||
struct epsg_traits
|
||||
{
|
||||
// Specializations define:
|
||||
// - type to get projection type
|
||||
// - function par to get parameters
|
||||
};
|
||||
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,267 +0,0 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_FACTORY_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_FACTORY_HPP
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/parameters.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/aea.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/aeqd.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/airy.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/aitoff.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/august.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/bacon.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/bipc.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/boggs.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/bonne.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/cass.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/cc.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/cea.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/chamb.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/collg.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/crast.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/denoy.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/eck1.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/eck2.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/eck3.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/eck4.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/eck5.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/eqc.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/eqdc.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/etmerc.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/fahey.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/fouc_s.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/gall.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/geocent.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/geos.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/gins8.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/gn_sinu.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/gnom.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/goode.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/gstmerc.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/hammer.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/hatano.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/healpix.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/krovak.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/igh.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/imw_p.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/isea.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/laea.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/labrd.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/lagrng.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/larr.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/lask.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/latlong.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/lcc.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/lcca.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/loxim.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/lsat.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/mbtfpp.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/mbtfpq.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/mbt_fps.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/merc.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/mill.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/mod_ster.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/moll.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/natearth.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/nell.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/nell_h.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/nocol.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/nsper.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/nzmg.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/ob_tran.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/ocea.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/oea.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/omerc.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/ortho.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/qsc.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/poly.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/putp2.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/putp3.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/putp4p.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/putp5.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/putp6.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/robin.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/rouss.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/rpoly.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/sconics.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/somerc.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/stere.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/sterea.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/sts.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/tcc.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/tcea.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/tmerc.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/tpeqd.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/urm5.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/urmfps.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/vandg.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/vandg2.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/vandg4.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/wag2.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/wag3.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/wag7.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/wink1.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/proj/wink2.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
template <typename LatLong, typename Cartesian, typename Parameters = parameters>
|
||||
class factory : public detail::base_factory<LatLong, Cartesian, Parameters>
|
||||
{
|
||||
private:
|
||||
|
||||
typedef std::map
|
||||
<
|
||||
std::string,
|
||||
boost::shared_ptr
|
||||
<
|
||||
detail::factory_entry
|
||||
<
|
||||
LatLong,
|
||||
Cartesian,
|
||||
Parameters
|
||||
>
|
||||
>
|
||||
> prj_registry;
|
||||
prj_registry m_registry;
|
||||
|
||||
public:
|
||||
|
||||
factory()
|
||||
{
|
||||
detail::aea_init(*this);
|
||||
detail::aeqd_init(*this);
|
||||
detail::airy_init(*this);
|
||||
detail::aitoff_init(*this);
|
||||
detail::august_init(*this);
|
||||
detail::bacon_init(*this);
|
||||
detail::bipc_init(*this);
|
||||
detail::boggs_init(*this);
|
||||
detail::bonne_init(*this);
|
||||
detail::cass_init(*this);
|
||||
detail::cc_init(*this);
|
||||
detail::cea_init(*this);
|
||||
detail::chamb_init(*this);
|
||||
detail::collg_init(*this);
|
||||
detail::crast_init(*this);
|
||||
detail::denoy_init(*this);
|
||||
detail::eck1_init(*this);
|
||||
detail::eck2_init(*this);
|
||||
detail::eck3_init(*this);
|
||||
detail::eck4_init(*this);
|
||||
detail::eck5_init(*this);
|
||||
detail::eqc_init(*this);
|
||||
detail::eqdc_init(*this);
|
||||
detail::etmerc_init(*this);
|
||||
detail::fahey_init(*this);
|
||||
detail::fouc_s_init(*this);
|
||||
detail::gall_init(*this);
|
||||
detail::geocent_init(*this);
|
||||
detail::geos_init(*this);
|
||||
detail::gins8_init(*this);
|
||||
detail::gn_sinu_init(*this);
|
||||
detail::gnom_init(*this);
|
||||
detail::goode_init(*this);
|
||||
detail::gstmerc_init(*this);
|
||||
detail::hammer_init(*this);
|
||||
detail::hatano_init(*this);
|
||||
detail::healpix_init(*this);
|
||||
detail::krovak_init(*this);
|
||||
detail::igh_init(*this);
|
||||
detail::imw_p_init(*this);
|
||||
detail::isea_init(*this);
|
||||
detail::labrd_init(*this);
|
||||
detail::laea_init(*this);
|
||||
detail::lagrng_init(*this);
|
||||
detail::larr_init(*this);
|
||||
detail::lask_init(*this);
|
||||
detail::latlong_init(*this);
|
||||
detail::lcc_init(*this);
|
||||
detail::lcca_init(*this);
|
||||
detail::loxim_init(*this);
|
||||
detail::lsat_init(*this);
|
||||
detail::mbtfpp_init(*this);
|
||||
detail::mbtfpq_init(*this);
|
||||
detail::mbt_fps_init(*this);
|
||||
detail::merc_init(*this);
|
||||
detail::mill_init(*this);
|
||||
detail::mod_ster_init(*this);
|
||||
detail::moll_init(*this);
|
||||
detail::natearth_init(*this);
|
||||
detail::nell_init(*this);
|
||||
detail::nell_h_init(*this);
|
||||
detail::nocol_init(*this);
|
||||
detail::nsper_init(*this);
|
||||
detail::nzmg_init(*this);
|
||||
detail::ob_tran_init(*this);
|
||||
detail::ocea_init(*this);
|
||||
detail::oea_init(*this);
|
||||
detail::omerc_init(*this);
|
||||
detail::ortho_init(*this);
|
||||
detail::qsc_init(*this);
|
||||
detail::poly_init(*this);
|
||||
detail::putp2_init(*this);
|
||||
detail::putp3_init(*this);
|
||||
detail::putp4p_init(*this);
|
||||
detail::putp5_init(*this);
|
||||
detail::putp6_init(*this);
|
||||
detail::robin_init(*this);
|
||||
detail::rouss_init(*this);
|
||||
detail::rpoly_init(*this);
|
||||
detail::sconics_init(*this);
|
||||
detail::somerc_init(*this);
|
||||
detail::stere_init(*this);
|
||||
detail::sterea_init(*this);
|
||||
detail::sts_init(*this);
|
||||
detail::tcc_init(*this);
|
||||
detail::tcea_init(*this);
|
||||
detail::tmerc_init(*this);
|
||||
detail::tpeqd_init(*this);
|
||||
detail::urm5_init(*this);
|
||||
detail::urmfps_init(*this);
|
||||
detail::vandg_init(*this);
|
||||
detail::vandg2_init(*this);
|
||||
detail::vandg4_init(*this);
|
||||
detail::wag2_init(*this);
|
||||
detail::wag3_init(*this);
|
||||
detail::wag7_init(*this);
|
||||
detail::wink1_init(*this);
|
||||
detail::wink2_init(*this);
|
||||
}
|
||||
|
||||
virtual ~factory() {}
|
||||
|
||||
virtual void add_to_factory(std::string const& name,
|
||||
detail::factory_entry<LatLong, Cartesian, Parameters>* sub)
|
||||
{
|
||||
m_registry[name].reset(sub);
|
||||
}
|
||||
|
||||
inline projection<LatLong, Cartesian>* create_new(Parameters const& parameters)
|
||||
{
|
||||
typename prj_registry::iterator it = m_registry.find(parameters.name);
|
||||
if (it != m_registry.end())
|
||||
{
|
||||
return it->second->create_new(parameters);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_FACTORY_HPP
|
||||
@@ -1,100 +0,0 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_IMPL_BASE_DYNAMIC_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_BASE_DYNAMIC_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/projection.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Base-virtual-forward
|
||||
template <typename C, typename LL, typename XY, typename P>
|
||||
class base_v_f : public projection<LL, XY>
|
||||
{
|
||||
protected:
|
||||
|
||||
typedef typename projection<LL, XY>::LL_T LL_T;
|
||||
typedef typename projection<LL, XY>::XY_T XY_T;
|
||||
|
||||
public:
|
||||
|
||||
base_v_f(P const& params) : m_proj(params) {}
|
||||
|
||||
virtual P const& params() const { return m_proj.params(); }
|
||||
|
||||
virtual P& mutable_params() { return m_proj.mutable_params(); }
|
||||
|
||||
virtual bool forward(LL const& ll, XY& xy) const
|
||||
{
|
||||
return m_proj.forward(ll, xy);
|
||||
}
|
||||
|
||||
virtual void fwd(LL_T& lp_lon, LL_T& lp_lat, XY_T& xy_x, XY_T& xy_y) const
|
||||
{
|
||||
m_proj.fwd(lp_lon, lp_lat, xy_x, xy_y);
|
||||
}
|
||||
|
||||
virtual bool inverse(XY const& , LL& ) const
|
||||
{
|
||||
// exception?
|
||||
return false;
|
||||
}
|
||||
virtual void inv(XY_T& , XY_T& , LL_T& , LL_T& ) const
|
||||
{
|
||||
// exception?
|
||||
}
|
||||
|
||||
virtual std::string name() const
|
||||
{
|
||||
return m_proj.name();
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
C m_proj;
|
||||
};
|
||||
|
||||
// Base-virtual-forward/inverse
|
||||
template <typename C, typename LL, typename XY, typename P>
|
||||
class base_v_fi : public base_v_f<C, LL, XY, P>
|
||||
{
|
||||
private:
|
||||
|
||||
typedef typename base_v_f<C, LL, XY, P>::LL_T LL_T;
|
||||
typedef typename base_v_f<C, LL, XY, P>::XY_T XY_T;
|
||||
|
||||
public :
|
||||
|
||||
base_v_fi(P const& params) : base_v_f<C, LL, XY, P>(params) {}
|
||||
|
||||
virtual bool inverse(XY const& xy, LL& ll) const
|
||||
{
|
||||
return this->m_proj.inverse(xy, ll);
|
||||
}
|
||||
|
||||
void inv(XY_T& xy_x, XY_T& xy_y, LL_T& lp_lon, LL_T& lp_lat) const
|
||||
{
|
||||
this->m_proj.inv(xy_x, xy_y, lp_lon, lp_lat);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_BASE_DYNAMIC_HPP
|
||||
@@ -1,93 +0,0 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// This file is manually converted from PROJ4
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// This file is converted from PROJ4, http://trac.osgeo.org/proj
|
||||
// PROJ4 is originally written by Gerald Evenden (then of the USGS)
|
||||
// PROJ4 is maintained by Frank Warmerdam
|
||||
// PROJ4 is converted to Geometry Library by Barend Gehrels (Geodan, Amsterdam)
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_ELLPS_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_ELLPS_HPP
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
|
||||
namespace detail {
|
||||
|
||||
static const PJ_ELLPS pj_ellps[] =
|
||||
{
|
||||
{ "MERIT", "a=6378137.0", "rf=298.257", "MERIT 1983" },
|
||||
{ "SGS85", "a=6378136.0", "rf=298.257", "Soviet Geodetic System 85" },
|
||||
{ "GRS80", "a=6378137.0", "rf=298.257222101", "GRS 1980(IUGG, 1980)" },
|
||||
{ "IAU76", "a=6378140.0", "rf=298.257", "IAU 1976" },
|
||||
{ "airy", "a=6377563.396", "b=6356256.910", "Airy 1830" },
|
||||
{ "APL4.9", "a=6378137.0.", "rf=298.25", "Appl. Physics. 1965" },
|
||||
{ "NWL9D", "a=6378145.0.", "rf=298.25", "Naval Weapons Lab., 1965" },
|
||||
{ "mod_airy", "a=6377340.189", "b=6356034.446", "Modified Airy" },
|
||||
{ "andrae", "a=6377104.43", "rf=300.0", "Andrae 1876 (Den., Iclnd.)" },
|
||||
{ "aust_SA", "a=6378160.0", "rf=298.25", "Australian Natl & S. Amer. 1969" },
|
||||
{ "GRS67", "a=6378160.0", "rf=298.2471674270", "GRS 67(IUGG 1967)" },
|
||||
{ "bessel", "a=6377397.155", "rf=299.1528128", "Bessel 1841" },
|
||||
{ "bess_nam", "a=6377483.865", "rf=299.1528128", "Bessel 1841 (Namibia)" },
|
||||
{ "clrk66", "a=6378206.4", "b=6356583.8", "Clarke 1866" },
|
||||
{ "clrk80", "a=6378249.145", "rf=293.4663", "Clarke 1880 mod." },
|
||||
{ "CPM", "a=6375738.7", "rf=334.29", "Comm. des Poids et Mesures 1799" },
|
||||
{ "delmbr", "a=6376428.", "rf=311.5", "Delambre 1810 (Belgium)" },
|
||||
{ "engelis", "a=6378136.05", "rf=298.2566", "Engelis 1985" },
|
||||
{ "evrst30", "a=6377276.345", "rf=300.8017", "Everest 1830" },
|
||||
{ "evrst48", "a=6377304.063", "rf=300.8017", "Everest 1948" },
|
||||
{ "evrst56", "a=6377301.243", "rf=300.8017", "Everest 1956" },
|
||||
{ "evrst69", "a=6377295.664", "rf=300.8017", "Everest 1969" },
|
||||
{ "evrstSS", "a=6377298.556", "rf=300.8017", "Everest (Sabah & Sarawak)" },
|
||||
{ "fschr60", "a=6378166.", "rf=298.3", "Fischer (Mercury Datum) 1960" },
|
||||
{ "fschr60m", "a=6378155.", "rf=298.3", "Modified Fischer 1960" },
|
||||
{ "fschr68", "a=6378150.", "rf=298.3", "Fischer 1968" },
|
||||
{ "helmert", "a=6378200.", "rf=298.3", "Helmert 1906" },
|
||||
{ "hough", "a=6378270.0", "rf=297.", "Hough" },
|
||||
{ "intl", "a=6378388.0", "rf=297.", "International 1909 (Hayford)" },
|
||||
{ "krass", "a=6378245.0", "rf=298.3", "Krassovsky, 1942" },
|
||||
{ "kaula", "a=6378163.", "rf=298.24", "Kaula 1961" },
|
||||
{ "lerch", "a=6378139.", "rf=298.257", "Lerch 1979" },
|
||||
{ "mprts", "a=6397300.", "rf=191.", "Maupertius 1738" },
|
||||
{ "new_intl", "a=6378157.5", "b=6356772.2","New International 1967" },
|
||||
{ "plessis", "a=6376523.", "b=6355863.", "Plessis 1817 (France)" },
|
||||
{ "SEasia", "a=6378155.0", "b=6356773.3205", "Southeast Asia" },
|
||||
{ "walbeck", "a=6376896.0", "b=6355834.8467", "Walbeck" },
|
||||
{ "WGS60", "a=6378165.0", "rf=298.3", "WGS 60" },
|
||||
{ "WGS66", "a=6378145.0", "rf=298.25", "WGS 66" },
|
||||
{ "WGS72", "a=6378135.0", "rf=298.26", "WGS 72" },
|
||||
{ "WGS84", "a=6378137.0", "rf=298.257223563", "WGS 84" },
|
||||
{ "sphere", "a=6370997.0", "b=6370997.0", "Normal Sphere (r=6370997)" }
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_ELLPS_HPP
|
||||
@@ -1,181 +0,0 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// This file is manually converted from PROJ4 (projects.h)
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// This file is converted from PROJ4, http://trac.osgeo.org/proj
|
||||
// PROJ4 is originally written by Gerald Evenden (then of the USGS)
|
||||
// PROJ4 is maintained by Frank Warmerdam
|
||||
// PROJ4 is converted to Geometry Library by Barend Gehrels (Geodan, Amsterdam)
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_IMPL_PROJECTS_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_PROJECTS_HPP
|
||||
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
/* some useful constants */
|
||||
static const double FORTPI = boost::math::constants::pi<double>() / 4.0;
|
||||
|
||||
static const int PJD_UNKNOWN =0;
|
||||
static const int PJD_3PARAM = 1;
|
||||
static const int PJD_7PARAM = 2;
|
||||
static const int PJD_GRIDSHIFT = 3;
|
||||
static const int PJD_WGS84 = 4; /* WGS84 (or anything considered equivelent) */
|
||||
|
||||
|
||||
struct pvalue
|
||||
{
|
||||
std::string param;
|
||||
int used;
|
||||
|
||||
int i;
|
||||
double f;
|
||||
std::string s;
|
||||
};
|
||||
|
||||
struct pj_const_pod
|
||||
{
|
||||
int over; /* over-range flag */
|
||||
int geoc; /* geocentric latitude flag */
|
||||
int is_latlong; /* proj=latlong ... not really a projection at all */
|
||||
int is_geocent; /* proj=geocent ... not really a projection at all */
|
||||
double
|
||||
a, /* major axis or radius if es==0 */
|
||||
a_orig, /* major axis before any +proj related adjustment */
|
||||
es, /* e ^ 2 */
|
||||
es_orig, /* es before any +proj related adjustment */
|
||||
e, /* eccentricity */
|
||||
ra, /* 1/A */
|
||||
one_es, /* 1 - e^2 */
|
||||
rone_es, /* 1/one_es */
|
||||
lam0, phi0, /* central longitude, latitude */
|
||||
x0, y0, /* easting and northing */
|
||||
k0, /* general scaling factor */
|
||||
to_meter, fr_meter; /* cartesian scaling */
|
||||
|
||||
int datum_type; /* PJD_UNKNOWN/3PARAM/7PARAM/GRIDSHIFT/WGS84 */
|
||||
double datum_params[7];
|
||||
double from_greenwich; /* prime meridian offset (in radians) */
|
||||
double long_wrap_center; /* 0.0 for -180 to 180, actually in radians*/
|
||||
|
||||
// Initialize all variables to zero
|
||||
pj_const_pod()
|
||||
{
|
||||
std::memset(this, 0, sizeof(pj_const_pod));
|
||||
}
|
||||
};
|
||||
|
||||
// PROJ4 complex. Might be replaced with std::complex
|
||||
struct COMPLEX { double r, i; };
|
||||
|
||||
struct PJ_ELLPS
|
||||
{
|
||||
std::string id; /* ellipse keyword name */
|
||||
std::string major; /* a= value */
|
||||
std::string ell; /* elliptical parameter */
|
||||
std::string name; /* comments */
|
||||
};
|
||||
|
||||
struct PJ_DATUMS
|
||||
{
|
||||
std::string id; /* datum keyword */
|
||||
std::string defn; /* ie. "to_wgs84=..." */
|
||||
std::string ellipse_id; /* ie from ellipse table */
|
||||
std::string comments; /* EPSG code, etc */
|
||||
};
|
||||
|
||||
struct PJ_PRIME_MERIDIANS
|
||||
{
|
||||
std::string id; /* prime meridian keyword */
|
||||
std::string defn; /* offset from greenwich in DMS format. */
|
||||
};
|
||||
|
||||
struct PJ_UNITS
|
||||
{
|
||||
std::string id; /* units keyword */
|
||||
std::string to_meter; /* multiply by value to get meters */
|
||||
std::string name; /* comments */
|
||||
};
|
||||
|
||||
struct DERIVS
|
||||
{
|
||||
double x_l, x_p; /* derivatives of x for lambda-phi */
|
||||
double y_l, y_p; /* derivatives of y for lambda-phi */
|
||||
};
|
||||
|
||||
struct FACTORS
|
||||
{
|
||||
struct DERIVS der;
|
||||
double h, k; /* meridinal, parallel scales */
|
||||
double omega, thetap; /* angular distortion, theta prime */
|
||||
double conv; /* convergence */
|
||||
double s; /* areal scale factor */
|
||||
double a, b; /* max-min scale error */
|
||||
int code; /* info as to analytics, see following */
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
/*!
|
||||
\brief parameters, projection parameters
|
||||
\details This structure initializes all projections
|
||||
\ingroup projection
|
||||
*/
|
||||
struct parameters : public detail::pj_const_pod
|
||||
{
|
||||
std::string name;
|
||||
std::vector<detail::pvalue> params;
|
||||
};
|
||||
|
||||
// TODO: derived from boost::exception / make more for forward/inverse/init/setup
|
||||
class proj_exception
|
||||
{
|
||||
public:
|
||||
|
||||
proj_exception(int code = 0)
|
||||
: m_code(code)
|
||||
{
|
||||
}
|
||||
int code() const { return m_code; }
|
||||
private :
|
||||
int m_code;
|
||||
};
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_PROJECTS_HPP
|
||||
@@ -1,54 +0,0 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2012 Krzysztof Czainski
|
||||
// Copyright (c) 2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_NEW_PROJECTION_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_NEW_PROJECTION_HPP
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/projection_point_type.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/projection.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
/*!
|
||||
\brief Creates a type-erased projection
|
||||
\details Creates using operator new a class derived from projection, that forwards method
|
||||
calls to @p Proj.
|
||||
\ingroup projection
|
||||
\tparam Projection Type of the concrete projection to be created.
|
||||
\tparam Parameters projection parameters type
|
||||
\see projection
|
||||
\see factory
|
||||
*/
|
||||
|
||||
//@{
|
||||
template <typename Projection, typename Parameters>
|
||||
inline projection
|
||||
<
|
||||
typename detail::projection_point_type<Projection, geographic_tag>::type
|
||||
, typename detail::projection_point_type<Projection, cartesian_tag>::type
|
||||
>* new_projection(Parameters const& par)
|
||||
{
|
||||
return new detail::base_v_fi
|
||||
<
|
||||
Projection
|
||||
, typename detail::projection_point_type<Projection, geographic_tag>::type
|
||||
, typename detail::projection_point_type<Projection, cartesian_tag>::type
|
||||
, Parameters
|
||||
>(par);
|
||||
}
|
||||
//@}
|
||||
|
||||
}}} // boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_NEW_PROJECTION_HPP
|
||||
@@ -1,65 +0,0 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_PARAMETERS_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_PARAMETERS_HPP
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/pj_init.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
|
||||
template <typename R>
|
||||
inline parameters init(const R& arguments)
|
||||
{
|
||||
return detail::pj_init(arguments);
|
||||
}
|
||||
|
||||
/*!
|
||||
\ingroup projection
|
||||
\brief Initializes a projection as a string, using the format with + and =
|
||||
\details The projection can be initialized with a string (with the same format as the PROJ4 package) for
|
||||
convenient initialization from, for example, the command line
|
||||
\par Example
|
||||
<tt>+proj=labrd +ellps=intl +lon_0=46d26'13.95E +lat_0=18d54S +azi=18d54 +k_0=.9995 +x_0=400000 +y_0=800000</tt>
|
||||
for the Madagascar projection.
|
||||
\note Parameters are described in the group
|
||||
*/
|
||||
inline parameters init(const std::string& arguments)
|
||||
{
|
||||
return detail::pj_init_plus(arguments);
|
||||
}
|
||||
|
||||
/*!
|
||||
\ingroup projection
|
||||
\brief Overload using a const char*
|
||||
*/
|
||||
inline parameters init(const char* arguments)
|
||||
{
|
||||
return detail::pj_init_plus(arguments);
|
||||
}
|
||||
|
||||
|
||||
// todo:
|
||||
/*
|
||||
parameters init(const std::map<std::string, std::string>& arguments)
|
||||
{
|
||||
return detail::pj_init_plus(arguments);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
#endif
|
||||
@@ -1,545 +0,0 @@
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_AEA_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_AEA_HPP
|
||||
|
||||
// Boost.Geometry - extensions-gis-projections (based on PROJ4)
|
||||
// This file is automatically generated. DO NOT EDIT.
|
||||
|
||||
// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// This file is converted from PROJ4, http://trac.osgeo.org/proj
|
||||
// PROJ4 is originally written by Gerald Evenden (then of the USGS)
|
||||
// PROJ4 is maintained by Frank Warmerdam
|
||||
// PROJ4 is converted to Boost.Geometry by Barend Gehrels
|
||||
|
||||
// Last updated version of proj: 4.9.1
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
// Purpose: Implementation of the aea (Albers Equal Area) projection.
|
||||
// Author: Gerald Evenden
|
||||
// Copyright (c) 1995, Gerald Evenden
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <boost/math/special_functions/hypot.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/pj_mlfn.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/pj_msfn.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/pj_qsfn.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/epsg_traits.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace aea
|
||||
{
|
||||
|
||||
static const double EPS10 = 1.e-10;
|
||||
static const double TOL7 = 1.e-7;
|
||||
static const int N_ITER = 15;
|
||||
static const double EPSILON = 1.0e-7;
|
||||
static const double TOL = 1.0e-10;
|
||||
|
||||
struct par_aea
|
||||
{
|
||||
double ec;
|
||||
double n;
|
||||
double c;
|
||||
double dd;
|
||||
double n2;
|
||||
double rho0;
|
||||
double phi1;
|
||||
double phi2;
|
||||
double en[EN_SIZE];
|
||||
int ellips;
|
||||
};
|
||||
|
||||
/* determine latitude angle phi-1 */
|
||||
static double
|
||||
phi1_(double qs, double Te, double Tone_es) {
|
||||
int i;
|
||||
double Phi, sinpi, cospi, con, com, dphi;
|
||||
|
||||
Phi = asin (.5 * qs);
|
||||
if (Te < EPSILON)
|
||||
return( Phi );
|
||||
i = N_ITER;
|
||||
do {
|
||||
sinpi = sin (Phi);
|
||||
cospi = cos (Phi);
|
||||
con = Te * sinpi;
|
||||
com = 1. - con * con;
|
||||
dphi = .5 * com * com / cospi * (qs / Tone_es -
|
||||
sinpi / com + .5 / Te * log ((1. - con) /
|
||||
(1. + con)));
|
||||
Phi += dphi;
|
||||
} while (fabs(dphi) > TOL && --i);
|
||||
return( i ? Phi : HUGE_VAL );
|
||||
}
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_aea_ellipsoid : public base_t_fi<base_aea_ellipsoid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
|
||||
par_aea m_proj_parm;
|
||||
|
||||
inline base_aea_ellipsoid(const Parameters& par)
|
||||
: base_t_fi<base_aea_ellipsoid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(e_forward) ellipsoid & spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
double rho = 0.0;
|
||||
if ((rho = this->m_proj_parm.c - (this->m_proj_parm.ellips ? this->m_proj_parm.n * pj_qsfn(sin(lp_lat),
|
||||
this->m_par.e, this->m_par.one_es) : this->m_proj_parm.n2 * sin(lp_lat))) < 0.) throw proj_exception();
|
||||
rho = this->m_proj_parm.dd * sqrt(rho);
|
||||
xy_x = rho * sin( lp_lon *= this->m_proj_parm.n );
|
||||
xy_y = this->m_proj_parm.rho0 - rho * cos(lp_lon);
|
||||
}
|
||||
|
||||
// INVERSE(e_inverse) ellipsoid & spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const
|
||||
{
|
||||
double rho = 0.0;
|
||||
if( (rho = boost::math::hypot(xy_x, xy_y = this->m_proj_parm.rho0 - xy_y)) != 0.0 ) {
|
||||
if (this->m_proj_parm.n < 0.) {
|
||||
rho = -rho;
|
||||
xy_x = -xy_x;
|
||||
xy_y = -xy_y;
|
||||
}
|
||||
lp_lat = rho / this->m_proj_parm.dd;
|
||||
if (this->m_proj_parm.ellips) {
|
||||
lp_lat = (this->m_proj_parm.c - lp_lat * lp_lat) / this->m_proj_parm.n;
|
||||
if (fabs(this->m_proj_parm.ec - fabs(lp_lat)) > TOL7) {
|
||||
if ((lp_lat = phi1_(lp_lat, this->m_par.e, this->m_par.one_es)) == HUGE_VAL)
|
||||
throw proj_exception();
|
||||
} else
|
||||
lp_lat = lp_lat < 0. ? -geometry::math::half_pi<double>() : geometry::math::half_pi<double>();
|
||||
} else if (fabs(lp_lat = (this->m_proj_parm.c - lp_lat * lp_lat) / this->m_proj_parm.n2) <= 1.)
|
||||
lp_lat = asin(lp_lat);
|
||||
else
|
||||
lp_lat = lp_lat < 0. ? -geometry::math::half_pi<double>() : geometry::math::half_pi<double>();
|
||||
lp_lon = atan2(xy_x, xy_y) / this->m_proj_parm.n;
|
||||
} else {
|
||||
lp_lon = 0.;
|
||||
lp_lat = this->m_proj_parm.n > 0. ? geometry::math::half_pi<double>() : - geometry::math::half_pi<double>();
|
||||
}
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "aea_ellipsoid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
template <typename Parameters>
|
||||
void setup(Parameters& par, par_aea& proj_parm)
|
||||
{
|
||||
double cosphi, sinphi;
|
||||
int secant;
|
||||
|
||||
if (fabs(proj_parm.phi1 + proj_parm.phi2) < EPS10) throw proj_exception(-21);
|
||||
proj_parm.n = sinphi = sin(proj_parm.phi1);
|
||||
cosphi = cos(proj_parm.phi1);
|
||||
secant = fabs(proj_parm.phi1 - proj_parm.phi2) >= EPS10;
|
||||
if( (proj_parm.ellips = (par.es > 0.))) {
|
||||
double ml1, m1;
|
||||
|
||||
if (!pj_enfn(par.es, proj_parm.en)) throw proj_exception(0);
|
||||
m1 = pj_msfn(sinphi, cosphi, par.es);
|
||||
ml1 = pj_qsfn(sinphi, par.e, par.one_es);
|
||||
if (secant) { /* secant cone */
|
||||
double ml2, m2;
|
||||
|
||||
sinphi = sin(proj_parm.phi2);
|
||||
cosphi = cos(proj_parm.phi2);
|
||||
m2 = pj_msfn(sinphi, cosphi, par.es);
|
||||
ml2 = pj_qsfn(sinphi, par.e, par.one_es);
|
||||
proj_parm.n = (m1 * m1 - m2 * m2) / (ml2 - ml1);
|
||||
}
|
||||
proj_parm.ec = 1. - .5 * par.one_es * log((1. - par.e) /
|
||||
(1. + par.e)) / par.e;
|
||||
proj_parm.c = m1 * m1 + proj_parm.n * ml1;
|
||||
proj_parm.dd = 1. / proj_parm.n;
|
||||
proj_parm.rho0 = proj_parm.dd * sqrt(proj_parm.c - proj_parm.n * pj_qsfn(sin(par.phi0),
|
||||
par.e, par.one_es));
|
||||
} else {
|
||||
if (secant) proj_parm.n = .5 * (proj_parm.n + sin(proj_parm.phi2));
|
||||
proj_parm.n2 = proj_parm.n + proj_parm.n;
|
||||
proj_parm.c = cosphi * cosphi + proj_parm.n2 * sinphi;
|
||||
proj_parm.dd = 1. / proj_parm.n;
|
||||
proj_parm.rho0 = proj_parm.dd * sqrt(proj_parm.c - proj_parm.n2 * sin(par.phi0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Albers Equal Area
|
||||
template <typename Parameters>
|
||||
void setup_aea(Parameters& par, par_aea& proj_parm)
|
||||
{
|
||||
boost::ignore_unused(phi1_);
|
||||
proj_parm.phi1 = pj_param(par.params, "rlat_1").f;
|
||||
proj_parm.phi2 = pj_param(par.params, "rlat_2").f;
|
||||
setup(par, proj_parm);
|
||||
}
|
||||
|
||||
// Lambert Equal Area Conic
|
||||
template <typename Parameters>
|
||||
void setup_leac(Parameters& par, par_aea& proj_parm)
|
||||
{
|
||||
proj_parm.phi2 = pj_param(par.params, "rlat_1").f;
|
||||
proj_parm.phi1 = pj_param(par.params, "bsouth").i ? - geometry::math::half_pi<double>(): geometry::math::half_pi<double>();
|
||||
setup(par, proj_parm);
|
||||
}
|
||||
|
||||
}} // namespace detail::aea
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Albers Equal Area projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Conic
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Projection parameters
|
||||
- lat_1: Latitude of first standard parallel (degrees)
|
||||
- lat_2: Latitude of second standard parallel (degrees)
|
||||
\par Example
|
||||
\image html ex_aea.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct aea_ellipsoid : public detail::aea::base_aea_ellipsoid<Geographic, Cartesian, Parameters>
|
||||
{
|
||||
inline aea_ellipsoid(const Parameters& par) : detail::aea::base_aea_ellipsoid<Geographic, Cartesian, Parameters>(par)
|
||||
{
|
||||
detail::aea::setup_aea(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Lambert Equal Area Conic projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Conic
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Projection parameters
|
||||
- lat_1: Latitude of first standard parallel (degrees)
|
||||
- south: Denotes southern hemisphere UTM zone (boolean)
|
||||
\par Example
|
||||
\image html ex_leac.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct leac_ellipsoid : public detail::aea::base_aea_ellipsoid<Geographic, Cartesian, Parameters>
|
||||
{
|
||||
inline leac_ellipsoid(const Parameters& par) : detail::aea::base_aea_ellipsoid<Geographic, Cartesian, Parameters>(par)
|
||||
{
|
||||
detail::aea::setup_leac(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Factory entry(s)
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
class aea_entry : public detail::factory_entry<Geographic, Cartesian, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual projection<Geographic, Cartesian>* create_new(const Parameters& par) const
|
||||
{
|
||||
return new base_v_fi<aea_ellipsoid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
class leac_entry : public detail::factory_entry<Geographic, Cartesian, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual projection<Geographic, Cartesian>* create_new(const Parameters& par) const
|
||||
{
|
||||
return new base_v_fi<leac_ellipsoid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
inline void aea_init(detail::base_factory<Geographic, Cartesian, Parameters>& factory)
|
||||
{
|
||||
factory.add_to_factory("aea", new aea_entry<Geographic, Cartesian, Parameters>);
|
||||
factory.add_to_factory("leac", new leac_entry<Geographic, Cartesian, Parameters>);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
// Create EPSG specializations
|
||||
// (Proof of Concept, only for some)
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<2964, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef aea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=aea +lat_1=55 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3005, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef aea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=aea +lat_1=50 +lat_2=58.5 +lat_0=45 +lon_0=-126 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3083, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef aea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=aea +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=6000000 +ellps=GRS80 +datum=NAD83 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3085, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef aea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=aea +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=6000000 +ellps=GRS80 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3086, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef aea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=aea +lat_1=24 +lat_2=31.5 +lat_0=24 +lon_0=-84 +x_0=400000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3087, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef aea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=aea +lat_1=24 +lat_2=31.5 +lat_0=24 +lon_0=-84 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3153, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef aea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=aea +lat_1=50 +lat_2=58.5 +lat_0=45 +lon_0=-126 +x_0=1000000 +y_0=0 +ellps=GRS80 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3174, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef aea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=aea +lat_1=42.122774 +lat_2=49.01518 +lat_0=45.568977 +lon_0=-84.455955 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3175, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef aea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=aea +lat_1=42.122774 +lat_2=49.01518 +lat_0=45.568977 +lon_0=-83.248627 +x_0=1000000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3309, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef aea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=clrk66 +datum=NAD27 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3310, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef aea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=GRS80 +datum=NAD83 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3311, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef aea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=GRS80 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3338, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef aea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=aea +lat_1=55 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3467, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef aea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=aea +lat_1=55 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3488, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef aea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=aea +lat_1=34 +lat_2=40.5 +lat_0=0 +lon_0=-120 +x_0=0 +y_0=-4000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3513, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef aea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=aea +lat_1=24 +lat_2=31.5 +lat_0=24 +lon_0=-84 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3577, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef aea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=aea +lat_1=-18 +lat_2=-36 +lat_0=0 +lon_0=132 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3578, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef aea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=aea +lat_1=61.66666666666666 +lat_2=68 +lat_0=59 +lon_0=-132.5 +x_0=500000 +y_0=500000 +ellps=GRS80 +datum=NAD83 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3579, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef aea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=aea +lat_1=61.66666666666666 +lat_2=68 +lat_0=59 +lon_0=-132.5 +x_0=500000 +y_0=500000 +ellps=GRS80 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3665, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef aea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=aea +lat_1=27.5 +lat_2=35 +lat_0=18 +lon_0=-100 +x_0=1500000 +y_0=6000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif // doxygen
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_AEA_HPP
|
||||
|
||||
@@ -1,487 +0,0 @@
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_AEQD_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_AEQD_HPP
|
||||
|
||||
// Boost.Geometry - extensions-gis-projections (based on PROJ4)
|
||||
// This file is automatically generated. DO NOT EDIT.
|
||||
|
||||
// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// This file is converted from PROJ4, http://trac.osgeo.org/proj
|
||||
// PROJ4 is originally written by Gerald Evenden (then of the USGS)
|
||||
// PROJ4 is maintained by Frank Warmerdam
|
||||
// PROJ4 is converted to Boost.Geometry by Barend Gehrels
|
||||
|
||||
// Last updated version of proj: 4.9.1
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
// Purpose: Implementation of the aeqd (Azimuthal Equidistant) projection.
|
||||
// Author: Gerald Evenden
|
||||
// Copyright (c) 1995, Gerald Evenden
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <boost/math/special_functions/hypot.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/aasincos.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/pj_mlfn.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace aeqd
|
||||
{
|
||||
|
||||
static const double EPS10 = 1.e-10;
|
||||
static const double TOL = 1.e-14;
|
||||
static const int N_POLE = 0;
|
||||
static const int S_POLE = 1;
|
||||
static const int EQUIT = 2;
|
||||
static const int OBLIQ = 3;
|
||||
|
||||
struct par_aeqd
|
||||
{
|
||||
double sinph0;
|
||||
double cosph0;
|
||||
double en[EN_SIZE];
|
||||
double M1;
|
||||
double N1;
|
||||
double Mp;
|
||||
double He;
|
||||
double G;
|
||||
int mode;
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_aeqd_ellipsoid : public base_t_fi<base_aeqd_ellipsoid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
|
||||
par_aeqd m_proj_parm;
|
||||
|
||||
inline base_aeqd_ellipsoid(const Parameters& par)
|
||||
: base_t_fi<base_aeqd_ellipsoid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(e_forward) elliptical
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
double coslam, cosphi, sinphi, rho, s, H, H2, c, Az, t, ct, st, cA, sA;
|
||||
|
||||
coslam = cos(lp_lon);
|
||||
cosphi = cos(lp_lat);
|
||||
sinphi = sin(lp_lat);
|
||||
switch (this->m_proj_parm.mode) {
|
||||
case N_POLE:
|
||||
coslam = - coslam;
|
||||
case S_POLE:
|
||||
xy_x = (rho = fabs(this->m_proj_parm.Mp - pj_mlfn(lp_lat, sinphi, cosphi, this->m_proj_parm.en))) *
|
||||
sin(lp_lon);
|
||||
xy_y = rho * coslam;
|
||||
break;
|
||||
case EQUIT:
|
||||
case OBLIQ:
|
||||
if (fabs(lp_lon) < EPS10 && fabs(lp_lat - this->m_par.phi0) < EPS10) {
|
||||
xy_x = xy_y = 0.;
|
||||
break;
|
||||
}
|
||||
t = atan2(this->m_par.one_es * sinphi + this->m_par.es * this->m_proj_parm.N1 * this->m_proj_parm.sinph0 *
|
||||
sqrt(1. - this->m_par.es * sinphi * sinphi), cosphi);
|
||||
ct = cos(t); st = sin(t);
|
||||
Az = atan2(sin(lp_lon) * ct, this->m_proj_parm.cosph0 * st - this->m_proj_parm.sinph0 * coslam * ct);
|
||||
cA = cos(Az); sA = sin(Az);
|
||||
s = aasin(fabs(sA) < TOL ?
|
||||
(this->m_proj_parm.cosph0 * st - this->m_proj_parm.sinph0 * coslam * ct) / cA :
|
||||
sin(lp_lon) * ct / sA );
|
||||
H = this->m_proj_parm.He * cA;
|
||||
H2 = H * H;
|
||||
c = this->m_proj_parm.N1 * s * (1. + s * s * (- H2 * (1. - H2)/6. +
|
||||
s * ( this->m_proj_parm.G * H * (1. - 2. * H2 * H2) / 8. +
|
||||
s * ((H2 * (4. - 7. * H2) - 3. * this->m_proj_parm.G * this->m_proj_parm.G * (1. - 7. * H2)) /
|
||||
120. - s * this->m_proj_parm.G * H / 48.))));
|
||||
xy_x = c * sA;
|
||||
xy_y = c * cA;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// INVERSE(e_inverse) elliptical
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const
|
||||
{
|
||||
double c, Az, cosAz, A, B, D, E, F, psi, t;
|
||||
|
||||
if ((c = boost::math::hypot(xy_x, xy_y)) < EPS10) {
|
||||
lp_lat = this->m_par.phi0;
|
||||
lp_lon = 0.;
|
||||
return;
|
||||
}
|
||||
if (this->m_proj_parm.mode == OBLIQ || this->m_proj_parm.mode == EQUIT) {
|
||||
cosAz = cos(Az = atan2(xy_x, xy_y));
|
||||
t = this->m_proj_parm.cosph0 * cosAz;
|
||||
B = this->m_par.es * t / this->m_par.one_es;
|
||||
A = - B * t;
|
||||
B *= 3. * (1. - A) * this->m_proj_parm.sinph0;
|
||||
D = c / this->m_proj_parm.N1;
|
||||
E = D * (1. - D * D * (A * (1. + A) / 6. + B * (1. + 3.*A) * D / 24.));
|
||||
F = 1. - E * E * (A / 2. + B * E / 6.);
|
||||
psi = aasin(this->m_proj_parm.sinph0 * cos(E) + t * sin(E));
|
||||
lp_lon = aasin(sin(Az) * sin(E) / cos(psi));
|
||||
if ((t = fabs(psi)) < EPS10)
|
||||
lp_lat = 0.;
|
||||
else if (fabs(t - geometry::math::half_pi<double>()) < 0.)
|
||||
lp_lat = geometry::math::half_pi<double>();
|
||||
else
|
||||
lp_lat = atan((1. - this->m_par.es * F * this->m_proj_parm.sinph0 / sin(psi)) * tan(psi) /
|
||||
this->m_par.one_es);
|
||||
} else { /* Polar */
|
||||
lp_lat = pj_inv_mlfn(this->m_proj_parm.mode == N_POLE ? this->m_proj_parm.Mp - c : this->m_proj_parm.Mp + c,
|
||||
this->m_par.es, this->m_proj_parm.en);
|
||||
lp_lon = atan2(xy_x, this->m_proj_parm.mode == N_POLE ? -xy_y : xy_y);
|
||||
}
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "aeqd_ellipsoid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_aeqd_guam : public base_t_fi<base_aeqd_guam<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
|
||||
par_aeqd m_proj_parm;
|
||||
|
||||
inline base_aeqd_guam(const Parameters& par)
|
||||
: base_t_fi<base_aeqd_guam<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(e_guam_fwd) Guam elliptical
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
double cosphi, sinphi, t;
|
||||
|
||||
cosphi = cos(lp_lat);
|
||||
sinphi = sin(lp_lat);
|
||||
t = 1. / sqrt(1. - this->m_par.es * sinphi * sinphi);
|
||||
xy_x = lp_lon * cosphi * t;
|
||||
xy_y = pj_mlfn(lp_lat, sinphi, cosphi, this->m_proj_parm.en) - this->m_proj_parm.M1 +
|
||||
.5 * lp_lon * lp_lon * cosphi * sinphi * t;
|
||||
}
|
||||
|
||||
// INVERSE(e_guam_inv) Guam elliptical
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const
|
||||
{
|
||||
double x2, t;
|
||||
int i;
|
||||
|
||||
x2 = 0.5 * xy_x * xy_x;
|
||||
lp_lat = this->m_par.phi0;
|
||||
for (i = 0; i < 3; ++i) {
|
||||
t = this->m_par.e * sin(lp_lat);
|
||||
lp_lat = pj_inv_mlfn(this->m_proj_parm.M1 + xy_y -
|
||||
x2 * tan(lp_lat) * (t = sqrt(1. - t * t)), this->m_par.es, this->m_proj_parm.en);
|
||||
}
|
||||
lp_lon = xy_x * t / cos(lp_lat);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "aeqd_guam";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_aeqd_spheroid : public base_t_fi<base_aeqd_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
|
||||
par_aeqd m_proj_parm;
|
||||
|
||||
inline base_aeqd_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_aeqd_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(s_forward) spherical
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
double coslam, cosphi, sinphi;
|
||||
|
||||
sinphi = sin(lp_lat);
|
||||
cosphi = cos(lp_lat);
|
||||
coslam = cos(lp_lon);
|
||||
switch (this->m_proj_parm.mode) {
|
||||
case EQUIT:
|
||||
xy_y = cosphi * coslam;
|
||||
goto oblcon;
|
||||
case OBLIQ:
|
||||
xy_y = this->m_proj_parm.sinph0 * sinphi + this->m_proj_parm.cosph0 * cosphi * coslam;
|
||||
oblcon:
|
||||
if (fabs(fabs(xy_y) - 1.) < TOL)
|
||||
if (xy_y < 0.)
|
||||
throw proj_exception();
|
||||
else
|
||||
xy_x = xy_y = 0.;
|
||||
else {
|
||||
xy_y = acos(xy_y);
|
||||
xy_y /= sin(xy_y);
|
||||
xy_x = xy_y * cosphi * sin(lp_lon);
|
||||
xy_y *= (this->m_proj_parm.mode == EQUIT) ? sinphi :
|
||||
this->m_proj_parm.cosph0 * sinphi - this->m_proj_parm.sinph0 * cosphi * coslam;
|
||||
}
|
||||
break;
|
||||
case N_POLE:
|
||||
lp_lat = -lp_lat;
|
||||
coslam = -coslam;
|
||||
case S_POLE:
|
||||
if (fabs(lp_lat - geometry::math::half_pi<double>()) < EPS10) throw proj_exception();;
|
||||
xy_x = (xy_y = (geometry::math::half_pi<double>() + lp_lat)) * sin(lp_lon);
|
||||
xy_y *= coslam;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spherical
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const
|
||||
{
|
||||
double cosc, c_rh, sinc;
|
||||
|
||||
if ((c_rh = boost::math::hypot(xy_x, xy_y)) > geometry::math::pi<double>()) {
|
||||
if (c_rh - EPS10 > geometry::math::pi<double>()) throw proj_exception();;
|
||||
c_rh = geometry::math::pi<double>();
|
||||
} else if (c_rh < EPS10) {
|
||||
lp_lat = this->m_par.phi0;
|
||||
lp_lon = 0.;
|
||||
return;
|
||||
}
|
||||
if (this->m_proj_parm.mode == OBLIQ || this->m_proj_parm.mode == EQUIT) {
|
||||
sinc = sin(c_rh);
|
||||
cosc = cos(c_rh);
|
||||
if (this->m_proj_parm.mode == EQUIT) {
|
||||
lp_lat = aasin(xy_y * sinc / c_rh);
|
||||
xy_x *= sinc;
|
||||
xy_y = cosc * c_rh;
|
||||
} else {
|
||||
lp_lat = aasin(cosc * this->m_proj_parm.sinph0 + xy_y * sinc * this->m_proj_parm.cosph0 /
|
||||
c_rh);
|
||||
xy_y = (cosc - this->m_proj_parm.sinph0 * sin(lp_lat)) * c_rh;
|
||||
xy_x *= sinc * this->m_proj_parm.cosph0;
|
||||
}
|
||||
lp_lon = atan2(xy_x, xy_y);
|
||||
} else if (this->m_proj_parm.mode == N_POLE) {
|
||||
lp_lat = geometry::math::half_pi<double>() - c_rh;
|
||||
lp_lon = atan2(xy_x, -xy_y);
|
||||
} else {
|
||||
lp_lat = c_rh - geometry::math::half_pi<double>();
|
||||
lp_lon = atan2(xy_x, xy_y);
|
||||
}
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "aeqd_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Azimuthal Equidistant
|
||||
template <typename Parameters>
|
||||
void setup_aeqd(Parameters& par, par_aeqd& proj_parm)
|
||||
{
|
||||
par.phi0 = pj_param(par.params, "rlat_0").f;
|
||||
if (fabs(fabs(par.phi0) - geometry::math::half_pi<double>()) < EPS10) {
|
||||
proj_parm.mode = par.phi0 < 0. ? S_POLE : N_POLE;
|
||||
proj_parm.sinph0 = par.phi0 < 0. ? -1. : 1.;
|
||||
proj_parm.cosph0 = 0.;
|
||||
} else if (fabs(par.phi0) < EPS10) {
|
||||
proj_parm.mode = EQUIT;
|
||||
proj_parm.sinph0 = 0.;
|
||||
proj_parm.cosph0 = 1.;
|
||||
} else {
|
||||
proj_parm.mode = OBLIQ;
|
||||
proj_parm.sinph0 = sin(par.phi0);
|
||||
proj_parm.cosph0 = cos(par.phi0);
|
||||
}
|
||||
if (! par.es) {
|
||||
} else {
|
||||
if (!pj_enfn(par.es, proj_parm.en)) throw proj_exception(0);
|
||||
if (pj_param(par.params, "bguam").i) {
|
||||
proj_parm.M1 = pj_mlfn(par.phi0, proj_parm.sinph0, proj_parm.cosph0, proj_parm.en);
|
||||
} else {
|
||||
switch (proj_parm.mode) {
|
||||
case N_POLE:
|
||||
proj_parm.Mp = pj_mlfn(geometry::math::half_pi<double>(), 1., 0., proj_parm.en);
|
||||
break;
|
||||
case S_POLE:
|
||||
proj_parm.Mp = pj_mlfn(-geometry::math::half_pi<double>(), -1., 0., proj_parm.en);
|
||||
break;
|
||||
case EQUIT:
|
||||
case OBLIQ:
|
||||
proj_parm.N1 = 1. / sqrt(1. - par.es * proj_parm.sinph0 * proj_parm.sinph0);
|
||||
proj_parm.G = proj_parm.sinph0 * (proj_parm.He = par.e / sqrt(par.one_es));
|
||||
proj_parm.He *= proj_parm.cosph0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}} // namespace detail::aeqd
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Azimuthal Equidistant projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Azimuthal
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Projection parameters
|
||||
- lat_0: Latitude of origin (degrees)
|
||||
- guam (boolean)
|
||||
\par Example
|
||||
\image html ex_aeqd.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct aeqd_ellipsoid : public detail::aeqd::base_aeqd_ellipsoid<Geographic, Cartesian, Parameters>
|
||||
{
|
||||
inline aeqd_ellipsoid(const Parameters& par) : detail::aeqd::base_aeqd_ellipsoid<Geographic, Cartesian, Parameters>(par)
|
||||
{
|
||||
detail::aeqd::setup_aeqd(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Azimuthal Equidistant projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Azimuthal
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Projection parameters
|
||||
- lat_0: Latitude of origin (degrees)
|
||||
- guam (boolean)
|
||||
\par Example
|
||||
\image html ex_aeqd.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct aeqd_guam : public detail::aeqd::base_aeqd_guam<Geographic, Cartesian, Parameters>
|
||||
{
|
||||
inline aeqd_guam(const Parameters& par) : detail::aeqd::base_aeqd_guam<Geographic, Cartesian, Parameters>(par)
|
||||
{
|
||||
detail::aeqd::setup_aeqd(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Azimuthal Equidistant projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Azimuthal
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Projection parameters
|
||||
- lat_0: Latitude of origin (degrees)
|
||||
- guam (boolean)
|
||||
\par Example
|
||||
\image html ex_aeqd.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct aeqd_spheroid : public detail::aeqd::base_aeqd_spheroid<Geographic, Cartesian, Parameters>
|
||||
{
|
||||
inline aeqd_spheroid(const Parameters& par) : detail::aeqd::base_aeqd_spheroid<Geographic, Cartesian, Parameters>(par)
|
||||
{
|
||||
detail::aeqd::setup_aeqd(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Factory entry(s)
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
class aeqd_entry : public detail::factory_entry<Geographic, Cartesian, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual projection<Geographic, Cartesian>* create_new(const Parameters& par) const
|
||||
{
|
||||
bool const guam = pj_param(par.params, "bguam").i;
|
||||
|
||||
if (par.es && ! guam)
|
||||
return new base_v_fi<aeqd_ellipsoid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
else if (par.es && guam)
|
||||
return new base_v_fi<aeqd_guam<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
else
|
||||
return new base_v_fi<aeqd_spheroid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
inline void aeqd_init(detail::base_factory<Geographic, Cartesian, Parameters>& factory)
|
||||
{
|
||||
factory.add_to_factory("aeqd", new aeqd_entry<Geographic, Cartesian, Parameters>);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_AEQD_HPP
|
||||
|
||||
@@ -1,477 +0,0 @@
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_CASS_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_CASS_HPP
|
||||
|
||||
// Boost.Geometry - extensions-gis-projections (based on PROJ4)
|
||||
// This file is automatically generated. DO NOT EDIT.
|
||||
|
||||
// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// This file is converted from PROJ4, http://trac.osgeo.org/proj
|
||||
// PROJ4 is originally written by Gerald Evenden (then of the USGS)
|
||||
// PROJ4 is maintained by Frank Warmerdam
|
||||
// PROJ4 is converted to Boost.Geometry by Barend Gehrels
|
||||
|
||||
// Last updated version of proj: 4.9.1
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/pj_mlfn.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/epsg_traits.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace cass
|
||||
{
|
||||
|
||||
static const double EPS10 = 1e-10;
|
||||
static const double C1 = .16666666666666666666;
|
||||
static const double C2 = .00833333333333333333;
|
||||
static const double C3 = .04166666666666666666;
|
||||
static const double C4 = .33333333333333333333;
|
||||
static const double C5 = .06666666666666666666;
|
||||
|
||||
struct par_cass
|
||||
{
|
||||
double m0;
|
||||
double en[EN_SIZE];
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_cass_ellipsoid : public base_t_fi<base_cass_ellipsoid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
|
||||
par_cass m_proj_parm;
|
||||
|
||||
inline base_cass_ellipsoid(const Parameters& par)
|
||||
: base_t_fi<base_cass_ellipsoid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(e_forward) ellipsoid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
double n = sin(lp_lat);
|
||||
double c = cos(lp_lat);
|
||||
xy_y = pj_mlfn(lp_lat, n, c, this->m_proj_parm.en);
|
||||
n = 1./sqrt(1. - this->m_par.es * n * n);
|
||||
double tn = tan(lp_lat); double t = tn * tn;
|
||||
double a1 = lp_lon * c;
|
||||
c *= this->m_par.es * c / (1 - this->m_par.es);
|
||||
double a2 = a1 * a1;
|
||||
xy_x = n * a1 * (1. - a2 * t *
|
||||
(C1 - (8. - t + 8. * c) * a2 * C2));
|
||||
xy_y -= this->m_proj_parm.m0 - n * tn * a2 *
|
||||
(.5 + (5. - t + 6. * c) * a2 * C3);
|
||||
}
|
||||
|
||||
// INVERSE(e_inverse) ellipsoid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const
|
||||
{
|
||||
double ph1;
|
||||
|
||||
ph1 = pj_inv_mlfn(this->m_proj_parm.m0 + xy_y, this->m_par.es, this->m_proj_parm.en);
|
||||
double tn = tan(ph1); double t = tn * tn;
|
||||
double n = sin(ph1);
|
||||
double r = 1. / (1. - this->m_par.es * n * n);
|
||||
n = sqrt(r);
|
||||
r *= (1. - this->m_par.es) * n;
|
||||
double dd = xy_x / n;
|
||||
double d2 = dd * dd;
|
||||
lp_lat = ph1 - (n * tn / r) * d2 *
|
||||
(.5 - (1. + 3. * t) * d2 * C3);
|
||||
lp_lon = dd * (1. + t * d2 *
|
||||
(-C4 + (1. + 3. * t) * d2 * C5)) / cos(ph1);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "cass_ellipsoid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_cass_spheroid : public base_t_fi<base_cass_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
|
||||
par_cass m_proj_parm;
|
||||
|
||||
inline base_cass_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_cass_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
xy_x = asin(cos(lp_lat) * sin(lp_lon));
|
||||
xy_y = atan2(tan(lp_lat) , cos(lp_lon)) - this->m_par.phi0;
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const
|
||||
{
|
||||
double dd = xy_y + this->m_par.phi0;
|
||||
lp_lat = asin(sin(dd) * cos(xy_x));
|
||||
lp_lon = atan2(tan(xy_x), cos(dd));
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "cass_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Cassini
|
||||
template <typename Parameters>
|
||||
void setup_cass(Parameters& par, par_cass& proj_parm)
|
||||
{
|
||||
if (par.es) {
|
||||
if (!pj_enfn(par.es, proj_parm.en)) throw proj_exception(0);
|
||||
proj_parm.m0 = pj_mlfn(par.phi0, sin(par.phi0), cos(par.phi0), proj_parm.en);
|
||||
} else {
|
||||
}
|
||||
}
|
||||
|
||||
}} // namespace detail::cass
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Cassini projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Cylindrical
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Example
|
||||
\image html ex_cass.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct cass_ellipsoid : public detail::cass::base_cass_ellipsoid<Geographic, Cartesian, Parameters>
|
||||
{
|
||||
inline cass_ellipsoid(const Parameters& par) : detail::cass::base_cass_ellipsoid<Geographic, Cartesian, Parameters>(par)
|
||||
{
|
||||
detail::cass::setup_cass(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Cassini projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Cylindrical
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Example
|
||||
\image html ex_cass.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct cass_spheroid : public detail::cass::base_cass_spheroid<Geographic, Cartesian, Parameters>
|
||||
{
|
||||
inline cass_spheroid(const Parameters& par) : detail::cass::base_cass_spheroid<Geographic, Cartesian, Parameters>(par)
|
||||
{
|
||||
detail::cass::setup_cass(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Factory entry(s)
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
class cass_entry : public detail::factory_entry<Geographic, Cartesian, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual projection<Geographic, Cartesian>* create_new(const Parameters& par) const
|
||||
{
|
||||
if (par.es)
|
||||
return new base_v_fi<cass_ellipsoid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
else
|
||||
return new base_v_fi<cass_spheroid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
inline void cass_init(detail::base_factory<Geographic, Cartesian, Parameters>& factory)
|
||||
{
|
||||
factory.add_to_factory("cass", new cass_entry<Geographic, Cartesian, Parameters>);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
// Create EPSG specializations
|
||||
// (Proof of Concept, only for some)
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<2066, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef cass_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=cass +lat_0=11.25217861111111 +lon_0=-60.68600888888889 +x_0=37718.66159325 +y_0=36209.91512952 +a=6378293.645208759 +b=6356617.987679838 +to_meter=0.201166195164";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<2099, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef cass_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=cass +lat_0=25.38236111111111 +lon_0=50.76138888888889 +x_0=100000 +y_0=100000 +ellps=helmert +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<2314, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef cass_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=cass +lat_0=10.44166666666667 +lon_0=-61.33333333333334 +x_0=86501.46392052001 +y_0=65379.0134283 +a=6378293.645208759 +b=6356617.987679838 +to_meter=0.3047972654";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3068, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef cass_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=cass +lat_0=52.41864827777778 +lon_0=13.62720366666667 +x_0=40000 +y_0=10000 +ellps=bessel +datum=potsdam +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3140, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef cass_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=cass +lat_0=-18 +lon_0=178 +x_0=109435.392 +y_0=141622.272 +a=6378306.3696 +b=6356571.996 +towgs84=51,391,-36,0,0,0,0 +to_meter=0.201168";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3366, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef cass_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=cass +lat_0=22.31213333333334 +lon_0=114.1785555555556 +x_0=40243.57775604237 +y_0=19069.93351512578 +a=6378293.645208759 +b=6356617.987679838 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3377, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef cass_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=cass +lat_0=2.121679744444445 +lon_0=103.4279362361111 +x_0=-14810.562 +y_0=8758.32 +ellps=GRS80 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3378, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef cass_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=cass +lat_0=2.682347636111111 +lon_0=101.9749050416667 +x_0=3673.785 +y_0=-4240.573 +ellps=GRS80 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3379, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef cass_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=cass +lat_0=3.769388088888889 +lon_0=102.3682989833333 +x_0=-7368.228 +y_0=6485.858 +ellps=GRS80 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3380, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef cass_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=cass +lat_0=3.68464905 +lon_0=101.3891079138889 +x_0=-34836.161 +y_0=56464.049 +ellps=GRS80 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3381, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef cass_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=cass +lat_0=4.9762852 +lon_0=103.070275625 +x_0=19594.245 +y_0=3371.895 +ellps=GRS80 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3382, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef cass_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=cass +lat_0=5.421517541666667 +lon_0=100.3443769638889 +x_0=-23.414 +y_0=62.283 +ellps=GRS80 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3383, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef cass_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=cass +lat_0=5.964672713888889 +lon_0=100.6363711111111 +x_0=0 +y_0=0 +ellps=GRS80 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3384, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef cass_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=cass +lat_0=4.859063022222222 +lon_0=100.8154105861111 +x_0=-1.769 +y_0=133454.779 +ellps=GRS80 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3385, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef cass_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=cass +lat_0=5.972543658333334 +lon_0=102.2952416694444 +x_0=13227.851 +y_0=8739.894 +ellps=GRS80 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3407, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef cass_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=cass +lat_0=22.31213333333334 +lon_0=114.1785555555556 +x_0=40243.57775604237 +y_0=19069.93351512578 +a=6378293.645208759 +b=6356617.987679838 +to_meter=0.3047972654";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<24500, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef cass_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=cass +lat_0=1.287646666666667 +lon_0=103.8530022222222 +x_0=30000 +y_0=30000 +a=6377304.063 +b=6356103.038993155 +towgs84=-11,851,5,0,0,0,0 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<28191, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef cass_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=cass +lat_0=31.73409694444445 +lon_0=35.21208055555556 +x_0=170251.555 +y_0=126867.909 +a=6378300.789 +b=6356566.435 +towgs84=-275.722,94.7824,340.894,-8.001,-4.42,-11.821,1 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<28193, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef cass_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=cass +lat_0=31.73409694444445 +lon_0=35.21208055555556 +x_0=170251.555 +y_0=1126867.909 +a=6378300.789 +b=6356566.435 +towgs84=-275.722,94.7824,340.894,-8.001,-4.42,-11.821,1 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<30200, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef cass_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=cass +lat_0=10.44166666666667 +lon_0=-61.33333333333334 +x_0=86501.46392051999 +y_0=65379.0134283 +a=6378293.645208759 +b=6356617.987679838 +to_meter=0.201166195164";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif // doxygen
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_CASS_HPP
|
||||
|
||||
@@ -1,355 +0,0 @@
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_OB_TRAN_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_OB_TRAN_HPP
|
||||
|
||||
// Boost.Geometry - extensions-gis-projections (based on PROJ4)
|
||||
// This file is automatically generated. DO NOT EDIT.
|
||||
|
||||
// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// This file is converted from PROJ4, http://trac.osgeo.org/proj
|
||||
// PROJ4 is originally written by Gerald Evenden (then of the USGS)
|
||||
// PROJ4 is maintained by Frank Warmerdam
|
||||
// PROJ4 is converted to Boost.Geometry by Barend Gehrels
|
||||
|
||||
// Last updated version of proj: 4.9.1
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/aasincos.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters> class factory;
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace ob_tran
|
||||
{
|
||||
|
||||
static const double TOL = 1e-10;
|
||||
|
||||
template <typename Geographic, typename Cartesian>
|
||||
struct par_ob_tran
|
||||
{
|
||||
boost::shared_ptr<projection<Geographic, Cartesian> > link;
|
||||
double lamp;
|
||||
double cphip, sphip;
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_ob_tran_oblique : public base_t_fi<base_ob_tran_oblique<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
|
||||
par_ob_tran<Geographic, Cartesian> m_proj_parm;
|
||||
|
||||
inline base_ob_tran_oblique(const Parameters& par)
|
||||
: base_t_fi<base_ob_tran_oblique<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(o_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
double coslam, sinphi, cosphi;
|
||||
|
||||
|
||||
coslam = cos(lp_lon);
|
||||
sinphi = sin(lp_lat);
|
||||
cosphi = cos(lp_lat);
|
||||
lp_lon = adjlon(aatan2(cosphi * sin(lp_lon), this->m_proj_parm.sphip * cosphi * coslam +
|
||||
this->m_proj_parm.cphip * sinphi) + this->m_proj_parm.lamp);
|
||||
lp_lat = aasin(this->m_proj_parm.sphip * sinphi - this->m_proj_parm.cphip * cosphi * coslam);
|
||||
m_proj_parm.link->fwd(lp_lon, lp_lat, xy_x, xy_y);
|
||||
}
|
||||
|
||||
// INVERSE(o_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const
|
||||
{
|
||||
double coslam, sinphi, cosphi;
|
||||
|
||||
m_proj_parm.link->inv(xy_x, xy_y, lp_lon, lp_lat);
|
||||
if (lp_lon != HUGE_VAL) {
|
||||
coslam = cos(lp_lon -= this->m_proj_parm.lamp);
|
||||
sinphi = sin(lp_lat);
|
||||
cosphi = cos(lp_lat);
|
||||
lp_lat = aasin(this->m_proj_parm.sphip * sinphi + this->m_proj_parm.cphip * cosphi * coslam);
|
||||
lp_lon = aatan2(cosphi * sin(lp_lon), this->m_proj_parm.sphip * cosphi * coslam -
|
||||
this->m_proj_parm.cphip * sinphi);
|
||||
}
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "ob_tran_oblique";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_ob_tran_transverse : public base_t_fi<base_ob_tran_transverse<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
|
||||
par_ob_tran<Geographic, Cartesian> m_proj_parm;
|
||||
|
||||
inline base_ob_tran_transverse(const Parameters& par)
|
||||
: base_t_fi<base_ob_tran_transverse<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(t_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
double cosphi, coslam;
|
||||
|
||||
|
||||
cosphi = cos(lp_lat);
|
||||
coslam = cos(lp_lon);
|
||||
lp_lon = adjlon(aatan2(cosphi * sin(lp_lon), sin(lp_lat)) + this->m_proj_parm.lamp);
|
||||
lp_lat = aasin(- cosphi * coslam);
|
||||
m_proj_parm.link->fwd(lp_lon, lp_lat, xy_x, xy_y);
|
||||
}
|
||||
|
||||
// INVERSE(t_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const
|
||||
{
|
||||
double cosphi, t;
|
||||
|
||||
m_proj_parm.link->inv(xy_x, xy_y, lp_lon, lp_lat);
|
||||
if (lp_lon != HUGE_VAL) {
|
||||
cosphi = cos(lp_lat);
|
||||
t = lp_lon - this->m_proj_parm.lamp;
|
||||
lp_lon = aatan2(cosphi * sin(t), - sin(lp_lat));
|
||||
lp_lat = aasin(cosphi * cos(t));
|
||||
}
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "ob_tran_transverse";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// General Oblique Transformation
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
double setup_ob_tran(Parameters& par, par_ob_tran<Geographic, Cartesian>& proj_parm, bool create = true)
|
||||
{
|
||||
double phip;
|
||||
Parameters pj;
|
||||
|
||||
/* get name of projection to be translated */
|
||||
pj.name = pj_param(par.params, "so_proj").s;
|
||||
/* copy existing header into new */
|
||||
par.es = 0.; /* force to spherical */
|
||||
pj.params = par.params;
|
||||
pj.over = par.over;
|
||||
pj.geoc = par.geoc;
|
||||
pj.a = par.a;
|
||||
pj.es = par.es;
|
||||
pj.ra = par.ra;
|
||||
pj.lam0 = par.lam0;
|
||||
pj.phi0 = par.phi0;
|
||||
pj.x0 = par.x0;
|
||||
pj.y0 = par.y0;
|
||||
pj.k0 = par.k0;
|
||||
/* force spherical earth */
|
||||
pj.one_es = pj.rone_es = 1.;
|
||||
pj.es = pj.e = 0.;
|
||||
|
||||
if (create)
|
||||
{
|
||||
factory<Geographic, Cartesian, Parameters> fac;
|
||||
proj_parm.link.reset(fac.create_new(pj));
|
||||
if (! proj_parm.link.get()) throw proj_exception(-26);
|
||||
}
|
||||
if (pj_param(par.params, "to_alpha").i) {
|
||||
double lamc, phic, alpha;
|
||||
|
||||
lamc = pj_param(par.params, "ro_lon_c").f;
|
||||
phic = pj_param(par.params, "ro_lat_c").f;
|
||||
alpha = pj_param(par.params, "ro_alpha").f;
|
||||
/*
|
||||
if (fabs(phic) <= TOL ||
|
||||
fabs(fabs(phic) - geometry::math::half_pi<double>()) <= TOL ||
|
||||
fabs(fabs(alpha) - geometry::math::half_pi<double>()) <= TOL)
|
||||
*/
|
||||
if (fabs(fabs(phic) - geometry::math::half_pi<double>()) <= TOL)
|
||||
throw proj_exception(-32);
|
||||
proj_parm.lamp = lamc + aatan2(-cos(alpha), -sin(alpha) * sin(phic));
|
||||
phip = aasin(cos(phic) * sin(alpha));
|
||||
} else if (pj_param(par.params, "to_lat_p").i) { /* specified new pole */
|
||||
proj_parm.lamp = pj_param(par.params, "ro_lon_p").f;
|
||||
phip = pj_param(par.params, "ro_lat_p").f;
|
||||
} else { /* specified new "equator" points */
|
||||
double lam1, lam2, phi1, phi2, con;
|
||||
|
||||
lam1 = pj_param(par.params, "ro_lon_1").f;
|
||||
phi1 = pj_param(par.params, "ro_lat_1").f;
|
||||
lam2 = pj_param(par.params, "ro_lon_2").f;
|
||||
phi2 = pj_param(par.params, "ro_lat_2").f;
|
||||
if (fabs(phi1 - phi2) <= TOL ||
|
||||
(con = fabs(phi1)) <= TOL ||
|
||||
fabs(con - geometry::math::half_pi<double>()) <= TOL ||
|
||||
fabs(fabs(phi2) - geometry::math::half_pi<double>()) <= TOL) throw proj_exception(-33);
|
||||
proj_parm.lamp = atan2(cos(phi1) * sin(phi2) * cos(lam1) -
|
||||
sin(phi1) * cos(phi2) * cos(lam2),
|
||||
sin(phi1) * cos(phi2) * sin(lam2) -
|
||||
cos(phi1) * sin(phi2) * sin(lam1));
|
||||
phip = atan(-cos(proj_parm.lamp - lam1) / tan(phi1));
|
||||
}
|
||||
if (fabs(phip) > TOL) { /* oblique */
|
||||
proj_parm.cphip = cos(phip);
|
||||
proj_parm.sphip = sin(phip);
|
||||
} else { /* transverse */
|
||||
}
|
||||
// return phip to choose model
|
||||
return phip;
|
||||
}
|
||||
|
||||
}} // namespace detail::ob_tran
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief General Oblique Transformation projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Miscellaneous
|
||||
- Spheroid
|
||||
\par Projection parameters
|
||||
- o_proj (string)
|
||||
- Plus projection parameters
|
||||
- o_lat_p (degrees)
|
||||
- o_lon_p (degrees)
|
||||
- New pole
|
||||
- o_alpha: Alpha (degrees)
|
||||
- o_lon_c (degrees)
|
||||
- o_lat_c (degrees)
|
||||
- o_lon_1 (degrees)
|
||||
- o_lat_1: Latitude of first standard parallel (degrees)
|
||||
- o_lon_2 (degrees)
|
||||
- o_lat_2: Latitude of second standard parallel (degrees)
|
||||
\par Example
|
||||
\image html ex_ob_tran.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct ob_tran_oblique : public detail::ob_tran::base_ob_tran_oblique<Geographic, Cartesian, Parameters>
|
||||
{
|
||||
inline ob_tran_oblique(const Parameters& par) : detail::ob_tran::base_ob_tran_oblique<Geographic, Cartesian, Parameters>(par)
|
||||
{
|
||||
detail::ob_tran::setup_ob_tran(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief General Oblique Transformation projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Miscellaneous
|
||||
- Spheroid
|
||||
\par Projection parameters
|
||||
- o_proj (string)
|
||||
- Plus projection parameters
|
||||
- o_lat_p (degrees)
|
||||
- o_lon_p (degrees)
|
||||
- New pole
|
||||
- o_alpha: Alpha (degrees)
|
||||
- o_lon_c (degrees)
|
||||
- o_lat_c (degrees)
|
||||
- o_lon_1 (degrees)
|
||||
- o_lat_1: Latitude of first standard parallel (degrees)
|
||||
- o_lon_2 (degrees)
|
||||
- o_lat_2: Latitude of second standard parallel (degrees)
|
||||
\par Example
|
||||
\image html ex_ob_tran.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct ob_tran_transverse : public detail::ob_tran::base_ob_tran_transverse<Geographic, Cartesian, Parameters>
|
||||
{
|
||||
inline ob_tran_transverse(const Parameters& par) : detail::ob_tran::base_ob_tran_transverse<Geographic, Cartesian, Parameters>(par)
|
||||
{
|
||||
detail::ob_tran::setup_ob_tran(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Factory entry(s)
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
class ob_tran_entry : public detail::factory_entry<Geographic, Cartesian, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual projection<Geographic, Cartesian>* create_new(const Parameters& par) const
|
||||
{
|
||||
detail::ob_tran::par_ob_tran<Geographic, Cartesian> proj_parm;
|
||||
Parameters p = par;
|
||||
double phip = setup_ob_tran(p, proj_parm, false);
|
||||
|
||||
if (fabs(phip) > detail::ob_tran::TOL)
|
||||
return new base_v_fi<ob_tran_oblique<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
else
|
||||
return new base_v_fi<ob_tran_transverse<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
inline void ob_tran_init(detail::base_factory<Geographic, Cartesian, Parameters>& factory)
|
||||
{
|
||||
factory.add_to_factory("ob_tran", new ob_tran_entry<Geographic, Cartesian, Parameters>);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_OB_TRAN_HPP
|
||||
|
||||
@@ -1,256 +0,0 @@
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_ROBIN_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_ROBIN_HPP
|
||||
|
||||
// Boost.Geometry - extensions-gis-projections (based on PROJ4)
|
||||
// This file is automatically generated. DO NOT EDIT.
|
||||
|
||||
// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// This file is converted from PROJ4, http://trac.osgeo.org/proj
|
||||
// PROJ4 is originally written by Gerald Evenden (then of the USGS)
|
||||
// PROJ4 is maintained by Frank Warmerdam
|
||||
// PROJ4 is converted to Boost.Geometry by Barend Gehrels
|
||||
|
||||
// Last updated version of proj: 4.9.1
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/function_overloads.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace robin
|
||||
{
|
||||
|
||||
static const double FXC = 0.8487;
|
||||
static const double FYC = 1.3523;
|
||||
static const double C1 = 11.45915590261646417544;
|
||||
static const double RC1 = 0.08726646259971647884;
|
||||
static const int NODES = 18;
|
||||
static const double ONEEPS = 1.000001;
|
||||
static const double EPS = 1e-8;
|
||||
|
||||
/*
|
||||
note: following terms based upon 5 deg. intervals in degrees.
|
||||
|
||||
Some background on these coefficients is available at:
|
||||
|
||||
http://article.gmane.org/gmane.comp.gis.proj-4.devel/6039
|
||||
http://trac.osgeo.org/proj/ticket/113
|
||||
*/
|
||||
|
||||
struct COEFS {
|
||||
double c0, c1, c2, c3;
|
||||
};
|
||||
|
||||
static const struct COEFS X[] = {
|
||||
{1, 2.2199e-17, -7.15515e-05, 3.1103e-06},
|
||||
{0.9986, -0.000482243, -2.4897e-05, -1.3309e-06},
|
||||
{0.9954, -0.00083103, -4.48605e-05, -9.86701e-07},
|
||||
{0.99, -0.00135364, -5.9661e-05, 3.6777e-06},
|
||||
{0.9822, -0.00167442, -4.49547e-06, -5.72411e-06},
|
||||
{0.973, -0.00214868, -9.03571e-05, 1.8736e-08},
|
||||
{0.96, -0.00305085, -9.00761e-05, 1.64917e-06},
|
||||
{0.9427, -0.00382792, -6.53386e-05, -2.6154e-06},
|
||||
{0.9216, -0.00467746, -0.00010457, 4.81243e-06},
|
||||
{0.8962, -0.00536223, -3.23831e-05, -5.43432e-06},
|
||||
{0.8679, -0.00609363, -0.000113898, 3.32484e-06},
|
||||
{0.835, -0.00698325, -6.40253e-05, 9.34959e-07},
|
||||
{0.7986, -0.00755338, -5.00009e-05, 9.35324e-07},
|
||||
{0.7597, -0.00798324, -3.5971e-05, -2.27626e-06},
|
||||
{0.7186, -0.00851367, -7.01149e-05, -8.6303e-06},
|
||||
{0.6732, -0.00986209, -0.000199569, 1.91974e-05},
|
||||
{0.6213, -0.010418, 8.83923e-05, 6.24051e-06},
|
||||
{0.5722, -0.00906601, 0.000182, 6.24051e-06},
|
||||
{0.5322, -0.00677797, 0.000275608, 6.24051e-06}
|
||||
};
|
||||
static const struct COEFS Y[] = {
|
||||
{-5.20417e-18, 0.0124, 1.21431e-18, -8.45284e-11},
|
||||
{0.062, 0.0124, -1.26793e-09, 4.22642e-10},
|
||||
{0.124, 0.0124, 5.07171e-09, -1.60604e-09},
|
||||
{0.186, 0.0123999, -1.90189e-08, 6.00152e-09},
|
||||
{0.248, 0.0124002, 7.10039e-08, -2.24e-08},
|
||||
{0.31, 0.0123992, -2.64997e-07, 8.35986e-08},
|
||||
{0.372, 0.0124029, 9.88983e-07, -3.11994e-07},
|
||||
{0.434, 0.0123893, -3.69093e-06, -4.35621e-07},
|
||||
{0.4958, 0.0123198, -1.02252e-05, -3.45523e-07},
|
||||
{0.5571, 0.0121916, -1.54081e-05, -5.82288e-07},
|
||||
{0.6176, 0.0119938, -2.41424e-05, -5.25327e-07},
|
||||
{0.6769, 0.011713, -3.20223e-05, -5.16405e-07},
|
||||
{0.7346, 0.0113541, -3.97684e-05, -6.09052e-07},
|
||||
{0.7903, 0.0109107, -4.89042e-05, -1.04739e-06},
|
||||
{0.8435, 0.0103431, -6.4615e-05, -1.40374e-09},
|
||||
{0.8936, 0.00969686, -6.4636e-05, -8.547e-06},
|
||||
{0.9394, 0.00840947, -0.000192841, -4.2106e-06},
|
||||
{0.9761, 0.00616527, -0.000256, -4.2106e-06},
|
||||
{1, 0.00328947, -0.000319159, -4.2106e-06}
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_robin_spheroid : public base_t_fi<base_robin_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
|
||||
|
||||
inline base_robin_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_robin_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
|
||||
inline double V(COEFS const& C, double z) const
|
||||
{ return (C.c0 + z * (C.c1 + z * (C.c2 + z * C.c3))); }
|
||||
inline double DV(COEFS const& C, double z) const
|
||||
{ return (C.c1 + z * (C.c2 + C.c2 + z * 3. * C.c3)); }
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
int i;
|
||||
double dphi;
|
||||
|
||||
i = int_floor((dphi = fabs(lp_lat)) * C1);
|
||||
if (i >= NODES) i = NODES - 1;
|
||||
dphi = geometry::math::r2d<double>() * (dphi - RC1 * i);
|
||||
xy_x = V(X[i], dphi) * FXC * lp_lon;
|
||||
xy_y = V(Y[i], dphi) * FYC;
|
||||
if (lp_lat < 0.) xy_y = -xy_y;
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const
|
||||
{
|
||||
int i;
|
||||
double t, t1;
|
||||
struct COEFS T;
|
||||
|
||||
lp_lon = xy_x / FXC;
|
||||
lp_lat = fabs(xy_y / FYC);
|
||||
if (lp_lat >= 1.) { /* simple pathologic cases */
|
||||
if (lp_lat > ONEEPS) throw proj_exception();
|
||||
else {
|
||||
lp_lat = xy_y < 0. ? -geometry::math::half_pi<double>() : geometry::math::half_pi<double>();
|
||||
lp_lon /= X[NODES].c0;
|
||||
}
|
||||
} else { /* general problem */
|
||||
/* in Y space, reduce to table interval */
|
||||
for (i = int_floor(lp_lat * NODES);;) {
|
||||
if (Y[i].c0 > lp_lat) --i;
|
||||
else if (Y[i+1].c0 <= lp_lat) ++i;
|
||||
else break;
|
||||
}
|
||||
T = Y[i];
|
||||
/* first guess, linear interp */
|
||||
t = 5. * (lp_lat - T.c0)/(Y[i+1].c0 - T.c0);
|
||||
/* make into root */
|
||||
T.c0 -= lp_lat;
|
||||
for (;;) { /* Newton-Raphson reduction */
|
||||
t -= t1 = V(T,t) / DV(T,t);
|
||||
if (fabs(t1) < EPS)
|
||||
break;
|
||||
}
|
||||
lp_lat = (5 * i + t) * geometry::math::d2r<double>();
|
||||
if (xy_y < 0.) lp_lat = -lp_lat;
|
||||
lp_lon /= V(X[i], t);
|
||||
}
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "robin_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Robinson
|
||||
template <typename Parameters>
|
||||
void setup_robin(Parameters& par)
|
||||
{
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::robin
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Robinson projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Pseudocylindrical
|
||||
- Spheroid
|
||||
\par Example
|
||||
\image html ex_robin.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct robin_spheroid : public detail::robin::base_robin_spheroid<Geographic, Cartesian, Parameters>
|
||||
{
|
||||
inline robin_spheroid(const Parameters& par) : detail::robin::base_robin_spheroid<Geographic, Cartesian, Parameters>(par)
|
||||
{
|
||||
detail::robin::setup_robin(this->m_par);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Factory entry(s)
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
class robin_entry : public detail::factory_entry<Geographic, Cartesian, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual projection<Geographic, Cartesian>* create_new(const Parameters& par) const
|
||||
{
|
||||
return new base_v_fi<robin_spheroid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
inline void robin_init(detail::base_factory<Geographic, Cartesian, Parameters>& factory)
|
||||
{
|
||||
factory.add_to_factory("robin", new robin_entry<Geographic, Cartesian, Parameters>);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_ROBIN_HPP
|
||||
|
||||
@@ -1,393 +0,0 @@
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_STEREA_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_STEREA_HPP
|
||||
|
||||
// Boost.Geometry - extensions-gis-projections (based on PROJ4)
|
||||
// This file is automatically generated. DO NOT EDIT.
|
||||
|
||||
// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// This file is converted from PROJ4, http://trac.osgeo.org/proj
|
||||
// PROJ4 is originally written by Gerald Evenden (then of the USGS)
|
||||
// PROJ4 is maintained by Frank Warmerdam
|
||||
// PROJ4 is converted to Boost.Geometry by Barend Gehrels
|
||||
|
||||
// Last updated version of proj: 4.9.1
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
// Copyright (c) 2003 Gerald I. Evenden
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#include <boost/math/special_functions/hypot.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/pj_gauss.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/epsg_traits.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace sterea
|
||||
{
|
||||
|
||||
static const double DEL_TOL = 1.e-14;
|
||||
static const int MAX_ITER = 10;
|
||||
|
||||
struct par_sterea
|
||||
{
|
||||
double phic0;
|
||||
double cosc0, sinc0;
|
||||
double R2;
|
||||
gauss::GAUSS en;
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_sterea_ellipsoid : public base_t_fi<base_sterea_ellipsoid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
|
||||
par_sterea m_proj_parm;
|
||||
|
||||
inline base_sterea_ellipsoid(const Parameters& par)
|
||||
: base_t_fi<base_sterea_ellipsoid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(e_forward) ellipsoid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
double cosc, sinc, cosl_, k;
|
||||
|
||||
detail::gauss::gauss(m_proj_parm.en, lp_lon, lp_lat);
|
||||
sinc = sin(lp_lat);
|
||||
cosc = cos(lp_lat);
|
||||
cosl_ = cos(lp_lon);
|
||||
k = this->m_par.k0 * this->m_proj_parm.R2 / (1. + this->m_proj_parm.sinc0 * sinc + this->m_proj_parm.cosc0 * cosc * cosl_);
|
||||
xy_x = k * cosc * sin(lp_lon);
|
||||
xy_y = k * (this->m_proj_parm.cosc0 * sinc - this->m_proj_parm.sinc0 * cosc * cosl_);
|
||||
}
|
||||
|
||||
// INVERSE(e_inverse) ellipsoid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const
|
||||
{
|
||||
double rho, c, sinc, cosc;
|
||||
|
||||
xy_x /= this->m_par.k0;
|
||||
xy_y /= this->m_par.k0;
|
||||
if((rho = boost::math::hypot(xy_x, xy_y))) {
|
||||
c = 2. * atan2(rho, this->m_proj_parm.R2);
|
||||
sinc = sin(c);
|
||||
cosc = cos(c);
|
||||
lp_lat = asin(cosc * this->m_proj_parm.sinc0 + xy_y * sinc * this->m_proj_parm.cosc0 / rho);
|
||||
lp_lon = atan2(xy_x * sinc, rho * this->m_proj_parm.cosc0 * cosc -
|
||||
xy_y * this->m_proj_parm.sinc0 * sinc);
|
||||
} else {
|
||||
lp_lat = this->m_proj_parm.phic0;
|
||||
lp_lon = 0.;
|
||||
}
|
||||
detail::gauss::inv_gauss(m_proj_parm.en, lp_lon, lp_lat);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "sterea_ellipsoid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Oblique Stereographic Alternative
|
||||
template <typename Parameters>
|
||||
void setup_sterea(Parameters& par, par_sterea& proj_parm)
|
||||
{
|
||||
double R;
|
||||
|
||||
proj_parm.en = detail::gauss::gauss_ini(par.e, par.phi0, proj_parm.phic0, R);
|
||||
proj_parm.sinc0 = sin(proj_parm.phic0);
|
||||
proj_parm.cosc0 = cos(proj_parm.phic0);
|
||||
proj_parm.R2 = 2. * R;
|
||||
}
|
||||
|
||||
}} // namespace detail::sterea
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Oblique Stereographic Alternative projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Azimuthal
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Example
|
||||
\image html ex_sterea.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct sterea_ellipsoid : public detail::sterea::base_sterea_ellipsoid<Geographic, Cartesian, Parameters>
|
||||
{
|
||||
inline sterea_ellipsoid(const Parameters& par) : detail::sterea::base_sterea_ellipsoid<Geographic, Cartesian, Parameters>(par)
|
||||
{
|
||||
detail::sterea::setup_sterea(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Factory entry(s)
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
class sterea_entry : public detail::factory_entry<Geographic, Cartesian, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual projection<Geographic, Cartesian>* create_new(const Parameters& par) const
|
||||
{
|
||||
return new base_v_fi<sterea_ellipsoid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
inline void sterea_init(detail::base_factory<Geographic, Cartesian, Parameters>& factory)
|
||||
{
|
||||
factory.add_to_factory("sterea", new sterea_entry<Geographic, Cartesian, Parameters>);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
// Create EPSG specializations
|
||||
// (Proof of Concept, only for some)
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<2036, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef sterea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=sterea +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=2500000 +y_0=7500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<2171, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef sterea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=sterea +lat_0=50.625 +lon_0=21.08333333333333 +k=0.9998 +x_0=4637000 +y_0=5647000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<2172, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef sterea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=sterea +lat_0=53.00194444444445 +lon_0=21.50277777777778 +k=0.9998 +x_0=4603000 +y_0=5806000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<2173, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef sterea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=sterea +lat_0=53.58333333333334 +lon_0=17.00833333333333 +k=0.9998 +x_0=3501000 +y_0=5999000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<2174, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef sterea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=sterea +lat_0=51.67083333333333 +lon_0=16.67222222222222 +k=0.9998 +x_0=3703000 +y_0=5627000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<2200, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef sterea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=sterea +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=300000 +y_0=800000 +a=6378135 +b=6356750.304921594 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<2290, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef sterea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=sterea +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=700000 +y_0=400000 +a=6378135 +b=6356750.304921594 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<2291, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef sterea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=sterea +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=400000 +y_0=800000 +a=6378135 +b=6356750.304921594 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<2292, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef sterea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=sterea +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<2953, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef sterea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=sterea +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=2500000 +y_0=7500000 +ellps=GRS80 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<2954, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef sterea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=sterea +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=400000 +y_0=800000 +ellps=GRS80 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3120, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef sterea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=sterea +lat_0=50.625 +lon_0=21.08333333333333 +k=0.9998 +x_0=4637000 +y_0=5467000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<3328, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef sterea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=sterea +lat_0=52.16666666666666 +lon_0=19.16666666666667 +k=0.999714 +x_0=500000 +y_0=500000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<22780, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef sterea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=sterea +lat_0=34.2 +lon_0=39.15 +k=0.9995341 +x_0=0 +y_0=0 +a=6378249.2 +b=6356515 +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<28991, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef sterea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=0 +y_0=0 +ellps=bessel +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<28992, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef sterea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<31600, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef sterea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=sterea +lat_0=45.9 +lon_0=25.39246588888889 +k=0.9996667 +x_0=500000 +y_0=500000 +ellps=intl +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<typename LatLongRadian, typename Cartesian, typename Parameters>
|
||||
struct epsg_traits<31700, LatLongRadian, Cartesian, Parameters>
|
||||
{
|
||||
typedef sterea_ellipsoid<LatLongRadian, Cartesian, Parameters> type;
|
||||
static inline std::string par()
|
||||
{
|
||||
return "+proj=sterea +lat_0=46 +lon_0=25 +k=0.99975 +x_0=500000 +y_0=500000 +ellps=krass +units=m";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif // doxygen
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_STEREA_HPP
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_STRATEGY_PROJECT_INVERSE_TRANSFORMER_HPP
|
||||
#define BOOST_GEOMETRY_STRATEGY_PROJECT_INVERSE_TRANSFORMER_HPP
|
||||
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <boost/geometry/core/coordinate_dimension.hpp>
|
||||
#include <boost/geometry/algorithms/convert.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/factory.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/parameters.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
|
||||
/*!
|
||||
\brief Transformation strategy to do transform using a Map Projection
|
||||
\ingroup transform
|
||||
\tparam Cartesian first point type
|
||||
\tparam LatLong second point type
|
||||
*/
|
||||
template <typename Cartesian, typename LatLong>
|
||||
struct project_inverse_transformer
|
||||
{
|
||||
typedef boost::shared_ptr<projection<LatLong, Cartesian> > projection_ptr;
|
||||
|
||||
projection_ptr m_prj;
|
||||
|
||||
/// Constructor using a shared-pointer-to-projection_ptr
|
||||
inline project_inverse_transformer(projection_ptr& prj)
|
||||
: m_prj(prj)
|
||||
{}
|
||||
|
||||
/// Constructor using a string
|
||||
inline project_inverse_transformer(std::string const& par)
|
||||
{
|
||||
factory<LatLong, Cartesian, parameters> fac;
|
||||
m_prj.reset(fac.create_new(init(par)));
|
||||
}
|
||||
|
||||
/// Constructor using Parameters
|
||||
template <typename Parameters>
|
||||
inline project_inverse_transformer(Parameters const& par)
|
||||
{
|
||||
factory<LatLong, Cartesian, Parameters> fac;
|
||||
m_prj.reset(fac.create_new(par));
|
||||
}
|
||||
|
||||
/// Transform operator
|
||||
inline bool apply(Cartesian const& p1, LatLong& p2) const
|
||||
{
|
||||
// Latlong (LL -> XY) will be projected, rest will be copied.
|
||||
// So first copy third or higher dimensions
|
||||
geometry::detail::conversion::point_to_point<Cartesian, LatLong, 2,
|
||||
geometry::dimension<Cartesian>::value> ::apply(p1, p2);
|
||||
return m_prj->inverse(p1, p2);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_STRATEGY_PROJECT_INVERSE_TRANSFORMER_HPP
|
||||
@@ -1,65 +0,0 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_STRATEGY_PROJECT_TRANSFORMER_HPP
|
||||
#define BOOST_GEOMETRY_STRATEGY_PROJECT_TRANSFORMER_HPP
|
||||
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <boost/geometry/core/coordinate_dimension.hpp>
|
||||
#include <boost/geometry/algorithms/detail/convert_point_to_point.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/factory.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/parameters.hpp>
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
/*!
|
||||
\brief Transformation strategy to do transform using a Map Projection
|
||||
\ingroup transform
|
||||
\tparam LatLong first point type
|
||||
\tparam Cartesian second point type
|
||||
|
||||
See also \link p03_projmap_example.cpp the projmap example \endlink
|
||||
where this last one plus a transformation using a projection are used.
|
||||
|
||||
*/
|
||||
template <typename LatLong, typename Cartesian>
|
||||
struct project_transformer
|
||||
{
|
||||
typedef boost::shared_ptr<projection<LatLong, Cartesian> > projection_ptr;
|
||||
|
||||
projection_ptr m_prj;
|
||||
|
||||
inline project_transformer(projection_ptr& prj)
|
||||
: m_prj(prj)
|
||||
{}
|
||||
|
||||
inline project_transformer(std::string const& par)
|
||||
{
|
||||
factory<LatLong, Cartesian, parameters> fac;
|
||||
m_prj.reset(fac.create_new(init(par)));
|
||||
}
|
||||
|
||||
inline bool apply(LatLong const& p1, Cartesian& p2) const
|
||||
{
|
||||
// Latlong (LatLong -> Cartesian) will be projected, rest will be copied.
|
||||
// So first copy third or higher dimensions
|
||||
geometry::detail::conversion::point_to_point<LatLong, Cartesian, 2,
|
||||
geometry::dimension<Cartesian>::value> ::apply(p1, p2);
|
||||
return m_prj->forward(p1, p2);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_STRATEGY_PROJECT_TRANSFORMER_HPP
|
||||
@@ -1,72 +0,0 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_PROJECTION_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_PROJECTION_HPP
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
/*!
|
||||
\brief projection virtual base class
|
||||
\details class containing virtual methods
|
||||
\ingroup projection
|
||||
\tparam LL latlong point type
|
||||
\tparam XY xy point type
|
||||
*/
|
||||
|
||||
template <typename LL, typename XY>
|
||||
class projection
|
||||
{
|
||||
protected :
|
||||
// see comment above
|
||||
//typedef typename geometry::coordinate_type<LL>::type LL_T;
|
||||
//typedef typename geometry::coordinate_type<XY>::type XY_T;
|
||||
typedef double LL_T;
|
||||
typedef double XY_T;
|
||||
|
||||
public :
|
||||
|
||||
typedef LL geographic_point_type; ///< latlong point type
|
||||
typedef XY cartesian_point_type; ///< xy point type
|
||||
|
||||
/// Forward projection, from Latitude-Longitude to Cartesian
|
||||
virtual bool forward(LL const& lp, XY& xy) const = 0;
|
||||
|
||||
/// Inverse projection, from Cartesian to Latitude-Longitude
|
||||
virtual bool inverse(XY const& xy, LL& lp) const = 0;
|
||||
|
||||
/// Forward projection using lon / lat and x / y separately
|
||||
virtual void fwd(LL_T& lp_lon, LL_T& lp_lat, XY_T& xy_x, XY_T& xy_y) const = 0;
|
||||
|
||||
/// Inverse projection using x / y and lon / lat
|
||||
virtual void inv(XY_T& xy_x, XY_T& xy_y, LL_T& lp_lon, LL_T& lp_lat) const = 0;
|
||||
|
||||
/// Returns name of projection
|
||||
virtual std::string name() const = 0;
|
||||
|
||||
/// Returns parameters of projection
|
||||
virtual parameters const& params() const = 0;
|
||||
|
||||
/// Returns mutable parameters of projection
|
||||
virtual parameters& mutable_params() = 0;
|
||||
|
||||
virtual ~projection() {}
|
||||
|
||||
};
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2012 Krzysztof Czainski
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_PROJECTION_POINT_TYPE_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_PROJECTION_POINT_TYPE_HPP
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template <typename Projection, typename CoordinateSystemTag>
|
||||
struct projection_point_type
|
||||
{};
|
||||
|
||||
template <typename Projection>
|
||||
struct projection_point_type<Projection, cartesian_tag>
|
||||
{
|
||||
typedef typename Projection::cartesian_point_type type;
|
||||
};
|
||||
|
||||
template <typename Projection>
|
||||
struct projection_point_type<Projection, geographic_tag>
|
||||
{
|
||||
typedef typename Projection::geographic_point_type type;
|
||||
};
|
||||
|
||||
} // detail
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
}}} // boost::geometry::projection
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_PROJECTION_POINT_TYPE_HPP
|
||||
@@ -1,41 +0,0 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
|
||||
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
|
||||
|
||||
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
||||
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_STRATEGIES_EXTENSIONS_PARSE_HPP
|
||||
#define BOOST_GEOMETRY_STRATEGIES_EXTENSIONS_PARSE_HPP
|
||||
|
||||
#include <boost/geometry/strategies/tags.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
\brief Tagraits class binding a parsing strategy to a coordinate system
|
||||
\ingroup parse
|
||||
\tparam Tag tag of coordinate system of point-type
|
||||
\tparam CoordinateSystem coordinate system
|
||||
*/
|
||||
template <typename Tag, typename CoordinateSystem>
|
||||
struct strategy_parse
|
||||
{
|
||||
typedef strategy::not_implemented type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_STRATEGIES_EXTENSIONS_PARSE_HPP
|
||||
@@ -17,7 +17,6 @@
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
|
||||
#include <boost/geometry/core/radius.hpp>
|
||||
#include <boost/geometry/core/srs.hpp>
|
||||
|
||||
#include <boost/geometry/util/condition.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
|
||||
#include <boost/geometry/core/radius.hpp>
|
||||
#include <boost/geometry/core/srs.hpp>
|
||||
|
||||
#include <boost/geometry/util/condition.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
|
||||
#include <boost/geometry/core/radius.hpp>
|
||||
#include <boost/geometry/core/srs.hpp>
|
||||
|
||||
#include <boost/geometry/util/condition.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
|
||||
#include <boost/geometry/core/radius.hpp>
|
||||
#include <boost/geometry/core/srs.hpp>
|
||||
|
||||
#include <boost/geometry/util/condition.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2015-2016 Oracle and/or its affiliates.
|
||||
// Copyright (c) 2015-2017 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
|
||||
#include <boost/geometry/core/radius.hpp>
|
||||
#include <boost/geometry/core/srs.hpp>
|
||||
|
||||
#include <boost/geometry/util/condition.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
@@ -12,11 +12,13 @@
|
||||
#ifndef BOOST_GEOMETRY_FORMULAS_MAXIMUM_LATITUDE_HPP
|
||||
#define BOOST_GEOMETRY_FORMULAS_MAXIMUM_LATITUDE_HPP
|
||||
|
||||
#include <boost/geometry/core/srs.hpp>
|
||||
|
||||
#include <boost/geometry/formulas/flattening.hpp>
|
||||
#include <boost/geometry/formulas/spherical.hpp>
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace formula
|
||||
{
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include <boost/geometry/formulas/spherical.hpp>
|
||||
#include <boost/geometry/formulas/flattening.hpp>
|
||||
#include <boost/geometry/core/srs.hpp>
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
|
||||
#include <boost/math/special_functions/hypot.hpp>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2014, 2016.
|
||||
// Modifications copyright (c) 2014-2016 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2014, 2016, 2017.
|
||||
// Modifications copyright (c) 2014-2017 Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
|
||||
#include <boost/geometry/core/radius.hpp>
|
||||
#include <boost/geometry/core/srs.hpp>
|
||||
|
||||
#include <boost/geometry/util/condition.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
|
||||
#include <boost/geometry/core/radius.hpp>
|
||||
#include <boost/geometry/core/srs.hpp>
|
||||
|
||||
#include <boost/geometry/util/condition.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include <boost/geometry/core/point_order.hpp>
|
||||
#include <boost/geometry/core/point_type.hpp>
|
||||
#include <boost/geometry/core/ring_type.hpp>
|
||||
#include <boost/geometry/core/srs.hpp>
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tag_cast.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
@@ -97,6 +96,8 @@
|
||||
// check includes all concepts
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
|
||||
#include <boost/geometry/srs/srs.hpp>
|
||||
|
||||
#include <boost/geometry/util/for_each_coordinate.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <boost/geometry/util/select_coordinate_type.hpp>
|
||||
|
||||
82
include/boost/geometry/srs/epsg.hpp
Normal file
82
include/boost/geometry/srs/epsg.hpp
Normal file
@@ -0,0 +1,82 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_SRS_EPSG_HPP
|
||||
#define BOOST_GEOMETRY_SRS_EPSG_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/srs/projection.hpp>
|
||||
#include <boost/geometry/srs/projections/epsg.hpp>
|
||||
#include <boost/geometry/srs/projections/epsg_params.hpp>
|
||||
#include <boost/geometry/srs/projections/epsg_traits.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
|
||||
template <typename CT>
|
||||
struct dynamic_parameters<srs::epsg, CT>
|
||||
{
|
||||
static inline projections::parameters<CT> apply(srs::epsg const& params)
|
||||
{
|
||||
return projections::detail::pj_init_plus<CT>(
|
||||
srs::dynamic(),
|
||||
projections::detail::epsg_to_string(params.code),
|
||||
false);
|
||||
}
|
||||
};
|
||||
|
||||
template <int Code, typename CT>
|
||||
class proj_wrapper<srs::static_epsg<Code>, CT>
|
||||
: public static_proj_wrapper_base
|
||||
<
|
||||
typename projections::detail::epsg_traits<Code>::static_parameters_type,
|
||||
CT
|
||||
>
|
||||
{
|
||||
typedef projections::detail::epsg_traits<Code> epsg_traits;
|
||||
typedef typename epsg_traits::static_parameters_type static_parameters_type;
|
||||
typedef static_proj_wrapper_base<static_parameters_type, CT> base_t;
|
||||
|
||||
public:
|
||||
proj_wrapper()
|
||||
: base_t(epsg_traits::s_par(), epsg_traits::par())
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
} // namespace projections
|
||||
|
||||
|
||||
namespace srs
|
||||
{
|
||||
|
||||
|
||||
template <int Code, typename CT>
|
||||
class projection<srs::static_epsg<Code>, CT>
|
||||
: public projections::projection<srs::static_epsg<Code>, CT>
|
||||
{
|
||||
typedef projections::projection<srs::static_epsg<Code>, CT> base_t;
|
||||
|
||||
public:
|
||||
projection()
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
} // namespace srs
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_SRS_EPSG_HPP
|
||||
82
include/boost/geometry/srs/esri.hpp
Normal file
82
include/boost/geometry/srs/esri.hpp
Normal file
@@ -0,0 +1,82 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_SRS_ESRI_HPP
|
||||
#define BOOST_GEOMETRY_SRS_ESRI_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/srs/projection.hpp>
|
||||
#include <boost/geometry/srs/projections/esri.hpp>
|
||||
#include <boost/geometry/srs/projections/esri_params.hpp>
|
||||
#include <boost/geometry/srs/projections/esri_traits.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
|
||||
template <typename CT>
|
||||
struct dynamic_parameters<srs::esri, CT>
|
||||
{
|
||||
static inline projections::parameters<CT> apply(srs::esri const& params)
|
||||
{
|
||||
return projections::detail::pj_init_plus<CT>(
|
||||
srs::dynamic(),
|
||||
projections::detail::esri_to_string(params.code),
|
||||
false);
|
||||
}
|
||||
};
|
||||
|
||||
template <int Code, typename CT>
|
||||
class proj_wrapper<srs::static_esri<Code>, CT>
|
||||
: public static_proj_wrapper_base
|
||||
<
|
||||
typename projections::detail::esri_traits<Code>::static_parameters_type,
|
||||
CT
|
||||
>
|
||||
{
|
||||
typedef projections::detail::esri_traits<Code> esri_traits;
|
||||
typedef typename esri_traits::static_parameters_type static_parameters_type;
|
||||
typedef static_proj_wrapper_base<static_parameters_type, CT> base_t;
|
||||
|
||||
public:
|
||||
proj_wrapper()
|
||||
: base_t(esri_traits::s_par(), esri_traits::par())
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
} // namespace projections
|
||||
|
||||
|
||||
namespace srs
|
||||
{
|
||||
|
||||
|
||||
template <int Code, typename CT>
|
||||
class projection<srs::static_esri<Code>, CT>
|
||||
: public projections::projection<srs::static_esri<Code>, CT>
|
||||
{
|
||||
typedef projections::projection<srs::static_esri<Code>, CT> base_t;
|
||||
|
||||
public:
|
||||
projection()
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
} // namespace srs
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_SRS_ESRI_HPP
|
||||
82
include/boost/geometry/srs/iau2000.hpp
Normal file
82
include/boost/geometry/srs/iau2000.hpp
Normal file
@@ -0,0 +1,82 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_SRS_IAU2000_HPP
|
||||
#define BOOST_GEOMETRY_SRS_IAU2000_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/srs/projection.hpp>
|
||||
#include <boost/geometry/srs/projections/iau2000.hpp>
|
||||
#include <boost/geometry/srs/projections/iau2000_params.hpp>
|
||||
#include <boost/geometry/srs/projections/iau2000_traits.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
|
||||
template <typename CT>
|
||||
struct dynamic_parameters<srs::iau2000, CT>
|
||||
{
|
||||
static inline projections::parameters<CT> apply(srs::iau2000 const& params)
|
||||
{
|
||||
return projections::detail::pj_init_plus<CT>(
|
||||
srs::dynamic(),
|
||||
projections::detail::iau2000_to_string(params.code),
|
||||
false);
|
||||
}
|
||||
};
|
||||
|
||||
template <int Code, typename CT>
|
||||
class proj_wrapper<srs::static_iau2000<Code>, CT>
|
||||
: public static_proj_wrapper_base
|
||||
<
|
||||
typename projections::detail::iau2000_traits<Code>::static_parameters_type,
|
||||
CT
|
||||
>
|
||||
{
|
||||
typedef projections::detail::iau2000_traits<Code> iau2000_traits;
|
||||
typedef typename iau2000_traits::static_parameters_type static_parameters_type;
|
||||
typedef static_proj_wrapper_base<static_parameters_type, CT> base_t;
|
||||
|
||||
public:
|
||||
proj_wrapper()
|
||||
: base_t(iau2000_traits::s_par(), iau2000_traits::par())
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
} // namespace projections
|
||||
|
||||
|
||||
namespace srs
|
||||
{
|
||||
|
||||
|
||||
template <int Code, typename CT>
|
||||
class projection<srs::static_iau2000<Code>, CT>
|
||||
: public projections::projection<srs::static_iau2000<Code>, CT>
|
||||
{
|
||||
typedef projections::projection<srs::static_iau2000<Code>, CT> base_t;
|
||||
|
||||
public:
|
||||
projection()
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
} // namespace srs
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_SRS_IAU2000_HPP
|
||||
591
include/boost/geometry/srs/projection.hpp
Normal file
591
include/boost/geometry/srs/projection.hpp
Normal file
@@ -0,0 +1,591 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_SRS_PROJECTION_HPP
|
||||
#define BOOST_GEOMETRY_SRS_PROJECTION_HPP
|
||||
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <boost/geometry/algorithms/convert.hpp>
|
||||
#include <boost/geometry/algorithms/detail/convert_point_to_point.hpp>
|
||||
|
||||
#include <boost/geometry/core/coordinate_dimension.hpp>
|
||||
|
||||
#include <boost/geometry/srs/projections/exception.hpp>
|
||||
#include <boost/geometry/srs/projections/factory.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_init.hpp>
|
||||
#include <boost/geometry/srs/projections/invalid_point.hpp>
|
||||
#include <boost/geometry/srs/projections/par4.hpp>
|
||||
#include <boost/geometry/srs/projections/proj4.hpp>
|
||||
|
||||
#include <boost/geometry/views/detail/indexed_point_view.hpp>
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/smart_ptr/shared_ptr.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/type_traits/is_integral.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template <typename G1, typename G2>
|
||||
struct same_tags
|
||||
{
|
||||
static const bool value = boost::is_same
|
||||
<
|
||||
typename geometry::tag<G1>::type,
|
||||
typename geometry::tag<G2>::type
|
||||
>::value;
|
||||
};
|
||||
|
||||
template <typename CT>
|
||||
struct promote_to_double
|
||||
{
|
||||
typedef typename boost::mpl::if_c
|
||||
<
|
||||
boost::is_integral<CT>::value || boost::is_same<CT, float>::value,
|
||||
double, CT
|
||||
>::type type;
|
||||
};
|
||||
|
||||
// Copy coordinates of dimensions >= MinDim
|
||||
template <std::size_t MinDim, typename Point1, typename Point2>
|
||||
inline void copy_higher_dimensions(Point1 const& point1, Point2 & point2)
|
||||
{
|
||||
static const std::size_t dim1 = geometry::dimension<Point1>::value;
|
||||
static const std::size_t dim2 = geometry::dimension<Point2>::value;
|
||||
static const std::size_t lesser_dim = dim1 < dim2 ? dim1 : dim2;
|
||||
BOOST_MPL_ASSERT_MSG((lesser_dim >= MinDim),
|
||||
THE_DIMENSION_OF_POINTS_IS_TOO_SMALL,
|
||||
(Point1, Point2));
|
||||
|
||||
geometry::detail::conversion::point_to_point
|
||||
<
|
||||
Point1, Point2, MinDim, lesser_dim
|
||||
> ::apply(point1, point2);
|
||||
|
||||
// TODO: fill point2 with zeros if dim1 < dim2 ?
|
||||
// currently no need because equal dimensions are checked
|
||||
}
|
||||
|
||||
|
||||
struct forward_point_projection_policy
|
||||
{
|
||||
template <typename LL, typename XY, typename Proj>
|
||||
static inline bool apply(LL const& ll, XY & xy, Proj const& proj)
|
||||
{
|
||||
return proj.forward(ll, xy);
|
||||
}
|
||||
};
|
||||
|
||||
struct inverse_point_projection_policy
|
||||
{
|
||||
template <typename XY, typename LL, typename Proj>
|
||||
static inline bool apply(XY const& xy, LL & ll, Proj const& proj)
|
||||
{
|
||||
return proj.inverse(xy, ll);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename PointPolicy>
|
||||
struct project_point
|
||||
{
|
||||
template <typename P1, typename P2, typename Proj>
|
||||
static inline bool apply(P1 const& p1, P2 & p2, Proj const& proj)
|
||||
{
|
||||
// (Geographic -> Cartesian) will be projected, rest will be copied.
|
||||
// So first copy third or higher dimensions
|
||||
projections::detail::copy_higher_dimensions<2>(p1, p2);
|
||||
|
||||
if (! PointPolicy::apply(p1, p2, proj))
|
||||
{
|
||||
// For consistency with transformation
|
||||
set_invalid_point(p2);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename PointPolicy>
|
||||
struct project_range
|
||||
{
|
||||
template <typename Proj>
|
||||
struct convert_policy
|
||||
{
|
||||
explicit convert_policy(Proj const& proj)
|
||||
: m_proj(proj)
|
||||
, m_result(true)
|
||||
{}
|
||||
|
||||
template <typename Point1, typename Point2>
|
||||
inline void apply(Point1 const& point1, Point2 & point2)
|
||||
{
|
||||
if (! project_point<PointPolicy>::apply(point1, point2, m_proj) )
|
||||
m_result = false;
|
||||
}
|
||||
|
||||
bool result() const
|
||||
{
|
||||
return m_result;
|
||||
}
|
||||
|
||||
private:
|
||||
Proj const& m_proj;
|
||||
bool m_result;
|
||||
};
|
||||
|
||||
template <typename R1, typename R2, typename Proj>
|
||||
static inline bool apply(R1 const& r1, R2 & r2, Proj const& proj)
|
||||
{
|
||||
return geometry::detail::conversion::range_to_range
|
||||
<
|
||||
R1, R2,
|
||||
geometry::point_order<R1>::value != geometry::point_order<R2>::value
|
||||
>::apply(r1, r2, convert_policy<Proj>(proj)).result();
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Policy>
|
||||
struct project_multi
|
||||
{
|
||||
template <typename G1, typename G2, typename Proj>
|
||||
static inline bool apply(G1 const& g1, G2 & g2, Proj const& proj)
|
||||
{
|
||||
range::resize(g2, boost::size(g1));
|
||||
return apply(boost::begin(g1), boost::end(g1),
|
||||
boost::begin(g2),
|
||||
proj);
|
||||
}
|
||||
|
||||
private:
|
||||
template <typename It1, typename It2, typename Proj>
|
||||
static inline bool apply(It1 g1_first, It1 g1_last, It2 g2_first, Proj const& proj)
|
||||
{
|
||||
bool result = true;
|
||||
for ( ; g1_first != g1_last ; ++g1_first, ++g2_first )
|
||||
{
|
||||
if (! Policy::apply(*g1_first, *g2_first, proj))
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
template
|
||||
<
|
||||
typename Geometry,
|
||||
typename PointPolicy,
|
||||
typename Tag = typename geometry::tag<Geometry>::type
|
||||
>
|
||||
struct project_geometry
|
||||
{};
|
||||
|
||||
template <typename Geometry, typename PointPolicy>
|
||||
struct project_geometry<Geometry, PointPolicy, point_tag>
|
||||
: project_point<PointPolicy>
|
||||
{};
|
||||
|
||||
template <typename Geometry, typename PointPolicy>
|
||||
struct project_geometry<Geometry, PointPolicy, multi_point_tag>
|
||||
: project_range<PointPolicy>
|
||||
{};
|
||||
|
||||
template <typename Geometry, typename PointPolicy>
|
||||
struct project_geometry<Geometry, PointPolicy, segment_tag>
|
||||
{
|
||||
template <typename G1, typename G2, typename Proj>
|
||||
static inline bool apply(G1 const& g1, G2 & g2, Proj const& proj)
|
||||
{
|
||||
bool r1 = apply<0>(g1, g2, proj);
|
||||
bool r2 = apply<1>(g1, g2, proj);
|
||||
return r1 && r2;
|
||||
}
|
||||
|
||||
private:
|
||||
template <std::size_t Index, typename G1, typename G2, typename Proj>
|
||||
static inline bool apply(G1 const& g1, G2 & g2, Proj const& proj)
|
||||
{
|
||||
geometry::detail::indexed_point_view<G1 const, Index> pt1(g1);
|
||||
geometry::detail::indexed_point_view<G2, Index> pt2(g2);
|
||||
return project_point<PointPolicy>::apply(pt1, pt2, proj);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geometry, typename PointPolicy>
|
||||
struct project_geometry<Geometry, PointPolicy, linestring_tag>
|
||||
: project_range<PointPolicy>
|
||||
{};
|
||||
|
||||
template <typename Geometry, typename PointPolicy>
|
||||
struct project_geometry<Geometry, PointPolicy, multi_linestring_tag>
|
||||
: project_multi< project_range<PointPolicy> >
|
||||
{};
|
||||
|
||||
template <typename Geometry, typename PointPolicy>
|
||||
struct project_geometry<Geometry, PointPolicy, ring_tag>
|
||||
: project_range<PointPolicy>
|
||||
{};
|
||||
|
||||
template <typename Geometry, typename PointPolicy>
|
||||
struct project_geometry<Geometry, PointPolicy, polygon_tag>
|
||||
{
|
||||
template <typename G1, typename G2, typename Proj>
|
||||
static inline bool apply(G1 const& g1, G2 & g2, Proj const& proj)
|
||||
{
|
||||
bool r1 = project_range
|
||||
<
|
||||
PointPolicy
|
||||
>::apply(geometry::exterior_ring(g1),
|
||||
geometry::exterior_ring(g2),
|
||||
proj);
|
||||
bool r2 = project_multi
|
||||
<
|
||||
project_range<PointPolicy>
|
||||
>::apply(geometry::interior_rings(g1),
|
||||
geometry::interior_rings(g2),
|
||||
proj);
|
||||
return r1 && r2;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename MultiPolygon, typename PointPolicy>
|
||||
struct project_geometry<MultiPolygon, PointPolicy, multi_polygon_tag>
|
||||
: project_multi
|
||||
<
|
||||
project_geometry
|
||||
<
|
||||
typename boost::range_value<MultiPolygon>::type,
|
||||
PointPolicy,
|
||||
polygon_tag
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
} // namespace detail
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
template <typename Params, typename CT>
|
||||
struct dynamic_parameters
|
||||
{
|
||||
BOOST_MPL_ASSERT_MSG((false),
|
||||
NOT_IMPLEMENTED_FOR_THESE_PARAMETERS,
|
||||
(Params));
|
||||
};
|
||||
|
||||
template <typename CT>
|
||||
struct dynamic_parameters<srs::proj4, CT>
|
||||
{
|
||||
static inline projections::parameters<CT> apply(srs::proj4 const& params)
|
||||
{
|
||||
return projections::detail::pj_init_plus<CT>(srs::dynamic(), params.str);
|
||||
}
|
||||
};
|
||||
|
||||
// proj_wrapper class and its specializations wrapps the internal projection
|
||||
// representation and implements transparent creation of projection object
|
||||
template <typename Proj, typename CT>
|
||||
class proj_wrapper
|
||||
{
|
||||
BOOST_MPL_ASSERT_MSG((false),
|
||||
NOT_IMPLEMENTED_FOR_THIS_PROJECTION,
|
||||
(Proj));
|
||||
};
|
||||
|
||||
template <typename CT>
|
||||
class proj_wrapper<srs::dynamic, CT>
|
||||
{
|
||||
// Some projections do not work with float -> wrong results
|
||||
// select <double> from int/float/double and else selects T
|
||||
typedef typename projections::detail::promote_to_double<CT>::type calc_t;
|
||||
|
||||
typedef projections::parameters<calc_t> parameters_type;
|
||||
typedef projections::detail::base_v<calc_t, parameters_type> vprj_t;
|
||||
|
||||
public:
|
||||
template <typename Params>
|
||||
proj_wrapper(Params const& params)
|
||||
: m_ptr(create(projections::dynamic_parameters<Params, calc_t>::apply(params)))
|
||||
{}
|
||||
|
||||
vprj_t const& proj() const { return *m_ptr; }
|
||||
vprj_t & mutable_proj() { return *m_ptr; }
|
||||
|
||||
private:
|
||||
static vprj_t* create(parameters_type const& pj_params)
|
||||
{
|
||||
vprj_t* result = projections::detail::create_new(pj_params);
|
||||
|
||||
if (result == NULL)
|
||||
{
|
||||
if (pj_params.name.empty())
|
||||
{
|
||||
BOOST_THROW_EXCEPTION(projection_not_named_exception());
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOST_THROW_EXCEPTION(projection_unknown_id_exception(pj_params.name));
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
boost::shared_ptr<vprj_t> m_ptr;
|
||||
};
|
||||
|
||||
template <typename StaticParameters, typename CT>
|
||||
class static_proj_wrapper_base
|
||||
{
|
||||
typedef typename projections::detail::promote_to_double<CT>::type calc_t;
|
||||
|
||||
typedef projections::parameters<calc_t> parameters_type;
|
||||
|
||||
typedef typename srs::par4::detail::pick_proj_tag
|
||||
<
|
||||
StaticParameters
|
||||
>::type proj_tag;
|
||||
typedef typename srs::par4::detail::pick_ellps
|
||||
<
|
||||
StaticParameters
|
||||
>::type ellps_type;
|
||||
|
||||
typedef typename projections::detail::static_projection_type
|
||||
<
|
||||
proj_tag,
|
||||
typename geometry::tag
|
||||
<
|
||||
typename srs::par4::detail::ellps_traits
|
||||
<
|
||||
ellps_type
|
||||
>::model_type
|
||||
>::type,
|
||||
StaticParameters,
|
||||
calc_t,
|
||||
parameters_type
|
||||
>::type projection_type;
|
||||
|
||||
public:
|
||||
projection_type const& proj() const { return m_proj; }
|
||||
projection_type & mutable_proj() { return m_proj; }
|
||||
|
||||
protected:
|
||||
explicit static_proj_wrapper_base(StaticParameters const& s_params,
|
||||
bool use_defaults = true)
|
||||
: m_proj(get_parameters(s_params, "", use_defaults))
|
||||
{}
|
||||
|
||||
static_proj_wrapper_base(StaticParameters const& s_params,
|
||||
srs::proj4 const& params,
|
||||
bool use_defaults = true)
|
||||
: m_proj(get_parameters(s_params, params.str, use_defaults))
|
||||
{}
|
||||
|
||||
private:
|
||||
static parameters_type get_parameters(StaticParameters const& s_params,
|
||||
std::string const& params_str,
|
||||
bool use_defaults)
|
||||
{
|
||||
return projections::detail::pj_init_plus<calc_t>(s_params, params_str, use_defaults);
|
||||
}
|
||||
|
||||
projection_type m_proj;
|
||||
};
|
||||
|
||||
template <BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX, typename CT>
|
||||
class proj_wrapper<srs::static_proj4<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX>, CT>
|
||||
: public static_proj_wrapper_base<srs::static_proj4<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX>, CT>
|
||||
{
|
||||
typedef srs::static_proj4<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX>
|
||||
static_parameters_type;
|
||||
typedef static_proj_wrapper_base
|
||||
<
|
||||
static_parameters_type,
|
||||
CT
|
||||
> base_t;
|
||||
|
||||
public:
|
||||
proj_wrapper()
|
||||
: base_t(static_parameters_type())
|
||||
{}
|
||||
|
||||
proj_wrapper(static_parameters_type const& s_params)
|
||||
: base_t(s_params)
|
||||
{}
|
||||
|
||||
proj_wrapper(srs::proj4 const& params)
|
||||
: base_t(static_parameters_type(), params)
|
||||
{}
|
||||
|
||||
proj_wrapper(static_parameters_type const& s_params,
|
||||
srs::proj4 const& params)
|
||||
: base_t(s_params, params)
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
// projection class implements transparent forward/inverse projection interface
|
||||
template <typename Proj, typename CT>
|
||||
class projection
|
||||
: private proj_wrapper<Proj, CT>
|
||||
{
|
||||
typedef proj_wrapper<Proj, CT> base_t;
|
||||
|
||||
public:
|
||||
projection()
|
||||
{}
|
||||
|
||||
template <typename Params>
|
||||
explicit projection(Params const& params)
|
||||
: base_t(params)
|
||||
{}
|
||||
|
||||
template <typename SParams, typename Params>
|
||||
projection(SParams const& s_params, Params const& params)
|
||||
: base_t(s_params, params)
|
||||
{}
|
||||
|
||||
/// Forward projection, from Latitude-Longitude to Cartesian
|
||||
template <typename LL, typename XY>
|
||||
inline bool forward(LL const& ll, XY& xy) const
|
||||
{
|
||||
BOOST_MPL_ASSERT_MSG((projections::detail::same_tags<LL, XY>::value),
|
||||
NOT_SUPPORTED_COMBINATION_OF_GEOMETRIES,
|
||||
(LL, XY));
|
||||
|
||||
concepts::check_concepts_and_equal_dimensions<LL const, XY>();
|
||||
|
||||
return projections::detail::project_geometry
|
||||
<
|
||||
LL,
|
||||
projections::detail::forward_point_projection_policy
|
||||
>::apply(ll, xy, base_t::proj());
|
||||
}
|
||||
|
||||
/// Inverse projection, from Cartesian to Latitude-Longitude
|
||||
template <typename XY, typename LL>
|
||||
inline bool inverse(XY const& xy, LL& ll) const
|
||||
{
|
||||
BOOST_MPL_ASSERT_MSG((projections::detail::same_tags<XY, LL>::value),
|
||||
NOT_SUPPORTED_COMBINATION_OF_GEOMETRIES,
|
||||
(XY, LL));
|
||||
|
||||
concepts::check_concepts_and_equal_dimensions<XY const, LL>();
|
||||
|
||||
return projections::detail::project_geometry
|
||||
<
|
||||
XY,
|
||||
projections::detail::inverse_point_projection_policy
|
||||
>::apply(xy, ll, base_t::proj());
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace projections
|
||||
|
||||
|
||||
namespace srs
|
||||
{
|
||||
|
||||
|
||||
/*!
|
||||
\brief Representation of projection
|
||||
\details Either dynamic or static projection representation
|
||||
\ingroup projection
|
||||
\tparam Proj default_dynamic or static projection parameters
|
||||
\tparam CT calculation type used internally
|
||||
*/
|
||||
template
|
||||
<
|
||||
typename Proj = srs::dynamic,
|
||||
typename CT = double
|
||||
>
|
||||
class projection
|
||||
{
|
||||
BOOST_MPL_ASSERT_MSG((false),
|
||||
NOT_IMPLEMENTED_FOR_THIS_PROJECTION,
|
||||
(Proj));
|
||||
};
|
||||
|
||||
template <typename CT>
|
||||
class projection<srs::dynamic, CT>
|
||||
: public projections::projection<srs::dynamic, CT>
|
||||
{
|
||||
typedef projections::projection<srs::dynamic, CT> base_t;
|
||||
|
||||
public:
|
||||
/*!
|
||||
\ingroup projection
|
||||
\brief Initializes a projection as a string, using the format with + and =
|
||||
\details The projection can be initialized with a string (with the same format as the PROJ4 package) for
|
||||
convenient initialization from, for example, the command line
|
||||
\par Example
|
||||
<tt>+proj=labrd +ellps=intl +lon_0=46d26'13.95E +lat_0=18d54S +azi=18d54 +k_0=.9995 +x_0=400000 +y_0=800000</tt>
|
||||
for the Madagascar projection.
|
||||
\note Parameters are described in the group
|
||||
*/
|
||||
template <typename Params>
|
||||
projection(Params const& params)
|
||||
: base_t(params)
|
||||
{}
|
||||
};
|
||||
|
||||
template <BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX, typename CT>
|
||||
class projection<srs::static_proj4<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX>, CT>
|
||||
: public projections::projection<srs::static_proj4<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX>, CT>
|
||||
{
|
||||
typedef projections::projection<srs::static_proj4<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX>, CT> base_t;
|
||||
|
||||
public:
|
||||
projection()
|
||||
{}
|
||||
|
||||
projection(srs::static_proj4<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& params)
|
||||
: base_t(params)
|
||||
{}
|
||||
|
||||
#ifdef BOOST_GEOMETRY_SRS_ENABLE_STATIC_PROJECTION_HYBRID_INTERFACE
|
||||
projection(srs::proj4 const& params)
|
||||
: base_t(params)
|
||||
{}
|
||||
|
||||
projection(srs::static_proj4<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& s_params,
|
||||
srs::proj4 const& params)
|
||||
: base_t(s_params, params)
|
||||
{}
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace srs
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_SRS_PROJECTION_HPP
|
||||
56
include/boost/geometry/srs/projections/code.hpp
Normal file
56
include/boost/geometry/srs/projections/code.hpp
Normal file
@@ -0,0 +1,56 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_CODE_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_CODE_HPP
|
||||
|
||||
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
struct code_element
|
||||
{
|
||||
int code;
|
||||
std::string proj4_str;
|
||||
};
|
||||
|
||||
struct code_element_less
|
||||
{
|
||||
inline bool operator()(code_element const& l, code_element const& r) const
|
||||
{
|
||||
return l.code < r.code;
|
||||
}
|
||||
};
|
||||
|
||||
template<typename RandIt>
|
||||
inline RandIt binary_find_code_element(RandIt first, RandIt last, int code)
|
||||
{
|
||||
code_element_less comp;
|
||||
code_element value;
|
||||
value.code = code;
|
||||
first = std::lower_bound(first, last, value, code_element_less());
|
||||
return first != last && !comp(value, *first) ? first : last;
|
||||
}
|
||||
|
||||
}
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif
|
||||
4409
include/boost/geometry/srs/projections/epsg.hpp
Normal file
4409
include/boost/geometry/srs/projections/epsg.hpp
Normal file
File diff suppressed because it is too large
Load Diff
48
include/boost/geometry/srs/projections/epsg_params.hpp
Normal file
48
include/boost/geometry/srs/projections/epsg_params.hpp
Normal file
@@ -0,0 +1,48 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_SRS_PROJECTIONS_EPSG_PARAMS_HPP
|
||||
#define BOOST_GEOMETRY_SRS_PROJECTIONS_EPSG_PARAMS_HPP
|
||||
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <boost/geometry/srs/spheroid.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace srs
|
||||
{
|
||||
|
||||
|
||||
struct epsg
|
||||
{
|
||||
explicit epsg(int c)
|
||||
: code(c)
|
||||
{}
|
||||
|
||||
int code;
|
||||
};
|
||||
|
||||
|
||||
template <int Code>
|
||||
struct static_epsg
|
||||
{
|
||||
static const int code = Code;
|
||||
};
|
||||
|
||||
|
||||
} // namespace srs
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_SRS_PROJECTIONS_EPSG_PARAMS_HPP
|
||||
4417
include/boost/geometry/srs/projections/epsg_traits.hpp
Normal file
4417
include/boost/geometry/srs/projections/epsg_traits.hpp
Normal file
File diff suppressed because it is too large
Load Diff
491
include/boost/geometry/srs/projections/esri.hpp
Normal file
491
include/boost/geometry/srs/projections/esri.hpp
Normal file
@@ -0,0 +1,491 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_ESRI_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_ESRI_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/srs/projections/code.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
inline std::string esri_to_string(int code)
|
||||
{
|
||||
static const code_element arr[] = {
|
||||
{37001, "+proj=longlat +ellps=WGS66 +no_defs"},
|
||||
{37002, "+proj=longlat +a=6378166 +b=6356784.283607107 +no_defs"},
|
||||
{37003, "+proj=longlat +a=6378150 +b=6356768.337244385 +no_defs"},
|
||||
{37004, "+proj=longlat +ellps=fschr60m +no_defs"},
|
||||
{37005, "+proj=longlat +a=6378270 +b=6356794.343434343 +no_defs"},
|
||||
{37006, "+proj=longlat +a=6377295.664 +b=6356094.667915204 +no_defs"},
|
||||
{37007, "+proj=longlat +a=6376896 +b=6355834.846687363 +no_defs"},
|
||||
{37008, "+proj=longlat +a=6370997 +b=6370997 +no_defs"},
|
||||
{37201, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37202, "+proj=longlat +a=6377276.345 +b=6356075.41314024 +no_defs"},
|
||||
{37203, "+proj=longlat +a=6377301.243 +b=6356100.230165384 +no_defs"},
|
||||
{37204, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37205, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37206, "+proj=longlat +ellps=clrk80 +no_defs"},
|
||||
{37207, "+proj=longlat +ellps=fschr60m +no_defs"},
|
||||
{37208, "+proj=longlat +ellps=clrk80 +no_defs"},
|
||||
{37211, "+proj=longlat +ellps=clrk80 +no_defs"},
|
||||
{37212, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37213, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37214, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37215, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37216, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37217, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37218, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37219, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37220, "+proj=longlat +ellps=clrk66 +no_defs"},
|
||||
{37221, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37222, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37223, "+proj=longlat +a=6378249.2 +b=6356514.999904194 +no_defs"},
|
||||
{37224, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37226, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37227, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37228, "+proj=longlat +ellps=clrk80 +no_defs"},
|
||||
{37229, "+proj=longlat +a=6378270 +b=6356794.343434343 +no_defs"},
|
||||
{37230, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37231, "+proj=longlat +ellps=aust_SA +no_defs"},
|
||||
{37232, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37233, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37234, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37235, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37237, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37238, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37239, "+proj=longlat +ellps=clrk66 +no_defs"},
|
||||
{37240, "+proj=longlat +ellps=clrk80 +no_defs"},
|
||||
{37241, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37242, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37243, "+proj=longlat +ellps=clrk66 +no_defs"},
|
||||
{37245, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37246, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37247, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37249, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37250, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37251, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37252, "+proj=longlat +ellps=clrk66 +no_defs"},
|
||||
{37253, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37254, "+proj=longlat +ellps=clrk80 +no_defs"},
|
||||
{37255, "+proj=longlat +ellps=bessel +no_defs"},
|
||||
{37257, "+proj=longlat +ellps=krass +no_defs"},
|
||||
{37259, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{37260, "+proj=longlat +ellps=clrk66 +no_defs"},
|
||||
//{53001, ""},
|
||||
{53002, "+proj=eqc +lat_ts=60 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs"},
|
||||
{53003, "+proj=mill +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +R_A +a=6371000 +b=6371000 +units=m +no_defs"},
|
||||
{53004, "+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs"},
|
||||
{53008, "+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs"},
|
||||
{53009, "+proj=moll +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs"},
|
||||
{53010, "+proj=eck6 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs"},
|
||||
//{53011, ""},
|
||||
{53012, "+proj=eck4 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs"},
|
||||
//{53013, ""},
|
||||
//{53014, ""},
|
||||
//{53015, ""},
|
||||
{53016, "+proj=gall +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs"},
|
||||
//{53017, ""},
|
||||
//{53018, ""},
|
||||
//{53019, ""},
|
||||
{53021, "+proj=poly +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs"},
|
||||
//{53022, ""},
|
||||
//{53023, ""},
|
||||
{53024, "+proj=bonne +lon_0=0 +lat_1=60 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs"},
|
||||
{53025, "+proj=omerc +lat_0=40 +lon_1=0 +lat_1=0 +lon_2=0 +lat_2=0 +k=1 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs"},
|
||||
{53026, "+proj=stere +lat_0=0 +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs"},
|
||||
{53027, "+proj=eqdc +lat_0=0 +lon_0=0 +lat_1=60 +lat_2=60 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs"},
|
||||
{53028, "+proj=cass +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs"},
|
||||
{53029, "+proj=vandg +lon_0=0 +x_0=0 +y_0=0 +R_A +a=6371000 +b=6371000 +units=m +no_defs"},
|
||||
{53030, "+proj=robin +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs"},
|
||||
{53031, "+proj=tpeqd +lat_1=0 +lon_1=0 +lat_2=60 +lon_2=60 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs"},
|
||||
{53032, "+proj=aeqd +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs"},
|
||||
//{54001, ""},
|
||||
{54002, "+proj=eqc +lat_ts=60 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{54003, "+proj=mill +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +R_A +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{54004, "+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{54008, "+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{54009, "+proj=moll +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{54010, "+proj=eck6 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
//{54011, ""},
|
||||
{54012, "+proj=eck4 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
//{54013, ""},
|
||||
//{54014, ""},
|
||||
//{54015, ""},
|
||||
{54016, "+proj=gall +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
//{54017, ""},
|
||||
//{54018, ""},
|
||||
//{54019, ""},
|
||||
{54021, "+proj=poly +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
//{54022, ""},
|
||||
//{54023, ""},
|
||||
{54024, "+proj=bonne +lon_0=0 +lat_1=60 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{54025, "+proj=omerc +lat_0=40 +lon_1=0 +lat_1=0 +lon_2=0 +lat_2=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{54026, "+proj=stere +lat_0=0 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{54027, "+proj=eqdc +lat_0=0 +lon_0=0 +lat_1=60 +lat_2=60 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{54028, "+proj=cass +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{54029, "+proj=vandg +lon_0=0 +x_0=0 +y_0=0 +R_A +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{54030, "+proj=robin +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{54031, "+proj=tpeqd +lat_1=0 +lon_1=0 +lat_2=60 +lon_2=60 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{54032, "+proj=aeqd +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{65061, "+proj=poly +lat_0=13.47246635277778 +lon_0=-144.7487507055556 +x_0=50000.00000000001 +y_0=50000.00000000001 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{65161, "+proj=poly +lat_0=13.47246635277778 +lon_0=-144.7487507055556 +x_0=50000 +y_0=50000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"},
|
||||
{102001, "+proj=aea +lat_1=50 +lat_2=70 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"},
|
||||
{102002, "+proj=lcc +lat_1=50 +lat_2=70 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"},
|
||||
{102003, "+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=37.5 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"},
|
||||
{102004, "+proj=lcc +lat_1=33 +lat_2=45 +lat_0=39 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"},
|
||||
{102005, "+proj=eqdc +lat_0=0 +lon_0=0 +lat_1=33 +lat_2=45 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"},
|
||||
{102006, "+proj=aea +lat_1=55 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"},
|
||||
{102007, "+proj=aea +lat_1=8 +lat_2=18 +lat_0=13 +lon_0=-157 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"},
|
||||
{102008, "+proj=aea +lat_1=20 +lat_2=60 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"},
|
||||
{102009, "+proj=lcc +lat_1=20 +lat_2=60 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"},
|
||||
{102010, "+proj=eqdc +lat_0=0 +lon_0=0 +lat_1=20 +lat_2=60 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"},
|
||||
{102011, "+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{102012, "+proj=lcc +lat_1=30 +lat_2=62 +lat_0=0 +lon_0=105 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{102013, "+proj=aea +lat_1=43 +lat_2=62 +lat_0=30 +lon_0=10 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs"},
|
||||
{102014, "+proj=lcc +lat_1=43 +lat_2=62 +lat_0=30 +lon_0=10 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs"},
|
||||
{102015, "+proj=lcc +lat_1=-5 +lat_2=-42 +lat_0=-32 +lon_0=-60 +x_0=0 +y_0=0 +ellps=aust_SA +units=m +no_defs"},
|
||||
{102016, "+proj=aeqd +lat_0=90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{102017, "+proj=laea +lat_0=90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{102018, "+proj=stere +lat_0=90 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{102019, "+proj=aeqd +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{102020, "+proj=laea +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{102021, "+proj=stere +lat_0=-90 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{102022, "+proj=aea +lat_1=20 +lat_2=-23 +lat_0=0 +lon_0=25 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{102023, "+proj=eqdc +lat_0=0 +lon_0=0 +lat_1=20 +lat_2=-23 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{102024, "+proj=lcc +lat_1=20 +lat_2=-23 +lat_0=0 +lon_0=25 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{102025, "+proj=aea +lat_1=15 +lat_2=65 +lat_0=30 +lon_0=95 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{102026, "+proj=eqdc +lat_0=0 +lon_0=0 +lat_1=15 +lat_2=65 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{102027, "+proj=lcc +lat_1=15 +lat_2=65 +lat_0=30 +lon_0=95 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{102028, "+proj=aea +lat_1=7 +lat_2=-32 +lat_0=-15 +lon_0=125 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{102029, "+proj=eqdc +lat_0=0 +lon_0=0 +lat_1=7 +lat_2=-32 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{102030, "+proj=lcc +lat_1=7 +lat_2=-32 +lat_0=-15 +lon_0=125 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"},
|
||||
{102031, "+proj=eqdc +lat_0=0 +lon_0=0 +lat_1=43 +lat_2=62 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs"},
|
||||
{102032, "+proj=eqdc +lat_0=0 +lon_0=0 +lat_1=-5 +lat_2=-42 +x_0=0 +y_0=0 +ellps=aust_SA +units=m +no_defs"},
|
||||
{102033, "+proj=aea +lat_1=-5 +lat_2=-42 +lat_0=-32 +lon_0=-60 +x_0=0 +y_0=0 +ellps=aust_SA +units=m +no_defs"},
|
||||
{102065, "+proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813975277778 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"},
|
||||
{102066, "+proj=krovak +lat_0=49.5 +lon_0=42.5 +alpha=30.28813975277778 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +pm=-17.66666666666667 +units=m +no_defs"},
|
||||
{102067, "+proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813975277778 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"},
|
||||
{102091, "+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +units=m +no_defs"},
|
||||
{102092, "+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9996 +x_0=2520000 +y_0=0 +ellps=intl +units=m +no_defs"},
|
||||
{102101, "+proj=tmerc +lat_0=58 +lon_0=6.05625 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs"},
|
||||
{102102, "+proj=tmerc +lat_0=58 +lon_0=8.389583333333333 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs"},
|
||||
{102103, "+proj=tmerc +lat_0=58 +lon_0=10.72291666666667 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs"},
|
||||
{102104, "+proj=tmerc +lat_0=58 +lon_0=13.22291666666667 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs"},
|
||||
{102105, "+proj=tmerc +lat_0=58 +lon_0=16.88958333333333 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs"},
|
||||
{102106, "+proj=tmerc +lat_0=58 +lon_0=20.88958333333333 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs"},
|
||||
{102107, "+proj=tmerc +lat_0=58 +lon_0=24.88958333333333 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs"},
|
||||
{102108, "+proj=tmerc +lat_0=58 +lon_0=29.05625 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs"},
|
||||
{102110, "+proj=lcc +lat_1=44 +lat_2=49 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102114, "+proj=utm +zone=4 +ellps=clrk66 +units=m +no_defs"},
|
||||
{102115, "+proj=utm +zone=5 +ellps=clrk66 +units=m +no_defs"},
|
||||
{102120, "+proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.255555555556 +k=0.9996 +x_0=2546731.495961392 +y_0=-4354009.816002033 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102121, "+proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.255555555556 +k=0.9996 +x_0=2546731.495961392 +y_0=-4354009.816002033 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102122, "+proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.255555555556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +ellps=clrk66 +datum=NAD27 +units=m +no_defs"},
|
||||
{102123, "+proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.255555555556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"},
|
||||
{102132, "+proj=utm +zone=32 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs"},
|
||||
{102133, "+proj=utm +zone=33 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs"},
|
||||
{102134, "+proj=utm +zone=34 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs"},
|
||||
{102135, "+proj=utm +zone=35 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs"},
|
||||
{102140, "+proj=tmerc +lat_0=22.31213333333334 +lon_0=114.1785555555556 +k=1 +x_0=836694.05 +y_0=819069.8 +ellps=intl +units=m +no_defs"},
|
||||
{102141, "+proj=utm +zone=49 +ellps=intl +units=m +no_defs"},
|
||||
{102142, "+proj=utm +zone=50 +ellps=intl +units=m +no_defs"},
|
||||
{102151, "+proj=utm +zone=51 +ellps=bessel +units=m +no_defs"},
|
||||
{102152, "+proj=utm +zone=52 +ellps=bessel +units=m +no_defs"},
|
||||
{102153, "+proj=utm +zone=53 +ellps=bessel +units=m +no_defs"},
|
||||
{102154, "+proj=utm +zone=54 +ellps=bessel +units=m +no_defs"},
|
||||
{102155, "+proj=utm +zone=55 +ellps=bessel +units=m +no_defs"},
|
||||
{102156, "+proj=utm +zone=56 +ellps=bessel +units=m +no_defs"},
|
||||
{102160, "+proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1 +x_0=200180.598 +y_0=299913.01 +ellps=intl +units=m +no_defs"},
|
||||
{102161, "+proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1 +x_0=180.598 +y_0=-86.98999999999999 +ellps=intl +units=m +no_defs"},
|
||||
{102162, "+proj=utm +zone=26 +ellps=intl +units=m +no_defs"},
|
||||
{102163, "+proj=bonne +lon_0=-8.131906111111112 +lat_1=39.66666666666666 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs"},
|
||||
{102164, "+proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1 +x_0=200000 +y_0=300000 +ellps=intl +units=m +no_defs"},
|
||||
{102165, "+proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs"},
|
||||
{102166, "+proj=utm +zone=25 +ellps=intl +units=m +no_defs"},
|
||||
{102167, "+proj=utm +zone=28 +ellps=intl +units=m +no_defs"},
|
||||
{102168, "+proj=utm +zone=26 +ellps=intl +units=m +no_defs"},
|
||||
{102169, "+proj=utm +zone=28 +ellps=intl +units=m +no_defs"},
|
||||
{102191, "+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=-5.4 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs"},
|
||||
{102192, "+proj=lcc +lat_1=29.7 +lat_0=29.7 +lon_0=-5.4 +k_0=0.9996155960000001 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs"},
|
||||
{102193, "+proj=lcc +lat_1=26.1 +lat_0=26.1 +lon_0=-5.4 +k_0=0.9996 +x_0=1200000 +y_0=400000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs"},
|
||||
{102229, "+proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.99996 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102230, "+proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.9999333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102241, "+proj=lcc +lat_1=40 +lat_2=41.66666666666666 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102242, "+proj=lcc +lat_1=38.33333333333334 +lat_2=39.83333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102243, "+proj=lcc +lat_1=37.06666666666667 +lat_2=38.43333333333333 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102244, "+proj=lcc +lat_1=36 +lat_2=37.25 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102245, "+proj=lcc +lat_1=34.03333333333333 +lat_2=35.46666666666667 +lat_0=33.5 +lon_0=-118 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102246, "+proj=lcc +lat_1=32.78333333333333 +lat_2=33.88333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102248, "+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102249, "+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102250, "+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.9999333333333333 +x_0=213360 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102251, "+proj=lcc +lat_1=34.93333333333333 +lat_2=36.23333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102252, "+proj=lcc +lat_1=33.3 +lat_2=34.76666666666667 +lat_0=32.66666666666666 +lon_0=-92 +x_0=400000 +y_0=400000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102253, "+proj=lcc +lat_1=39.71666666666667 +lat_2=40.78333333333333 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102254, "+proj=lcc +lat_1=38.45 +lat_2=39.75 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102255, "+proj=lcc +lat_1=37.23333333333333 +lat_2=38.43333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102256, "+proj=lcc +lat_1=41.2 +lat_2=41.86666666666667 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096 +y_0=152400.3048 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102257, "+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102258, "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.9999411764705882 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102259, "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.9999411764705882 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102260, "+proj=lcc +lat_1=29.58333333333333 +lat_2=30.75 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102261, "+proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.9999666666666667 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102262, "+proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.9999666666666667 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102263, "+proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.99999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102264, "+proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.99999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102265, "+proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102266, "+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102267, "+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102268, "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473684210526 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102269, "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473684210526 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102270, "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.9999333333333333 +x_0=800000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102271, "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102272, "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.9999411764705882 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102273, "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.9999666666666667 +x_0=100000 +y_0=250000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102274, "+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.9999666666666667 +x_0=900000 +y_0=250000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102277, "+proj=lcc +lat_1=38.71666666666667 +lat_2=39.78333333333333 +lat_0=38.33333333333334 +lon_0=-98 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102278, "+proj=lcc +lat_1=37.26666666666667 +lat_2=38.56666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=400000 +y_0=400000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102279, "+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102280, "+proj=lcc +lat_1=36.73333333333333 +lat_2=37.93333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000 +y_0=500000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102281, "+proj=lcc +lat_1=31.16666666666667 +lat_2=32.66666666666666 +lat_0=30.5 +lon_0=-92.5 +x_0=1000000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102282, "+proj=lcc +lat_1=29.3 +lat_2=30.7 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=1000000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102283, "+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102284, "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.9999666666666667 +x_0=900000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102285, "+proj=lcc +lat_1=38.3 +lat_2=39.45 +lat_0=37.66666666666666 +lon_0=-77 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102286, "+proj=lcc +lat_1=41.71666666666667 +lat_2=42.68333333333333 +lat_0=41 +lon_0=-71.5 +x_0=200000 +y_0=750000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102287, "+proj=lcc +lat_1=41.28333333333333 +lat_2=41.48333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102288, "+proj=lcc +lat_1=45.48333333333333 +lat_2=47.08333333333334 +lat_0=44.78333333333333 +lon_0=-87 +x_0=8000000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102289, "+proj=lcc +lat_1=44.18333333333333 +lat_2=45.7 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=6000000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102290, "+proj=lcc +lat_1=42.1 +lat_2=43.66666666666666 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=4000000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102291, "+proj=lcc +lat_1=47.03333333333333 +lat_2=48.63333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102292, "+proj=lcc +lat_1=45.61666666666667 +lat_2=47.05 +lat_0=45 +lon_0=-94.25 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102293, "+proj=lcc +lat_1=43.78333333333333 +lat_2=45.21666666666667 +lat_0=43 +lon_0=-94 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102294, "+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102295, "+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102296, "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.9999333333333333 +x_0=250000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102297, "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.9999333333333333 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102298, "+proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.9999411764705882 +x_0=850000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102300, "+proj=lcc +lat_1=45 +lat_2=49 +lat_0=44.25 +lon_0=-109.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102304, "+proj=lcc +lat_1=40 +lat_2=43 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102307, "+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000 +y_0=8000000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102308, "+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000 +y_0=6000000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102309, "+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000 +y_0=4000000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102310, "+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.9999666666666667 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102311, "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102312, "+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.9999090909090909 +x_0=165000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102313, "+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102314, "+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.9999166666666667 +x_0=830000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102315, "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102316, "+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=250000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102317, "+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102318, "+proj=lcc +lat_1=40.66666666666666 +lat_2=41.03333333333333 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102320, "+proj=lcc +lat_1=47.43333333333333 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102321, "+proj=lcc +lat_1=46.18333333333333 +lat_2=47.48333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102322, "+proj=lcc +lat_1=40.43333333333333 +lat_2=41.7 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102323, "+proj=lcc +lat_1=38.73333333333333 +lat_2=40.03333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102324, "+proj=lcc +lat_1=35.56666666666667 +lat_2=36.76666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102325, "+proj=lcc +lat_1=33.93333333333333 +lat_2=35.23333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102326, "+proj=lcc +lat_1=44.33333333333334 +lat_2=46 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102327, "+proj=lcc +lat_1=42.33333333333334 +lat_2=44 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102330, "+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=100000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102334, "+proj=lcc +lat_1=44.41666666666666 +lat_2=45.68333333333333 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102335, "+proj=lcc +lat_1=42.83333333333334 +lat_2=44.4 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102336, "+proj=lcc +lat_1=35.25 +lat_2=36.41666666666666 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102337, "+proj=lcc +lat_1=34.65 +lat_2=36.18333333333333 +lat_0=34 +lon_0=-101.5 +x_0=200000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102338, "+proj=lcc +lat_1=32.13333333333333 +lat_2=33.96666666666667 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102339, "+proj=lcc +lat_1=30.11666666666667 +lat_2=31.88333333333333 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=700000 +y_0=3000000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102340, "+proj=lcc +lat_1=28.38333333333333 +lat_2=30.28333333333334 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=4000000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102341, "+proj=lcc +lat_1=26.16666666666667 +lat_2=27.83333333333333 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000 +y_0=5000000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102342, "+proj=lcc +lat_1=40.71666666666667 +lat_2=41.78333333333333 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102343, "+proj=lcc +lat_1=39.01666666666667 +lat_2=40.65 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=2000000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102344, "+proj=lcc +lat_1=37.21666666666667 +lat_2=38.35 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000 +y_0=3000000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102345, "+proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.9999642857142857 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102346, "+proj=lcc +lat_1=38.03333333333333 +lat_2=39.2 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000 +y_0=2000000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102347, "+proj=lcc +lat_1=36.76666666666667 +lat_2=37.96666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102348, "+proj=lcc +lat_1=47.5 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102349, "+proj=lcc +lat_1=45.83333333333334 +lat_2=47.33333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102350, "+proj=lcc +lat_1=39 +lat_2=40.25 +lat_0=38.5 +lon_0=-79.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102351, "+proj=lcc +lat_1=37.48333333333333 +lat_2=38.88333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102352, "+proj=lcc +lat_1=45.56666666666667 +lat_2=46.76666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102353, "+proj=lcc +lat_1=44.25 +lat_2=45.5 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102354, "+proj=lcc +lat_1=42.73333333333333 +lat_2=44.06666666666667 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102355, "+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102356, "+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=400000 +y_0=100000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102357, "+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102358, "+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102361, "+proj=lcc +lat_1=18.03333333333334 +lat_2=18.43333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=200000 +y_0=200000 +ellps=GRS80 +units=m +no_defs"},
|
||||
{102491, "+proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.999625544 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs"},
|
||||
{102492, "+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs"},
|
||||
{102581, "+proj=lcc +lat_1=49.5 +lat_0=49.5 +lon_0=2.337229166666667 +k_0=0.999877341 +x_0=600000 +y_0=1200000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs"},
|
||||
{102582, "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=2.337229166666667 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs"},
|
||||
{102583, "+proj=lcc +lat_1=44.1 +lat_0=44.1 +lon_0=2.337229166666667 +k_0=0.999877499 +x_0=600000 +y_0=3200000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs"},
|
||||
{102584, "+proj=lcc +lat_1=42.165 +lat_0=42.165 +lon_0=2.337229166666667 +k_0=0.99994471 +x_0=234.358 +y_0=4185861.369 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs"},
|
||||
{102591, "+proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.999625544 +x_0=500135 +y_0=300090 +ellps=clrk80 +units=m +no_defs"},
|
||||
{102592, "+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.999625769 +x_0=500135 +y_0=300090 +ellps=clrk80 +units=m +no_defs"},
|
||||
{102629, "+proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.99996 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102630, "+proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.9999333333333333 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102631, "+proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=-36.86989764583333 +k=0.9999 +x_0=4999999.999999999 +y_0=-4999999.999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102632, "+proj=tmerc +lat_0=54 +lon_0=-142 +k=0.9999 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102633, "+proj=tmerc +lat_0=54 +lon_0=-146 +k=0.9999 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102634, "+proj=tmerc +lat_0=54 +lon_0=-150 +k=0.9999 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102635, "+proj=tmerc +lat_0=54 +lon_0=-154 +k=0.9999 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102636, "+proj=tmerc +lat_0=54 +lon_0=-158 +k=0.9999 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102637, "+proj=tmerc +lat_0=54 +lon_0=-162 +k=0.9999 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102638, "+proj=tmerc +lat_0=54 +lon_0=-166 +k=0.9999 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102639, "+proj=tmerc +lat_0=54 +lon_0=-170 +k=0.9999 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102640, "+proj=lcc +lat_1=51.83333333333334 +lat_2=53.83333333333334 +lat_0=51 +lon_0=-176 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102641, "+proj=lcc +lat_1=40 +lat_2=41.66666666666666 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102642, "+proj=lcc +lat_1=38.33333333333334 +lat_2=39.83333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102643, "+proj=lcc +lat_1=37.06666666666667 +lat_2=38.43333333333333 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102644, "+proj=lcc +lat_1=36 +lat_2=37.25 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102645, "+proj=lcc +lat_1=34.03333333333333 +lat_2=35.46666666666667 +lat_0=33.5 +lon_0=-118 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102646, "+proj=lcc +lat_1=32.78333333333333 +lat_2=33.88333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102648, "+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102649, "+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102650, "+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.9999333333333333 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102651, "+proj=lcc +lat_1=34.93333333333333 +lat_2=36.23333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=399999.9999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102652, "+proj=lcc +lat_1=33.3 +lat_2=34.76666666666667 +lat_0=32.66666666666666 +lon_0=-92 +x_0=399999.9999999999 +y_0=399999.9999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102653, "+proj=lcc +lat_1=39.71666666666667 +lat_2=40.78333333333333 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102654, "+proj=lcc +lat_1=38.45 +lat_2=39.75 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102655, "+proj=lcc +lat_1=37.23333333333333 +lat_2=38.43333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102656, "+proj=lcc +lat_1=41.2 +lat_2=41.86666666666667 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096 +y_0=152400.3048 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102657, "+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102658, "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.9999411764705882 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102659, "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.9999411764705882 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102660, "+proj=lcc +lat_1=29.58333333333333 +lat_2=30.75 +lat_0=29 +lon_0=-84.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102661, "+proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.9999666666666667 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102662, "+proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.9999666666666667 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102663, "+proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.99999 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102664, "+proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.99999 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102665, "+proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102666, "+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102667, "+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102668, "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473684210526 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102669, "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473684210526 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102670, "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.9999333333333333 +x_0=799999.9999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102671, "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102672, "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.9999411764705882 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102673, "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.9999666666666667 +x_0=100000 +y_0=250000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102674, "+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.9999666666666667 +x_0=900000.0000000001 +y_0=250000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102675, "+proj=lcc +lat_1=42.06666666666667 +lat_2=43.26666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102676, "+proj=lcc +lat_1=40.61666666666667 +lat_2=41.78333333333333 +lat_0=40 +lon_0=-93.5 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102677, "+proj=lcc +lat_1=38.71666666666667 +lat_2=39.78333333333333 +lat_0=38.33333333333334 +lon_0=-98 +x_0=399999.9999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102678, "+proj=lcc +lat_1=37.26666666666667 +lat_2=38.56666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=399999.9999999999 +y_0=399999.9999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102679, "+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102680, "+proj=lcc +lat_1=36.73333333333333 +lat_2=37.93333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000.0000000002 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102681, "+proj=lcc +lat_1=31.16666666666667 +lat_2=32.66666666666666 +lat_0=30.5 +lon_0=-92.5 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102682, "+proj=lcc +lat_1=29.3 +lat_2=30.7 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102683, "+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102684, "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.9999666666666667 +x_0=900000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102685, "+proj=lcc +lat_1=38.3 +lat_2=39.45 +lat_0=37.66666666666666 +lon_0=-77 +x_0=399999.9999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102686, "+proj=lcc +lat_1=41.71666666666667 +lat_2=42.68333333333333 +lat_0=41 +lon_0=-71.5 +x_0=200000 +y_0=750000.0000000001 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102687, "+proj=lcc +lat_1=41.28333333333333 +lat_2=41.48333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102688, "+proj=lcc +lat_1=45.48333333333333 +lat_2=47.08333333333334 +lat_0=44.78333333333333 +lon_0=-87 +x_0=7999999.999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102689, "+proj=lcc +lat_1=44.18333333333333 +lat_2=45.7 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=6000000.000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102690, "+proj=lcc +lat_1=42.1 +lat_2=43.66666666666666 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=4000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102691, "+proj=lcc +lat_1=47.03333333333333 +lat_2=48.63333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=799999.9999999999 +y_0=100000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102692, "+proj=lcc +lat_1=45.61666666666667 +lat_2=47.05 +lat_0=45 +lon_0=-94.25 +x_0=799999.9999999999 +y_0=100000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102693, "+proj=lcc +lat_1=43.78333333333333 +lat_2=45.21666666666667 +lat_0=43 +lon_0=-94 +x_0=799999.9999999999 +y_0=100000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102694, "+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102695, "+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102696, "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.9999333333333333 +x_0=250000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102697, "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.9999333333333333 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102698, "+proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.9999411764705882 +x_0=850000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102700, "+proj=lcc +lat_1=45 +lat_2=49 +lat_0=44.25 +lon_0=-109.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102704, "+proj=lcc +lat_1=40 +lat_2=43 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102707, "+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000 +y_0=7999999.999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102708, "+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000.0000000002 +y_0=6000000.000000001 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102709, "+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=799999.9999999999 +y_0=4000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102710, "+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.9999666666666667 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102711, "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102712, "+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.9999090909090909 +x_0=165000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102713, "+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102714, "+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.9999166666666667 +x_0=829999.9999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102715, "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102716, "+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=250000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102717, "+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102718, "+proj=lcc +lat_1=40.66666666666666 +lat_2=41.03333333333333 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102719, "+proj=lcc +lat_1=34.33333333333334 +lat_2=36.16666666666666 +lat_0=33.75 +lon_0=-79 +x_0=609601.2199999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102720, "+proj=lcc +lat_1=47.43333333333333 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-100.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102721, "+proj=lcc +lat_1=46.18333333333333 +lat_2=47.48333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102722, "+proj=lcc +lat_1=40.43333333333333 +lat_2=41.7 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102723, "+proj=lcc +lat_1=38.73333333333333 +lat_2=40.03333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102724, "+proj=lcc +lat_1=35.56666666666667 +lat_2=36.76666666666667 +lat_0=35 +lon_0=-98 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102725, "+proj=lcc +lat_1=33.93333333333333 +lat_2=35.23333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102726, "+proj=lcc +lat_1=44.33333333333334 +lat_2=46 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102727, "+proj=lcc +lat_1=42.33333333333334 +lat_2=44 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102728, "+proj=lcc +lat_1=40.88333333333333 +lat_2=41.95 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102729, "+proj=lcc +lat_1=39.93333333333333 +lat_2=40.96666666666667 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102730, "+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=100000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102733, "+proj=lcc +lat_1=32.5 +lat_2=34.83333333333334 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102734, "+proj=lcc +lat_1=44.41666666666666 +lat_2=45.68333333333333 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102735, "+proj=lcc +lat_1=42.83333333333334 +lat_2=44.4 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102736, "+proj=lcc +lat_1=35.25 +lat_2=36.41666666666666 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102737, "+proj=lcc +lat_1=34.65 +lat_2=36.18333333333333 +lat_0=34 +lon_0=-101.5 +x_0=200000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102738, "+proj=lcc +lat_1=32.13333333333333 +lat_2=33.96666666666667 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000.0000000001 +y_0=2000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102739, "+proj=lcc +lat_1=30.11666666666667 +lat_2=31.88333333333333 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=700000 +y_0=3000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102740, "+proj=lcc +lat_1=28.38333333333333 +lat_2=30.28333333333334 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000.0000000001 +y_0=4000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102741, "+proj=lcc +lat_1=26.16666666666667 +lat_2=27.83333333333333 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000 +y_0=4999999.999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102742, "+proj=lcc +lat_1=40.71666666666667 +lat_2=41.78333333333333 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.0000000002 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102743, "+proj=lcc +lat_1=39.01666666666667 +lat_2=40.65 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.0000000002 +y_0=2000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102744, "+proj=lcc +lat_1=37.21666666666667 +lat_2=38.35 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.0000000002 +y_0=3000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102745, "+proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.9999642857142857 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102746, "+proj=lcc +lat_1=38.03333333333333 +lat_2=39.2 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3499999.999999999 +y_0=2000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102747, "+proj=lcc +lat_1=36.76666666666667 +lat_2=37.96666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3499999.999999999 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102748, "+proj=lcc +lat_1=47.5 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102749, "+proj=lcc +lat_1=45.83333333333334 +lat_2=47.33333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102750, "+proj=lcc +lat_1=39 +lat_2=40.25 +lat_0=38.5 +lon_0=-79.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102751, "+proj=lcc +lat_1=37.48333333333333 +lat_2=38.88333333333333 +lat_0=37 +lon_0=-81 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102752, "+proj=lcc +lat_1=45.56666666666667 +lat_2=46.76666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102753, "+proj=lcc +lat_1=44.25 +lat_2=45.5 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102754, "+proj=lcc +lat_1=42.73333333333333 +lat_2=44.06666666666667 +lat_0=42 +lon_0=-90 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102755, "+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102756, "+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=399999.9999999999 +y_0=100000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102757, "+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102758, "+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=799999.9999999999 +y_0=100000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102761, "+proj=lcc +lat_1=18.03333333333334 +lat_2=18.43333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=200000 +y_0=200000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{102766, "+proj=poly +lat_0=13.47246635277778 +lon_0=-144.7487507055556 +x_0=49999.99999999999 +y_0=49999.99999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs"},
|
||||
{103300, "+proj=lcc +lat_1=49.8333339 +lat_2=51.16666733333333 +lat_0=90 +lon_0=4.367486666666666 +x_0=150000.01256 +y_0=5400088.4378 +ellps=intl +units=m +no_defs"},
|
||||
{104000, "+proj=longlat +ellps=clrk66 +datum=NAD27 +no_defs"},
|
||||
{104101, "+proj=longlat +ellps=bessel +no_defs"},
|
||||
{104102, "+proj=longlat +ellps=bessel +no_defs"},
|
||||
{104103, "+proj=longlat +ellps=clrk80 +no_defs"},
|
||||
{104104, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{104105, "+proj=longlat +ellps=bessel +no_defs"},
|
||||
{104106, "+proj=longlat +ellps=intl +no_defs"},
|
||||
{104107, "+proj=longlat +ellps=GRS80 +no_defs"},
|
||||
{104108, "+proj=longlat +ellps=GRS80 +no_defs"},
|
||||
{104261, "+proj=longlat +a=6378249.2 +b=6356514.999904194 +no_defs"},
|
||||
{104304, "+proj=longlat +a=6378249.2 +b=6356514.999904194 +no_defs"},
|
||||
{104305, "+proj=longlat +ellps=clrk80 +no_defs"}
|
||||
};
|
||||
|
||||
const code_element * first = arr;
|
||||
const code_element * last = arr + sizeof(arr) / sizeof(code_element);
|
||||
const code_element * el = binary_find_code_element(first, last, code);
|
||||
|
||||
return el != last ? el->proj4_str : "";
|
||||
}
|
||||
|
||||
}
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif
|
||||
48
include/boost/geometry/srs/projections/esri_params.hpp
Normal file
48
include/boost/geometry/srs/projections/esri_params.hpp
Normal file
@@ -0,0 +1,48 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_SRS_PROJECTIONS_ESRI_PARAMS_HPP
|
||||
#define BOOST_GEOMETRY_SRS_PROJECTIONS_ESRI_PARAMS_HPP
|
||||
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <boost/geometry/srs/spheroid.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace srs
|
||||
{
|
||||
|
||||
|
||||
struct esri
|
||||
{
|
||||
explicit esri(int c)
|
||||
: code(c)
|
||||
{}
|
||||
|
||||
int code;
|
||||
};
|
||||
|
||||
|
||||
template <int Code>
|
||||
struct static_esri
|
||||
{
|
||||
static const int code = Code;
|
||||
};
|
||||
|
||||
|
||||
} // namespace srs
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_SRS_PROJECTIONS_ESRI_PARAMS_HPP
|
||||
499
include/boost/geometry/srs/projections/esri_traits.hpp
Normal file
499
include/boost/geometry/srs/projections/esri_traits.hpp
Normal file
@@ -0,0 +1,499 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_ESRI_TRAITS_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_ESRI_TRAITS_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/srs/projections/factory.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/srid_traits.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
/*!
|
||||
\brief ESRI traits
|
||||
\details With help of the ESRI traits library users can statically use projections
|
||||
or coordinate systems specifying an ESRI code. The correct projections for transformations
|
||||
are used automically then, still keeping static polymorphism.
|
||||
\ingroup projection
|
||||
\tparam ESRI esri code
|
||||
*/
|
||||
template <size_t ESRI>
|
||||
struct esri_traits
|
||||
{
|
||||
// Specializations define:
|
||||
// - type to get projection type
|
||||
// - function par to get parameters
|
||||
};
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37001, longlat, WGS66, "+proj=longlat +ellps=WGS66 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 37002, longlat, 6378166, 6356784.283607107, "+proj=longlat +a=6378166 +b=6356784.283607107 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 37003, longlat, 6378150, 6356768.337244385, "+proj=longlat +a=6378150 +b=6356768.337244385 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37004, longlat, fschr60m, "+proj=longlat +ellps=fschr60m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 37005, longlat, 6378270, 6356794.343434343, "+proj=longlat +a=6378270 +b=6356794.343434343 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 37006, longlat, 6377295.664, 6356094.667915204, "+proj=longlat +a=6377295.664 +b=6356094.667915204 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 37007, longlat, 6376896, 6355834.846687363, "+proj=longlat +a=6376896 +b=6355834.846687363 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_S (esri, 37008, longlat, 6370997, "+proj=longlat +a=6370997 +b=6370997 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37201, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 37202, longlat, 6377276.345, 6356075.41314024, "+proj=longlat +a=6377276.345 +b=6356075.41314024 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 37203, longlat, 6377301.243, 6356100.230165384, "+proj=longlat +a=6377301.243 +b=6356100.230165384 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37204, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37205, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37206, longlat, clrk80, "+proj=longlat +ellps=clrk80 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37207, longlat, fschr60m, "+proj=longlat +ellps=fschr60m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37208, longlat, clrk80, "+proj=longlat +ellps=clrk80 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37211, longlat, clrk80, "+proj=longlat +ellps=clrk80 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37212, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37213, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37214, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37215, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37216, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37217, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37218, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37219, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37220, longlat, clrk66, "+proj=longlat +ellps=clrk66 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37221, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37222, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 37223, longlat, 6378249.2, 6356514.999904194, "+proj=longlat +a=6378249.2 +b=6356514.999904194 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37224, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37226, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37227, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37228, longlat, clrk80, "+proj=longlat +ellps=clrk80 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 37229, longlat, 6378270, 6356794.343434343, "+proj=longlat +a=6378270 +b=6356794.343434343 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37230, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37231, longlat, aust_SA, "+proj=longlat +ellps=aust_SA +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37232, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37233, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37234, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37235, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37237, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37238, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37239, longlat, clrk66, "+proj=longlat +ellps=clrk66 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37240, longlat, clrk80, "+proj=longlat +ellps=clrk80 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37241, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37242, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37243, longlat, clrk66, "+proj=longlat +ellps=clrk66 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37245, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37246, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37247, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37249, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37250, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37251, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37252, longlat, clrk66, "+proj=longlat +ellps=clrk66 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37253, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37254, longlat, clrk80, "+proj=longlat +ellps=clrk80 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37255, longlat, bessel, "+proj=longlat +ellps=bessel +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37257, longlat, krass, "+proj=longlat +ellps=krass +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37259, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 37260, longlat, clrk66, "+proj=longlat +ellps=clrk66 +no_defs");
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS (esri, 53001, "");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_S (esri, 53002, eqc, 6371000, "+proj=eqc +lat_ts=60 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_S (esri, 53003, mill, 6371000, "+proj=mill +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +R_A +a=6371000 +b=6371000 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_S (esri, 53004, merc, 6371000, "+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_S (esri, 53008, sinu, 6371000, "+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_S (esri, 53009, moll, 6371000, "+proj=moll +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_S (esri, 53010, eck6, 6371000, "+proj=eck6 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs");
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS (esri, 53011, "");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_S (esri, 53012, eck4, 6371000, "+proj=eck4 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs");
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS (esri, 53013, "");
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS (esri, 53014, "");
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS (esri, 53015, "");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_S (esri, 53016, gall, 6371000, "+proj=gall +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs");
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS (esri, 53017, "");
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS (esri, 53018, "");
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS (esri, 53019, "");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_S (esri, 53021, poly, 6371000, "+proj=poly +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs");
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS (esri, 53022, "");
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS (esri, 53023, "");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_S (esri, 53024, bonne, 6371000, "+proj=bonne +lon_0=0 +lat_1=60 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_S (esri, 53025, omerc, 6371000, "+proj=omerc +lat_0=40 +lon_1=0 +lat_1=0 +lon_2=0 +lat_2=0 +k=1 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_S (esri, 53026, stere, 6371000, "+proj=stere +lat_0=0 +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_S (esri, 53027, eqdc, 6371000, "+proj=eqdc +lat_0=0 +lon_0=0 +lat_1=60 +lat_2=60 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_S (esri, 53028, cass, 6371000, "+proj=cass +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_S (esri, 53029, vandg, 6371000, "+proj=vandg +lon_0=0 +x_0=0 +y_0=0 +R_A +a=6371000 +b=6371000 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_S (esri, 53030, robin, 6371000, "+proj=robin +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_S (esri, 53031, tpeqd, 6371000, "+proj=tpeqd +lat_1=0 +lon_1=0 +lat_2=60 +lon_2=60 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_S (esri, 53032, aeqd, 6371000, "+proj=aeqd +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs");
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS (esri, 54001, "");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 54002, eqc, WGS84, WGS84, "+proj=eqc +lat_ts=60 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_S (esri, 54003, mill, 6371007.1810824294, "+proj=mill +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +R_A +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 54004, merc, WGS84, WGS84, "+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 54008, sinu, WGS84, WGS84, "+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 54009, moll, WGS84, WGS84, "+proj=moll +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 54010, eck6, WGS84, WGS84, "+proj=eck6 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS (esri, 54011, "");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 54012, eck4, WGS84, WGS84, "+proj=eck4 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS (esri, 54013, "");
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS (esri, 54014, "");
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS (esri, 54015, "");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 54016, gall, WGS84, WGS84, "+proj=gall +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS (esri, 54017, "");
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS (esri, 54018, "");
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS (esri, 54019, "");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 54021, poly, WGS84, WGS84, "+proj=poly +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS (esri, 54022, "");
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS (esri, 54023, "");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 54024, bonne, WGS84, WGS84, "+proj=bonne +lon_0=0 +lat_1=60 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 54025, omerc, WGS84, WGS84, "+proj=omerc +lat_0=40 +lon_1=0 +lat_1=0 +lon_2=0 +lat_2=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 54026, stere, WGS84, WGS84, "+proj=stere +lat_0=0 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 54027, eqdc, WGS84, WGS84, "+proj=eqdc +lat_0=0 +lon_0=0 +lat_1=60 +lat_2=60 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 54028, cass, WGS84, WGS84, "+proj=cass +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_S (esri, 54029, vandg, 6371007.1810824294, "+proj=vandg +lon_0=0 +x_0=0 +y_0=0 +R_A +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 54030, robin, WGS84, WGS84, "+proj=robin +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 54031, tpeqd, WGS84, WGS84, "+proj=tpeqd +lat_1=0 +lon_1=0 +lat_2=60 +lon_2=60 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 54032, aeqd, WGS84, WGS84, "+proj=aeqd +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 65061, poly, clrk66, NAD27, "+proj=poly +lat_0=13.47246635277778 +lon_0=-144.7487507055556 +x_0=50000.00000000001 +y_0=50000.00000000001 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 65161, poly, GRS80, NAD83, "+proj=poly +lat_0=13.47246635277778 +lon_0=-144.7487507055556 +x_0=50000 +y_0=50000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102001, aea, GRS80, NAD83, "+proj=aea +lat_1=50 +lat_2=70 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102002, lcc, GRS80, NAD83, "+proj=lcc +lat_1=50 +lat_2=70 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102003, aea, GRS80, NAD83, "+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=37.5 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102004, lcc, GRS80, NAD83, "+proj=lcc +lat_1=33 +lat_2=45 +lat_0=39 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102005, eqdc, GRS80, NAD83, "+proj=eqdc +lat_0=0 +lon_0=0 +lat_1=33 +lat_2=45 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102006, aea, GRS80, NAD83, "+proj=aea +lat_1=55 +lat_2=65 +lat_0=50 +lon_0=-154 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102007, aea, GRS80, NAD83, "+proj=aea +lat_1=8 +lat_2=18 +lat_0=13 +lon_0=-157 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102008, aea, GRS80, NAD83, "+proj=aea +lat_1=20 +lat_2=60 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102009, lcc, GRS80, NAD83, "+proj=lcc +lat_1=20 +lat_2=60 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102010, eqdc, GRS80, NAD83, "+proj=eqdc +lat_0=0 +lon_0=0 +lat_1=20 +lat_2=60 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102011, sinu, WGS84, WGS84, "+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102012, lcc, WGS84, WGS84, "+proj=lcc +lat_1=30 +lat_2=62 +lat_0=0 +lon_0=105 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102013, aea, intl, "+proj=aea +lat_1=43 +lat_2=62 +lat_0=30 +lon_0=10 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102014, lcc, intl, "+proj=lcc +lat_1=43 +lat_2=62 +lat_0=30 +lon_0=10 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102015, lcc, aust_SA, "+proj=lcc +lat_1=-5 +lat_2=-42 +lat_0=-32 +lon_0=-60 +x_0=0 +y_0=0 +ellps=aust_SA +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102016, aeqd, WGS84, WGS84, "+proj=aeqd +lat_0=90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102017, laea, WGS84, WGS84, "+proj=laea +lat_0=90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102018, stere, WGS84, WGS84, "+proj=stere +lat_0=90 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102019, aeqd, WGS84, WGS84, "+proj=aeqd +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102020, laea, WGS84, WGS84, "+proj=laea +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102021, stere, WGS84, WGS84, "+proj=stere +lat_0=-90 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102022, aea, WGS84, WGS84, "+proj=aea +lat_1=20 +lat_2=-23 +lat_0=0 +lon_0=25 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102023, eqdc, WGS84, WGS84, "+proj=eqdc +lat_0=0 +lon_0=0 +lat_1=20 +lat_2=-23 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102024, lcc, WGS84, WGS84, "+proj=lcc +lat_1=20 +lat_2=-23 +lat_0=0 +lon_0=25 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102025, aea, WGS84, WGS84, "+proj=aea +lat_1=15 +lat_2=65 +lat_0=30 +lon_0=95 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102026, eqdc, WGS84, WGS84, "+proj=eqdc +lat_0=0 +lon_0=0 +lat_1=15 +lat_2=65 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102027, lcc, WGS84, WGS84, "+proj=lcc +lat_1=15 +lat_2=65 +lat_0=30 +lon_0=95 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102028, aea, WGS84, WGS84, "+proj=aea +lat_1=7 +lat_2=-32 +lat_0=-15 +lon_0=125 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102029, eqdc, WGS84, WGS84, "+proj=eqdc +lat_0=0 +lon_0=0 +lat_1=7 +lat_2=-32 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102030, lcc, WGS84, WGS84, "+proj=lcc +lat_1=7 +lat_2=-32 +lat_0=-15 +lon_0=125 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102031, eqdc, intl, "+proj=eqdc +lat_0=0 +lon_0=0 +lat_1=43 +lat_2=62 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102032, eqdc, aust_SA, "+proj=eqdc +lat_0=0 +lon_0=0 +lat_1=-5 +lat_2=-42 +x_0=0 +y_0=0 +ellps=aust_SA +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102033, aea, aust_SA, "+proj=aea +lat_1=-5 +lat_2=-42 +lat_0=-32 +lon_0=-60 +x_0=0 +y_0=0 +ellps=aust_SA +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102065, krovak, bessel, "+proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813975277778 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102066, krovak, bessel, "+proj=krovak +lat_0=49.5 +lon_0=42.5 +alpha=30.28813975277778 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +pm=-17.66666666666667 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102067, krovak, bessel, "+proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813975277778 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102091, tmerc, intl, "+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000 +y_0=0 +ellps=intl +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102092, tmerc, intl, "+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9996 +x_0=2520000 +y_0=0 +ellps=intl +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 102101, tmerc, 6377492.018, 6356173.508712696, "+proj=tmerc +lat_0=58 +lon_0=6.05625 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 102102, tmerc, 6377492.018, 6356173.508712696, "+proj=tmerc +lat_0=58 +lon_0=8.389583333333333 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 102103, tmerc, 6377492.018, 6356173.508712696, "+proj=tmerc +lat_0=58 +lon_0=10.72291666666667 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 102104, tmerc, 6377492.018, 6356173.508712696, "+proj=tmerc +lat_0=58 +lon_0=13.22291666666667 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 102105, tmerc, 6377492.018, 6356173.508712696, "+proj=tmerc +lat_0=58 +lon_0=16.88958333333333 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 102106, tmerc, 6377492.018, 6356173.508712696, "+proj=tmerc +lat_0=58 +lon_0=20.88958333333333 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 102107, tmerc, 6377492.018, 6356173.508712696, "+proj=tmerc +lat_0=58 +lon_0=24.88958333333333 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 102108, tmerc, 6377492.018, 6356173.508712696, "+proj=tmerc +lat_0=58 +lon_0=29.05625 +k=1 +x_0=0 +y_0=0 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102110, lcc, GRS80, "+proj=lcc +lat_1=44 +lat_2=49 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102114, utm, clrk66, "+proj=utm +zone=4 +ellps=clrk66 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102115, utm, clrk66, "+proj=utm +zone=5 +ellps=clrk66 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102120, omerc, clrk66, NAD27, "+proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.255555555556 +k=0.9996 +x_0=2546731.495961392 +y_0=-4354009.816002033 +ellps=clrk66 +datum=NAD27 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102121, omerc, GRS80, NAD83, "+proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.255555555556 +k=0.9996 +x_0=2546731.495961392 +y_0=-4354009.816002033 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102122, omerc, clrk66, NAD27, "+proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.255555555556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +ellps=clrk66 +datum=NAD27 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102123, omerc, GRS80, NAD83, "+proj=omerc +lat_0=45.30916666666666 +lonc=-86 +alpha=337.255555555556 +k=0.9996 +x_0=2546731.496 +y_0=-4354009.816 +ellps=GRS80 +datum=NAD83 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 102132, utm, 6377492.018, 6356173.508712696, "+proj=utm +zone=32 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 102133, utm, 6377492.018, 6356173.508712696, "+proj=utm +zone=33 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 102134, utm, 6377492.018, 6356173.508712696, "+proj=utm +zone=34 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 102135, utm, 6377492.018, 6356173.508712696, "+proj=utm +zone=35 +a=6377492.018 +b=6356173.508712696 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102140, tmerc, intl, "+proj=tmerc +lat_0=22.31213333333334 +lon_0=114.1785555555556 +k=1 +x_0=836694.05 +y_0=819069.8 +ellps=intl +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102141, utm, intl, "+proj=utm +zone=49 +ellps=intl +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102142, utm, intl, "+proj=utm +zone=50 +ellps=intl +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102151, utm, bessel, "+proj=utm +zone=51 +ellps=bessel +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102152, utm, bessel, "+proj=utm +zone=52 +ellps=bessel +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102153, utm, bessel, "+proj=utm +zone=53 +ellps=bessel +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102154, utm, bessel, "+proj=utm +zone=54 +ellps=bessel +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102155, utm, bessel, "+proj=utm +zone=55 +ellps=bessel +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102156, utm, bessel, "+proj=utm +zone=56 +ellps=bessel +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102160, tmerc, intl, "+proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1 +x_0=200180.598 +y_0=299913.01 +ellps=intl +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102161, tmerc, intl, "+proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1 +x_0=180.598 +y_0=-86.98999999999999 +ellps=intl +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102162, utm, intl, "+proj=utm +zone=26 +ellps=intl +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102163, bonne, bessel, "+proj=bonne +lon_0=-8.131906111111112 +lat_1=39.66666666666666 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102164, tmerc, intl, "+proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1 +x_0=200000 +y_0=300000 +ellps=intl +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102165, tmerc, intl, "+proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1 +x_0=0 +y_0=0 +ellps=intl +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102166, utm, intl, "+proj=utm +zone=25 +ellps=intl +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102167, utm, intl, "+proj=utm +zone=28 +ellps=intl +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102168, utm, intl, "+proj=utm +zone=26 +ellps=intl +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102169, utm, intl, "+proj=utm +zone=28 +ellps=intl +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 102191, lcc, 6378249.2, 6356514.999904194, "+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=-5.4 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 102192, lcc, 6378249.2, 6356514.999904194, "+proj=lcc +lat_1=29.7 +lat_0=29.7 +lon_0=-5.4 +k_0=0.9996155960000001 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 102193, lcc, 6378249.2, 6356514.999904194, "+proj=lcc +lat_1=26.1 +lat_0=26.1 +lon_0=-5.4 +k_0=0.9996 +x_0=1200000 +y_0=400000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102229, tmerc, GRS80, "+proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.99996 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102230, tmerc, GRS80, "+proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.9999333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102241, lcc, GRS80, "+proj=lcc +lat_1=40 +lat_2=41.66666666666666 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102242, lcc, GRS80, "+proj=lcc +lat_1=38.33333333333334 +lat_2=39.83333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102243, lcc, GRS80, "+proj=lcc +lat_1=37.06666666666667 +lat_2=38.43333333333333 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102244, lcc, GRS80, "+proj=lcc +lat_1=36 +lat_2=37.25 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102245, lcc, GRS80, "+proj=lcc +lat_1=34.03333333333333 +lat_2=35.46666666666667 +lat_0=33.5 +lon_0=-118 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102246, lcc, GRS80, "+proj=lcc +lat_1=32.78333333333333 +lat_2=33.88333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102248, tmerc, GRS80, "+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102249, tmerc, GRS80, "+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102250, tmerc, GRS80, "+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.9999333333333333 +x_0=213360 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102251, lcc, GRS80, "+proj=lcc +lat_1=34.93333333333333 +lat_2=36.23333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102252, lcc, GRS80, "+proj=lcc +lat_1=33.3 +lat_2=34.76666666666667 +lat_0=32.66666666666666 +lon_0=-92 +x_0=400000 +y_0=400000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102253, lcc, GRS80, "+proj=lcc +lat_1=39.71666666666667 +lat_2=40.78333333333333 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102254, lcc, GRS80, "+proj=lcc +lat_1=38.45 +lat_2=39.75 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102255, lcc, GRS80, "+proj=lcc +lat_1=37.23333333333333 +lat_2=38.43333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102256, lcc, GRS80, "+proj=lcc +lat_1=41.2 +lat_2=41.86666666666667 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096 +y_0=152400.3048 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102257, tmerc, GRS80, "+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102258, tmerc, GRS80, "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.9999411764705882 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102259, tmerc, GRS80, "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.9999411764705882 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102260, lcc, GRS80, "+proj=lcc +lat_1=29.58333333333333 +lat_2=30.75 +lat_0=29 +lon_0=-84.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102261, tmerc, GRS80, "+proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.9999666666666667 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102262, tmerc, GRS80, "+proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.9999666666666667 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102263, tmerc, GRS80, "+proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.99999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102264, tmerc, GRS80, "+proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.99999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102265, tmerc, GRS80, "+proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102266, tmerc, GRS80, "+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102267, tmerc, GRS80, "+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102268, tmerc, GRS80, "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473684210526 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102269, tmerc, GRS80, "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473684210526 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102270, tmerc, GRS80, "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.9999333333333333 +x_0=800000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102271, tmerc, GRS80, "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102272, tmerc, GRS80, "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.9999411764705882 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102273, tmerc, GRS80, "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.9999666666666667 +x_0=100000 +y_0=250000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102274, tmerc, GRS80, "+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.9999666666666667 +x_0=900000 +y_0=250000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102277, lcc, GRS80, "+proj=lcc +lat_1=38.71666666666667 +lat_2=39.78333333333333 +lat_0=38.33333333333334 +lon_0=-98 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102278, lcc, GRS80, "+proj=lcc +lat_1=37.26666666666667 +lat_2=38.56666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=400000 +y_0=400000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102279, lcc, GRS80, "+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102280, lcc, GRS80, "+proj=lcc +lat_1=36.73333333333333 +lat_2=37.93333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000 +y_0=500000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102281, lcc, GRS80, "+proj=lcc +lat_1=31.16666666666667 +lat_2=32.66666666666666 +lat_0=30.5 +lon_0=-92.5 +x_0=1000000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102282, lcc, GRS80, "+proj=lcc +lat_1=29.3 +lat_2=30.7 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=1000000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102283, tmerc, GRS80, "+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102284, tmerc, GRS80, "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.9999666666666667 +x_0=900000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102285, lcc, GRS80, "+proj=lcc +lat_1=38.3 +lat_2=39.45 +lat_0=37.66666666666666 +lon_0=-77 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102286, lcc, GRS80, "+proj=lcc +lat_1=41.71666666666667 +lat_2=42.68333333333333 +lat_0=41 +lon_0=-71.5 +x_0=200000 +y_0=750000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102287, lcc, GRS80, "+proj=lcc +lat_1=41.28333333333333 +lat_2=41.48333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102288, lcc, GRS80, "+proj=lcc +lat_1=45.48333333333333 +lat_2=47.08333333333334 +lat_0=44.78333333333333 +lon_0=-87 +x_0=8000000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102289, lcc, GRS80, "+proj=lcc +lat_1=44.18333333333333 +lat_2=45.7 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=6000000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102290, lcc, GRS80, "+proj=lcc +lat_1=42.1 +lat_2=43.66666666666666 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=4000000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102291, lcc, GRS80, "+proj=lcc +lat_1=47.03333333333333 +lat_2=48.63333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102292, lcc, GRS80, "+proj=lcc +lat_1=45.61666666666667 +lat_2=47.05 +lat_0=45 +lon_0=-94.25 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102293, lcc, GRS80, "+proj=lcc +lat_1=43.78333333333333 +lat_2=45.21666666666667 +lat_0=43 +lon_0=-94 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102294, tmerc, GRS80, "+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102295, tmerc, GRS80, "+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=700000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102296, tmerc, GRS80, "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.9999333333333333 +x_0=250000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102297, tmerc, GRS80, "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.9999333333333333 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102298, tmerc, GRS80, "+proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.9999411764705882 +x_0=850000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102300, lcc, GRS80, "+proj=lcc +lat_1=45 +lat_2=49 +lat_0=44.25 +lon_0=-109.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102304, lcc, GRS80, "+proj=lcc +lat_1=40 +lat_2=43 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102307, tmerc, GRS80, "+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000 +y_0=8000000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102308, tmerc, GRS80, "+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000 +y_0=6000000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102309, tmerc, GRS80, "+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=800000 +y_0=4000000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102310, tmerc, GRS80, "+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.9999666666666667 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102311, tmerc, GRS80, "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102312, tmerc, GRS80, "+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.9999090909090909 +x_0=165000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102313, tmerc, GRS80, "+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102314, tmerc, GRS80, "+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.9999166666666667 +x_0=830000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102315, tmerc, GRS80, "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102316, tmerc, GRS80, "+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=250000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102317, tmerc, GRS80, "+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102318, lcc, GRS80, "+proj=lcc +lat_1=40.66666666666666 +lat_2=41.03333333333333 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102320, lcc, GRS80, "+proj=lcc +lat_1=47.43333333333333 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102321, lcc, GRS80, "+proj=lcc +lat_1=46.18333333333333 +lat_2=47.48333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102322, lcc, GRS80, "+proj=lcc +lat_1=40.43333333333333 +lat_2=41.7 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102323, lcc, GRS80, "+proj=lcc +lat_1=38.73333333333333 +lat_2=40.03333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102324, lcc, GRS80, "+proj=lcc +lat_1=35.56666666666667 +lat_2=36.76666666666667 +lat_0=35 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102325, lcc, GRS80, "+proj=lcc +lat_1=33.93333333333333 +lat_2=35.23333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102326, lcc, GRS80, "+proj=lcc +lat_1=44.33333333333334 +lat_2=46 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102327, lcc, GRS80, "+proj=lcc +lat_1=42.33333333333334 +lat_2=44 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102330, tmerc, GRS80, "+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=100000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102334, lcc, GRS80, "+proj=lcc +lat_1=44.41666666666666 +lat_2=45.68333333333333 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102335, lcc, GRS80, "+proj=lcc +lat_1=42.83333333333334 +lat_2=44.4 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102336, lcc, GRS80, "+proj=lcc +lat_1=35.25 +lat_2=36.41666666666666 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102337, lcc, GRS80, "+proj=lcc +lat_1=34.65 +lat_2=36.18333333333333 +lat_0=34 +lon_0=-101.5 +x_0=200000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102338, lcc, GRS80, "+proj=lcc +lat_1=32.13333333333333 +lat_2=33.96666666666667 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000 +y_0=2000000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102339, lcc, GRS80, "+proj=lcc +lat_1=30.11666666666667 +lat_2=31.88333333333333 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=700000 +y_0=3000000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102340, lcc, GRS80, "+proj=lcc +lat_1=28.38333333333333 +lat_2=30.28333333333334 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000 +y_0=4000000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102341, lcc, GRS80, "+proj=lcc +lat_1=26.16666666666667 +lat_2=27.83333333333333 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000 +y_0=5000000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102342, lcc, GRS80, "+proj=lcc +lat_1=40.71666666666667 +lat_2=41.78333333333333 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102343, lcc, GRS80, "+proj=lcc +lat_1=39.01666666666667 +lat_2=40.65 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000 +y_0=2000000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102344, lcc, GRS80, "+proj=lcc +lat_1=37.21666666666667 +lat_2=38.35 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000 +y_0=3000000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102345, tmerc, GRS80, "+proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.9999642857142857 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102346, lcc, GRS80, "+proj=lcc +lat_1=38.03333333333333 +lat_2=39.2 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3500000 +y_0=2000000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102347, lcc, GRS80, "+proj=lcc +lat_1=36.76666666666667 +lat_2=37.96666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3500000 +y_0=1000000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102348, lcc, GRS80, "+proj=lcc +lat_1=47.5 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102349, lcc, GRS80, "+proj=lcc +lat_1=45.83333333333334 +lat_2=47.33333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102350, lcc, GRS80, "+proj=lcc +lat_1=39 +lat_2=40.25 +lat_0=38.5 +lon_0=-79.5 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102351, lcc, GRS80, "+proj=lcc +lat_1=37.48333333333333 +lat_2=38.88333333333333 +lat_0=37 +lon_0=-81 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102352, lcc, GRS80, "+proj=lcc +lat_1=45.56666666666667 +lat_2=46.76666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102353, lcc, GRS80, "+proj=lcc +lat_1=44.25 +lat_2=45.5 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102354, lcc, GRS80, "+proj=lcc +lat_1=42.73333333333333 +lat_2=44.06666666666667 +lat_0=42 +lon_0=-90 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102355, tmerc, GRS80, "+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102356, tmerc, GRS80, "+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=400000 +y_0=100000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102357, tmerc, GRS80, "+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000 +y_0=0 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102358, tmerc, GRS80, "+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000 +y_0=100000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102361, lcc, GRS80, "+proj=lcc +lat_1=18.03333333333334 +lat_2=18.43333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=200000 +y_0=200000 +ellps=GRS80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 102491, lcc, 6378249.2, 6356514.999904194, "+proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.999625544 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 102492, lcc, 6378249.2, 6356514.999904194, "+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.999625769 +x_0=500000 +y_0=300000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 102581, lcc, 6378249.2, 6356514.999904194, "+proj=lcc +lat_1=49.5 +lat_0=49.5 +lon_0=2.337229166666667 +k_0=0.999877341 +x_0=600000 +y_0=1200000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 102582, lcc, 6378249.2, 6356514.999904194, "+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=2.337229166666667 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 102583, lcc, 6378249.2, 6356514.999904194, "+proj=lcc +lat_1=44.1 +lat_0=44.1 +lon_0=2.337229166666667 +k_0=0.999877499 +x_0=600000 +y_0=3200000 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 102584, lcc, 6378249.2, 6356514.999904194, "+proj=lcc +lat_1=42.165 +lat_0=42.165 +lon_0=2.337229166666667 +k_0=0.99994471 +x_0=234.358 +y_0=4185861.369 +a=6378249.2 +b=6356514.999904194 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102591, lcc, clrk80, "+proj=lcc +lat_1=36 +lat_0=36 +lon_0=2.7 +k_0=0.999625544 +x_0=500135 +y_0=300090 +ellps=clrk80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 102592, lcc, clrk80, "+proj=lcc +lat_1=33.3 +lat_0=33.3 +lon_0=2.7 +k_0=0.999625769 +x_0=500135 +y_0=300090 +ellps=clrk80 +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102629, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=30.5 +lon_0=-85.83333333333333 +k=0.99996 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102630, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=30 +lon_0=-87.5 +k=0.9999333333333333 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102631, omerc, GRS80, NAD83, "+proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=-36.86989764583333 +k=0.9999 +x_0=4999999.999999999 +y_0=-4999999.999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102632, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=54 +lon_0=-142 +k=0.9999 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102633, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=54 +lon_0=-146 +k=0.9999 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102634, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=54 +lon_0=-150 +k=0.9999 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102635, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=54 +lon_0=-154 +k=0.9999 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102636, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=54 +lon_0=-158 +k=0.9999 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102637, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=54 +lon_0=-162 +k=0.9999 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102638, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=54 +lon_0=-166 +k=0.9999 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102639, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=54 +lon_0=-170 +k=0.9999 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102640, lcc, GRS80, NAD83, "+proj=lcc +lat_1=51.83333333333334 +lat_2=53.83333333333334 +lat_0=51 +lon_0=-176 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102641, lcc, GRS80, NAD83, "+proj=lcc +lat_1=40 +lat_2=41.66666666666666 +lat_0=39.33333333333334 +lon_0=-122 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102642, lcc, GRS80, NAD83, "+proj=lcc +lat_1=38.33333333333334 +lat_2=39.83333333333334 +lat_0=37.66666666666666 +lon_0=-122 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102643, lcc, GRS80, NAD83, "+proj=lcc +lat_1=37.06666666666667 +lat_2=38.43333333333333 +lat_0=36.5 +lon_0=-120.5 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102644, lcc, GRS80, NAD83, "+proj=lcc +lat_1=36 +lat_2=37.25 +lat_0=35.33333333333334 +lon_0=-119 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102645, lcc, GRS80, NAD83, "+proj=lcc +lat_1=34.03333333333333 +lat_2=35.46666666666667 +lat_0=33.5 +lon_0=-118 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102646, lcc, GRS80, NAD83, "+proj=lcc +lat_1=32.78333333333333 +lat_2=33.88333333333333 +lat_0=32.16666666666666 +lon_0=-116.25 +x_0=2000000 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102648, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=31 +lon_0=-110.1666666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102649, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=31 +lon_0=-111.9166666666667 +k=0.9999 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102650, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=31 +lon_0=-113.75 +k=0.9999333333333333 +x_0=213360 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102651, lcc, GRS80, NAD83, "+proj=lcc +lat_1=34.93333333333333 +lat_2=36.23333333333333 +lat_0=34.33333333333334 +lon_0=-92 +x_0=399999.9999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102652, lcc, GRS80, NAD83, "+proj=lcc +lat_1=33.3 +lat_2=34.76666666666667 +lat_0=32.66666666666666 +lon_0=-92 +x_0=399999.9999999999 +y_0=399999.9999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102653, lcc, GRS80, NAD83, "+proj=lcc +lat_1=39.71666666666667 +lat_2=40.78333333333333 +lat_0=39.33333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102654, lcc, GRS80, NAD83, "+proj=lcc +lat_1=38.45 +lat_2=39.75 +lat_0=37.83333333333334 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102655, lcc, GRS80, NAD83, "+proj=lcc +lat_1=37.23333333333333 +lat_2=38.43333333333333 +lat_0=36.66666666666666 +lon_0=-105.5 +x_0=914401.8289 +y_0=304800.6096 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102656, lcc, GRS80, NAD83, "+proj=lcc +lat_1=41.2 +lat_2=41.86666666666667 +lat_0=40.83333333333334 +lon_0=-72.75 +x_0=304800.6096 +y_0=152400.3048 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102657, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=38 +lon_0=-75.41666666666667 +k=0.999995 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102658, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.9999411764705882 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102659, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=24.33333333333333 +lon_0=-82 +k=0.9999411764705882 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102660, lcc, GRS80, NAD83, "+proj=lcc +lat_1=29.58333333333333 +lat_2=30.75 +lat_0=29 +lon_0=-84.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102661, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=18.83333333333333 +lon_0=-155.5 +k=0.9999666666666667 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102662, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=20.33333333333333 +lon_0=-156.6666666666667 +k=0.9999666666666667 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102663, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=21.16666666666667 +lon_0=-158 +k=0.99999 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102664, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=21.83333333333333 +lon_0=-159.5 +k=0.99999 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102665, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=21.66666666666667 +lon_0=-160.1666666666667 +k=1 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102666, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=30 +lon_0=-82.16666666666667 +k=0.9999 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102667, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=30 +lon_0=-84.16666666666667 +k=0.9999 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102668, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-112.1666666666667 +k=0.9999473684210526 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102669, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-114 +k=0.9999473684210526 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102670, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=41.66666666666666 +lon_0=-115.75 +k=0.9999333333333333 +x_0=799999.9999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102671, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-88.33333333333333 +k=0.9999749999999999 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102672, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=36.66666666666666 +lon_0=-90.16666666666667 +k=0.9999411764705882 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102673, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=37.5 +lon_0=-85.66666666666667 +k=0.9999666666666667 +x_0=100000 +y_0=250000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102674, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=37.5 +lon_0=-87.08333333333333 +k=0.9999666666666667 +x_0=900000.0000000001 +y_0=250000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102675, lcc, GRS80, NAD83, "+proj=lcc +lat_1=42.06666666666667 +lat_2=43.26666666666667 +lat_0=41.5 +lon_0=-93.5 +x_0=1500000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102676, lcc, GRS80, NAD83, "+proj=lcc +lat_1=40.61666666666667 +lat_2=41.78333333333333 +lat_0=40 +lon_0=-93.5 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102677, lcc, GRS80, NAD83, "+proj=lcc +lat_1=38.71666666666667 +lat_2=39.78333333333333 +lat_0=38.33333333333334 +lon_0=-98 +x_0=399999.9999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102678, lcc, GRS80, NAD83, "+proj=lcc +lat_1=37.26666666666667 +lat_2=38.56666666666667 +lat_0=36.66666666666666 +lon_0=-98.5 +x_0=399999.9999999999 +y_0=399999.9999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102679, lcc, GRS80, NAD83, "+proj=lcc +lat_1=37.96666666666667 +lat_2=38.96666666666667 +lat_0=37.5 +lon_0=-84.25 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102680, lcc, GRS80, NAD83, "+proj=lcc +lat_1=36.73333333333333 +lat_2=37.93333333333333 +lat_0=36.33333333333334 +lon_0=-85.75 +x_0=500000.0000000002 +y_0=500000.0000000002 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102681, lcc, GRS80, NAD83, "+proj=lcc +lat_1=31.16666666666667 +lat_2=32.66666666666666 +lat_0=30.5 +lon_0=-92.5 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102682, lcc, GRS80, NAD83, "+proj=lcc +lat_1=29.3 +lat_2=30.7 +lat_0=28.5 +lon_0=-91.33333333333333 +x_0=1000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102683, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=43.66666666666666 +lon_0=-68.5 +k=0.9999 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102684, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0.9999666666666667 +x_0=900000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102685, lcc, GRS80, NAD83, "+proj=lcc +lat_1=38.3 +lat_2=39.45 +lat_0=37.66666666666666 +lon_0=-77 +x_0=399999.9999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102686, lcc, GRS80, NAD83, "+proj=lcc +lat_1=41.71666666666667 +lat_2=42.68333333333333 +lat_0=41 +lon_0=-71.5 +x_0=200000 +y_0=750000.0000000001 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102687, lcc, GRS80, NAD83, "+proj=lcc +lat_1=41.28333333333333 +lat_2=41.48333333333333 +lat_0=41 +lon_0=-70.5 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102688, lcc, GRS80, NAD83, "+proj=lcc +lat_1=45.48333333333333 +lat_2=47.08333333333334 +lat_0=44.78333333333333 +lon_0=-87 +x_0=7999999.999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102689, lcc, GRS80, NAD83, "+proj=lcc +lat_1=44.18333333333333 +lat_2=45.7 +lat_0=43.31666666666667 +lon_0=-84.36666666666666 +x_0=6000000.000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102690, lcc, GRS80, NAD83, "+proj=lcc +lat_1=42.1 +lat_2=43.66666666666666 +lat_0=41.5 +lon_0=-84.36666666666666 +x_0=4000000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102691, lcc, GRS80, NAD83, "+proj=lcc +lat_1=47.03333333333333 +lat_2=48.63333333333333 +lat_0=46.5 +lon_0=-93.09999999999999 +x_0=799999.9999999999 +y_0=100000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102692, lcc, GRS80, NAD83, "+proj=lcc +lat_1=45.61666666666667 +lat_2=47.05 +lat_0=45 +lon_0=-94.25 +x_0=799999.9999999999 +y_0=100000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102693, lcc, GRS80, NAD83, "+proj=lcc +lat_1=43.78333333333333 +lat_2=45.21666666666667 +lat_0=43 +lon_0=-94 +x_0=799999.9999999999 +y_0=100000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102694, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=29.5 +lon_0=-88.83333333333333 +k=0.99995 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102695, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=29.5 +lon_0=-90.33333333333333 +k=0.99995 +x_0=700000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102696, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-90.5 +k=0.9999333333333333 +x_0=250000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102697, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.9999333333333333 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102698, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=36.16666666666666 +lon_0=-94.5 +k=0.9999411764705882 +x_0=850000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102700, lcc, GRS80, NAD83, "+proj=lcc +lat_1=45 +lat_2=49 +lat_0=44.25 +lon_0=-109.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102704, lcc, GRS80, NAD83, "+proj=lcc +lat_1=40 +lat_2=43 +lat_0=39.83333333333334 +lon_0=-100 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102707, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000 +y_0=7999999.999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102708, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=34.75 +lon_0=-116.6666666666667 +k=0.9999 +x_0=500000.0000000002 +y_0=6000000.000000001 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102709, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=34.75 +lon_0=-118.5833333333333 +k=0.9999 +x_0=799999.9999999999 +y_0=4000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102710, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=42.5 +lon_0=-71.66666666666667 +k=0.9999666666666667 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102711, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102712, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=31 +lon_0=-104.3333333333333 +k=0.9999090909090909 +x_0=165000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102713, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=31 +lon_0=-106.25 +k=0.9999 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102714, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=31 +lon_0=-107.8333333333333 +k=0.9999166666666667 +x_0=829999.9999999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102715, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102716, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=40 +lon_0=-76.58333333333333 +k=0.9999375 +x_0=250000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102717, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=40 +lon_0=-78.58333333333333 +k=0.9999375 +x_0=350000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102718, lcc, GRS80, NAD83, "+proj=lcc +lat_1=40.66666666666666 +lat_2=41.03333333333333 +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102719, lcc, GRS80, NAD83, "+proj=lcc +lat_1=34.33333333333334 +lat_2=36.16666666666666 +lat_0=33.75 +lon_0=-79 +x_0=609601.2199999999 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102720, lcc, GRS80, NAD83, "+proj=lcc +lat_1=47.43333333333333 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-100.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102721, lcc, GRS80, NAD83, "+proj=lcc +lat_1=46.18333333333333 +lat_2=47.48333333333333 +lat_0=45.66666666666666 +lon_0=-100.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102722, lcc, GRS80, NAD83, "+proj=lcc +lat_1=40.43333333333333 +lat_2=41.7 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102723, lcc, GRS80, NAD83, "+proj=lcc +lat_1=38.73333333333333 +lat_2=40.03333333333333 +lat_0=38 +lon_0=-82.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102724, lcc, GRS80, NAD83, "+proj=lcc +lat_1=35.56666666666667 +lat_2=36.76666666666667 +lat_0=35 +lon_0=-98 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102725, lcc, GRS80, NAD83, "+proj=lcc +lat_1=33.93333333333333 +lat_2=35.23333333333333 +lat_0=33.33333333333334 +lon_0=-98 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102726, lcc, GRS80, NAD83, "+proj=lcc +lat_1=44.33333333333334 +lat_2=46 +lat_0=43.66666666666666 +lon_0=-120.5 +x_0=2500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102727, lcc, GRS80, NAD83, "+proj=lcc +lat_1=42.33333333333334 +lat_2=44 +lat_0=41.66666666666666 +lon_0=-120.5 +x_0=1500000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102728, lcc, GRS80, NAD83, "+proj=lcc +lat_1=40.88333333333333 +lat_2=41.95 +lat_0=40.16666666666666 +lon_0=-77.75 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102729, lcc, GRS80, NAD83, "+proj=lcc +lat_1=39.93333333333333 +lat_2=40.96666666666667 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102730, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=41.08333333333334 +lon_0=-71.5 +k=0.99999375 +x_0=100000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102733, lcc, GRS80, NAD83, "+proj=lcc +lat_1=32.5 +lat_2=34.83333333333334 +lat_0=31.83333333333333 +lon_0=-81 +x_0=609600.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102734, lcc, GRS80, NAD83, "+proj=lcc +lat_1=44.41666666666666 +lat_2=45.68333333333333 +lat_0=43.83333333333334 +lon_0=-100 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102735, lcc, GRS80, NAD83, "+proj=lcc +lat_1=42.83333333333334 +lat_2=44.4 +lat_0=42.33333333333334 +lon_0=-100.3333333333333 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102736, lcc, GRS80, NAD83, "+proj=lcc +lat_1=35.25 +lat_2=36.41666666666666 +lat_0=34.33333333333334 +lon_0=-86 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102737, lcc, GRS80, NAD83, "+proj=lcc +lat_1=34.65 +lat_2=36.18333333333333 +lat_0=34 +lon_0=-101.5 +x_0=200000 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102738, lcc, GRS80, NAD83, "+proj=lcc +lat_1=32.13333333333333 +lat_2=33.96666666666667 +lat_0=31.66666666666667 +lon_0=-98.5 +x_0=600000.0000000001 +y_0=2000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102739, lcc, GRS80, NAD83, "+proj=lcc +lat_1=30.11666666666667 +lat_2=31.88333333333333 +lat_0=29.66666666666667 +lon_0=-100.3333333333333 +x_0=700000 +y_0=3000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102740, lcc, GRS80, NAD83, "+proj=lcc +lat_1=28.38333333333333 +lat_2=30.28333333333334 +lat_0=27.83333333333333 +lon_0=-99 +x_0=600000.0000000001 +y_0=4000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102741, lcc, GRS80, NAD83, "+proj=lcc +lat_1=26.16666666666667 +lat_2=27.83333333333333 +lat_0=25.66666666666667 +lon_0=-98.5 +x_0=300000 +y_0=4999999.999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102742, lcc, GRS80, NAD83, "+proj=lcc +lat_1=40.71666666666667 +lat_2=41.78333333333333 +lat_0=40.33333333333334 +lon_0=-111.5 +x_0=500000.0000000002 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102743, lcc, GRS80, NAD83, "+proj=lcc +lat_1=39.01666666666667 +lat_2=40.65 +lat_0=38.33333333333334 +lon_0=-111.5 +x_0=500000.0000000002 +y_0=2000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102744, lcc, GRS80, NAD83, "+proj=lcc +lat_1=37.21666666666667 +lat_2=38.35 +lat_0=36.66666666666666 +lon_0=-111.5 +x_0=500000.0000000002 +y_0=3000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102745, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=42.5 +lon_0=-72.5 +k=0.9999642857142857 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102746, lcc, GRS80, NAD83, "+proj=lcc +lat_1=38.03333333333333 +lat_2=39.2 +lat_0=37.66666666666666 +lon_0=-78.5 +x_0=3499999.999999999 +y_0=2000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102747, lcc, GRS80, NAD83, "+proj=lcc +lat_1=36.76666666666667 +lat_2=37.96666666666667 +lat_0=36.33333333333334 +lon_0=-78.5 +x_0=3499999.999999999 +y_0=1000000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102748, lcc, GRS80, NAD83, "+proj=lcc +lat_1=47.5 +lat_2=48.73333333333333 +lat_0=47 +lon_0=-120.8333333333333 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102749, lcc, GRS80, NAD83, "+proj=lcc +lat_1=45.83333333333334 +lat_2=47.33333333333334 +lat_0=45.33333333333334 +lon_0=-120.5 +x_0=500000.0000000002 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102750, lcc, GRS80, NAD83, "+proj=lcc +lat_1=39 +lat_2=40.25 +lat_0=38.5 +lon_0=-79.5 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102751, lcc, GRS80, NAD83, "+proj=lcc +lat_1=37.48333333333333 +lat_2=38.88333333333333 +lat_0=37 +lon_0=-81 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102752, lcc, GRS80, NAD83, "+proj=lcc +lat_1=45.56666666666667 +lat_2=46.76666666666667 +lat_0=45.16666666666666 +lon_0=-90 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102753, lcc, GRS80, NAD83, "+proj=lcc +lat_1=44.25 +lat_2=45.5 +lat_0=43.83333333333334 +lon_0=-90 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102754, lcc, GRS80, NAD83, "+proj=lcc +lat_1=42.73333333333333 +lat_2=44.06666666666667 +lat_0=42 +lon_0=-90 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102755, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=40.5 +lon_0=-105.1666666666667 +k=0.9999375 +x_0=200000 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102756, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=40.5 +lon_0=-107.3333333333333 +k=0.9999375 +x_0=399999.9999999999 +y_0=100000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102757, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=40.5 +lon_0=-108.75 +k=0.9999375 +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102758, tmerc, GRS80, NAD83, "+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=799999.9999999999 +y_0=100000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102761, lcc, GRS80, NAD83, "+proj=lcc +lat_1=18.03333333333334 +lat_2=18.43333333333333 +lat_0=17.83333333333333 +lon_0=-66.43333333333334 +x_0=200000 +y_0=200000 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 102766, poly, GRS80, NAD83, "+proj=poly +lat_0=13.47246635277778 +lon_0=-144.7487507055556 +x_0=49999.99999999999 +y_0=49999.99999999999 +ellps=GRS80 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 103300, lcc, intl, "+proj=lcc +lat_1=49.8333339 +lat_2=51.16666733333333 +lat_0=90 +lon_0=4.367486666666666 +x_0=150000.01256 +y_0=5400088.4378 +ellps=intl +units=m +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_ED(esri, 104000, longlat, clrk66, NAD27, "+proj=longlat +ellps=clrk66 +datum=NAD27 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 104101, longlat, bessel, "+proj=longlat +ellps=bessel +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 104102, longlat, bessel, "+proj=longlat +ellps=bessel +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 104103, longlat, clrk80, "+proj=longlat +ellps=clrk80 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 104104, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 104105, longlat, bessel, "+proj=longlat +ellps=bessel +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 104106, longlat, intl, "+proj=longlat +ellps=intl +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 104107, longlat, GRS80, "+proj=longlat +ellps=GRS80 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 104108, longlat, GRS80, "+proj=longlat +ellps=GRS80 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 104261, longlat, 6378249.2, 6356514.999904194, "+proj=longlat +a=6378249.2 +b=6356514.999904194 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_AB(esri, 104304, longlat, 6378249.2, 6356514.999904194, "+proj=longlat +a=6378249.2 +b=6356514.999904194 +no_defs");
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_E (esri, 104305, longlat, clrk80, "+proj=longlat +ellps=clrk80 +no_defs");
|
||||
|
||||
} // namespace detail
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
97
include/boost/geometry/srs/projections/exception.hpp
Normal file
97
include/boost/geometry/srs/projections/exception.hpp
Normal file
@@ -0,0 +1,97 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_EXCEPTION_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_EXCEPTION_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/core/exception.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_strerrno.hpp>
|
||||
|
||||
#include <boost/throw_exception.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
// TODO: make more for forward/inverse/init/setup
|
||||
class projection_exception : public geometry::exception
|
||||
{
|
||||
public:
|
||||
explicit projection_exception(int code = 0)
|
||||
: m_code(code)
|
||||
, m_msg(projections::detail::pj_strerrno(code))
|
||||
{}
|
||||
|
||||
explicit projection_exception(std::string const& msg)
|
||||
: m_code(0)
|
||||
, m_msg(msg)
|
||||
{}
|
||||
|
||||
projection_exception(int code, std::string const& msg)
|
||||
: m_code(code)
|
||||
, m_msg(msg)
|
||||
{}
|
||||
|
||||
virtual char const* what() const throw()
|
||||
{
|
||||
//return "Boost.Geometry Projection exception";
|
||||
return m_msg.what();
|
||||
}
|
||||
|
||||
int code() const { return m_code; }
|
||||
private :
|
||||
int m_code;
|
||||
std::runtime_error m_msg;
|
||||
};
|
||||
|
||||
|
||||
struct projection_not_named_exception
|
||||
: projection_exception
|
||||
{
|
||||
projection_not_named_exception()
|
||||
: projection_exception(-4)
|
||||
{}
|
||||
};
|
||||
|
||||
struct projection_unknown_id_exception
|
||||
: projection_exception
|
||||
{
|
||||
projection_unknown_id_exception(std::string const& proj_name)
|
||||
: projection_exception(-5, msg(proj_name))
|
||||
{}
|
||||
|
||||
private:
|
||||
static std::string msg(std::string const& proj_name)
|
||||
{
|
||||
return projections::detail::pj_strerrno(-5) + " (" + proj_name + ")";
|
||||
}
|
||||
};
|
||||
|
||||
struct projection_not_invertible_exception
|
||||
: projection_exception
|
||||
{
|
||||
projection_not_invertible_exception(std::string const& proj_name)
|
||||
: projection_exception(-17, msg(proj_name))
|
||||
{}
|
||||
|
||||
private:
|
||||
static std::string msg(std::string const& proj_name)
|
||||
{
|
||||
return std::string("projection (") + proj_name + ") is not invertible";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_EXCEPTION_HPP
|
||||
282
include/boost/geometry/srs/projections/factory.hpp
Normal file
282
include/boost/geometry/srs/projections/factory.hpp
Normal file
@@ -0,0 +1,282 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_FACTORY_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_FACTORY_HPP
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <boost/geometry/srs/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/aea.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/aeqd.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/airy.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/aitoff.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/august.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/bacon.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/bipc.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/boggs.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/bonne.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/cass.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/cc.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/cea.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/chamb.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/collg.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/crast.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/denoy.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/eck1.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/eck2.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/eck3.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/eck4.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/eck5.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/eqc.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/eqdc.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/etmerc.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/fahey.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/fouc_s.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/gall.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/geocent.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/geos.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/gins8.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/gn_sinu.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/gnom.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/goode.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/gstmerc.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/hammer.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/hatano.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/healpix.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/krovak.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/igh.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/imw_p.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/isea.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/laea.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/labrd.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/lagrng.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/larr.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/lask.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/latlong.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/lcc.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/lcca.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/loxim.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/lsat.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/mbtfpp.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/mbtfpq.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/mbt_fps.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/merc.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/mill.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/mod_ster.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/moll.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/natearth.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/nell.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/nell_h.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/nocol.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/nsper.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/nzmg.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/ob_tran.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/ocea.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/oea.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/omerc.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/ortho.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/qsc.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/poly.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/putp2.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/putp3.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/putp4p.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/putp5.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/putp6.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/robin.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/rouss.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/rpoly.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/sconics.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/somerc.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/stere.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/sterea.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/sts.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/tcc.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/tcea.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/tmerc.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/tpeqd.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/urm5.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/urmfps.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/vandg.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/vandg2.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/vandg4.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/wag2.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/wag3.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/wag7.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/wink1.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/wink2.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template <typename CT, typename Parameters>
|
||||
class factory : public detail::base_factory<CT, Parameters>
|
||||
{
|
||||
private:
|
||||
|
||||
typedef std::map
|
||||
<
|
||||
std::string,
|
||||
boost::shared_ptr
|
||||
<
|
||||
detail::factory_entry
|
||||
<
|
||||
CT,
|
||||
Parameters
|
||||
>
|
||||
>
|
||||
> prj_registry;
|
||||
prj_registry m_registry;
|
||||
|
||||
public:
|
||||
|
||||
factory()
|
||||
{
|
||||
detail::aea_init(*this);
|
||||
detail::aeqd_init(*this);
|
||||
detail::airy_init(*this);
|
||||
detail::aitoff_init(*this);
|
||||
detail::august_init(*this);
|
||||
detail::bacon_init(*this);
|
||||
detail::bipc_init(*this);
|
||||
detail::boggs_init(*this);
|
||||
detail::bonne_init(*this);
|
||||
detail::cass_init(*this);
|
||||
detail::cc_init(*this);
|
||||
detail::cea_init(*this);
|
||||
detail::chamb_init(*this);
|
||||
detail::collg_init(*this);
|
||||
detail::crast_init(*this);
|
||||
detail::denoy_init(*this);
|
||||
detail::eck1_init(*this);
|
||||
detail::eck2_init(*this);
|
||||
detail::eck3_init(*this);
|
||||
detail::eck4_init(*this);
|
||||
detail::eck5_init(*this);
|
||||
detail::eqc_init(*this);
|
||||
detail::eqdc_init(*this);
|
||||
detail::etmerc_init(*this);
|
||||
detail::fahey_init(*this);
|
||||
detail::fouc_s_init(*this);
|
||||
detail::gall_init(*this);
|
||||
detail::geocent_init(*this);
|
||||
detail::geos_init(*this);
|
||||
detail::gins8_init(*this);
|
||||
detail::gn_sinu_init(*this);
|
||||
detail::gnom_init(*this);
|
||||
detail::goode_init(*this);
|
||||
detail::gstmerc_init(*this);
|
||||
detail::hammer_init(*this);
|
||||
detail::hatano_init(*this);
|
||||
detail::healpix_init(*this);
|
||||
detail::krovak_init(*this);
|
||||
detail::igh_init(*this);
|
||||
detail::imw_p_init(*this);
|
||||
detail::isea_init(*this);
|
||||
detail::labrd_init(*this);
|
||||
detail::laea_init(*this);
|
||||
detail::lagrng_init(*this);
|
||||
detail::larr_init(*this);
|
||||
detail::lask_init(*this);
|
||||
detail::latlong_init(*this);
|
||||
detail::lcc_init(*this);
|
||||
detail::lcca_init(*this);
|
||||
detail::loxim_init(*this);
|
||||
detail::lsat_init(*this);
|
||||
detail::mbtfpp_init(*this);
|
||||
detail::mbtfpq_init(*this);
|
||||
detail::mbt_fps_init(*this);
|
||||
detail::merc_init(*this);
|
||||
detail::mill_init(*this);
|
||||
detail::mod_ster_init(*this);
|
||||
detail::moll_init(*this);
|
||||
detail::natearth_init(*this);
|
||||
detail::nell_init(*this);
|
||||
detail::nell_h_init(*this);
|
||||
detail::nocol_init(*this);
|
||||
detail::nsper_init(*this);
|
||||
detail::nzmg_init(*this);
|
||||
detail::ob_tran_init(*this);
|
||||
detail::ocea_init(*this);
|
||||
detail::oea_init(*this);
|
||||
detail::omerc_init(*this);
|
||||
detail::ortho_init(*this);
|
||||
detail::qsc_init(*this);
|
||||
detail::poly_init(*this);
|
||||
detail::putp2_init(*this);
|
||||
detail::putp3_init(*this);
|
||||
detail::putp4p_init(*this);
|
||||
detail::putp5_init(*this);
|
||||
detail::putp6_init(*this);
|
||||
detail::robin_init(*this);
|
||||
detail::rouss_init(*this);
|
||||
detail::rpoly_init(*this);
|
||||
detail::sconics_init(*this);
|
||||
detail::somerc_init(*this);
|
||||
detail::stere_init(*this);
|
||||
detail::sterea_init(*this);
|
||||
detail::sts_init(*this);
|
||||
detail::tcc_init(*this);
|
||||
detail::tcea_init(*this);
|
||||
detail::tmerc_init(*this);
|
||||
detail::tpeqd_init(*this);
|
||||
detail::urm5_init(*this);
|
||||
detail::urmfps_init(*this);
|
||||
detail::vandg_init(*this);
|
||||
detail::vandg2_init(*this);
|
||||
detail::vandg4_init(*this);
|
||||
detail::wag2_init(*this);
|
||||
detail::wag3_init(*this);
|
||||
detail::wag7_init(*this);
|
||||
detail::wink1_init(*this);
|
||||
detail::wink2_init(*this);
|
||||
}
|
||||
|
||||
virtual ~factory() {}
|
||||
|
||||
virtual void add_to_factory(std::string const& name,
|
||||
detail::factory_entry<CT, Parameters>* sub)
|
||||
{
|
||||
m_registry[name].reset(sub);
|
||||
}
|
||||
|
||||
inline detail::base_v<CT, Parameters>* create_new(Parameters const& parameters) const
|
||||
{
|
||||
typename prj_registry::const_iterator it = m_registry.find(parameters.name);
|
||||
if (it != m_registry.end())
|
||||
{
|
||||
return it->second->create_new(parameters);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename CT>
|
||||
inline detail::base_v<CT, projections::parameters<CT> >*
|
||||
create_new(projections::parameters<CT> const& parameters)
|
||||
{
|
||||
static factory<CT, projections::parameters<CT> > fac;
|
||||
return fac.create_new(parameters);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_FACTORY_HPP
|
||||
2424
include/boost/geometry/srs/projections/iau2000.hpp
Normal file
2424
include/boost/geometry/srs/projections/iau2000.hpp
Normal file
File diff suppressed because it is too large
Load Diff
48
include/boost/geometry/srs/projections/iau2000_params.hpp
Normal file
48
include/boost/geometry/srs/projections/iau2000_params.hpp
Normal file
@@ -0,0 +1,48 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_SRS_PROJECTIONS_IAU2000_PARAMS_HPP
|
||||
#define BOOST_GEOMETRY_SRS_PROJECTIONS_IAU2000_PARAMS_HPP
|
||||
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <boost/geometry/srs/spheroid.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace srs
|
||||
{
|
||||
|
||||
|
||||
struct iau2000
|
||||
{
|
||||
explicit iau2000(int c)
|
||||
: code(c)
|
||||
{}
|
||||
|
||||
int code;
|
||||
};
|
||||
|
||||
|
||||
template <int Code>
|
||||
struct static_iau2000
|
||||
{
|
||||
static const int code = Code;
|
||||
};
|
||||
|
||||
|
||||
} // namespace srs
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_SRS_PROJECTIONS_IAU2000_PARAMS_HPP
|
||||
2432
include/boost/geometry/srs/projections/iau2000_traits.hpp
Normal file
2432
include/boost/geometry/srs/projections/iau2000_traits.hpp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -49,52 +49,59 @@ namespace detail
|
||||
|
||||
namespace aasincos
|
||||
{
|
||||
static const double ONE_TOL= 1.00000000000001;
|
||||
//static const double TOL = 0.000000001;
|
||||
static const double ATOL = 1e-50;
|
||||
template <typename T>
|
||||
inline T ONE_TOL() { return 1.00000000000001; }
|
||||
//template <typename T>
|
||||
//inline T TOL() { return 0.000000001; }
|
||||
template <typename T>
|
||||
inline T ATOL() { return 1e-50; }
|
||||
}
|
||||
|
||||
inline double aasin(double v)
|
||||
template <typename T>
|
||||
inline T aasin(T const& v)
|
||||
{
|
||||
double av = 0;
|
||||
T av = 0;
|
||||
|
||||
if ((av = geometry::math::abs(v)) >= 1.0)
|
||||
{
|
||||
if (av > aasincos::ONE_TOL)
|
||||
if (av > aasincos::ONE_TOL<T>())
|
||||
{
|
||||
throw proj_exception(-19);
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-19) );
|
||||
}
|
||||
return (v < 0.0 ? -geometry::math::half_pi<double>() : geometry::math::half_pi<double>());
|
||||
return (v < 0.0 ? -geometry::math::half_pi<T>() : geometry::math::half_pi<T>());
|
||||
}
|
||||
|
||||
return asin(v);
|
||||
}
|
||||
|
||||
inline double aacos(double v)
|
||||
template <typename T>
|
||||
inline T aacos(T const& v)
|
||||
{
|
||||
double av = 0;
|
||||
T av = 0;
|
||||
|
||||
if ((av = geometry::math::abs(v)) >= 1.0)
|
||||
{
|
||||
if (av > aasincos::ONE_TOL)
|
||||
if (av > aasincos::ONE_TOL<T>())
|
||||
{
|
||||
throw proj_exception(-19);
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-19) );
|
||||
}
|
||||
return (v < 0.0 ? geometry::math::pi<double>() : 0.0);
|
||||
return (v < 0.0 ? geometry::math::pi<T>() : 0.0);
|
||||
}
|
||||
|
||||
return acos(v);
|
||||
}
|
||||
|
||||
inline double asqrt(double v)
|
||||
template <typename T>
|
||||
inline T asqrt(T const& v)
|
||||
{
|
||||
return ((v <= 0) ? 0 : sqrt(v));
|
||||
}
|
||||
|
||||
inline double aatan2(double n, double d)
|
||||
template <typename T>
|
||||
inline T aatan2(T const& n, T const& d)
|
||||
{
|
||||
return ((geometry::math::abs(n) < aasincos::ATOL
|
||||
&& geometry::math::abs(d) < aasincos::ATOL) ? 0.0 : atan2(n, d));
|
||||
return ((geometry::math::abs(n) < aasincos::ATOL<T>()
|
||||
&& geometry::math::abs(d) < aasincos::ATOL<T>()) ? 0.0 : atan2(n, d));
|
||||
}
|
||||
|
||||
|
||||
151
include/boost/geometry/srs/projections/impl/base_dynamic.hpp
Normal file
151
include/boost/geometry/srs/projections/impl/base_dynamic.hpp
Normal file
@@ -0,0 +1,151 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_IMPL_BASE_DYNAMIC_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_BASE_DYNAMIC_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
/*!
|
||||
\brief projection virtual base class
|
||||
\details class containing virtual methods
|
||||
\ingroup projection
|
||||
\tparam CT calculation type
|
||||
\tparam P parameters type
|
||||
*/
|
||||
template <typename CT, typename P>
|
||||
class base_v
|
||||
{
|
||||
public :
|
||||
/// Forward projection, from Latitude-Longitude to Cartesian
|
||||
template <typename LL, typename XY>
|
||||
inline bool forward(LL const& lp, XY& xy) const
|
||||
{
|
||||
try
|
||||
{
|
||||
pj_fwd(*this, this->params(), lp, xy);
|
||||
return true;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// Inverse projection, from Cartesian to Latitude-Longitude
|
||||
template <typename LL, typename XY>
|
||||
inline bool inverse(XY const& xy, LL& lp) const
|
||||
{
|
||||
try
|
||||
{
|
||||
pj_inv(*this, this->params(), xy, lp);
|
||||
return true;
|
||||
}
|
||||
catch (projection_not_invertible_exception &)
|
||||
{
|
||||
BOOST_RETHROW
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// Forward projection using lon / lat and x / y separately
|
||||
virtual void fwd(CT& lp_lon, CT& lp_lat, CT& xy_x, CT& xy_y) const = 0;
|
||||
|
||||
/// Inverse projection using x / y and lon / lat
|
||||
virtual void inv(CT& xy_x, CT& xy_y, CT& lp_lon, CT& lp_lat) const = 0;
|
||||
|
||||
/// Returns name of projection
|
||||
virtual std::string name() const = 0;
|
||||
|
||||
/// Returns parameters of projection
|
||||
virtual P const& params() const = 0;
|
||||
|
||||
/// Returns mutable parameters of projection
|
||||
virtual P& mutable_params() = 0;
|
||||
|
||||
virtual ~base_v() {}
|
||||
};
|
||||
|
||||
// Base-virtual-forward
|
||||
template <typename Prj, typename CT, typename P>
|
||||
class base_v_f : public base_v<CT, P>
|
||||
{
|
||||
public:
|
||||
base_v_f(P const& params)
|
||||
: m_proj(params)
|
||||
{}
|
||||
|
||||
template <typename ProjP>
|
||||
base_v_f(P const& params, ProjP const& proj_params)
|
||||
: m_proj(params, proj_params)
|
||||
{}
|
||||
|
||||
virtual void fwd(CT& lp_lon, CT& lp_lat, CT& xy_x, CT& xy_y) const
|
||||
{
|
||||
m_proj.fwd(lp_lon, lp_lat, xy_x, xy_y);
|
||||
}
|
||||
|
||||
virtual void inv(CT& , CT& , CT& , CT& ) const
|
||||
{
|
||||
BOOST_THROW_EXCEPTION(projection_not_invertible_exception(params().name));
|
||||
}
|
||||
|
||||
virtual std::string name() const { return m_proj.name(); }
|
||||
|
||||
virtual P const& params() const { return m_proj.params(); }
|
||||
|
||||
virtual P& mutable_params() { return m_proj.mutable_params(); }
|
||||
|
||||
protected:
|
||||
Prj m_proj;
|
||||
};
|
||||
|
||||
// Base-virtual-forward/inverse
|
||||
template <typename Prj, typename CT, typename P>
|
||||
class base_v_fi : public base_v_f<Prj, CT, P>
|
||||
{
|
||||
typedef base_v_f<Prj, CT, P> base_t;
|
||||
|
||||
public:
|
||||
base_v_fi(P const& params)
|
||||
: base_t(params)
|
||||
{}
|
||||
|
||||
template <typename ProjP>
|
||||
base_v_fi(P const& params, ProjP const& proj_params)
|
||||
: base_t(params, proj_params)
|
||||
{}
|
||||
|
||||
virtual void inv(CT& xy_x, CT& xy_y, CT& lp_lon, CT& lp_lat) const
|
||||
{
|
||||
this->m_proj.inv(xy_x, xy_y, lp_lon, lp_lat);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_BASE_DYNAMIC_HPP
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -17,8 +21,13 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/pj_fwd.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/pj_inv.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/srs/projections/impl/pj_fwd.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_inv.hpp>
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
@@ -28,15 +37,32 @@ namespace boost { namespace geometry { namespace projections
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template <typename Prj, typename CSTag, typename BGP, typename CT, typename P>
|
||||
struct static_projection_type
|
||||
{
|
||||
BOOST_MPL_ASSERT_MSG((false),
|
||||
NOT_IMPLEMENTED_FOR_THIS_PROJECTION_OR_CSTAG,
|
||||
(Prj, CSTag));
|
||||
};
|
||||
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(PROJ, P_SPHERE, P_SPHEROID) \
|
||||
template <typename BGP, typename CT, typename P> \
|
||||
struct static_projection_type<PROJ, srs_sphere_tag, BGP, CT, P> \
|
||||
{ \
|
||||
typedef P_SPHERE<CT, P> type; \
|
||||
}; \
|
||||
template <typename BGP, typename CT, typename P> \
|
||||
struct static_projection_type<PROJ, srs_spheroid_tag, BGP, CT, P> \
|
||||
{ \
|
||||
typedef P_SPHEROID<CT, P> type; \
|
||||
}; \
|
||||
|
||||
// Base-template-forward
|
||||
template <typename Prj, typename LL, typename XY, typename P>
|
||||
template <typename Prj, typename CT, typename P>
|
||||
struct base_t_f
|
||||
{
|
||||
public:
|
||||
|
||||
typedef LL geographic_point_type; ///< latlong point type
|
||||
typedef XY cartesian_point_type; ///< xy point type
|
||||
|
||||
inline base_t_f(Prj const& prj, P const& params)
|
||||
: m_par(params), m_prj(prj)
|
||||
{}
|
||||
@@ -45,6 +71,7 @@ public:
|
||||
|
||||
inline P& mutable_params() { return m_par; }
|
||||
|
||||
template <typename LL, typename XY>
|
||||
inline bool forward(LL const& lp, XY& xy) const
|
||||
{
|
||||
try
|
||||
@@ -58,6 +85,15 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
template <typename XY, typename LL>
|
||||
inline bool inverse(XY const& , LL& ) const
|
||||
{
|
||||
BOOST_MPL_ASSERT_MSG((false),
|
||||
PROJECTION_IS_NOT_INVERTABLE,
|
||||
(Prj));
|
||||
return false;
|
||||
}
|
||||
|
||||
inline std::string name() const
|
||||
{
|
||||
return this->m_par.name;
|
||||
@@ -65,27 +101,20 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
// Some projections do not work with float -> wrong results
|
||||
// TODO: make traits which select <double> from int/float/double and else selects T
|
||||
|
||||
//typedef typename geometry::coordinate_type<LL>::type LL_T;
|
||||
//typedef typename geometry::coordinate_type<XY>::type XY_T;
|
||||
typedef double LL_T;
|
||||
typedef double XY_T;
|
||||
|
||||
P m_par;
|
||||
const Prj& m_prj;
|
||||
};
|
||||
|
||||
// Base-template-forward/inverse
|
||||
template <typename Prj, typename LL, typename XY, typename P>
|
||||
struct base_t_fi : public base_t_f<Prj, LL, XY, P>
|
||||
template <typename Prj, typename CT, typename P>
|
||||
struct base_t_fi : public base_t_f<Prj, CT, P>
|
||||
{
|
||||
public :
|
||||
inline base_t_fi(Prj const& prj, P const& params)
|
||||
: base_t_f<Prj, LL, XY, P>(prj, params)
|
||||
: base_t_f<Prj, CT, P>(prj, params)
|
||||
{}
|
||||
|
||||
template <typename XY, typename LL>
|
||||
inline bool inverse(XY const& xy, LL& lp) const
|
||||
{
|
||||
try
|
||||
265
include/boost/geometry/srs/projections/impl/dms_parser.hpp
Normal file
265
include/boost/geometry/srs/projections/impl/dms_parser.hpp
Normal file
@@ -0,0 +1,265 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_SRS_PROJECTIONS_IMPL_DMS_PARSER_HPP
|
||||
#define BOOST_GEOMETRY_SRS_PROJECTIONS_IMPL_DMS_PARSER_HPP
|
||||
|
||||
// This file is totally revised from PROJ4 dmstor.c
|
||||
|
||||
// PROJ4 is originally written by Gerald Evenden (then of the USGS)
|
||||
// PROJ4 is maintained by Frank Warmerdam
|
||||
// PROJ4 is converted to Geometry Library by Barend Gehrels (Geodan, Amsterdam)
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
#if !defined(BOOST_GEOMETRY_NO_LEXICAL_CAST)
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#endif // !defined(BOOST_GEOMETRY_NO_LEXICAL_CAST)
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template <typename T>
|
||||
struct dms_result
|
||||
{
|
||||
enum axis_selector {axis_lat = 1, axis_lon = 0};
|
||||
|
||||
private :
|
||||
T m_angle;
|
||||
axis_selector m_axis;
|
||||
|
||||
public :
|
||||
|
||||
explicit dms_result(T const& v, axis_selector ax)
|
||||
: m_angle(v)
|
||||
, m_axis(ax)
|
||||
{}
|
||||
|
||||
inline axis_selector axis() const { return m_axis; }
|
||||
|
||||
inline T angle() const { return m_angle; }
|
||||
|
||||
template <typename CH, typename TR>
|
||||
inline friend std::basic_ostream<CH, TR>& operator<<(std::basic_ostream<CH, TR>& os,
|
||||
const dms_result& d)
|
||||
{
|
||||
os << d.m_angle;
|
||||
return os;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
template <typename T
|
||||
, bool as_radian = true
|
||||
, char N = 'N', char E = 'E', char S = 'S', char W = 'W' // translatable
|
||||
, char MIN = '\'', char SEC = '"' // other char's possible
|
||||
, char D = 'D', char R = 'R' // degree sign might be small o
|
||||
>
|
||||
struct dms_parser
|
||||
{
|
||||
|
||||
|
||||
// Question from Barend: can we compile-time select that it is case-sensitive/case-insensitive?
|
||||
// We have to change the switch then -> specializations
|
||||
|
||||
// For now: make it (compile-time) case sensitive
|
||||
static const int diff = 'a' - 'A';
|
||||
#ifndef __GNUC__
|
||||
BOOST_STATIC_ASSERT((diff > 0)); // make sure we've the right assumption. GCC does not accept this here.
|
||||
#endif
|
||||
static const char n_alter = N <= 'Z' ? N + diff : N - diff;
|
||||
static const char e_alter = E <= 'Z' ? E + diff : E - diff;
|
||||
static const char s_alter = S <= 'Z' ? S + diff : S - diff;
|
||||
static const char w_alter = W <= 'Z' ? W + diff : W - diff;
|
||||
|
||||
static const char r_alter = R <= 'Z' ? R + diff : R - diff;
|
||||
|
||||
// degree is normally D (proj4) but might be superscript o
|
||||
// Note d_alter is not correct then, so map it to NULL now, guarded by the while
|
||||
static const char d_alter =
|
||||
((D >= 'A' && D <= 'Z') || (D >= 'a' && D <= 'z')) ? (D <= 'Z' ? D + diff : D - diff) : '\0';
|
||||
|
||||
|
||||
struct dms_value
|
||||
{
|
||||
T dms[3];
|
||||
bool has_dms[3];
|
||||
|
||||
dms_value()
|
||||
{
|
||||
memset(this, 0, sizeof(dms_value));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template <size_t I>
|
||||
static inline void assign_dms(dms_value& dms, std::string& value, bool& has_value)
|
||||
{
|
||||
#if !defined(BOOST_GEOMETRY_NO_LEXICAL_CAST)
|
||||
dms.dms[I] = boost::lexical_cast<T>(value.c_str());
|
||||
#else // !defined(BOOST_GEOMETRY_NO_LEXICAL_CAST)
|
||||
dms.dms[I] = std::atof(value.c_str());
|
||||
#endif // !defined(BOOST_GEOMETRY_NO_LEXICAL_CAST)
|
||||
dms.has_dms[I] = true;
|
||||
has_value = false;
|
||||
value.clear();
|
||||
}
|
||||
|
||||
static inline void process(dms_value& dms, std::string& value, bool& has_value)
|
||||
{
|
||||
if (has_value)
|
||||
{
|
||||
// Assign last one, sequentially
|
||||
if (! dms.has_dms[0]) assign_dms<0>(dms, value, has_value);
|
||||
else if (! dms.has_dms[1]) assign_dms<1>(dms, value, has_value);
|
||||
else if (! dms.has_dms[2]) assign_dms<2>(dms, value, has_value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
dms_result<T> apply(const char* is) const
|
||||
{
|
||||
dms_value dms;
|
||||
bool has_value = false;
|
||||
std::string value;
|
||||
|
||||
T factor = 1.0; // + denotes N/E values, -1 denotes S/W values
|
||||
typename dms_result<T>::axis_selector axis = dms_result<T>::axis_lon; // true denotes N/S values
|
||||
bool in_radian = false; // true denotes values as "0.1R"
|
||||
|
||||
while(*is)
|
||||
{
|
||||
switch(*is)
|
||||
{
|
||||
case '-' :
|
||||
if (! has_value && ! dms.has_dms[0])
|
||||
{
|
||||
factor = -factor;
|
||||
}
|
||||
break;
|
||||
case N :
|
||||
case n_alter :
|
||||
axis = dms_result<T>::axis_lat;
|
||||
break;
|
||||
case S :
|
||||
case s_alter :
|
||||
axis = dms_result<T>::axis_lat;
|
||||
factor = -factor;
|
||||
break;
|
||||
case E :
|
||||
case e_alter :
|
||||
axis = dms_result<T>::axis_lon;
|
||||
break;
|
||||
case W :
|
||||
case w_alter :
|
||||
axis = dms_result<T>::axis_lon;
|
||||
factor = -factor;
|
||||
break;
|
||||
case D :
|
||||
case d_alter :
|
||||
if (! dms.has_dms[0] && has_value)
|
||||
{
|
||||
assign_dms<0>(dms, value, has_value);
|
||||
}
|
||||
break;
|
||||
case R :
|
||||
case r_alter :
|
||||
if (! dms.has_dms[0] && has_value)
|
||||
{
|
||||
// specified value is in radian!
|
||||
in_radian = true;
|
||||
assign_dms<0>(dms, value, has_value);
|
||||
}
|
||||
break;
|
||||
case MIN:
|
||||
if (! dms.has_dms[1] && has_value)
|
||||
{
|
||||
assign_dms<1>(dms, value, has_value);
|
||||
}
|
||||
break;
|
||||
case SEC :
|
||||
if (! dms.has_dms[2] && has_value)
|
||||
{
|
||||
assign_dms<2>(dms, value, has_value);
|
||||
}
|
||||
break;
|
||||
case ' ' :
|
||||
case '\t' :
|
||||
case '\n' :
|
||||
process(dms, value, has_value);
|
||||
break;
|
||||
default :
|
||||
value += *is;
|
||||
has_value = true;
|
||||
break;
|
||||
}
|
||||
is++;
|
||||
}
|
||||
|
||||
// Assign last one, if any
|
||||
process(dms, value, has_value);
|
||||
|
||||
T const d2r = math::d2r<T>();
|
||||
T const r2d = math::r2d<T>();
|
||||
|
||||
return dms_result<T>(factor *
|
||||
(in_radian && as_radian
|
||||
? dms.dms[0]
|
||||
: in_radian && ! as_radian
|
||||
? dms.dms[0] * r2d
|
||||
: ! in_radian && as_radian
|
||||
? dms.dms[0] * d2r + dms.dms[1] * d2r / 60.0 + dms.dms[2] * d2r / 3600.0
|
||||
: dms.dms[0] + dms.dms[1] / 60.0 + dms.dms[2] / 3600.0)
|
||||
, axis);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
} // namespace detail
|
||||
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_SRS_PROJECTIONS_IMPL_DMS_PARSER_HPP
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -11,7 +15,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/projection.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
@@ -19,22 +23,26 @@ namespace boost { namespace geometry { namespace projections
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template <typename LL, typename XY, typename P>
|
||||
// forward declaration needed by some projections
|
||||
template <typename CT, typename Parameters>
|
||||
class factory;
|
||||
|
||||
template <typename CT, typename P>
|
||||
class factory_entry
|
||||
{
|
||||
public:
|
||||
|
||||
virtual ~factory_entry() {}
|
||||
virtual projection<LL, XY>* create_new(P const& par) const = 0;
|
||||
virtual base_v<CT, P>* create_new(P const& par) const = 0;
|
||||
};
|
||||
|
||||
template <typename LL, typename XY, typename P>
|
||||
template <typename CT, typename P>
|
||||
class base_factory
|
||||
{
|
||||
public:
|
||||
|
||||
virtual ~base_factory() {}
|
||||
virtual void add_to_factory(std::string const& name, factory_entry<LL, XY, P>* sub) = 0;
|
||||
virtual void add_to_factory(std::string const& name, factory_entry<CT, P>* sub) = 0;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -15,19 +19,26 @@ namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
// Functions to resolve ambiguity when compiling with coordinates of different types
|
||||
/*inline double atan2(double a, double b)
|
||||
/*
|
||||
template <typename T>
|
||||
inline T atan2(T const& a, T const& b)
|
||||
{
|
||||
return std::atan2(a, b);
|
||||
using std::atan2;
|
||||
return atan2(a, b);
|
||||
}
|
||||
inline double pow(double a, double b)
|
||||
template <typename T>
|
||||
inline T pow(T const& a, T const& b)
|
||||
{
|
||||
return std::pow(a, b);
|
||||
using std::pow;
|
||||
return pow(a, b);
|
||||
}
|
||||
*/
|
||||
|
||||
inline int int_floor(double f)
|
||||
template <typename T>
|
||||
inline int int_floor(T const& f)
|
||||
{
|
||||
return int(std::floor(f));
|
||||
using std::floor;
|
||||
return int(floor(f));
|
||||
}
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
487
include/boost/geometry/srs/projections/impl/geocent.hpp
Normal file
487
include/boost/geometry/srs/projections/impl/geocent.hpp
Normal file
@@ -0,0 +1,487 @@
|
||||
// Boost.Geometry
|
||||
// This file is manually converted from PROJ4
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// This file is converted from PROJ4, http://trac.osgeo.org/proj
|
||||
// PROJ4 is originally written by Gerald Evenden (then of the USGS)
|
||||
// PROJ4 is maintained by Frank Warmerdam
|
||||
// This file was converted to Geometry Library by Adam Wulkiewicz
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
/***************************************************************************/
|
||||
/* RSC IDENTIFIER: GEOCENTRIC
|
||||
*
|
||||
* ABSTRACT
|
||||
*
|
||||
* This component provides conversions between Geodetic coordinates (latitude,
|
||||
* longitude in radians and height in meters) and Geocentric coordinates
|
||||
* (X, Y, Z) in meters.
|
||||
*
|
||||
* ERROR HANDLING
|
||||
*
|
||||
* This component checks parameters for valid values. If an invalid value
|
||||
* is found, the error code is combined with the current error code using
|
||||
* the bitwise or. This combining allows multiple error codes to be
|
||||
* returned. The possible error codes are:
|
||||
*
|
||||
* GEOCENT_NO_ERROR : No errors occurred in function
|
||||
* GEOCENT_LAT_ERROR : Latitude out of valid range
|
||||
* (-90 to 90 degrees)
|
||||
* GEOCENT_LON_ERROR : Longitude out of valid range
|
||||
* (-180 to 360 degrees)
|
||||
* GEOCENT_A_ERROR : Semi-major axis lessthan or equal to zero
|
||||
* GEOCENT_B_ERROR : Semi-minor axis lessthan or equal to zero
|
||||
* GEOCENT_A_LESS_B_ERROR : Semi-major axis less than semi-minor axis
|
||||
*
|
||||
*
|
||||
* REUSE NOTES
|
||||
*
|
||||
* GEOCENTRIC is intended for reuse by any application that performs
|
||||
* coordinate conversions between geodetic coordinates and geocentric
|
||||
* coordinates.
|
||||
*
|
||||
*
|
||||
* REFERENCES
|
||||
*
|
||||
* An Improved Algorithm for Geocentric to Geodetic Coordinate Conversion,
|
||||
* Ralph Toms, February 1996 UCRL-JC-123138.
|
||||
*
|
||||
* Further information on GEOCENTRIC can be found in the Reuse Manual.
|
||||
*
|
||||
* GEOCENTRIC originated from : U.S. Army Topographic Engineering Center
|
||||
* Geospatial Information Division
|
||||
* 7701 Telegraph Road
|
||||
* Alexandria, VA 22310-3864
|
||||
*
|
||||
* LICENSES
|
||||
*
|
||||
* None apply to this component.
|
||||
*
|
||||
* RESTRICTIONS
|
||||
*
|
||||
* GEOCENTRIC has no restrictions.
|
||||
*
|
||||
* ENVIRONMENT
|
||||
*
|
||||
* GEOCENTRIC was tested and certified in the following environments:
|
||||
*
|
||||
* 1. Solaris 2.5 with GCC version 2.8.1
|
||||
* 2. Windows 95 with MS Visual C++ version 6
|
||||
*
|
||||
* MODIFICATIONS
|
||||
*
|
||||
* Date Description
|
||||
* ---- -----------
|
||||
* 25-02-97 Original Code
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOOST_GEOMETRY_SRS_PROJECTIONS_IMPL_GEOCENT_HPP
|
||||
#define BOOST_GEOMETRY_SRS_PROJECTIONS_IMPL_GEOCENT_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
/***************************************************************************/
|
||||
/*
|
||||
* DEFINES
|
||||
*/
|
||||
static const long GEOCENT_NO_ERROR = 0x0000;
|
||||
static const long GEOCENT_LAT_ERROR = 0x0001;
|
||||
static const long GEOCENT_LON_ERROR = 0x0002;
|
||||
static const long GEOCENT_A_ERROR = 0x0004;
|
||||
static const long GEOCENT_B_ERROR = 0x0008;
|
||||
static const long GEOCENT_A_LESS_B_ERROR = 0x0010;
|
||||
|
||||
template <typename T>
|
||||
struct GeocentricInfo
|
||||
{
|
||||
T Geocent_a; /* Semi-major axis of ellipsoid in meters */
|
||||
T Geocent_b; /* Semi-minor axis of ellipsoid */
|
||||
T Geocent_a2; /* Square of semi-major axis */
|
||||
T Geocent_b2; /* Square of semi-minor axis */
|
||||
T Geocent_e2; /* Eccentricity squared */
|
||||
T Geocent_ep2; /* 2nd eccentricity squared */
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
inline T COS_67P5()
|
||||
{
|
||||
/*return 0.38268343236508977*/;
|
||||
return cos(T(67.5) * math::d2r<T>()); /* cosine of 67.5 degrees */
|
||||
}
|
||||
template <typename T>
|
||||
inline T AD_C()
|
||||
{
|
||||
return 1.0026000; /* Toms region 1 constant */
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
/*
|
||||
* FUNCTIONS
|
||||
*/
|
||||
|
||||
template <typename T>
|
||||
inline long pj_Set_Geocentric_Parameters (GeocentricInfo<T> & gi, T const& a, T const& b)
|
||||
|
||||
{ /* BEGIN Set_Geocentric_Parameters */
|
||||
/*
|
||||
* The function Set_Geocentric_Parameters receives the ellipsoid parameters
|
||||
* as inputs and sets the corresponding state variables.
|
||||
*
|
||||
* a : Semi-major axis, in meters. (input)
|
||||
* b : Semi-minor axis, in meters. (input)
|
||||
*/
|
||||
long Error_Code = GEOCENT_NO_ERROR;
|
||||
|
||||
if (a <= 0.0)
|
||||
Error_Code |= GEOCENT_A_ERROR;
|
||||
if (b <= 0.0)
|
||||
Error_Code |= GEOCENT_B_ERROR;
|
||||
if (a < b)
|
||||
Error_Code |= GEOCENT_A_LESS_B_ERROR;
|
||||
if (!Error_Code)
|
||||
{
|
||||
gi.Geocent_a = a;
|
||||
gi.Geocent_b = b;
|
||||
gi.Geocent_a2 = a * a;
|
||||
gi.Geocent_b2 = b * b;
|
||||
gi.Geocent_e2 = (gi.Geocent_a2 - gi.Geocent_b2) / gi.Geocent_a2;
|
||||
gi.Geocent_ep2 = (gi.Geocent_a2 - gi.Geocent_b2) / gi.Geocent_b2;
|
||||
}
|
||||
return (Error_Code);
|
||||
} /* END OF Set_Geocentric_Parameters */
|
||||
|
||||
|
||||
template <typename T>
|
||||
inline void pj_Get_Geocentric_Parameters (GeocentricInfo<T> const& gi,
|
||||
T & a,
|
||||
T & b)
|
||||
{ /* BEGIN Get_Geocentric_Parameters */
|
||||
/*
|
||||
* The function Get_Geocentric_Parameters returns the ellipsoid parameters
|
||||
* to be used in geocentric coordinate conversions.
|
||||
*
|
||||
* a : Semi-major axis, in meters. (output)
|
||||
* b : Semi-minor axis, in meters. (output)
|
||||
*/
|
||||
|
||||
a = gi.Geocent_a;
|
||||
b = gi.Geocent_b;
|
||||
} /* END OF Get_Geocentric_Parameters */
|
||||
|
||||
|
||||
template <typename T>
|
||||
inline long pj_Convert_Geodetic_To_Geocentric (GeocentricInfo<T> const& gi,
|
||||
T Longitude, T Latitude, T Height,
|
||||
T & X, T & Y, T & Z)
|
||||
{ /* BEGIN Convert_Geodetic_To_Geocentric */
|
||||
/*
|
||||
* The function Convert_Geodetic_To_Geocentric converts geodetic coordinates
|
||||
* (latitude, longitude, and height) to geocentric coordinates (X, Y, Z),
|
||||
* according to the current ellipsoid parameters.
|
||||
*
|
||||
* Latitude : Geodetic latitude in radians (input)
|
||||
* Longitude : Geodetic longitude in radians (input)
|
||||
* Height : Geodetic height, in meters (input)
|
||||
* X : Calculated Geocentric X coordinate, in meters (output)
|
||||
* Y : Calculated Geocentric Y coordinate, in meters (output)
|
||||
* Z : Calculated Geocentric Z coordinate, in meters (output)
|
||||
*
|
||||
*/
|
||||
long Error_Code = GEOCENT_NO_ERROR;
|
||||
T Rn; /* Earth radius at location */
|
||||
T Sin_Lat; /* sin(Latitude) */
|
||||
T Sin2_Lat; /* Square of sin(Latitude) */
|
||||
T Cos_Lat; /* cos(Latitude) */
|
||||
|
||||
static const T PI = math::pi<T>();
|
||||
static const T PI_OVER_2 = math::half_pi<T>();
|
||||
|
||||
/*
|
||||
** Don't blow up if Latitude is just a little out of the value
|
||||
** range as it may just be a rounding issue. Also removed longitude
|
||||
** test, it should be wrapped by cos() and sin(). NFW for PROJ.4, Sep/2001.
|
||||
*/
|
||||
if( Latitude < -PI_OVER_2 && Latitude > -1.001 * PI_OVER_2 )
|
||||
Latitude = -PI_OVER_2;
|
||||
else if( Latitude > PI_OVER_2 && Latitude < 1.001 * PI_OVER_2 )
|
||||
Latitude = PI_OVER_2;
|
||||
else if ((Latitude < -PI_OVER_2) || (Latitude > PI_OVER_2))
|
||||
{ /* Latitude out of range */
|
||||
Error_Code |= GEOCENT_LAT_ERROR;
|
||||
}
|
||||
|
||||
if (!Error_Code)
|
||||
{ /* no errors */
|
||||
if (Longitude > PI)
|
||||
Longitude -= (2*PI);
|
||||
Sin_Lat = sin(Latitude);
|
||||
Cos_Lat = cos(Latitude);
|
||||
Sin2_Lat = Sin_Lat * Sin_Lat;
|
||||
Rn = gi.Geocent_a / (sqrt(1.0e0 - gi.Geocent_e2 * Sin2_Lat));
|
||||
X = (Rn + Height) * Cos_Lat * cos(Longitude);
|
||||
Y = (Rn + Height) * Cos_Lat * sin(Longitude);
|
||||
Z = ((Rn * (1 - gi.Geocent_e2)) + Height) * Sin_Lat;
|
||||
}
|
||||
return (Error_Code);
|
||||
} /* END OF Convert_Geodetic_To_Geocentric */
|
||||
|
||||
/*
|
||||
* The function Convert_Geocentric_To_Geodetic converts geocentric
|
||||
* coordinates (X, Y, Z) to geodetic coordinates (latitude, longitude,
|
||||
* and height), according to the current ellipsoid parameters.
|
||||
*
|
||||
* X : Geocentric X coordinate, in meters. (input)
|
||||
* Y : Geocentric Y coordinate, in meters. (input)
|
||||
* Z : Geocentric Z coordinate, in meters. (input)
|
||||
* Latitude : Calculated latitude value in radians. (output)
|
||||
* Longitude : Calculated longitude value in radians. (output)
|
||||
* Height : Calculated height value, in meters. (output)
|
||||
*/
|
||||
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_USE_ITERATIVE_METHOD
|
||||
|
||||
template <typename T>
|
||||
inline void pj_Convert_Geocentric_To_Geodetic (GeocentricInfo<T> const& gi,
|
||||
T X, T Y, T Z,
|
||||
T & Longitude, T & Latitude, T & Height)
|
||||
{ /* BEGIN Convert_Geocentric_To_Geodetic */
|
||||
|
||||
static const T PI_OVER_2 = math::half_pi<T>();
|
||||
|
||||
#if !defined(BOOST_GEOMETRY_PROJECTIONS_USE_ITERATIVE_METHOD)
|
||||
|
||||
static const T COS_67P5 = detail::COS_67P5<T>();
|
||||
static const T AD_C = detail::AD_C<T>();
|
||||
|
||||
/*
|
||||
* The method used here is derived from 'An Improved Algorithm for
|
||||
* Geocentric to Geodetic Coordinate Conversion', by Ralph Toms, Feb 1996
|
||||
*/
|
||||
|
||||
/* Note: Variable names follow the notation used in Toms, Feb 1996 */
|
||||
|
||||
T W; /* distance from Z axis */
|
||||
T W2; /* square of distance from Z axis */
|
||||
T T0; /* initial estimate of vertical component */
|
||||
T T1; /* corrected estimate of vertical component */
|
||||
T S0; /* initial estimate of horizontal component */
|
||||
T S1; /* corrected estimate of horizontal component */
|
||||
T Sin_B0; /* sin(B0), B0 is estimate of Bowring aux variable */
|
||||
T Sin3_B0; /* cube of sin(B0) */
|
||||
T Cos_B0; /* cos(B0) */
|
||||
T Sin_p1; /* sin(phi1), phi1 is estimated latitude */
|
||||
T Cos_p1; /* cos(phi1) */
|
||||
T Rn; /* Earth radius at location */
|
||||
T Sum; /* numerator of cos(phi1) */
|
||||
bool At_Pole; /* indicates location is in polar region */
|
||||
|
||||
At_Pole = false;
|
||||
if (X != 0.0)
|
||||
{
|
||||
Longitude = atan2(Y,X);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Y > 0)
|
||||
{
|
||||
Longitude = PI_OVER_2;
|
||||
}
|
||||
else if (Y < 0)
|
||||
{
|
||||
Longitude = -PI_OVER_2;
|
||||
}
|
||||
else
|
||||
{
|
||||
At_Pole = true;
|
||||
Longitude = 0.0;
|
||||
if (Z > 0.0)
|
||||
{ /* north pole */
|
||||
Latitude = PI_OVER_2;
|
||||
}
|
||||
else if (Z < 0.0)
|
||||
{ /* south pole */
|
||||
Latitude = -PI_OVER_2;
|
||||
}
|
||||
else
|
||||
{ /* center of earth */
|
||||
Latitude = PI_OVER_2;
|
||||
Height = -Geocent_b;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
W2 = X*X + Y*Y;
|
||||
W = sqrt(W2);
|
||||
T0 = Z * AD_C;
|
||||
S0 = sqrt(T0 * T0 + W2);
|
||||
Sin_B0 = T0 / S0;
|
||||
Cos_B0 = W / S0;
|
||||
Sin3_B0 = Sin_B0 * Sin_B0 * Sin_B0;
|
||||
T1 = Z + gi.Geocent_b * gi.Geocent_ep2 * Sin3_B0;
|
||||
Sum = W - gi.Geocent_a * gi.Geocent_e2 * Cos_B0 * Cos_B0 * Cos_B0;
|
||||
S1 = sqrt(T1*T1 + Sum * Sum);
|
||||
Sin_p1 = T1 / S1;
|
||||
Cos_p1 = Sum / S1;
|
||||
Rn = gi.Geocent_a / sqrt(1.0 - gi.Geocent_e2 * Sin_p1 * Sin_p1);
|
||||
if (Cos_p1 >= COS_67P5)
|
||||
{
|
||||
Height = W / Cos_p1 - Rn;
|
||||
}
|
||||
else if (Cos_p1 <= -COS_67P5)
|
||||
{
|
||||
Height = W / -Cos_p1 - Rn;
|
||||
}
|
||||
else
|
||||
{
|
||||
Height = Z / Sin_p1 + Rn * (gi.Geocent_e2 - 1.0);
|
||||
}
|
||||
if (At_Pole == false)
|
||||
{
|
||||
Latitude = atan(Sin_p1 / Cos_p1);
|
||||
}
|
||||
#else /* defined(BOOST_GEOMETRY_PROJECTIONS_USE_ITERATIVE_METHOD) */
|
||||
/*
|
||||
* Reference...
|
||||
* ============
|
||||
* Wenzel, H.-G.(1985): Hochauflösende Kugelfunktionsmodelle für
|
||||
* das Gravitationspotential der Erde. Wiss. Arb. Univ. Hannover
|
||||
* Nr. 137, p. 130-131.
|
||||
|
||||
* Programmed by GGA- Leibniz-Institute of Applied Geophysics
|
||||
* Stilleweg 2
|
||||
* D-30655 Hannover
|
||||
* Federal Republic of Germany
|
||||
* Internet: www.gga-hannover.de
|
||||
*
|
||||
* Hannover, March 1999, April 2004.
|
||||
* see also: comments in statements
|
||||
* remarks:
|
||||
* Mathematically exact and because of symmetry of rotation-ellipsoid,
|
||||
* each point (X,Y,Z) has at least two solutions (Latitude1,Longitude1,Height1) and
|
||||
* (Latitude2,Longitude2,Height2). Is point=(0.,0.,Z) (P=0.), so you get even
|
||||
* four solutions, every two symmetrical to the semi-minor axis.
|
||||
* Here Height1 and Height2 have at least a difference in order of
|
||||
* radius of curvature (e.g. (0,0,b)=> (90.,0.,0.) or (-90.,0.,-2b);
|
||||
* (a+100.)*(sqrt(2.)/2.,sqrt(2.)/2.,0.) => (0.,45.,100.) or
|
||||
* (0.,225.,-(2a+100.))).
|
||||
* The algorithm always computes (Latitude,Longitude) with smallest |Height|.
|
||||
* For normal computations, that means |Height|<10000.m, algorithm normally
|
||||
* converges after to 2-3 steps!!!
|
||||
* But if |Height| has the amount of length of ellipsoid's axis
|
||||
* (e.g. -6300000.m), algorithm needs about 15 steps.
|
||||
*/
|
||||
|
||||
/* local definitions and variables */
|
||||
/* end-criterium of loop, accuracy of sin(Latitude) */
|
||||
static const T genau = 1.E-12;
|
||||
static const T genau2 = (genau*genau);
|
||||
static const int maxiter = 30;
|
||||
|
||||
T P; /* distance between semi-minor axis and location */
|
||||
T RR; /* distance between center and location */
|
||||
T CT; /* sin of geocentric latitude */
|
||||
T ST; /* cos of geocentric latitude */
|
||||
T RX;
|
||||
T RK;
|
||||
T RN; /* Earth radius at location */
|
||||
T CPHI0; /* cos of start or old geodetic latitude in iterations */
|
||||
T SPHI0; /* sin of start or old geodetic latitude in iterations */
|
||||
T CPHI; /* cos of searched geodetic latitude */
|
||||
T SPHI; /* sin of searched geodetic latitude */
|
||||
T SDPHI; /* end-criterium: addition-theorem of sin(Latitude(iter)-Latitude(iter-1)) */
|
||||
int iter; /* # of continuous iteration, max. 30 is always enough (s.a.) */
|
||||
|
||||
P = sqrt(X*X+Y*Y);
|
||||
RR = sqrt(X*X+Y*Y+Z*Z);
|
||||
|
||||
/* special cases for latitude and longitude */
|
||||
if (P/gi.Geocent_a < genau) {
|
||||
|
||||
/* special case, if P=0. (X=0., Y=0.) */
|
||||
Longitude = 0.;
|
||||
|
||||
/* if (X,Y,Z)=(0.,0.,0.) then Height becomes semi-minor axis
|
||||
* of ellipsoid (=center of mass), Latitude becomes PI/2 */
|
||||
if (RR/gi.Geocent_a < genau) {
|
||||
Latitude = PI_OVER_2;
|
||||
Height = -gi.Geocent_b;
|
||||
return ;
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* ellipsoidal (geodetic) longitude
|
||||
* interval: -PI < Longitude <= +PI */
|
||||
Longitude=atan2(Y,X);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------
|
||||
* Following iterative algorithm was developed by
|
||||
* "Institut für Erdmessung", University of Hannover, July 1988.
|
||||
* Internet: www.ife.uni-hannover.de
|
||||
* Iterative computation of CPHI,SPHI and Height.
|
||||
* Iteration of CPHI and SPHI to 10**-12 radian resp.
|
||||
* 2*10**-7 arcsec.
|
||||
* --------------------------------------------------------------
|
||||
*/
|
||||
CT = Z/RR;
|
||||
ST = P/RR;
|
||||
RX = 1.0/sqrt(1.0-gi.Geocent_e2*(2.0-gi.Geocent_e2)*ST*ST);
|
||||
CPHI0 = ST*(1.0-gi.Geocent_e2)*RX;
|
||||
SPHI0 = CT*RX;
|
||||
iter = 0;
|
||||
|
||||
/* loop to find sin(Latitude) resp. Latitude
|
||||
* until |sin(Latitude(iter)-Latitude(iter-1))| < genau */
|
||||
do
|
||||
{
|
||||
iter++;
|
||||
RN = gi.Geocent_a/sqrt(1.0-gi.Geocent_e2*SPHI0*SPHI0);
|
||||
|
||||
/* ellipsoidal (geodetic) height */
|
||||
Height = P*CPHI0+Z*SPHI0-RN*(1.0-gi.Geocent_e2*SPHI0*SPHI0);
|
||||
|
||||
RK = gi.Geocent_e2*RN/(RN+Height);
|
||||
RX = 1.0/sqrt(1.0-RK*(2.0-RK)*ST*ST);
|
||||
CPHI = ST*(1.0-RK)*RX;
|
||||
SPHI = CT*RX;
|
||||
SDPHI = SPHI*CPHI0-CPHI*SPHI0;
|
||||
CPHI0 = CPHI;
|
||||
SPHI0 = SPHI;
|
||||
}
|
||||
while (SDPHI*SDPHI > genau2 && iter < maxiter);
|
||||
|
||||
/* ellipsoidal (geodetic) latitude */
|
||||
Latitude=atan(SPHI/fabs(CPHI));
|
||||
|
||||
return;
|
||||
#endif /* defined(BOOST_GEOMETRY_PROJECTIONS_USE_ITERATIVE_METHOD) */
|
||||
} /* END OF Convert_Geocentric_To_Geodetic */
|
||||
|
||||
|
||||
} // namespace detail
|
||||
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_SRS_PROJECTIONS_IMPL_GEOCENT_HPP
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -44,20 +48,22 @@ namespace boost { namespace geometry { namespace projections {
|
||||
|
||||
namespace detail {
|
||||
|
||||
static const double P00 = .33333333333333333333;
|
||||
static const double P01 = .17222222222222222222;
|
||||
static const double P02 = .10257936507936507936;
|
||||
static const double P10 = .06388888888888888888;
|
||||
static const double P11 = .06640211640211640211;
|
||||
static const double P20 = .01641501294219154443;
|
||||
static const int APA_SIZE = 3;
|
||||
|
||||
/* determine latitude from authalic latitude */
|
||||
inline bool pj_authset(double es, double* APA)
|
||||
template <typename T>
|
||||
inline bool pj_authset(T const& es, T* APA)
|
||||
{
|
||||
BOOST_GEOMETRY_ASSERT(0 != APA);
|
||||
|
||||
double t = 0;
|
||||
static const T P00 = .33333333333333333333;
|
||||
static const T P01 = .17222222222222222222;
|
||||
static const T P02 = .10257936507936507936;
|
||||
static const T P10 = .06388888888888888888;
|
||||
static const T P11 = .06640211640211640211;
|
||||
static const T P20 = .01641501294219154443;
|
||||
|
||||
T t = 0;
|
||||
|
||||
// if (APA = (double *)pj_malloc(APA_SIZE * sizeof(double)))
|
||||
{
|
||||
@@ -73,11 +79,12 @@ inline bool pj_authset(double es, double* APA)
|
||||
return true;
|
||||
}
|
||||
|
||||
inline double pj_authlat(double beta, const double* APA)
|
||||
template <typename T>
|
||||
inline T pj_authlat(T const& beta, const T* APA)
|
||||
{
|
||||
BOOST_GEOMETRY_ASSERT(0 != APA);
|
||||
|
||||
double const t = beta + beta;
|
||||
T const t = beta + beta;
|
||||
|
||||
return(beta + APA[0] * sin(t) + APA[1] * sin(t + t) + APA[2] * sin(t + t + t));
|
||||
}
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -35,14 +39,19 @@
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_DATUM_SET_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_DATUM_SET_HPP
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/pj_datums.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/parameters.hpp>
|
||||
#include <boost/geometry/srs/projections/exception.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_datums.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/par4.hpp>
|
||||
#include <boost/geometry/srs/projections/proj4.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
|
||||
@@ -50,20 +59,14 @@ namespace detail {
|
||||
|
||||
|
||||
/* SEC_TO_RAD = Pi/180/3600 */
|
||||
const double SEC_TO_RAD = 4.84813681109535993589914102357e-6;
|
||||
template <typename T>
|
||||
inline T SEC_TO_RAD() { return 4.84813681109535993589914102357e-6; }
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_datum_set() */
|
||||
/************************************************************************/
|
||||
|
||||
inline void pj_datum_set(std::vector<pvalue>& pvalues, parameters& projdef)
|
||||
template <typename BGParams, typename T>
|
||||
inline void pj_datum_add_defn(BGParams const& , std::vector<pvalue<T> >& pvalues)
|
||||
{
|
||||
std::string name, towgs84, nadgrids;
|
||||
|
||||
projdef.datum_type = PJD_UNKNOWN;
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* Is there a datum definition in the parameter list? If so, */
|
||||
/* Is there a datum definition in the parameter list? If so, */
|
||||
/* add the defining values to the parameter list. Note that */
|
||||
/* this will append the ellipse definition as well as the */
|
||||
/* towgs84= and related parameters. It should also be pointed */
|
||||
@@ -72,7 +75,7 @@ inline void pj_datum_set(std::vector<pvalue>& pvalues, parameters& projdef)
|
||||
/* definition will last into the pj_ell_set() function called */
|
||||
/* after this one. */
|
||||
/* -------------------------------------------------------------------- */
|
||||
name = pj_param(pvalues, "sdatum").s;
|
||||
std::string name = pj_param(pvalues, "sdatum").s;
|
||||
if(! name.empty())
|
||||
{
|
||||
/* find the datum definition */
|
||||
@@ -88,27 +91,67 @@ inline void pj_datum_set(std::vector<pvalue>& pvalues, parameters& projdef)
|
||||
|
||||
if (index == -1)
|
||||
{
|
||||
throw proj_exception(-9);
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-9) );
|
||||
}
|
||||
|
||||
if(! pj_datums[index].ellipse_id.empty())
|
||||
{
|
||||
std::string entry("ellps=");
|
||||
entry +=pj_datums[index].ellipse_id;
|
||||
pvalues.push_back(pj_mkparam(entry));
|
||||
pvalues.push_back(pj_mkparam<T>(entry));
|
||||
}
|
||||
|
||||
if(! pj_datums[index].defn.empty())
|
||||
{
|
||||
pvalues.push_back(pj_mkparam(pj_datums[index].defn));
|
||||
pvalues.push_back(pj_mkparam<T>(pj_datums[index].defn));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX, typename T>
|
||||
inline void pj_datum_add_defn(srs::static_proj4<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& bg_params,
|
||||
std::vector<pvalue<T> >& pvalues)
|
||||
{
|
||||
typedef srs::static_proj4<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> bg_parameters_type;
|
||||
typedef typename srs::par4::detail::tuples_find_if
|
||||
<
|
||||
bg_parameters_type,
|
||||
srs::par4::detail::is_param_t<srs::par4::datum>::is_same
|
||||
>::type datum_type;
|
||||
typedef typename srs::par4::detail::datum_traits
|
||||
<
|
||||
datum_type
|
||||
> datum_traits;
|
||||
|
||||
// is unknown if datum parameter found but traits are not specialized
|
||||
static const bool not_set_or_known = boost::is_same<datum_type, void>::value
|
||||
|| ! boost::is_same<typename datum_traits::ellps_type, void>::value;
|
||||
BOOST_MPL_ASSERT_MSG((not_set_or_known), UNKNOWN_DATUM, (bg_parameters_type));
|
||||
|
||||
std::string defn = datum_traits::definition();
|
||||
|
||||
if (! defn.empty())
|
||||
pvalues.push_back(pj_mkparam<T>(defn));
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_datum_set() */
|
||||
/************************************************************************/
|
||||
|
||||
template <typename BGParams, typename T>
|
||||
inline void pj_datum_set(BGParams const& bg_params, std::vector<pvalue<T> >& pvalues, parameters<T>& projdef)
|
||||
{
|
||||
static const T SEC_TO_RAD = detail::SEC_TO_RAD<T>();
|
||||
|
||||
projdef.datum_type = PJD_UNKNOWN;
|
||||
|
||||
pj_datum_add_defn(bg_params, pvalues);
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* Check for nadgrids parameter. */
|
||||
/* -------------------------------------------------------------------- */
|
||||
nadgrids = pj_param(pvalues, "snadgrids").s;
|
||||
towgs84 = pj_param(pvalues, "stowgs84").s;
|
||||
std::string nadgrids = pj_param(pvalues, "snadgrids").s;
|
||||
std::string towgs84 = pj_param(pvalues, "stowgs84").s;
|
||||
if(! nadgrids.empty())
|
||||
{
|
||||
/* We don't actually save the value separately. It will continue
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -35,7 +39,7 @@
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_DATUMS_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_DATUMS_HPP
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
|
||||
@@ -51,33 +55,35 @@ static const PJ_DATUMS pj_datums[] =
|
||||
{
|
||||
/* id definition ellipse comments */
|
||||
/* -- ---------- ------- -------- */
|
||||
{ "WGS84", "towgs84=0,0,0", "WGS84", "" },
|
||||
{"WGS84", "towgs84=0,0,0",
|
||||
"WGS84", ""},
|
||||
|
||||
{ "GGRS87", "towgs84=-199.87,74.79,246.62",
|
||||
"GRS80", "Greek_Geodetic_Reference_System_1987" },
|
||||
{"GGRS87", "towgs84=-199.87,74.79,246.62",
|
||||
"GRS80", "Greek_Geodetic_Reference_System_1987"},
|
||||
|
||||
{ "NAD83", "towgs84=0,0,0", "GRS80","North_American_Datum_1983" },
|
||||
{"NAD83", "towgs84=0,0,0",
|
||||
"GRS80", "North_American_Datum_1983"},
|
||||
|
||||
{ "NAD27", "nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",
|
||||
"clrk66", "North_American_Datum_1927" },
|
||||
{"NAD27", "nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",
|
||||
"clrk66", "North_American_Datum_1927"},
|
||||
|
||||
{ "potsdam", "towgs84=606.0,23.0,413.0",
|
||||
"bessel", "Potsdam Rauenberg 1950 DHDN" },
|
||||
{"potsdam", "towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7",
|
||||
"bessel", "Potsdam Rauenberg 1950 DHDN"},
|
||||
|
||||
{ "carthage", "towgs84=-263.0,6.0,431.0",
|
||||
"clark80", "Carthage 1934 Tunisia" },
|
||||
{"carthage", "towgs84=-263.0,6.0,431.0",
|
||||
"clrk80ign", "Carthage 1934 Tunisia"},
|
||||
|
||||
{ "hermannskogel", "towgs84=653.0,-212.0,449.0",
|
||||
"bessel", "Hermannskogel" },
|
||||
{"hermannskogel", "towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232",
|
||||
"bessel", "Hermannskogel"},
|
||||
|
||||
{ "ire65", "towgs84=482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",
|
||||
"mod_airy", "Ireland 1965" },
|
||||
{"ire65", "towgs84=482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",
|
||||
"mod_airy", "Ireland 1965"},
|
||||
|
||||
{ "nzgd49", "towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",
|
||||
"intl", "New Zealand Geodetic Datum 1949" },
|
||||
{"nzgd49", "towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",
|
||||
"intl", "New Zealand Geodetic Datum 1949"},
|
||||
|
||||
{ "OSGB36", "towgs84=446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",
|
||||
"airy", "Airy 1830" }
|
||||
{"OSGB36", "towgs84=446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",
|
||||
"airy", "Airy 1830"}
|
||||
};
|
||||
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -38,27 +42,36 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/geometry/formulas/eccentricity_sqr.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/pj_ellps.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_ellps.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/proj4.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
|
||||
namespace detail {
|
||||
|
||||
/* set ellipsoid parameters a and es */
|
||||
static const double SIXTH = .1666666666666666667; /* 1/6 */
|
||||
static const double RA4 = .04722222222222222222; /* 17/360 */
|
||||
static const double RA6 = .02215608465608465608; /* 67/3024 */
|
||||
static const double RV4 = .06944444444444444444; /* 5/72 */
|
||||
static const double RV6 = .04243827160493827160; /* 55/1296 */
|
||||
template <typename T>
|
||||
inline T SIXTH() { return .1666666666666666667; } /* 1/6 */
|
||||
template <typename T>
|
||||
inline T RA4() { return .04722222222222222222; } /* 17/360 */
|
||||
template <typename T>
|
||||
inline T RA6() { return .02215608465608465608; } /* 67/3024 */
|
||||
template <typename T>
|
||||
inline T RV4() { return .06944444444444444444; } /* 5/72 */
|
||||
template <typename T>
|
||||
inline T RV6() { return .04243827160493827160; } /* 55/1296 */
|
||||
|
||||
/* initialize geographic shape parameters */
|
||||
inline void pj_ell_set(std::vector<pvalue>& parameters, double &a, double &es)
|
||||
template <typename BGParams, typename T>
|
||||
inline void pj_ell_set(BGParams const& bg_params, std::vector<pvalue<T> >& parameters, T &a, T &es)
|
||||
{
|
||||
double b = 0.0;
|
||||
double e = 0.0;
|
||||
T b = 0.0;
|
||||
T e = 0.0;
|
||||
std::string name;
|
||||
|
||||
/* check for varying forms of ellipsoid input */
|
||||
@@ -83,10 +96,12 @@ inline void pj_ell_set(std::vector<pvalue>& parameters, double &a, double &es)
|
||||
}
|
||||
}
|
||||
|
||||
if (index == -1) { throw proj_exception(-9); }
|
||||
if (index == -1) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-9) );
|
||||
}
|
||||
|
||||
parameters.push_back(pj_mkparam(pj_ellps[index].major));
|
||||
parameters.push_back(pj_mkparam(pj_ellps[index].ell));
|
||||
parameters.push_back(pj_mkparam<T>(pj_ellps[index].major));
|
||||
parameters.push_back(pj_mkparam<T>(pj_ellps[index].ell));
|
||||
}
|
||||
a = pj_param(parameters, "da").f;
|
||||
if (pj_param(parameters, "tes").i) /* eccentricity squared */
|
||||
@@ -97,7 +112,7 @@ inline void pj_ell_set(std::vector<pvalue>& parameters, double &a, double &es)
|
||||
} else if (pj_param(parameters, "trf").i) { /* recip flattening */
|
||||
es = pj_param(parameters, "drf").f;
|
||||
if (!es) {
|
||||
throw proj_exception(-10);
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-10) );
|
||||
}
|
||||
es = 1./ es;
|
||||
es = es * (2. - es);
|
||||
@@ -112,10 +127,10 @@ inline void pj_ell_set(std::vector<pvalue>& parameters, double &a, double &es)
|
||||
b = a * sqrt(1. - es);
|
||||
/* following options turn ellipsoid into equivalent sphere */
|
||||
if (pj_param(parameters, "bR_A").i) { /* sphere--area of ellipsoid */
|
||||
a *= 1. - es * (SIXTH + es * (RA4 + es * RA6));
|
||||
a *= 1. - es * (SIXTH<T>() + es * (RA4<T>() + es * RA6<T>()));
|
||||
es = 0.;
|
||||
} else if (pj_param(parameters, "bR_V").i) { /* sphere--vol. of ellipsoid */
|
||||
a *= 1. - es * (SIXTH + es * (RV4 + es * RV6));
|
||||
a *= 1. - es * (SIXTH<T>() + es * (RV4<T>() + es * RV6<T>()));
|
||||
es = 0.;
|
||||
} else if (pj_param(parameters, "bR_a").i) { /* sphere--arithmetic mean */
|
||||
a = .5 * (a + b);
|
||||
@@ -130,11 +145,11 @@ inline void pj_ell_set(std::vector<pvalue>& parameters, double &a, double &es)
|
||||
int i = pj_param(parameters, "tR_lat_a").i;
|
||||
if (i || /* sphere--arith. */
|
||||
pj_param(parameters, "tR_lat_g").i) { /* or geom. mean at latitude */
|
||||
double tmp;
|
||||
T tmp;
|
||||
|
||||
tmp = sin(pj_param(parameters, i ? "rR_lat_a" : "rR_lat_g").f);
|
||||
if (geometry::math::abs(tmp) > geometry::math::half_pi<double>()) {
|
||||
throw proj_exception(-11);
|
||||
if (geometry::math::abs(tmp) > geometry::math::half_pi<T>()) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-11) );
|
||||
}
|
||||
tmp = 1. - es * tmp * tmp;
|
||||
a *= i ? .5 * (1. - es + tmp) / ( tmp * sqrt(tmp)) :
|
||||
@@ -145,10 +160,43 @@ inline void pj_ell_set(std::vector<pvalue>& parameters, double &a, double &es)
|
||||
}
|
||||
|
||||
/* some remaining checks */
|
||||
if (es < 0.)
|
||||
{ throw proj_exception(-12); }
|
||||
if (a <= 0.)
|
||||
{ throw proj_exception(-13); }
|
||||
if (es < 0.) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-12) );
|
||||
}
|
||||
if (a <= 0.) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-13) );
|
||||
}
|
||||
}
|
||||
|
||||
template <BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX, typename T>
|
||||
inline void pj_ell_set(srs::static_proj4<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& bg_params,
|
||||
std::vector<pvalue<T> >& parameters, T &a, T &es)
|
||||
{
|
||||
typedef srs::static_proj4<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> static_parameters_type;
|
||||
typedef typename srs::par4::detail::pick_ellps
|
||||
<
|
||||
static_parameters_type
|
||||
> pick_ellps;
|
||||
|
||||
typename pick_ellps::model_type model = pick_ellps::model(bg_params);
|
||||
|
||||
a = geometry::get_radius<0>(model);
|
||||
T b = geometry::get_radius<2>(model);
|
||||
es = 0.;
|
||||
if (a != b)
|
||||
{
|
||||
es = formula::eccentricity_sqr<T>(model);
|
||||
|
||||
// Ignore all other parameters passed in string, at least for now
|
||||
}
|
||||
|
||||
/* some remaining checks */
|
||||
if (es < 0.) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-12) );
|
||||
}
|
||||
if (a <= 0.) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-13) );
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
98
include/boost/geometry/srs/projections/impl/pj_ellps.hpp
Normal file
98
include/boost/geometry/srs/projections/impl/pj_ellps.hpp
Normal file
@@ -0,0 +1,98 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// This file is manually converted from PROJ4
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// This file is converted from PROJ4, http://trac.osgeo.org/proj
|
||||
// PROJ4 is originally written by Gerald Evenden (then of the USGS)
|
||||
// PROJ4 is maintained by Frank Warmerdam
|
||||
// PROJ4 is converted to Geometry Library by Barend Gehrels (Geodan, Amsterdam)
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_ELLPS_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_ELLPS_HPP
|
||||
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
|
||||
namespace detail {
|
||||
|
||||
static const PJ_ELLPS pj_ellps[] =
|
||||
{
|
||||
{"MERIT", "a=6378137.0", "rf=298.257", "MERIT 1983"},
|
||||
{"SGS85", "a=6378136.0", "rf=298.257", "Soviet Geodetic System 85"},
|
||||
{"GRS80", "a=6378137.0", "rf=298.257222101", "GRS 1980(IUGG, 1980)"},
|
||||
{"IAU76", "a=6378140.0", "rf=298.257", "IAU 1976"},
|
||||
{"airy", "a=6377563.396", "b=6356256.910", "Airy 1830"},
|
||||
{"APL4.9", "a=6378137.0.", "rf=298.25", "Appl. Physics. 1965"},
|
||||
{"NWL9D", "a=6378145.0.", "rf=298.25", "Naval Weapons Lab., 1965"},
|
||||
{"mod_airy", "a=6377340.189", "b=6356034.446", "Modified Airy"},
|
||||
{"andrae", "a=6377104.43", "rf=300.0", "Andrae 1876 (Den., Iclnd.)"},
|
||||
{"aust_SA", "a=6378160.0", "rf=298.25", "Australian Natl & S. Amer. 1969"},
|
||||
{"GRS67", "a=6378160.0", "rf=298.2471674270", "GRS 67(IUGG 1967)"},
|
||||
{"bessel", "a=6377397.155", "rf=299.1528128", "Bessel 1841"},
|
||||
{"bess_nam", "a=6377483.865", "rf=299.1528128", "Bessel 1841 (Namibia)"},
|
||||
{"clrk66", "a=6378206.4", "b=6356583.8", "Clarke 1866"},
|
||||
{"clrk80", "a=6378249.145", "rf=293.4663", "Clarke 1880 mod."},
|
||||
{"clrk80ign", "a=6378249.2", "rf=293.4660212936269", "Clarke 1880 (IGN)."},
|
||||
{"CPM", "a=6375738.7", "rf=334.29", "Comm. des Poids et Mesures 1799"},
|
||||
{"delmbr", "a=6376428.", "rf=311.5", "Delambre 1810 (Belgium)"},
|
||||
{"engelis", "a=6378136.05", "rf=298.2566", "Engelis 1985"},
|
||||
{"evrst30", "a=6377276.345", "rf=300.8017", "Everest 1830"},
|
||||
{"evrst48", "a=6377304.063", "rf=300.8017", "Everest 1948"},
|
||||
{"evrst56", "a=6377301.243", "rf=300.8017", "Everest 1956"},
|
||||
{"evrst69", "a=6377295.664", "rf=300.8017", "Everest 1969"},
|
||||
{"evrstSS", "a=6377298.556", "rf=300.8017", "Everest (Sabah & Sarawak)"},
|
||||
{"fschr60", "a=6378166.", "rf=298.3", "Fischer (Mercury Datum) 1960"},
|
||||
{"fschr60m", "a=6378155.", "rf=298.3", "Modified Fischer 1960"},
|
||||
{"fschr68", "a=6378150.", "rf=298.3", "Fischer 1968"},
|
||||
{"helmert", "a=6378200.", "rf=298.3", "Helmert 1906"},
|
||||
{"hough", "a=6378270.0", "rf=297.", "Hough"},
|
||||
{"intl", "a=6378388.0", "rf=297.", "International 1909 (Hayford)"},
|
||||
{"krass", "a=6378245.0", "rf=298.3", "Krassovsky, 1942"},
|
||||
{"kaula", "a=6378163.", "rf=298.24", "Kaula 1961"},
|
||||
{"lerch", "a=6378139.", "rf=298.257", "Lerch 1979"},
|
||||
{"mprts", "a=6397300.", "rf=191.", "Maupertius 1738"},
|
||||
{"new_intl", "a=6378157.5", "b=6356772.2", "New International 1967"},
|
||||
{"plessis", "a=6376523.", "b=6355863.", "Plessis 1817 (France)"},
|
||||
{"SEasia", "a=6378155.0", "b=6356773.3205", "Southeast Asia"},
|
||||
{"walbeck", "a=6376896.0", "b=6355834.8467", "Walbeck"},
|
||||
{"WGS60", "a=6378165.0", "rf=298.3", "WGS 60"},
|
||||
{"WGS66", "a=6378145.0", "rf=298.25", "WGS 66"},
|
||||
{"WGS72", "a=6378135.0", "rf=298.26", "WGS 72"},
|
||||
{"WGS84", "a=6378137.0", "rf=298.257223563", "WGS 84"},
|
||||
{"sphere", "a=6370997.0", "b=6370997.0", "Normal Sphere (r=6370997)"}
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_ELLPS_HPP
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -38,8 +42,8 @@
|
||||
#include <boost/geometry/core/radian_access.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/adjlon.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/adjlon.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
|
||||
@@ -49,30 +53,28 @@ namespace boost { namespace geometry { namespace projections {
|
||||
|
||||
namespace detail {
|
||||
|
||||
namespace forwrd
|
||||
{
|
||||
static const double EPS = 1.0e-12;
|
||||
}
|
||||
|
||||
/* forward projection entry */
|
||||
template <typename Prj, typename LL, typename XY, typename P>
|
||||
inline void pj_fwd(Prj const& prj, P const& par, LL const& ll, XY& xy)
|
||||
{
|
||||
typedef typename P::type calc_t;
|
||||
static const calc_t EPS = 1.0e-12;
|
||||
|
||||
using namespace detail;
|
||||
|
||||
double lp_lon = geometry::get_as_radian<0>(ll);
|
||||
double lp_lat = geometry::get_as_radian<1>(ll);
|
||||
const double t = geometry::math::abs(lp_lat) - geometry::math::half_pi<double>();
|
||||
calc_t lp_lon = geometry::get_as_radian<0>(ll);
|
||||
calc_t lp_lat = geometry::get_as_radian<1>(ll);
|
||||
calc_t const t = geometry::math::abs(lp_lat) - geometry::math::half_pi<calc_t>();
|
||||
|
||||
/* check for forward and latitude or longitude overange */
|
||||
if (t > forwrd::EPS || geometry::math::abs(lp_lon) > 10.)
|
||||
if (t > EPS || geometry::math::abs(lp_lon) > 10.)
|
||||
{
|
||||
throw proj_exception();
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-14) );
|
||||
}
|
||||
|
||||
if (geometry::math::abs(t) <= forwrd::EPS)
|
||||
if (geometry::math::abs(t) <= EPS)
|
||||
{
|
||||
lp_lat = lp_lat < 0. ? -geometry::math::half_pi<double>() : geometry::math::half_pi<double>();
|
||||
lp_lat = lp_lat < 0. ? -geometry::math::half_pi<calc_t>() : geometry::math::half_pi<calc_t>();
|
||||
}
|
||||
else if (par.geoc)
|
||||
{
|
||||
@@ -85,8 +87,8 @@ inline void pj_fwd(Prj const& prj, P const& par, LL const& ll, XY& xy)
|
||||
lp_lon = adjlon(lp_lon); /* post_forward del longitude */
|
||||
}
|
||||
|
||||
double x = 0;
|
||||
double y = 0;
|
||||
calc_t x = 0;
|
||||
calc_t y = 0;
|
||||
|
||||
prj.fwd(lp_lon, lp_lat, x, y);
|
||||
geometry::set<0>(xy, par.fr_meter * (par.a * x + par.x0));
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -46,34 +50,37 @@ namespace detail { namespace gauss {
|
||||
|
||||
static const int MAX_ITER = 20;
|
||||
|
||||
template <typename T>
|
||||
struct GAUSS
|
||||
{
|
||||
double C;
|
||||
double K;
|
||||
double e;
|
||||
double ratexp;
|
||||
T C;
|
||||
T K;
|
||||
T e;
|
||||
T ratexp;
|
||||
};
|
||||
|
||||
static const double DEL_TOL = 1e-14;
|
||||
|
||||
inline double srat(double esinp, double exp)
|
||||
template <typename T>
|
||||
inline T srat(T const& esinp, T const& exp)
|
||||
{
|
||||
return (pow((1.0 - esinp) / (1.0 + esinp), exp));
|
||||
}
|
||||
|
||||
inline GAUSS gauss_ini(double e, double phi0, double &chi, double &rc)
|
||||
template <typename T>
|
||||
inline GAUSS<T> gauss_ini(T const& e, T const& phi0, T& chi, T& rc)
|
||||
{
|
||||
static const T FORTPI = detail::FORTPI<T>();
|
||||
|
||||
using std::asin;
|
||||
using std::cos;
|
||||
using std::sin;
|
||||
using std::sqrt;
|
||||
using std::tan;
|
||||
|
||||
double sphi = 0;
|
||||
double cphi = 0;
|
||||
double es = 0;
|
||||
T sphi = 0;
|
||||
T cphi = 0;
|
||||
T es = 0;
|
||||
|
||||
GAUSS en;
|
||||
GAUSS<T> en;
|
||||
es = e * e;
|
||||
en.e = e;
|
||||
sphi = sin(phi0);
|
||||
@@ -84,31 +91,36 @@ inline GAUSS gauss_ini(double e, double phi0, double &chi, double &rc)
|
||||
en.C = sqrt(1.0 + es * cphi * cphi / (1.0 - es));
|
||||
chi = asin(sphi / en.C);
|
||||
en.ratexp = 0.5 * en.C * e;
|
||||
en.K = tan(0.5 * chi + detail::FORTPI)
|
||||
/ (pow(tan(0.5 * phi0 + detail::FORTPI), en.C) * srat(en.e * sphi, en.ratexp));
|
||||
en.K = tan(0.5 * chi + FORTPI)
|
||||
/ (pow(tan(0.5 * phi0 + FORTPI), en.C) * srat(en.e * sphi, en.ratexp));
|
||||
|
||||
return en;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline void gauss(GAUSS const& en, T& lam, T& phi)
|
||||
inline void gauss(GAUSS<T> const& en, T& lam, T& phi)
|
||||
{
|
||||
static const T FORTPI = detail::FORTPI<T>();
|
||||
|
||||
phi = 2.0 * atan(en.K * pow(tan(0.5 * phi + FORTPI), en.C)
|
||||
* srat(en.e * sin(phi), en.ratexp) ) - geometry::math::half_pi<double>();
|
||||
* srat(en.e * sin(phi), en.ratexp) ) - geometry::math::half_pi<T>();
|
||||
|
||||
lam *= en.C;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline void inv_gauss(GAUSS const& en, T& lam, T& phi)
|
||||
inline void inv_gauss(GAUSS<T> const& en, T& lam, T& phi)
|
||||
{
|
||||
static const T FORTPI = detail::FORTPI<T>();
|
||||
static const T DEL_TOL = 1e-14;
|
||||
|
||||
lam /= en.C;
|
||||
const double num = pow(tan(0.5 * phi + FORTPI) / en.K, 1.0 / en.C);
|
||||
const T num = pow(tan(0.5 * phi + FORTPI) / en.K, 1.0 / en.C);
|
||||
|
||||
int i = 0;
|
||||
for (i = MAX_ITER; i; --i)
|
||||
{
|
||||
const double elp_phi = 2.0 * atan(num * srat(en.e * sin(phi), - 0.5 * en.e)) - geometry::math::half_pi<double>();
|
||||
const T elp_phi = 2.0 * atan(num * srat(en.e * sin(phi), - 0.5 * en.e)) - geometry::math::half_pi<T>();
|
||||
|
||||
if (geometry::math::abs(elp_phi - phi) < DEL_TOL)
|
||||
{
|
||||
@@ -120,7 +132,7 @@ inline void inv_gauss(GAUSS const& en, T& lam, T& phi)
|
||||
/* convergence failed */
|
||||
if (!i)
|
||||
{
|
||||
throw proj_exception(-17);
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-17) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -40,21 +44,21 @@
|
||||
#include <vector>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/range.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <boost/geometry/util/condition.hpp>
|
||||
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/pj_datum_set.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/pj_datums.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/pj_ell_set.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/pj_units.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/parameters.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/geographic/strategies/dms_parser.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/dms_parser.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_datum_set.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_datums.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_ell_set.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_units.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/proj4.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
@@ -64,6 +68,120 @@ namespace boost { namespace geometry { namespace projections
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template <typename BGParams, typename T>
|
||||
inline void pj_push_defaults(BGParams const& bg_params, parameters<T>& pin)
|
||||
{
|
||||
pin.params.push_back(pj_mkparam<T>("ellps=WGS84"));
|
||||
|
||||
if (pin.name == "aea")
|
||||
{
|
||||
pin.params.push_back(pj_mkparam<T>("lat_1=29.5"));
|
||||
pin.params.push_back(pj_mkparam<T>("lat_2=45.5 "));
|
||||
}
|
||||
else if (pin.name == "lcc")
|
||||
{
|
||||
pin.params.push_back(pj_mkparam<T>("lat_1=33"));
|
||||
pin.params.push_back(pj_mkparam<T>("lat_2=45"));
|
||||
}
|
||||
else if (pin.name == "lagrng")
|
||||
{
|
||||
pin.params.push_back(pj_mkparam<T>("W=2"));
|
||||
}
|
||||
}
|
||||
|
||||
template <BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX, typename T>
|
||||
inline void pj_push_defaults(srs::static_proj4<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& bg_params,
|
||||
parameters<T>& pin)
|
||||
{
|
||||
typedef srs::static_proj4<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> static_parameters_type;
|
||||
typedef typename srs::par4::detail::pick_proj_tag
|
||||
<
|
||||
static_parameters_type
|
||||
>::type proj_tag;
|
||||
|
||||
// statically defaulting to WGS84
|
||||
//pin.params.push_back(pj_mkparam("ellps=WGS84"));
|
||||
|
||||
if (BOOST_GEOMETRY_CONDITION((boost::is_same<proj_tag, srs::par4::aea>::value)))
|
||||
{
|
||||
pin.params.push_back(pj_mkparam<T>("lat_1=29.5"));
|
||||
pin.params.push_back(pj_mkparam<T>("lat_2=45.5 "));
|
||||
}
|
||||
else if (BOOST_GEOMETRY_CONDITION((boost::is_same<proj_tag, srs::par4::lcc>::value)))
|
||||
{
|
||||
pin.params.push_back(pj_mkparam<T>("lat_1=33"));
|
||||
pin.params.push_back(pj_mkparam<T>("lat_2=45"));
|
||||
}
|
||||
else if (BOOST_GEOMETRY_CONDITION((boost::is_same<proj_tag, srs::par4::lagrng>::value)))
|
||||
{
|
||||
pin.params.push_back(pj_mkparam<T>("W=2"));
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline void pj_init_units(std::vector<pvalue<T> > const& params,
|
||||
std::string const& sunits,
|
||||
std::string const& sto_meter,
|
||||
T & to_meter,
|
||||
T & fr_meter,
|
||||
T const& default_to_meter,
|
||||
T const& default_fr_meter)
|
||||
{
|
||||
std::string s;
|
||||
std::string units = pj_param(params, sunits).s;
|
||||
if (! units.empty())
|
||||
{
|
||||
const int n = sizeof(pj_units) / sizeof(pj_units[0]);
|
||||
int index = -1;
|
||||
for (int i = 0; i < n && index == -1; i++)
|
||||
{
|
||||
if(pj_units[i].id == units)
|
||||
{
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (index == -1) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-7) );
|
||||
}
|
||||
s = pj_units[index].to_meter;
|
||||
}
|
||||
|
||||
if (s.empty())
|
||||
{
|
||||
s = pj_param(params, sto_meter).s;
|
||||
}
|
||||
|
||||
if (! s.empty())
|
||||
{
|
||||
std::size_t const pos = s.find('/');
|
||||
if (pos == std::string::npos)
|
||||
{
|
||||
to_meter = lexical_cast<T>(s);
|
||||
}
|
||||
else
|
||||
{
|
||||
T const numerator = lexical_cast<T>(s.substr(0, pos));
|
||||
T const denominator = lexical_cast<T>(s.substr(pos + 1));
|
||||
if (numerator == 0.0 || denominator == 0.0)
|
||||
{
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-99) );
|
||||
}
|
||||
to_meter = numerator / denominator;
|
||||
}
|
||||
if (to_meter == 0.0)
|
||||
{
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-99) );
|
||||
}
|
||||
fr_meter = 1. / to_meter;
|
||||
}
|
||||
else
|
||||
{
|
||||
to_meter = default_to_meter;
|
||||
fr_meter = default_fr_meter;
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_init() */
|
||||
/* */
|
||||
@@ -72,14 +190,14 @@ namespace detail
|
||||
/* called to do the initial allocation so it can be created */
|
||||
/* large enough to hold projection specific parameters. */
|
||||
/************************************************************************/
|
||||
template <typename R>
|
||||
inline parameters pj_init(R const& arguments, bool use_defaults = true)
|
||||
template <typename T, typename BGParams, typename R>
|
||||
inline parameters<T> pj_init(BGParams const& bg_params, R const& arguments, bool use_defaults = true)
|
||||
{
|
||||
parameters pin;
|
||||
parameters<T> pin;
|
||||
for (std::vector<std::string>::const_iterator it = boost::begin(arguments);
|
||||
it != boost::end(arguments); it++)
|
||||
{
|
||||
pin.params.push_back(pj_mkparam(*it));
|
||||
pin.params.push_back(pj_mkparam<T>(*it));
|
||||
}
|
||||
|
||||
/* check if +init present */
|
||||
@@ -91,9 +209,11 @@ inline parameters pj_init(R const& arguments, bool use_defaults = true)
|
||||
|
||||
// find projection -> implemented in projection factory
|
||||
pin.name = pj_param(pin.params, "sproj").s;
|
||||
// exception thrown in projection<>
|
||||
// TODO: consider throwing here both projection_unknown_id_exception and
|
||||
// projection_not_named_exception in order to throw before other exceptions
|
||||
//if (pin.name.empty())
|
||||
//{ throw proj_exception(-4); }
|
||||
|
||||
//{ BOOST_THROW_EXCEPTION( projection_not_named_exception() ); }
|
||||
|
||||
// set defaults, unless inhibited
|
||||
// GL-Addition, if use_defaults is false then defaults are ignored
|
||||
@@ -101,34 +221,23 @@ inline parameters pj_init(R const& arguments, bool use_defaults = true)
|
||||
{
|
||||
// proj4 gets defaults from "proj_def.dat", file of 94/02/23 with a few defaults.
|
||||
// Here manually
|
||||
if (pin.name == "lcc")
|
||||
{
|
||||
pin.params.push_back(pj_mkparam("lat_1=33"));
|
||||
pin.params.push_back(pj_mkparam("lat_2=45"));
|
||||
}
|
||||
else if (pin.name == "aea")
|
||||
{
|
||||
pin.params.push_back(pj_mkparam("lat_1=29.5"));
|
||||
pin.params.push_back(pj_mkparam("lat_2=45.5 "));
|
||||
}
|
||||
else
|
||||
{
|
||||
//<general>ellps=WGS84
|
||||
}
|
||||
pj_push_defaults(bg_params, pin);
|
||||
//curr = get_defaults(&arguments, curr, name);
|
||||
}
|
||||
|
||||
/* allocate projection structure */
|
||||
// done by constructor:
|
||||
// done by BGParams constructor:
|
||||
// pin.is_latlong = 0;
|
||||
// pin.is_geocent = 0;
|
||||
// pin.long_wrap_center = 0.0;
|
||||
// pin.long_wrap_center = 0.0;
|
||||
pin.is_long_wrap_set = false;
|
||||
|
||||
/* set datum parameters */
|
||||
pj_datum_set(pin.params, pin);
|
||||
pj_datum_set(bg_params, pin.params, pin);
|
||||
|
||||
/* set ellipsoid/sphere parameters */
|
||||
pj_ell_set(pin.params, pin.a, pin.es);
|
||||
pj_ell_set(bg_params, pin.params, pin.a, pin.es);
|
||||
|
||||
pin.a_orig = pin.a;
|
||||
pin.es_orig = pin.es;
|
||||
@@ -136,7 +245,9 @@ inline parameters pj_init(R const& arguments, bool use_defaults = true)
|
||||
pin.e = sqrt(pin.es);
|
||||
pin.ra = 1. / pin.a;
|
||||
pin.one_es = 1. - pin.es;
|
||||
if (pin.one_es == 0.) { throw proj_exception(-6); }
|
||||
if (pin.one_es == 0.) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-6) );
|
||||
}
|
||||
pin.rone_es = 1./pin.one_es;
|
||||
|
||||
/* Now that we have ellipse information check for WGS84 datum */
|
||||
@@ -157,7 +268,9 @@ inline parameters pj_init(R const& arguments, bool use_defaults = true)
|
||||
pin.over = pj_param(pin.params, "bover").i;
|
||||
|
||||
/* longitude center for wrapping */
|
||||
pin.long_wrap_center = pj_param(pin.params, "rlon_wrap").f;
|
||||
pin.is_long_wrap_set = pj_param(pin.params, "tlon_wrap").i != 0;
|
||||
if (pin.is_long_wrap_set)
|
||||
pin.long_wrap_center = pj_param(pin.params, "rlon_wrap").f;
|
||||
|
||||
/* central meridian */
|
||||
pin.lam0 = pj_param(pin.params, "rlon_0").f;
|
||||
@@ -177,63 +290,16 @@ inline parameters pj_init(R const& arguments, bool use_defaults = true)
|
||||
else
|
||||
pin.k0 = 1.;
|
||||
if (pin.k0 <= 0.) {
|
||||
throw proj_exception(-31);
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-31) );
|
||||
}
|
||||
|
||||
/* set units */
|
||||
std::string s;
|
||||
std::string units = pj_param(pin.params, "sunits").s;
|
||||
if (! units.empty())
|
||||
{
|
||||
const int n = sizeof(pj_units) / sizeof(pj_units[0]);
|
||||
int index = -1;
|
||||
for (int i = 0; i < n && index == -1; i++)
|
||||
{
|
||||
if(pj_units[i].id == units)
|
||||
{
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (index == -1) { throw proj_exception(-7); }
|
||||
s = pj_units[index].to_meter;
|
||||
}
|
||||
|
||||
if (s.empty())
|
||||
{
|
||||
s = pj_param(pin.params, "sto_meter").s;
|
||||
}
|
||||
|
||||
if (! s.empty())
|
||||
{
|
||||
std::size_t const pos = s.find('/');
|
||||
if (pos == std::string::npos)
|
||||
{
|
||||
pin.to_meter = lexical_cast<double>(s);
|
||||
}
|
||||
else
|
||||
{
|
||||
double const numerator = lexical_cast<double>(s.substr(0, pos));
|
||||
double const denominator = lexical_cast<double>(s.substr(pos + 1));
|
||||
if (numerator == 0.0 || denominator == 0.0)
|
||||
{
|
||||
throw proj_exception(-99);
|
||||
}
|
||||
pin.to_meter = numerator / denominator;
|
||||
}
|
||||
if (pin.to_meter == 0.0)
|
||||
{
|
||||
throw proj_exception(-99);
|
||||
}
|
||||
pin.fr_meter = 1. / pin.to_meter;
|
||||
}
|
||||
else
|
||||
{
|
||||
pin.to_meter = pin.fr_meter = 1.;
|
||||
}
|
||||
pj_init_units(pin.params, "sunits", "sto_meter",
|
||||
pin.to_meter, pin.fr_meter, 1., 1.);
|
||||
pj_init_units(pin.params, "svunits", "svto_meter",
|
||||
pin.vto_meter, pin.vfr_meter, pin.to_meter, pin.fr_meter);
|
||||
|
||||
/* prime meridian */
|
||||
s.clear();
|
||||
std::string pm = pj_param(pin.params, "spm").s;
|
||||
if (! pm.empty())
|
||||
{
|
||||
@@ -250,11 +316,15 @@ inline parameters pj_init(R const& arguments, bool use_defaults = true)
|
||||
}
|
||||
}
|
||||
|
||||
if (index == -1) { throw proj_exception(-7); }
|
||||
if (value.empty()) { throw proj_exception(-46); }
|
||||
if (index == -1) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-7) );
|
||||
}
|
||||
if (value.empty()) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-46) );
|
||||
}
|
||||
|
||||
geometry::strategy::dms_parser<true> parser;
|
||||
pin.from_greenwich = parser(value.c_str());
|
||||
dms_parser<T, true> parser;
|
||||
pin.from_greenwich = parser.apply(value.c_str()).angle();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -271,8 +341,8 @@ inline parameters pj_init(R const& arguments, bool use_defaults = true)
|
||||
/* individual arguments preceeded by '+', such as "+proj=utm */
|
||||
/* +zone=11 +ellps=WGS84". */
|
||||
/************************************************************************/
|
||||
|
||||
inline parameters pj_init_plus(std::string const& definition, bool use_defaults = true)
|
||||
template <typename T, typename BGParams>
|
||||
inline parameters<T> pj_init_plus(BGParams const& bg_params, std::string const& definition, bool use_defaults = true)
|
||||
{
|
||||
const char* sep = " +";
|
||||
|
||||
@@ -309,7 +379,7 @@ inline parameters pj_init_plus(std::string const& definition, bool use_defaults
|
||||
{
|
||||
boost::trim(*it);
|
||||
}*/
|
||||
return pj_init(arguments, use_defaults);
|
||||
return pj_init<T>(bg_params, arguments, use_defaults);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -37,7 +41,7 @@
|
||||
|
||||
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/adjlon.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/adjlon.hpp>
|
||||
#include <boost/geometry/core/radian_access.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
@@ -49,25 +53,23 @@ namespace boost { namespace geometry { namespace projections
|
||||
namespace detail
|
||||
{
|
||||
|
||||
namespace inv
|
||||
{
|
||||
static const double EPS = 1.0e-12;
|
||||
}
|
||||
|
||||
/* inverse projection entry */
|
||||
template <typename PRJ, typename LL, typename XY, typename PAR>
|
||||
inline void pj_inv(PRJ const& prj, PAR const& par, XY const& xy, LL& ll)
|
||||
{
|
||||
typedef typename PAR::type calc_t;
|
||||
static const calc_t EPS = 1.0e-12;
|
||||
|
||||
/* can't do as much preliminary checking as with forward */
|
||||
/* descale and de-offset */
|
||||
double xy_x = (geometry::get<0>(xy) * par.to_meter - par.x0) * par.ra;
|
||||
double xy_y = (geometry::get<1>(xy) * par.to_meter - par.y0) * par.ra;
|
||||
double lon = 0, lat = 0;
|
||||
calc_t xy_x = (geometry::get<0>(xy) * par.to_meter - par.x0) * par.ra;
|
||||
calc_t xy_y = (geometry::get<1>(xy) * par.to_meter - par.y0) * par.ra;
|
||||
calc_t lon = 0, lat = 0;
|
||||
prj.inv(xy_x, xy_y, lon, lat); /* inverse project */
|
||||
lon += par.lam0; /* reduce from del lp.lam */
|
||||
if (!par.over)
|
||||
lon = adjlon(lon); /* adjust longitude to CM */
|
||||
if (par.geoc && geometry::math::abs(fabs(lat)-geometry::math::half_pi<double>()) > inv::EPS)
|
||||
if (par.geoc && geometry::math::abs(geometry::math::abs(lat)-geometry::math::half_pi<calc_t>()) > EPS)
|
||||
lat = atan(par.one_es * tan(lat));
|
||||
|
||||
geometry::set_from_radian<0>(ll, lon);
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -44,30 +48,25 @@ namespace boost { namespace geometry { namespace projections {
|
||||
|
||||
namespace detail {
|
||||
|
||||
/* meridinal distance for ellipsoid and inverse
|
||||
** 8th degree - accurate to < 1e-5 meters when used in conjuction
|
||||
** with typical major axis values.
|
||||
** Inverse determines phi to EPS (1e-11) radians, about 1e-6 seconds.
|
||||
*/
|
||||
static const double C00 = 1.;
|
||||
static const double C02 = .25;
|
||||
static const double C04 = .046875;
|
||||
static const double C06 = .01953125;
|
||||
static const double C08 = .01068115234375;
|
||||
static const double C22 = .75;
|
||||
static const double C44 = .46875;
|
||||
static const double C46 = .01302083333333333333;
|
||||
static const double C48 = .00712076822916666666;
|
||||
static const double C66 = .36458333333333333333;
|
||||
static const double C68 = .00569661458333333333;
|
||||
static const double C88 = .3076171875;
|
||||
static const double EPS = 1e-11;
|
||||
static const int MAX_ITER = 10;
|
||||
static const int EN_SIZE = 5;
|
||||
|
||||
inline bool pj_enfn(double es, double* en)
|
||||
template <typename T>
|
||||
inline bool pj_enfn(T const& es, T* en)
|
||||
{
|
||||
double t; //, *en;
|
||||
static const T C00 = 1.;
|
||||
static const T C02 = .25;
|
||||
static const T C04 = .046875;
|
||||
static const T C06 = .01953125;
|
||||
static const T C08 = .01068115234375;
|
||||
static const T C22 = .75;
|
||||
static const T C44 = .46875;
|
||||
static const T C46 = .01302083333333333333;
|
||||
static const T C48 = .00712076822916666666;
|
||||
static const T C66 = .36458333333333333333;
|
||||
static const T C68 = .00569661458333333333;
|
||||
static const T C88 = .3076171875;
|
||||
|
||||
T t; //, *en;
|
||||
|
||||
//if (en = (double *)pj_malloc(EN_SIZE * sizeof(double)))
|
||||
{
|
||||
@@ -81,7 +80,8 @@ inline bool pj_enfn(double es, double* en)
|
||||
return true;
|
||||
}
|
||||
|
||||
inline double pj_mlfn(double phi, double sphi, double cphi, const double *en)
|
||||
template <typename T>
|
||||
inline T pj_mlfn(T const& phi, T sphi, T cphi, const T *en)
|
||||
{
|
||||
cphi *= sphi;
|
||||
sphi *= sphi;
|
||||
@@ -89,9 +89,18 @@ inline double pj_mlfn(double phi, double sphi, double cphi, const double *en)
|
||||
+ sphi*(en[3] + sphi*en[4]))));
|
||||
}
|
||||
|
||||
inline double pj_inv_mlfn(double arg, double es, const double *en)
|
||||
template <typename T>
|
||||
inline T pj_inv_mlfn(T const& arg, T const& es, const T *en)
|
||||
{
|
||||
double s, t, phi, k = 1./(1.-es);
|
||||
/* meridinal distance for ellipsoid and inverse
|
||||
** 8th degree - accurate to < 1e-5 meters when used in conjuction
|
||||
** with typical major axis values.
|
||||
** Inverse determines phi to EPS (1e-11) radians, about 1e-6 seconds.
|
||||
*/
|
||||
static const T EPS = 1e-11;
|
||||
static const int MAX_ITER = 10;
|
||||
|
||||
T s, t, phi, k = 1./(1.-es);
|
||||
int i;
|
||||
|
||||
phi = arg;
|
||||
@@ -102,7 +111,7 @@ inline double pj_inv_mlfn(double arg, double es, const double *en)
|
||||
if (geometry::math::abs(t) < EPS)
|
||||
return phi;
|
||||
}
|
||||
throw proj_exception(-17);
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-17) );
|
||||
return phi;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -42,7 +46,8 @@ namespace detail {
|
||||
|
||||
|
||||
/* determine constant small m */
|
||||
inline double pj_msfn(double sinphi, double cosphi, double es)
|
||||
template <typename T>
|
||||
inline T pj_msfn(T const& sinphi, T const& cosphi, T const& es)
|
||||
{
|
||||
return (cosphi / sqrt (1. - es * sinphi * sinphi));
|
||||
}
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -39,9 +43,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/geometry/extensions/gis/geographic/strategies/dms_parser.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/dms_parser.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
@@ -51,7 +54,8 @@ namespace detail {
|
||||
|
||||
|
||||
/* create pvalue list entry */
|
||||
inline pvalue pj_mkparam(std::string const& str)
|
||||
template <typename T>
|
||||
inline pvalue<T> pj_mkparam(std::string const& str)
|
||||
{
|
||||
std::string name = str;
|
||||
std::string value;
|
||||
@@ -64,7 +68,7 @@ inline pvalue pj_mkparam(std::string const& str)
|
||||
}
|
||||
|
||||
|
||||
pvalue newitem;
|
||||
pvalue<T> newitem;
|
||||
newitem.param = name;
|
||||
newitem.s = value;
|
||||
newitem.used = 0;
|
||||
@@ -90,15 +94,17 @@ inline pvalue pj_mkparam(std::string const& str)
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
inline pvalue pj_param(std::vector<pvalue> const& pl, std::string opt)
|
||||
template <typename T>
|
||||
inline pvalue<T> pj_param(std::vector<pvalue<T> > const& pl, std::string opt)
|
||||
{
|
||||
char type = opt[0];
|
||||
opt.erase(opt.begin());
|
||||
|
||||
pvalue value;
|
||||
pvalue<T> value;
|
||||
|
||||
/* simple linear lookup */
|
||||
for (std::vector<pvalue>::const_iterator it = pl.begin(); it != pl.end(); it++)
|
||||
typedef typename std::vector<pvalue<T> >::const_iterator iterator;
|
||||
for (iterator it = pl.begin(); it != pl.end(); it++)
|
||||
{
|
||||
if (it->param == opt)
|
||||
{
|
||||
@@ -116,8 +122,8 @@ inline pvalue pj_param(std::vector<pvalue> const& pl, std::string opt)
|
||||
break;
|
||||
case 'r': /* degrees input */
|
||||
{
|
||||
geometry::strategy::dms_parser<true> parser;
|
||||
value.f = parser(it->s.c_str());
|
||||
dms_parser<T, true> parser;
|
||||
value.f = parser.apply(it->s.c_str()).angle();
|
||||
}
|
||||
break;
|
||||
case 's': /* char string */
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -40,28 +44,26 @@
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
namespace detail {
|
||||
|
||||
namespace phi2
|
||||
template <typename T>
|
||||
inline T pj_phi2(T const& ts, T const& e)
|
||||
{
|
||||
static const double TOL = 1.0e-10;
|
||||
static const T TOL = 1.0e-10;
|
||||
static const int N_ITER = 15;
|
||||
}
|
||||
|
||||
inline double pj_phi2(double ts, double e)
|
||||
{
|
||||
double eccnth, Phi, con, dphi;
|
||||
T eccnth, Phi, con, dphi;
|
||||
int i;
|
||||
|
||||
eccnth = .5 * e;
|
||||
Phi = geometry::math::half_pi<double>() - 2. * atan (ts);
|
||||
i = phi2::N_ITER;
|
||||
Phi = geometry::math::half_pi<T>() - 2. * atan (ts);
|
||||
i = N_ITER;
|
||||
do {
|
||||
con = e * sin (Phi);
|
||||
dphi = geometry::math::half_pi<double>() - 2. * atan (ts * pow((1. - con) /
|
||||
dphi = geometry::math::half_pi<T>() - 2. * atan (ts * pow((1. - con) /
|
||||
(1. + con), eccnth)) - Phi;
|
||||
Phi += dphi;
|
||||
} while ( geometry::math::abs(dphi) > phi2::TOL && --i);
|
||||
} while ( geometry::math::abs(dphi) > TOL && --i);
|
||||
if (i <= 0)
|
||||
throw proj_exception(-18);
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-18) );
|
||||
return Phi;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -37,16 +41,19 @@
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{ namespace detail {
|
||||
{
|
||||
|
||||
namespace detail {
|
||||
|
||||
/* determine small q */
|
||||
inline double pj_qsfn(double sinphi, double e, double one_es)
|
||||
template <typename T>
|
||||
inline T pj_qsfn(T const& sinphi, T const& e, T const& one_es)
|
||||
{
|
||||
static const double EPSILON = 1.0e-7;
|
||||
static const T EPSILON = 1.0e-7;
|
||||
|
||||
if (e >= EPSILON)
|
||||
{
|
||||
double con = e * sinphi;
|
||||
T con = e * sinphi;
|
||||
return (one_es * (sinphi / (1. - con * con) -
|
||||
(.5 / e) * log ((1. - con) / (1. + con))));
|
||||
} else
|
||||
@@ -54,10 +61,12 @@ inline double pj_qsfn(double sinphi, double e, double one_es)
|
||||
}
|
||||
|
||||
|
||||
#define MAX_C 9
|
||||
static const int MAX_C = 9;
|
||||
|
||||
template <typename T>
|
||||
struct AUTHALIC
|
||||
{
|
||||
double C[MAX_C], CP[MAX_C], CQ[MAX_C];
|
||||
T C[MAX_C], CP[MAX_C], CQ[MAX_C];
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -66,9 +75,10 @@ struct AUTHALIC
|
||||
* @param[in] a initialized structure pointer
|
||||
* @return authalic latitude
|
||||
*/
|
||||
inline double proj_qsfn(double phi, const AUTHALIC& a)
|
||||
template <typename T>
|
||||
inline T proj_qsfn(T const& phi, AUTHALIC<T> const& a)
|
||||
{
|
||||
double s, s2, sum;
|
||||
T s, s2, sum;
|
||||
int i = MAX_C;
|
||||
|
||||
s = sin(phi);
|
||||
@@ -79,6 +89,7 @@ inline double proj_qsfn(double phi, const AUTHALIC& a)
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif
|
||||
120
include/boost/geometry/srs/projections/impl/pj_strerrno.hpp
Normal file
120
include/boost/geometry/srs/projections/impl/pj_strerrno.hpp
Normal file
@@ -0,0 +1,120 @@
|
||||
// Boost.Geometry
|
||||
// This file is manually converted from PROJ4
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// This file is converted from PROJ4, http://trac.osgeo.org/proj
|
||||
// PROJ4 is originally written by Gerald Evenden (then of the USGS)
|
||||
// PROJ4 is maintained by Frank Warmerdam
|
||||
// This file was converted to Geometry Library by Adam Wulkiewicz
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
// None
|
||||
|
||||
/* list of projection system pj_errno values */
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_STRERRNO_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_STRERRNO_HPP
|
||||
|
||||
#include <cstring>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
static const char *
|
||||
pj_err_list[] = {
|
||||
"no arguments in initialization list", /* -1 */
|
||||
"no options found in 'init' file", /* -2 */
|
||||
"no colon in init= string", /* -3 */
|
||||
"projection not named", /* -4 */
|
||||
"unknown projection id", /* -5 */
|
||||
"effective eccentricity = 1.", /* -6 */
|
||||
"unknown unit conversion id", /* -7 */
|
||||
"invalid boolean param argument", /* -8 */
|
||||
"unknown elliptical parameter name", /* -9 */
|
||||
"reciprocal flattening (1/f) = 0", /* -10 */
|
||||
"|radius reference latitude| > 90", /* -11 */
|
||||
"squared eccentricity < 0", /* -12 */
|
||||
"major axis or radius = 0 or not given", /* -13 */
|
||||
"latitude or longitude exceeded limits", /* -14 */
|
||||
"invalid x or y", /* -15 */
|
||||
"improperly formed DMS value", /* -16 */
|
||||
"non-convergent inverse meridional dist", /* -17 */
|
||||
"non-convergent inverse phi2", /* -18 */
|
||||
"acos/asin: |arg| >1.+1e-14", /* -19 */
|
||||
"tolerance condition error", /* -20 */
|
||||
"conic lat_1 = -lat_2", /* -21 */
|
||||
"lat_1 >= 90", /* -22 */
|
||||
"lat_1 = 0", /* -23 */
|
||||
"lat_ts >= 90", /* -24 */
|
||||
"no distance between control points", /* -25 */
|
||||
"projection not selected to be rotated", /* -26 */
|
||||
"W <= 0 or M <= 0", /* -27 */
|
||||
"lsat not in 1-5 range", /* -28 */
|
||||
"path not in range", /* -29 */
|
||||
"h <= 0", /* -30 */
|
||||
"k <= 0", /* -31 */
|
||||
"lat_0 = 0 or 90 or alpha = 90", /* -32 */
|
||||
"lat_1=lat_2 or lat_1=0 or lat_2=90", /* -33 */
|
||||
"elliptical usage required", /* -34 */
|
||||
"invalid UTM zone number", /* -35 */
|
||||
"arg(s) out of range for Tcheby eval", /* -36 */
|
||||
"failed to find projection to be rotated", /* -37 */
|
||||
"failed to load datum shift file", /* -38 */
|
||||
"both n & m must be spec'd and > 0", /* -39 */
|
||||
"n <= 0, n > 1 or not specified", /* -40 */
|
||||
"lat_1 or lat_2 not specified", /* -41 */
|
||||
"|lat_1| == |lat_2|", /* -42 */
|
||||
"lat_0 is pi/2 from mean lat", /* -43 */
|
||||
"unparseable coordinate system definition", /* -44 */
|
||||
"geocentric transformation missing z or ellps", /* -45 */
|
||||
"unknown prime meridian conversion id", /* -46 */
|
||||
"illegal axis orientation combination", /* -47 */
|
||||
"point not within available datum shift grids", /* -48 */
|
||||
"invalid sweep axis, choose x or y", /* -49 */
|
||||
"malformed pipeline", /* -50 */
|
||||
};
|
||||
|
||||
inline std::string pj_strerrno(int err) {
|
||||
if (0==err)
|
||||
return "";
|
||||
|
||||
if (err > 0) {
|
||||
//#ifdef HAVE_STRERROR
|
||||
return ::strerror(err);
|
||||
//#else
|
||||
// std::stringstream ss;
|
||||
// ss << "no system list, errno: " << err;
|
||||
// return ss.str();
|
||||
//#endif
|
||||
}
|
||||
|
||||
else /*if (err < 0)*/ {
|
||||
size_t adjusted_err = - err - 1;
|
||||
if (adjusted_err < (sizeof(pj_err_list) / sizeof(char *)))
|
||||
return(pj_err_list[adjusted_err]);
|
||||
else {
|
||||
std::stringstream ss;
|
||||
ss << "invalid projection system error (" << err << ")";
|
||||
return ss.str();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_STRERRNO_HPP
|
||||
1009
include/boost/geometry/srs/projections/impl/pj_transform.hpp
Normal file
1009
include/boost/geometry/srs/projections/impl/pj_transform.hpp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -3,6 +3,10 @@
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -41,10 +45,11 @@ namespace boost { namespace geometry { namespace projections {
|
||||
namespace detail {
|
||||
|
||||
/* determine small t */
|
||||
inline double pj_tsfn(double phi, double sinphi, double e)
|
||||
template <typename T>
|
||||
inline T pj_tsfn(T const& phi, T sinphi, T const& e)
|
||||
{
|
||||
sinphi *= e;
|
||||
return (tan (.5 * (geometry::math::half_pi<double>() - phi)) /
|
||||
return (tan (.5 * (geometry::math::half_pi<T>() - phi)) /
|
||||
pow((1. - sinphi) / (1. + sinphi), .5 * e));
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -35,7 +39,7 @@
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_UNITS_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_UNITS_HPP
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
namespace detail {
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -36,7 +40,7 @@
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_ZPOLY1_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections { namespace detail {
|
||||
@@ -47,11 +51,12 @@ namespace boost { namespace geometry { namespace projections { namespace detail
|
||||
** i.e. C_0 == (0., 0)
|
||||
** n should always be >= 1 though no checks are made
|
||||
*/
|
||||
inline COMPLEX
|
||||
pj_zpoly1(COMPLEX z, COMPLEX *C, int n)
|
||||
template <typename T>
|
||||
inline COMPLEX<T>
|
||||
pj_zpoly1(COMPLEX<T> z, const COMPLEX<T> *C, int n)
|
||||
{
|
||||
COMPLEX a;
|
||||
double t;
|
||||
COMPLEX<T> a;
|
||||
T t;
|
||||
|
||||
a = *(C += n);
|
||||
while (n-- > 0)
|
||||
@@ -65,14 +70,15 @@ namespace boost { namespace geometry { namespace projections { namespace detail
|
||||
}
|
||||
|
||||
/* evaluate complex polynomial and derivative */
|
||||
inline COMPLEX
|
||||
pj_zpolyd1(COMPLEX z, COMPLEX *C, int n, COMPLEX *der)
|
||||
template <typename T>
|
||||
inline COMPLEX<T>
|
||||
pj_zpolyd1(COMPLEX<T> z, const COMPLEX<T> *C, int n, COMPLEX<T> *der)
|
||||
{
|
||||
double t;
|
||||
T t;
|
||||
bool first = true;
|
||||
|
||||
COMPLEX a = *(C += n);
|
||||
COMPLEX b = a;
|
||||
COMPLEX<T> a = *(C += n);
|
||||
COMPLEX<T> b = a;
|
||||
while (n-- > 0)
|
||||
{
|
||||
if (first)
|
||||
@@ -45,19 +45,21 @@ namespace detail
|
||||
{
|
||||
static const int MDIST_MAX_ITER = 20;
|
||||
|
||||
template <typename T>
|
||||
struct MDIST
|
||||
{
|
||||
int nb;
|
||||
double es;
|
||||
double E;
|
||||
double b[MDIST_MAX_ITER];
|
||||
T es;
|
||||
T E;
|
||||
T b[MDIST_MAX_ITER];
|
||||
};
|
||||
|
||||
inline bool proj_mdist_ini(double es, MDIST& b)
|
||||
template <typename CT>
|
||||
inline bool proj_mdist_ini(CT const& es, MDIST<CT>& b)
|
||||
{
|
||||
double numf, numfi, twon1, denf, denfi, ens, T, twon;
|
||||
double den, El, Es;
|
||||
double E[MDIST_MAX_ITER];
|
||||
CT numf, numfi, twon1, denf, denfi, ens, T, twon;
|
||||
CT den, El, Es;
|
||||
CT E[MDIST_MAX_ITER];
|
||||
int i, j;
|
||||
|
||||
/* generate E(e^2) and its terms E[] */
|
||||
@@ -99,9 +101,11 @@ namespace detail
|
||||
}
|
||||
return true;
|
||||
}
|
||||
inline double proj_mdist(double phi, double sphi, double cphi, const MDIST& b)
|
||||
|
||||
template <typename T>
|
||||
inline T proj_mdist(T const& phi, T const& sphi, T const& cphi, MDIST<T> const& b)
|
||||
{
|
||||
double sc, sum, sphi2, D;
|
||||
T sc, sum, sphi2, D;
|
||||
int i;
|
||||
|
||||
sc = sphi * cphi;
|
||||
@@ -111,10 +115,12 @@ namespace detail
|
||||
while (i) sum = b.b[--i] + sphi2 * sum;
|
||||
return(D + sc * sum);
|
||||
}
|
||||
inline double proj_inv_mdist(double dist, const MDIST& b)
|
||||
|
||||
template <typename T>
|
||||
inline T proj_inv_mdist(T const& dist, MDIST<T> const& b)
|
||||
{
|
||||
static const double TOL = 1e-14;
|
||||
double s, t, phi, k;
|
||||
static const T TOL = 1e-14;
|
||||
T s, t, phi, k;
|
||||
int i;
|
||||
|
||||
k = 1./(1.- b.es);
|
||||
@@ -129,7 +135,7 @@ namespace detail
|
||||
return phi;
|
||||
}
|
||||
/* convergence failed */
|
||||
throw proj_exception(-17);
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-17) );
|
||||
}
|
||||
} // namespace detail
|
||||
|
||||
272
include/boost/geometry/srs/projections/impl/projects.hpp
Normal file
272
include/boost/geometry/srs/projections/impl/projects.hpp
Normal file
@@ -0,0 +1,272 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// This file is manually converted from PROJ4 (projects.h)
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// This file is converted from PROJ4, http://trac.osgeo.org/proj
|
||||
// PROJ4 is originally written by Gerald Evenden (then of the USGS)
|
||||
// PROJ4 is maintained by Frank Warmerdam
|
||||
// PROJ4 is converted to Geometry Library by Barend Gehrels (Geodan, Amsterdam)
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_IMPL_PROJECTS_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_PROJECTS_HPP
|
||||
|
||||
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/geometry/srs/projections/exception.hpp>
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/type_traits/is_pod.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
/* some useful constants */
|
||||
template <typename T>
|
||||
inline T ONEPI() { return boost::math::constants::pi<T>(); }
|
||||
template <typename T>
|
||||
inline T HALFPI() { return boost::math::constants::half_pi<T>(); }
|
||||
template <typename T>
|
||||
inline T FORTPI() { return boost::math::constants::pi<T>() / T(4); }
|
||||
template <typename T>
|
||||
inline T TWOPI() { return boost::math::constants::two_pi<T>(); }
|
||||
template <typename T>
|
||||
inline T TWO_D_PI() { return boost::math::constants::two_div_pi<T>(); }
|
||||
template <typename T>
|
||||
inline T HALFPI_SQR() { return 2.4674011002723396547086227499689; }
|
||||
template <typename T>
|
||||
inline T PI_SQR() { return boost::math::constants::pi_sqr<T>(); }
|
||||
template <typename T>
|
||||
inline T THIRD() { return 0.3333333333333333333333333333333; }
|
||||
template <typename T>
|
||||
inline T TWOTHIRD() { return 0.6666666666666666666666666666666; }
|
||||
template <typename T>
|
||||
inline T PI_HALFPI() { return 4.7123889803846898576939650749193; }
|
||||
template <typename T>
|
||||
inline T TWOPI_HALFPI() { return 7.8539816339744830961566084581988; }
|
||||
template <typename T>
|
||||
inline T PI_DIV_3() { return 1.0471975511965977461542144610932; }
|
||||
|
||||
/* datum_type values */
|
||||
static const int PJD_UNKNOWN = 0;
|
||||
static const int PJD_3PARAM = 1;
|
||||
static const int PJD_7PARAM = 2;
|
||||
static const int PJD_GRIDSHIFT = 3;
|
||||
static const int PJD_WGS84 = 4; /* WGS84 (or anything considered equivelent) */
|
||||
|
||||
/* library errors */
|
||||
static const int PJD_ERR_GEOCENTRIC = -45;
|
||||
static const int PJD_ERR_AXIS = -47;
|
||||
static const int PJD_ERR_GRID_AREA = -48;
|
||||
static const int PJD_ERR_CATALOG = -49;
|
||||
|
||||
template <typename T>
|
||||
struct pvalue
|
||||
{
|
||||
std::string param;
|
||||
int used;
|
||||
|
||||
int i;
|
||||
T f;
|
||||
std::string s;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct pj_const_pod
|
||||
{
|
||||
int over; /* over-range flag */
|
||||
int geoc; /* geocentric latitude flag */
|
||||
int is_latlong; /* proj=latlong ... not really a projection at all */
|
||||
int is_geocent; /* proj=geocent ... not really a projection at all */
|
||||
T
|
||||
a, /* major axis or radius if es==0 */
|
||||
a_orig, /* major axis before any +proj related adjustment */
|
||||
es, /* e ^ 2 */
|
||||
es_orig, /* es before any +proj related adjustment */
|
||||
e, /* eccentricity */
|
||||
ra, /* 1/A */
|
||||
one_es, /* 1 - e^2 */
|
||||
rone_es, /* 1/one_es */
|
||||
lam0, phi0, /* central longitude, latitude */
|
||||
x0, y0, /* easting and northing */
|
||||
k0, /* general scaling factor */
|
||||
to_meter, fr_meter, /* cartesian scaling */
|
||||
vto_meter, vfr_meter; /* Vertical scaling. Internal unit [m] */
|
||||
|
||||
int datum_type; /* PJD_UNKNOWN/3PARAM/7PARAM/GRIDSHIFT/WGS84 */
|
||||
T datum_params[7];
|
||||
T from_greenwich; /* prime meridian offset (in radians) */
|
||||
T long_wrap_center; /* 0.0 for -180 to 180, actually in radians*/
|
||||
bool is_long_wrap_set;
|
||||
|
||||
// Initialize all variables to zero
|
||||
pj_const_pod()
|
||||
{
|
||||
std::memset(this, 0, sizeof(pj_const_pod));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct pj_const_non_pod
|
||||
{
|
||||
int over; /* over-range flag */
|
||||
int geoc; /* geocentric latitude flag */
|
||||
int is_latlong; /* proj=latlong ... not really a projection at all */
|
||||
int is_geocent; /* proj=geocent ... not really a projection at all */
|
||||
T
|
||||
a, /* major axis or radius if es==0 */
|
||||
a_orig, /* major axis before any +proj related adjustment */
|
||||
es, /* e ^ 2 */
|
||||
es_orig, /* es before any +proj related adjustment */
|
||||
e, /* eccentricity */
|
||||
ra, /* 1/A */
|
||||
one_es, /* 1 - e^2 */
|
||||
rone_es, /* 1/one_es */
|
||||
lam0, phi0, /* central longitude, latitude */
|
||||
x0, y0, /* easting and northing */
|
||||
k0, /* general scaling factor */
|
||||
to_meter, fr_meter, /* cartesian scaling */
|
||||
vto_meter, vfr_meter; /* Vertical scaling. Internal unit [m] */
|
||||
|
||||
int datum_type; /* PJD_UNKNOWN/3PARAM/7PARAM/GRIDSHIFT/WGS84 */
|
||||
T datum_params[7];
|
||||
T from_greenwich; /* prime meridian offset (in radians) */
|
||||
T long_wrap_center; /* 0.0 for -180 to 180, actually in radians*/
|
||||
bool is_long_wrap_set;
|
||||
|
||||
// Initialize all variables to zero
|
||||
pj_const_non_pod()
|
||||
: over(0), geoc(0), is_latlong(0), is_geocent(0)
|
||||
, a(0), a_orig(0), es(0), es_orig(0), e(0), ra(0)
|
||||
, one_es(0), rone_es(0), lam0(0), phi0(0), x0(0), y0(0), k0(0)
|
||||
, to_meter(0), fr_meter(0), vto_meter(0), vfr_meter(0)
|
||||
, datum_type(PJD_UNKNOWN)
|
||||
, from_greenwich(0), long_wrap_center(0), is_long_wrap_set(false)
|
||||
{
|
||||
datum_params[0] = 0;
|
||||
datum_params[1] = 0;
|
||||
datum_params[2] = 0;
|
||||
datum_params[3] = 0;
|
||||
datum_params[4] = 0;
|
||||
datum_params[5] = 0;
|
||||
datum_params[6] = 0;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct pj_const
|
||||
: boost::mpl::if_c
|
||||
<
|
||||
boost::is_pod<T>::value,
|
||||
pj_const_pod<T>,
|
||||
pj_const_non_pod<T>
|
||||
>::type
|
||||
{};
|
||||
|
||||
// PROJ4 complex. Might be replaced with std::complex
|
||||
template <typename T>
|
||||
struct COMPLEX { T r, i; };
|
||||
|
||||
struct PJ_ELLPS
|
||||
{
|
||||
std::string id; /* ellipse keyword name */
|
||||
std::string major; /* a= value */
|
||||
std::string ell; /* elliptical parameter */
|
||||
std::string name; /* comments */
|
||||
};
|
||||
|
||||
struct PJ_DATUMS
|
||||
{
|
||||
std::string id; /* datum keyword */
|
||||
std::string defn; /* ie. "to_wgs84=..." */
|
||||
std::string ellipse_id; /* ie from ellipse table */
|
||||
std::string comments; /* EPSG code, etc */
|
||||
};
|
||||
|
||||
struct PJ_PRIME_MERIDIANS
|
||||
{
|
||||
std::string id; /* prime meridian keyword */
|
||||
std::string defn; /* offset from greenwich in DMS format. */
|
||||
};
|
||||
|
||||
struct PJ_UNITS
|
||||
{
|
||||
std::string id; /* units keyword */
|
||||
std::string to_meter; /* multiply by value to get meters */
|
||||
std::string name; /* comments */
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct DERIVS
|
||||
{
|
||||
T x_l, x_p; /* derivatives of x for lambda-phi */
|
||||
T y_l, y_p; /* derivatives of y for lambda-phi */
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct FACTORS
|
||||
{
|
||||
DERIVS<T> der;
|
||||
T h, k; /* meridinal, parallel scales */
|
||||
T omega, thetap; /* angular distortion, theta prime */
|
||||
T conv; /* convergence */
|
||||
T s; /* areal scale factor */
|
||||
T a, b; /* max-min scale error */
|
||||
int code; /* info as to analytics, see following */
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
/*!
|
||||
\brief parameters, projection parameters
|
||||
\details This structure initializes all projections
|
||||
\ingroup projection
|
||||
*/
|
||||
template <typename T>
|
||||
struct parameters : public detail::pj_const<T>
|
||||
{
|
||||
typedef T type;
|
||||
|
||||
std::string name;
|
||||
std::vector<detail::pvalue<T> > params;
|
||||
};
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_PROJECTS_HPP
|
||||
38
include/boost/geometry/srs/projections/invalid_point.hpp
Normal file
38
include/boost/geometry/srs/projections/invalid_point.hpp
Normal file
@@ -0,0 +1,38 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_INVALID_POINT_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_INVALID_POINT_HPP
|
||||
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include <boost/geometry/core/access.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
// Originally in pj_transform()
|
||||
template <typename Point>
|
||||
inline void set_invalid_point(Point & point)
|
||||
{
|
||||
set<0>(point, HUGE_VAL);
|
||||
set<1>(point, HUGE_VAL);
|
||||
}
|
||||
|
||||
template <typename Point>
|
||||
inline bool is_invalid_point(Point const& point)
|
||||
{
|
||||
return get<0>(point) == HUGE_VAL;
|
||||
}
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_INVALID_POINT_HPP
|
||||
454
include/boost/geometry/srs/projections/par4.hpp
Normal file
454
include/boost/geometry/srs/projections/par4.hpp
Normal file
@@ -0,0 +1,454 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_SRS_PROJECTIONS_PAR4_HPP
|
||||
#define BOOST_GEOMETRY_SRS_PROJECTIONS_PAR4_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/srs/sphere.hpp>
|
||||
#include <boost/geometry/srs/spheroid.hpp>
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace srs { namespace par4
|
||||
{
|
||||
|
||||
// proj
|
||||
// defined in projections' implementation files
|
||||
|
||||
// ellps
|
||||
struct MERIT {};
|
||||
struct SGS85 {};
|
||||
struct GRS80 {};
|
||||
struct IAU76 {};
|
||||
struct airy {};
|
||||
struct APL4_9 {};
|
||||
struct NWL9D {};
|
||||
struct mod_airy {};
|
||||
struct andrae {};
|
||||
struct aust_SA {};
|
||||
struct GRS67 {};
|
||||
struct bessel {};
|
||||
struct bess_nam {};
|
||||
struct clrk66 {};
|
||||
struct clrk80 {};
|
||||
struct clrk80ign {};
|
||||
struct CPM {};
|
||||
struct delmbr {};
|
||||
struct engelis {};
|
||||
struct evrst30 {};
|
||||
struct evrst48 {};
|
||||
struct evrst56 {};
|
||||
struct evrst69 {};
|
||||
struct evrstSS {};
|
||||
struct fschr60 {};
|
||||
struct fschr60m {};
|
||||
struct fschr68 {};
|
||||
struct helmert {};
|
||||
struct hough {};
|
||||
struct intl {};
|
||||
struct krass {};
|
||||
struct kaula {};
|
||||
struct lerch {};
|
||||
struct mprts {};
|
||||
struct new_intl {};
|
||||
struct plessis {};
|
||||
struct SEasia {};
|
||||
struct walbeck {};
|
||||
struct WGS60 {};
|
||||
struct WGS66 {};
|
||||
struct WGS72 {};
|
||||
struct WGS84 {};
|
||||
struct sphere {};
|
||||
|
||||
// datum
|
||||
//struct WGS84 {}; // already defined above
|
||||
struct GGRS87 {};
|
||||
struct NAD83 {};
|
||||
struct NAD27 {};
|
||||
struct potsdam {};
|
||||
struct carthage {};
|
||||
struct hermannskogel {};
|
||||
struct ire65 {};
|
||||
struct nzgd49 {};
|
||||
struct OSGB36 {};
|
||||
|
||||
template <typename P>
|
||||
struct proj
|
||||
{
|
||||
typedef P type;
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template
|
||||
<
|
||||
typename E,
|
||||
typename Tag = typename geometry::tag<E>::type
|
||||
>
|
||||
struct ellps_impl
|
||||
: private E // empty base optimization
|
||||
{
|
||||
typedef E type;
|
||||
|
||||
ellps_impl() : E() {}
|
||||
explicit ellps_impl(E const& e) : E(e) {}
|
||||
|
||||
E const& model() const { return *this; }
|
||||
};
|
||||
|
||||
template <typename E>
|
||||
struct ellps_impl<E, void>
|
||||
{
|
||||
typedef E type;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
template<typename E>
|
||||
struct ellps
|
||||
: par4::detail::ellps_impl<E>
|
||||
{
|
||||
ellps() {}
|
||||
explicit ellps(E const& e)
|
||||
: par4::detail::ellps_impl<E>(e)
|
||||
{}
|
||||
};
|
||||
|
||||
template <typename D>
|
||||
struct datum
|
||||
{
|
||||
typedef D type;
|
||||
};
|
||||
|
||||
template <typename P>
|
||||
struct o_proj
|
||||
{
|
||||
typedef P type;
|
||||
};
|
||||
|
||||
struct guam {};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
inline double b_from_a_rf(double a, double rf)
|
||||
{
|
||||
return a * (1.0 - 1.0 / rf);
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename Ellps,
|
||||
typename Tag = typename geometry::tag<typename Ellps::type>::type
|
||||
>
|
||||
struct ellps_traits
|
||||
{
|
||||
typedef typename Ellps::type model_type;
|
||||
static model_type model(Ellps const& e) { return e.model(); }
|
||||
};
|
||||
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_B(NAME, A, B) \
|
||||
template <> \
|
||||
struct ellps_traits<ellps<par4::NAME>, void> \
|
||||
{ \
|
||||
typedef srs::spheroid<double> model_type; \
|
||||
static model_type model(ellps<par4::NAME> const&) { return model_type(A, B); } \
|
||||
};
|
||||
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(NAME, A, RF) \
|
||||
template <> \
|
||||
struct ellps_traits<ellps<par4::NAME>, void> \
|
||||
{ \
|
||||
typedef srs::spheroid<double> model_type; \
|
||||
static model_type model(ellps<par4::NAME> const&) { return model_type(A, b_from_a_rf(A, RF)); } \
|
||||
};
|
||||
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_SPHERE(NAME, R) \
|
||||
template <> \
|
||||
struct ellps_traits<ellps<par4::NAME>, void> \
|
||||
{ \
|
||||
typedef srs::sphere<double> model_type; \
|
||||
static model_type model(ellps<par4::NAME> const&) { return model_type(R); } \
|
||||
};
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(MERIT, 6378137.0, 298.257)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(SGS85, 6378136.0, 298.257)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(GRS80, 6378137.0, 298.257222101)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(IAU76, 6378140.0, 298.257)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_B (airy, 6377563.396, 6356256.910)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(APL4_9, 6378137.0, 298.25)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(NWL9D, 6378145.0, 298.25)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_B (mod_airy, 6377340.189, 6356034.446)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(andrae, 6377104.43, 300.0)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(aust_SA, 6378160.0, 298.25)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(GRS67, 6378160.0, 298.2471674270)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(bessel, 6377397.155, 299.1528128)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(bess_nam, 6377483.865, 299.1528128)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_B (clrk66, 6378206.4, 6356583.8)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(clrk80, 6378249.145, 293.4663)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(clrk80ign, 6378249.2, 293.4660212936269)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(CPM, 6375738.7, 334.29)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(delmbr, 6376428.0, 311.5)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(engelis, 6378136.05, 298.2566)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(evrst30, 6377276.345, 300.8017)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(evrst48, 6377304.063, 300.8017)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(evrst56, 6377301.243, 300.8017)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(evrst69, 6377295.664, 300.8017)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(evrstSS, 6377298.556, 300.8017)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(fschr60, 6378166.0, 298.3)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(fschr60m, 6378155.0, 298.3)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(fschr68, 6378150.0, 298.3)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(helmert, 6378200.0, 298.3)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(hough, 6378270.0, 297.0)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(intl, 6378388.0, 297.0)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(krass, 6378245.0, 298.3)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(kaula, 6378163.0, 298.24)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(lerch, 6378139.0, 298.257)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(mprts, 6397300.0, 191.0)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_B (new_intl, 6378157.5, 6356772.2)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_B (plessis, 6376523.0, 6355863.0)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_B (SEasia, 6378155.0, 6356773.3205)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_B (walbeck, 6376896.0, 6355834.8467)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(WGS60, 6378165.0, 298.3)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(WGS66, 6378145.0, 298.25)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(WGS72, 6378135.0, 298.26)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ELLPS_A_RF(WGS84, 6378137.0, 298.257223563)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_SPHERE (sphere, 6370997.0)
|
||||
|
||||
|
||||
template <typename D>
|
||||
struct datum_traits
|
||||
{
|
||||
typedef void ellps_type;
|
||||
static std::string id() { return ""; }
|
||||
static std::string definition() { return ""; }
|
||||
};
|
||||
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_DATUM(NAME, ID, ELLPS, DEF) \
|
||||
template <> \
|
||||
struct datum_traits< datum<par4::NAME> > \
|
||||
{ \
|
||||
typedef par4::ellps<par4::ELLPS> ellps_type; \
|
||||
static std::string id() { return ID; } \
|
||||
static std::string definition() { return DEF; } \
|
||||
};
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_DATUM(WGS84, "WGS84", WGS84, "towgs84=0,0,0")
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_DATUM(GGRS87, "GGRS87", GRS80, "towgs84=-199.87,74.79,246.62")
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_DATUM(NAD83, "NAD83", GRS80, "towgs84=0,0,0")
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_DATUM(NAD27, "NAD27", clrk66, "nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat")
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_DATUM(potsdam, "potsdam", bessel, "towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7")
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_DATUM(carthage, "carthage", clrk80ign, "towgs84=-263.0,6.0,431.0")
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_DATUM(hermannskogel, "hermannskogel", bessel, "towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232")
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_DATUM(ire65, "ire65", mod_airy, "towgs84=482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15")
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_DATUM(nzgd49, "nzgd49", intl, "towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993")
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_DATUM(OSGB36, "OSGB36", airy, "towgs84=446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894")
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename Tuple,
|
||||
template <typename> class IsSamePred,
|
||||
int I = 0,
|
||||
int N = boost::tuples::length<Tuple>::value
|
||||
>
|
||||
struct tuples_find_index_if
|
||||
: boost::mpl::if_c
|
||||
<
|
||||
IsSamePred<typename boost::tuples::element<I, Tuple>::type>::value,
|
||||
boost::integral_constant<int, I>,
|
||||
typename tuples_find_index_if<Tuple, IsSamePred, I+1, N>::type
|
||||
>::type
|
||||
{};
|
||||
|
||||
template
|
||||
<
|
||||
typename Tuple,
|
||||
template <typename> class IsSamePred,
|
||||
int N
|
||||
>
|
||||
struct tuples_find_index_if<Tuple, IsSamePred, N, N>
|
||||
: boost::integral_constant<int, N>
|
||||
{};
|
||||
|
||||
template
|
||||
<
|
||||
typename Tuple,
|
||||
template <typename> class IsSamePred,
|
||||
int I = tuples_find_index_if<Tuple, IsSamePred>::value,
|
||||
int N = boost::tuples::length<Tuple>::value
|
||||
>
|
||||
struct tuples_find_if
|
||||
: boost::tuples::element<I, Tuple>
|
||||
{};
|
||||
|
||||
template
|
||||
<
|
||||
typename Tuple,
|
||||
template <typename> class IsSamePred,
|
||||
int N
|
||||
>
|
||||
struct tuples_find_if<Tuple, IsSamePred, N, N>
|
||||
{
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
template <typename Param>
|
||||
struct is_param
|
||||
{
|
||||
template <typename T, int D = 0>
|
||||
struct is_same_impl : boost::false_type {};
|
||||
template <int D>
|
||||
struct is_same_impl<Param, D> : boost::true_type {};
|
||||
|
||||
template <typename T>
|
||||
struct is_same : is_same_impl<T> {};
|
||||
};
|
||||
|
||||
template <template <typename> class Param>
|
||||
struct is_param_t
|
||||
{
|
||||
template <typename T>
|
||||
struct is_same : boost::false_type {};
|
||||
template <typename T>
|
||||
struct is_same<Param<T> > : boost::true_type {};
|
||||
};
|
||||
|
||||
template <template <bool> class Param>
|
||||
struct is_param_b
|
||||
{
|
||||
template <typename T>
|
||||
struct is_same : boost::false_type {};
|
||||
template <bool V>
|
||||
struct is_same<Param<V> > : boost::true_type {};
|
||||
};
|
||||
|
||||
|
||||
// pick proj static name
|
||||
|
||||
template <typename Tuple>
|
||||
struct pick_proj_tag
|
||||
{
|
||||
typedef typename tuples_find_if
|
||||
<
|
||||
Tuple, is_param_t<proj>::is_same
|
||||
>::type proj_type;
|
||||
|
||||
static const bool is_non_void = ! boost::is_same<proj_type, void>::value;
|
||||
|
||||
BOOST_MPL_ASSERT_MSG((is_non_void), PROJECTION_NOT_NAMED, (Tuple));
|
||||
|
||||
typedef typename proj_type::type type;
|
||||
};
|
||||
|
||||
|
||||
template <typename Ellps, typename Datum, int EllpsIndex>
|
||||
struct pick_ellps_impl
|
||||
{
|
||||
typedef Ellps type;
|
||||
typedef typename ellps_traits<Ellps>::model_type model_type;
|
||||
template <typename Tuple>
|
||||
static model_type model(Tuple const& tup)
|
||||
{
|
||||
return ellps_traits<Ellps>::model(boost::get<EllpsIndex>(tup));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Ellps, int EllpsIndex>
|
||||
struct pick_ellps_impl<Ellps, void, EllpsIndex>
|
||||
{
|
||||
typedef Ellps type;
|
||||
typedef typename ellps_traits<Ellps>::model_type model_type;
|
||||
template <typename Tuple>
|
||||
static model_type model(Tuple const& tup)
|
||||
{
|
||||
return ellps_traits<Ellps>::model(boost::get<EllpsIndex>(tup));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Datum, int EllpsIndex>
|
||||
struct pick_ellps_impl<void, Datum, EllpsIndex>
|
||||
{
|
||||
typedef typename datum_traits<Datum>::ellps_type type;
|
||||
|
||||
static const bool is_datum_known = ! boost::is_same<type, void>::value;
|
||||
BOOST_MPL_ASSERT_MSG((is_datum_known), UNKNOWN_DATUM, (types<Datum>));
|
||||
|
||||
typedef typename ellps_traits<type>::model_type model_type;
|
||||
template <typename Tuple>
|
||||
static model_type model(Tuple const& tup)
|
||||
{
|
||||
return ellps_traits<type>::model(type());
|
||||
}
|
||||
};
|
||||
|
||||
template <int EllpsIndex>
|
||||
struct pick_ellps_impl<void, void, EllpsIndex>
|
||||
{
|
||||
// default ellipsoid
|
||||
typedef ellps<WGS84> type;
|
||||
typedef typename ellps_traits<type>::model_type model_type;
|
||||
template <typename Tuple>
|
||||
static model_type model(Tuple const& tup)
|
||||
{
|
||||
return ellps_traits<type>::model(type());
|
||||
}
|
||||
};
|
||||
|
||||
// Pick spheroid/sphere model from ellps or datum
|
||||
// mimic pj_init() calling pj_datum_set() and pj_ell_set()
|
||||
template <typename Tuple>
|
||||
struct pick_ellps
|
||||
: pick_ellps_impl
|
||||
<
|
||||
typename tuples_find_if<Tuple, is_param_t<ellps>::is_same>::type,
|
||||
typename tuples_find_if<Tuple, is_param_t<datum>::is_same>::type,
|
||||
tuples_find_index_if<Tuple, is_param_t<ellps>::is_same>::value
|
||||
>
|
||||
{};
|
||||
|
||||
|
||||
template <typename Tuple>
|
||||
struct pick_o_proj_tag
|
||||
{
|
||||
typedef typename tuples_find_if
|
||||
<
|
||||
Tuple, is_param_t<o_proj>::is_same
|
||||
>::type proj_type;
|
||||
|
||||
static const bool is_non_void = ! boost::is_same<proj_type, void>::value;
|
||||
|
||||
BOOST_MPL_ASSERT_MSG((is_non_void), PROJECTION_NOT_NAMED, (Tuple));
|
||||
|
||||
typedef typename proj_type::type type;
|
||||
};
|
||||
|
||||
|
||||
} // namespace detail
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
}}}} // namespace boost::geometry::srs::par4
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_SRS_PROJECTIONS_PAR4_HPP
|
||||
349
include/boost/geometry/srs/projections/proj/aea.hpp
Normal file
349
include/boost/geometry/srs/projections/proj/aea.hpp
Normal file
@@ -0,0 +1,349 @@
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_AEA_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_AEA_HPP
|
||||
|
||||
// Boost.Geometry - extensions-gis-projections (based on PROJ4)
|
||||
// This file is automatically generated. DO NOT EDIT.
|
||||
|
||||
// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// This file is converted from PROJ4, http://trac.osgeo.org/proj
|
||||
// PROJ4 is originally written by Gerald Evenden (then of the USGS)
|
||||
// PROJ4 is maintained by Frank Warmerdam
|
||||
// PROJ4 is converted to Boost.Geometry by Barend Gehrels
|
||||
|
||||
// Last updated version of proj: 4.9.1
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
// Purpose: Implementation of the aea (Albers Equal Area) projection.
|
||||
// Author: Gerald Evenden
|
||||
// Copyright (c) 1995, Gerald Evenden
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <boost/math/special_functions/hypot.hpp>
|
||||
|
||||
#include <boost/geometry/srs/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_mlfn.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_msfn.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_qsfn.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace srs { namespace par4
|
||||
{
|
||||
struct aea {};
|
||||
struct leac {};
|
||||
|
||||
}} //namespace srs::par4
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace aea
|
||||
{
|
||||
|
||||
static const double EPS10 = 1.e-10;
|
||||
static const double TOL7 = 1.e-7;
|
||||
static const double EPSILON = 1.0e-7;
|
||||
static const double TOL = 1.0e-10;
|
||||
static const int N_ITER = 15;
|
||||
|
||||
template <typename T>
|
||||
struct par_aea
|
||||
{
|
||||
T ec;
|
||||
T n;
|
||||
T c;
|
||||
T dd;
|
||||
T n2;
|
||||
T rho0;
|
||||
T phi1;
|
||||
T phi2;
|
||||
T en[EN_SIZE];
|
||||
int ellips;
|
||||
};
|
||||
|
||||
/* determine latitude angle phi-1 */
|
||||
template <typename T>
|
||||
inline T phi1_(T const& qs, T const& Te, T const& Tone_es)
|
||||
{
|
||||
int i;
|
||||
T Phi, sinpi, cospi, con, com, dphi;
|
||||
|
||||
Phi = asin (.5 * qs);
|
||||
if (Te < EPSILON)
|
||||
return( Phi );
|
||||
i = N_ITER;
|
||||
do {
|
||||
sinpi = sin (Phi);
|
||||
cospi = cos (Phi);
|
||||
con = Te * sinpi;
|
||||
com = 1. - con * con;
|
||||
dphi = .5 * com * com / cospi * (qs / Tone_es -
|
||||
sinpi / com + .5 / Te * log ((1. - con) /
|
||||
(1. + con)));
|
||||
Phi += dphi;
|
||||
} while (fabs(dphi) > TOL && --i);
|
||||
return( i ? Phi : HUGE_VAL );
|
||||
}
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct base_aea_ellipsoid : public base_t_fi<base_aea_ellipsoid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>
|
||||
{
|
||||
|
||||
typedef CalculationType geographic_type;
|
||||
typedef CalculationType cartesian_type;
|
||||
|
||||
par_aea<CalculationType> m_proj_parm;
|
||||
|
||||
inline base_aea_ellipsoid(const Parameters& par)
|
||||
: base_t_fi<base_aea_ellipsoid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(e_forward) ellipsoid & spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
CalculationType rho = 0.0;
|
||||
if ((rho = this->m_proj_parm.c - (this->m_proj_parm.ellips ? this->m_proj_parm.n * pj_qsfn(sin(lp_lat),
|
||||
this->m_par.e, this->m_par.one_es) : this->m_proj_parm.n2 * sin(lp_lat))) < 0.)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-20) );
|
||||
rho = this->m_proj_parm.dd * sqrt(rho);
|
||||
xy_x = rho * sin( lp_lon *= this->m_proj_parm.n );
|
||||
xy_y = this->m_proj_parm.rho0 - rho * cos(lp_lon);
|
||||
}
|
||||
|
||||
// INVERSE(e_inverse) ellipsoid & spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const
|
||||
{
|
||||
static const CalculationType HALFPI = detail::HALFPI<CalculationType>();
|
||||
|
||||
CalculationType rho = 0.0;
|
||||
if( (rho = boost::math::hypot(xy_x, xy_y = this->m_proj_parm.rho0 - xy_y)) != 0.0 ) {
|
||||
if (this->m_proj_parm.n < 0.) {
|
||||
rho = -rho;
|
||||
xy_x = -xy_x;
|
||||
xy_y = -xy_y;
|
||||
}
|
||||
lp_lat = rho / this->m_proj_parm.dd;
|
||||
if (this->m_proj_parm.ellips) {
|
||||
lp_lat = (this->m_proj_parm.c - lp_lat * lp_lat) / this->m_proj_parm.n;
|
||||
if (fabs(this->m_proj_parm.ec - fabs(lp_lat)) > TOL7) {
|
||||
if ((lp_lat = phi1_(lp_lat, this->m_par.e, this->m_par.one_es)) == HUGE_VAL)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-20) );
|
||||
} else
|
||||
lp_lat = lp_lat < 0. ? -HALFPI : HALFPI;
|
||||
} else if (fabs(lp_lat = (this->m_proj_parm.c - lp_lat * lp_lat) / this->m_proj_parm.n2) <= 1.)
|
||||
lp_lat = asin(lp_lat);
|
||||
else
|
||||
lp_lat = lp_lat < 0. ? -HALFPI : HALFPI;
|
||||
lp_lon = atan2(xy_x, xy_y) / this->m_proj_parm.n;
|
||||
} else {
|
||||
lp_lon = 0.;
|
||||
lp_lat = this->m_proj_parm.n > 0. ? HALFPI : - HALFPI;
|
||||
}
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "aea_ellipsoid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup(Parameters& par, par_aea<T>& proj_parm)
|
||||
{
|
||||
T cosphi, sinphi;
|
||||
int secant;
|
||||
|
||||
if (fabs(proj_parm.phi1 + proj_parm.phi2) < EPS10)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-21) );
|
||||
proj_parm.n = sinphi = sin(proj_parm.phi1);
|
||||
cosphi = cos(proj_parm.phi1);
|
||||
secant = fabs(proj_parm.phi1 - proj_parm.phi2) >= EPS10;
|
||||
if( (proj_parm.ellips = (par.es > 0.))) {
|
||||
T ml1, m1;
|
||||
|
||||
if (!pj_enfn(par.es, proj_parm.en))
|
||||
BOOST_THROW_EXCEPTION( projection_exception(0) );
|
||||
m1 = pj_msfn(sinphi, cosphi, par.es);
|
||||
ml1 = pj_qsfn(sinphi, par.e, par.one_es);
|
||||
if (secant) { /* secant cone */
|
||||
T ml2, m2;
|
||||
|
||||
sinphi = sin(proj_parm.phi2);
|
||||
cosphi = cos(proj_parm.phi2);
|
||||
m2 = pj_msfn(sinphi, cosphi, par.es);
|
||||
ml2 = pj_qsfn(sinphi, par.e, par.one_es);
|
||||
proj_parm.n = (m1 * m1 - m2 * m2) / (ml2 - ml1);
|
||||
}
|
||||
proj_parm.ec = 1. - .5 * par.one_es * log((1. - par.e) /
|
||||
(1. + par.e)) / par.e;
|
||||
proj_parm.c = m1 * m1 + proj_parm.n * ml1;
|
||||
proj_parm.dd = 1. / proj_parm.n;
|
||||
proj_parm.rho0 = proj_parm.dd * sqrt(proj_parm.c - proj_parm.n * pj_qsfn(sin(par.phi0),
|
||||
par.e, par.one_es));
|
||||
} else {
|
||||
if (secant) proj_parm.n = .5 * (proj_parm.n + sin(proj_parm.phi2));
|
||||
proj_parm.n2 = proj_parm.n + proj_parm.n;
|
||||
proj_parm.c = cosphi * cosphi + proj_parm.n2 * sinphi;
|
||||
proj_parm.dd = 1. / proj_parm.n;
|
||||
proj_parm.rho0 = proj_parm.dd * sqrt(proj_parm.c - proj_parm.n2 * sin(par.phi0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Albers Equal Area
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup_aea(Parameters& par, par_aea<T>& proj_parm)
|
||||
{
|
||||
proj_parm.phi1 = pj_param(par.params, "rlat_1").f;
|
||||
proj_parm.phi2 = pj_param(par.params, "rlat_2").f;
|
||||
setup(par, proj_parm);
|
||||
}
|
||||
|
||||
// Lambert Equal Area Conic
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup_leac(Parameters& par, par_aea<T>& proj_parm)
|
||||
{
|
||||
static const T HALFPI = detail::HALFPI<T>();
|
||||
|
||||
proj_parm.phi2 = pj_param(par.params, "rlat_1").f;
|
||||
proj_parm.phi1 = pj_param(par.params, "bsouth").i ? -HALFPI : HALFPI;
|
||||
setup(par, proj_parm);
|
||||
}
|
||||
|
||||
}} // namespace detail::aea
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Albers Equal Area projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Conic
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Projection parameters
|
||||
- lat_1: Latitude of first standard parallel (degrees)
|
||||
- lat_2: Latitude of second standard parallel (degrees)
|
||||
\par Example
|
||||
\image html ex_aea.gif
|
||||
*/
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct aea_ellipsoid : public detail::aea::base_aea_ellipsoid<CalculationType, Parameters>
|
||||
{
|
||||
inline aea_ellipsoid(const Parameters& par) : detail::aea::base_aea_ellipsoid<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::aea::setup_aea(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Lambert Equal Area Conic projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Conic
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Projection parameters
|
||||
- lat_1: Latitude of first standard parallel (degrees)
|
||||
- south: Denotes southern hemisphere UTM zone (boolean)
|
||||
\par Example
|
||||
\image html ex_leac.gif
|
||||
*/
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct leac_ellipsoid : public detail::aea::base_aea_ellipsoid<CalculationType, Parameters>
|
||||
{
|
||||
inline leac_ellipsoid(const Parameters& par) : detail::aea::base_aea_ellipsoid<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::aea::setup_leac(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::par4::aea, aea_ellipsoid, aea_ellipsoid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::par4::leac, leac_ellipsoid, leac_ellipsoid)
|
||||
|
||||
// Factory entry(s)
|
||||
template <typename CalculationType, typename Parameters>
|
||||
class aea_entry : public detail::factory_entry<CalculationType, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual base_v<CalculationType, Parameters>* create_new(const Parameters& par) const
|
||||
{
|
||||
return new base_v_fi<aea_ellipsoid<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename CalculationType, typename Parameters>
|
||||
class leac_entry : public detail::factory_entry<CalculationType, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual base_v<CalculationType, Parameters>* create_new(const Parameters& par) const
|
||||
{
|
||||
return new base_v_fi<leac_ellipsoid<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename CalculationType, typename Parameters>
|
||||
inline void aea_init(detail::base_factory<CalculationType, Parameters>& factory)
|
||||
{
|
||||
factory.add_to_factory("aea", new aea_entry<CalculationType, Parameters>);
|
||||
factory.add_to_factory("leac", new leac_entry<CalculationType, Parameters>);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_AEA_HPP
|
||||
|
||||
650
include/boost/geometry/srs/projections/proj/aeqd.hpp
Normal file
650
include/boost/geometry/srs/projections/proj/aeqd.hpp
Normal file
@@ -0,0 +1,650 @@
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_AEQD_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_AEQD_HPP
|
||||
|
||||
// Boost.Geometry - extensions-gis-projections (based on PROJ4)
|
||||
// This file is automatically generated. DO NOT EDIT.
|
||||
|
||||
// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// This file is converted from PROJ4, http://trac.osgeo.org/proj
|
||||
// PROJ4 is originally written by Gerald Evenden (then of the USGS)
|
||||
// PROJ4 is maintained by Frank Warmerdam
|
||||
// PROJ4 is converted to Boost.Geometry by Barend Gehrels
|
||||
|
||||
// Last updated version of proj: 4.9.1
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
// Purpose: Implementation of the aeqd (Azimuthal Equidistant) projection.
|
||||
// Author: Gerald Evenden
|
||||
// Copyright (c) 1995, Gerald Evenden
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <boost/math/special_functions/hypot.hpp>
|
||||
|
||||
#include <boost/geometry/srs/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/aasincos.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_mlfn.hpp>
|
||||
|
||||
#include <boost/geometry/srs/projections/par4.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace srs { namespace par4
|
||||
{
|
||||
struct aeqd {};
|
||||
//struct aeqd_guam {};
|
||||
|
||||
}} //namespace srs::par4
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace aeqd
|
||||
{
|
||||
|
||||
static const double EPS10 = 1.e-10;
|
||||
static const double TOL = 1.e-14;
|
||||
static const int N_POLE = 0;
|
||||
static const int S_POLE = 1;
|
||||
static const int EQUIT = 2;
|
||||
static const int OBLIQ = 3;
|
||||
|
||||
template <typename T>
|
||||
struct par_aeqd
|
||||
{
|
||||
T sinph0;
|
||||
T cosph0;
|
||||
T en[EN_SIZE];
|
||||
T M1;
|
||||
T N1;
|
||||
T Mp;
|
||||
T He;
|
||||
T G;
|
||||
int mode;
|
||||
};
|
||||
|
||||
template <typename T, typename Par, typename ProjParm>
|
||||
inline void e_forward(T& lp_lon, T& lp_lat, T& xy_x, T& xy_y, Par const& par, ProjParm const& proj_parm)
|
||||
{
|
||||
T coslam, cosphi, sinphi, rho, s, H, H2, c, Az, t, ct, st, cA, sA;
|
||||
|
||||
coslam = cos(lp_lon);
|
||||
cosphi = cos(lp_lat);
|
||||
sinphi = sin(lp_lat);
|
||||
switch (proj_parm.mode) {
|
||||
case N_POLE:
|
||||
coslam = - coslam;
|
||||
case S_POLE:
|
||||
xy_x = (rho = fabs(proj_parm.Mp - pj_mlfn(lp_lat, sinphi, cosphi, proj_parm.en))) *
|
||||
sin(lp_lon);
|
||||
xy_y = rho * coslam;
|
||||
break;
|
||||
case EQUIT:
|
||||
case OBLIQ:
|
||||
if (fabs(lp_lon) < EPS10 && fabs(lp_lat - par.phi0) < EPS10) {
|
||||
xy_x = xy_y = 0.;
|
||||
break;
|
||||
}
|
||||
t = atan2(par.one_es * sinphi + par.es * proj_parm.N1 * proj_parm.sinph0 *
|
||||
sqrt(1. - par.es * sinphi * sinphi), cosphi);
|
||||
ct = cos(t); st = sin(t);
|
||||
Az = atan2(sin(lp_lon) * ct, proj_parm.cosph0 * st - proj_parm.sinph0 * coslam * ct);
|
||||
cA = cos(Az); sA = sin(Az);
|
||||
s = aasin(fabs(sA) < TOL ?
|
||||
(proj_parm.cosph0 * st - proj_parm.sinph0 * coslam * ct) / cA :
|
||||
sin(lp_lon) * ct / sA );
|
||||
H = proj_parm.He * cA;
|
||||
H2 = H * H;
|
||||
c = proj_parm.N1 * s * (1. + s * s * (- H2 * (1. - H2)/6. +
|
||||
s * ( proj_parm.G * H * (1. - 2. * H2 * H2) / 8. +
|
||||
s * ((H2 * (4. - 7. * H2) - 3. * proj_parm.G * proj_parm.G * (1. - 7. * H2)) /
|
||||
120. - s * proj_parm.G * H / 48.))));
|
||||
xy_x = c * sA;
|
||||
xy_y = c * cA;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T, typename Par, typename ProjParm>
|
||||
inline void e_inverse(T& xy_x, T& xy_y, T& lp_lon, T& lp_lat, Par const& par, ProjParm const& proj_parm)
|
||||
{
|
||||
static const T HALFPI = detail::HALFPI<T>();
|
||||
|
||||
T c, Az, cosAz, A, B, D, E, F, psi, t;
|
||||
|
||||
if ((c = boost::math::hypot(xy_x, xy_y)) < EPS10) {
|
||||
lp_lat = par.phi0;
|
||||
lp_lon = 0.;
|
||||
return;
|
||||
}
|
||||
if (proj_parm.mode == OBLIQ || proj_parm.mode == EQUIT) {
|
||||
cosAz = cos(Az = atan2(xy_x, xy_y));
|
||||
t = proj_parm.cosph0 * cosAz;
|
||||
B = par.es * t / par.one_es;
|
||||
A = - B * t;
|
||||
B *= 3. * (1. - A) * proj_parm.sinph0;
|
||||
D = c / proj_parm.N1;
|
||||
E = D * (1. - D * D * (A * (1. + A) / 6. + B * (1. + 3.*A) * D / 24.));
|
||||
F = 1. - E * E * (A / 2. + B * E / 6.);
|
||||
psi = aasin(proj_parm.sinph0 * cos(E) + t * sin(E));
|
||||
lp_lon = aasin(sin(Az) * sin(E) / cos(psi));
|
||||
if ((t = fabs(psi)) < EPS10)
|
||||
lp_lat = 0.;
|
||||
else if (fabs(t - HALFPI) < 0.)
|
||||
lp_lat = HALFPI;
|
||||
else
|
||||
lp_lat = atan((1. - par.es * F * proj_parm.sinph0 / sin(psi)) * tan(psi) /
|
||||
par.one_es);
|
||||
} else { /* Polar */
|
||||
lp_lat = pj_inv_mlfn(proj_parm.mode == N_POLE ? proj_parm.Mp - c : proj_parm.Mp + c,
|
||||
par.es, proj_parm.en);
|
||||
lp_lon = atan2(xy_x, proj_parm.mode == N_POLE ? -xy_y : xy_y);
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T, typename Par, typename ProjParm>
|
||||
inline void e_guam_fwd(T& lp_lon, T& lp_lat, T& xy_x, T& xy_y, Par const& par, ProjParm const& proj_parm)
|
||||
{
|
||||
T cosphi, sinphi, t;
|
||||
|
||||
cosphi = cos(lp_lat);
|
||||
sinphi = sin(lp_lat);
|
||||
t = 1. / sqrt(1. - par.es * sinphi * sinphi);
|
||||
xy_x = lp_lon * cosphi * t;
|
||||
xy_y = pj_mlfn(lp_lat, sinphi, cosphi, proj_parm.en) - proj_parm.M1 +
|
||||
.5 * lp_lon * lp_lon * cosphi * sinphi * t;
|
||||
}
|
||||
|
||||
template <typename T, typename Par, typename ProjParm>
|
||||
inline void e_guam_inv(T& xy_x, T& xy_y, T& lp_lon, T& lp_lat, Par const& par, ProjParm const& proj_parm)
|
||||
{
|
||||
T x2, t;
|
||||
int i;
|
||||
|
||||
x2 = 0.5 * xy_x * xy_x;
|
||||
lp_lat = par.phi0;
|
||||
for (i = 0; i < 3; ++i) {
|
||||
t = par.e * sin(lp_lat);
|
||||
lp_lat = pj_inv_mlfn(proj_parm.M1 + xy_y -
|
||||
x2 * tan(lp_lat) * (t = sqrt(1. - t * t)), par.es, proj_parm.en);
|
||||
}
|
||||
lp_lon = xy_x * t / cos(lp_lat);
|
||||
}
|
||||
|
||||
template <typename T, typename Par, typename ProjParm>
|
||||
inline void s_forward(T& lp_lon, T& lp_lat, T& xy_x, T& xy_y, Par const& par, ProjParm const& proj_parm)
|
||||
{
|
||||
static const T HALFPI = detail::HALFPI<T>();
|
||||
|
||||
T coslam, cosphi, sinphi;
|
||||
|
||||
sinphi = sin(lp_lat);
|
||||
cosphi = cos(lp_lat);
|
||||
coslam = cos(lp_lon);
|
||||
switch (proj_parm.mode) {
|
||||
case EQUIT:
|
||||
xy_y = cosphi * coslam;
|
||||
goto oblcon;
|
||||
case OBLIQ:
|
||||
xy_y = proj_parm.sinph0 * sinphi + proj_parm.cosph0 * cosphi * coslam;
|
||||
oblcon:
|
||||
if (fabs(fabs(xy_y) - 1.) < TOL)
|
||||
if (xy_y < 0.)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-20) );
|
||||
else
|
||||
xy_x = xy_y = 0.;
|
||||
else {
|
||||
xy_y = acos(xy_y);
|
||||
xy_y /= sin(xy_y);
|
||||
xy_x = xy_y * cosphi * sin(lp_lon);
|
||||
xy_y *= (proj_parm.mode == EQUIT) ? sinphi :
|
||||
proj_parm.cosph0 * sinphi - proj_parm.sinph0 * cosphi * coslam;
|
||||
}
|
||||
break;
|
||||
case N_POLE:
|
||||
lp_lat = -lp_lat;
|
||||
coslam = -coslam;
|
||||
case S_POLE:
|
||||
if (fabs(lp_lat - HALFPI) < EPS10)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-20) );
|
||||
xy_x = (xy_y = (HALFPI + lp_lat)) * sin(lp_lon);
|
||||
xy_y *= coslam;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T, typename Par, typename ProjParm>
|
||||
inline void s_inverse(T& xy_x, T& xy_y, T& lp_lon, T& lp_lat, Par const& par, ProjParm const& proj_parm)
|
||||
{
|
||||
static const T ONEPI = detail::ONEPI<T>();
|
||||
static const T HALFPI = detail::HALFPI<T>();
|
||||
|
||||
T cosc, c_rh, sinc;
|
||||
|
||||
if ((c_rh = boost::math::hypot(xy_x, xy_y)) > ONEPI) {
|
||||
if (c_rh - EPS10 > ONEPI)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-20) );
|
||||
c_rh = ONEPI;
|
||||
} else if (c_rh < EPS10) {
|
||||
lp_lat = par.phi0;
|
||||
lp_lon = 0.;
|
||||
return;
|
||||
}
|
||||
if (proj_parm.mode == OBLIQ || proj_parm.mode == EQUIT) {
|
||||
sinc = sin(c_rh);
|
||||
cosc = cos(c_rh);
|
||||
if (proj_parm.mode == EQUIT) {
|
||||
lp_lat = aasin(xy_y * sinc / c_rh);
|
||||
xy_x *= sinc;
|
||||
xy_y = cosc * c_rh;
|
||||
} else {
|
||||
lp_lat = aasin(cosc * proj_parm.sinph0 + xy_y * sinc * proj_parm.cosph0 /
|
||||
c_rh);
|
||||
xy_y = (cosc - proj_parm.sinph0 * sin(lp_lat)) * c_rh;
|
||||
xy_x *= sinc * proj_parm.cosph0;
|
||||
}
|
||||
lp_lon = atan2(xy_x, xy_y);
|
||||
} else if (proj_parm.mode == N_POLE) {
|
||||
lp_lat = HALFPI - c_rh;
|
||||
lp_lon = atan2(xy_x, -xy_y);
|
||||
} else {
|
||||
lp_lat = c_rh - HALFPI;
|
||||
lp_lon = atan2(xy_x, xy_y);
|
||||
}
|
||||
}
|
||||
|
||||
// Azimuthal Equidistant
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup_aeqd(Parameters& par, par_aeqd<T>& proj_parm, bool is_sphere, bool is_guam)
|
||||
{
|
||||
static const T HALFPI = detail::HALFPI<T>();
|
||||
|
||||
par.phi0 = pj_param(par.params, "rlat_0").f;
|
||||
if (fabs(fabs(par.phi0) - HALFPI) < EPS10) {
|
||||
proj_parm.mode = par.phi0 < 0. ? S_POLE : N_POLE;
|
||||
proj_parm.sinph0 = par.phi0 < 0. ? -1. : 1.;
|
||||
proj_parm.cosph0 = 0.;
|
||||
} else if (fabs(par.phi0) < EPS10) {
|
||||
proj_parm.mode = EQUIT;
|
||||
proj_parm.sinph0 = 0.;
|
||||
proj_parm.cosph0 = 1.;
|
||||
} else {
|
||||
proj_parm.mode = OBLIQ;
|
||||
proj_parm.sinph0 = sin(par.phi0);
|
||||
proj_parm.cosph0 = cos(par.phi0);
|
||||
}
|
||||
if (is_sphere) {
|
||||
} else {
|
||||
if (!pj_enfn(par.es, proj_parm.en))
|
||||
BOOST_THROW_EXCEPTION( projection_exception(0) );
|
||||
if (is_guam) {
|
||||
proj_parm.M1 = pj_mlfn(par.phi0, proj_parm.sinph0, proj_parm.cosph0, proj_parm.en);
|
||||
} else {
|
||||
switch (proj_parm.mode) {
|
||||
case N_POLE:
|
||||
proj_parm.Mp = pj_mlfn<T>(HALFPI, 1., 0., proj_parm.en);
|
||||
break;
|
||||
case S_POLE:
|
||||
proj_parm.Mp = pj_mlfn<T>(-HALFPI, -1., 0., proj_parm.en);
|
||||
break;
|
||||
case EQUIT:
|
||||
case OBLIQ:
|
||||
proj_parm.N1 = 1. / sqrt(1. - par.es * proj_parm.sinph0 * proj_parm.sinph0);
|
||||
proj_parm.G = proj_parm.sinph0 * (proj_parm.He = par.e / sqrt(par.one_es));
|
||||
proj_parm.He *= proj_parm.cosph0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct base_aeqd_e : public base_t_fi<base_aeqd_e<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>
|
||||
{
|
||||
|
||||
typedef CalculationType geographic_type;
|
||||
typedef CalculationType cartesian_type;
|
||||
|
||||
par_aeqd<CalculationType> m_proj_parm;
|
||||
|
||||
inline base_aeqd_e(const Parameters& par)
|
||||
: base_t_fi<base_aeqd_e<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(e_forward) elliptical
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
e_forward(lp_lon, lp_lat, xy_x, xy_y, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
|
||||
// INVERSE(e_inverse) elliptical
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const
|
||||
{
|
||||
e_inverse(xy_x, xy_y, lp_lon, lp_lat, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "aeqd_e";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct base_aeqd_e_guam : public base_t_fi<base_aeqd_e_guam<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>
|
||||
{
|
||||
|
||||
typedef CalculationType geographic_type;
|
||||
typedef CalculationType cartesian_type;
|
||||
|
||||
par_aeqd<CalculationType> m_proj_parm;
|
||||
|
||||
inline base_aeqd_e_guam(const Parameters& par)
|
||||
: base_t_fi<base_aeqd_e_guam<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(e_guam_fwd) Guam elliptical
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
e_guam_fwd(lp_lon, lp_lat, xy_x, xy_y, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
|
||||
// INVERSE(e_guam_inv) Guam elliptical
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const
|
||||
{
|
||||
e_guam_inv(xy_x, xy_y, lp_lon, lp_lat, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "aeqd_e_guam";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename BGParameters, typename CalculationType, typename Parameters>
|
||||
struct base_aeqd_e_static : public base_t_fi<base_aeqd_e_static<BGParameters, CalculationType, Parameters>,
|
||||
CalculationType, Parameters>
|
||||
{
|
||||
|
||||
typedef CalculationType geographic_type;
|
||||
typedef CalculationType cartesian_type;
|
||||
|
||||
par_aeqd<CalculationType> m_proj_parm;
|
||||
|
||||
static const bool is_guam = ! boost::is_same
|
||||
<
|
||||
typename srs::par4::detail::tuples_find_if
|
||||
<
|
||||
BGParameters,
|
||||
srs::par4::detail::is_param<srs::par4::guam>::is_same
|
||||
>::type,
|
||||
void
|
||||
>::value;
|
||||
|
||||
inline base_aeqd_e_static(const Parameters& par)
|
||||
: base_t_fi<base_aeqd_e_static<BGParameters, CalculationType, Parameters>,
|
||||
CalculationType, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(e_forward or e_guam_fwd) elliptical
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
if (is_guam)
|
||||
e_guam_fwd(lp_lon, lp_lat, xy_x, xy_y, this->m_par, this->m_proj_parm);
|
||||
else
|
||||
e_forward(lp_lon, lp_lat, xy_x, xy_y, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
|
||||
// INVERSE(e_inverse or e_guam_inv) elliptical
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const
|
||||
{
|
||||
if (is_guam)
|
||||
e_guam_inv(xy_x, xy_y, lp_lon, lp_lat, this->m_par, this->m_proj_parm);
|
||||
else
|
||||
e_inverse(xy_x, xy_y, lp_lon, lp_lat, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "aeqd_e_static";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct base_aeqd_s : public base_t_fi<base_aeqd_s<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>
|
||||
{
|
||||
|
||||
typedef CalculationType geographic_type;
|
||||
typedef CalculationType cartesian_type;
|
||||
|
||||
par_aeqd<CalculationType> m_proj_parm;
|
||||
|
||||
inline base_aeqd_s(const Parameters& par)
|
||||
: base_t_fi<base_aeqd_s<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(s_forward) spherical
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
s_forward(lp_lon, lp_lat, xy_x, xy_y, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spherical
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const
|
||||
{
|
||||
s_inverse(xy_x, xy_y, lp_lon, lp_lat, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "aeqd_s";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}} // namespace detail::aeqd
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Azimuthal Equidistant projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Azimuthal
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Projection parameters
|
||||
- lat_0: Latitude of origin (degrees)
|
||||
- guam (boolean)
|
||||
\par Example
|
||||
\image html ex_aeqd.gif
|
||||
*/
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct aeqd_e : public detail::aeqd::base_aeqd_e<CalculationType, Parameters>
|
||||
{
|
||||
inline aeqd_e(const Parameters& par) : detail::aeqd::base_aeqd_e<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::aeqd::setup_aeqd(this->m_par, this->m_proj_parm, false, false);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Azimuthal Equidistant projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Azimuthal
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Projection parameters
|
||||
- lat_0: Latitude of origin (degrees)
|
||||
- guam (boolean)
|
||||
\par Example
|
||||
\image html ex_aeqd.gif
|
||||
*/
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct aeqd_e_guam : public detail::aeqd::base_aeqd_e_guam<CalculationType, Parameters>
|
||||
{
|
||||
inline aeqd_e_guam(const Parameters& par) : detail::aeqd::base_aeqd_e_guam<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::aeqd::setup_aeqd(this->m_par, this->m_proj_parm, false, true);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Azimuthal Equidistant projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Azimuthal
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Projection parameters
|
||||
- lat_0: Latitude of origin (degrees)
|
||||
- guam (boolean)
|
||||
\par Example
|
||||
\image html ex_aeqd.gif
|
||||
*/
|
||||
template <typename BGParameters, typename CalculationType, typename Parameters>
|
||||
struct aeqd_e_static : public detail::aeqd::base_aeqd_e_static<BGParameters, CalculationType, Parameters>
|
||||
{
|
||||
inline aeqd_e_static(const Parameters& par) : detail::aeqd::base_aeqd_e_static<BGParameters, CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::aeqd::setup_aeqd(this->m_par, this->m_proj_parm,
|
||||
false,
|
||||
detail::aeqd::base_aeqd_e_static<BGParameters, CalculationType, Parameters>::is_guam);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Azimuthal Equidistant projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Azimuthal
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Projection parameters
|
||||
- lat_0: Latitude of origin (degrees)
|
||||
- guam (boolean)
|
||||
\par Example
|
||||
\image html ex_aeqd.gif
|
||||
*/
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct aeqd_s : public detail::aeqd::base_aeqd_s<CalculationType, Parameters>
|
||||
{
|
||||
inline aeqd_s(const Parameters& par) : detail::aeqd::base_aeqd_s<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::aeqd::setup_aeqd(this->m_par, this->m_proj_parm, true, false);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
template <typename BGP, typename CT, typename P>
|
||||
struct static_projection_type<srs::par4::aeqd, srs_sphere_tag, BGP, CT, P>
|
||||
{
|
||||
typedef aeqd_s<CT, P> type;
|
||||
};
|
||||
template <typename BGP, typename CT, typename P>
|
||||
struct static_projection_type<srs::par4::aeqd, srs_spheroid_tag, BGP, CT, P>
|
||||
{
|
||||
typedef aeqd_e_static<BGP, CT, P> type;
|
||||
};
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::par4::aeqd, aeqd_s, aeqd_e_static)
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::par4::aeqd_guam, aeqd_guam, aeqd_guam)
|
||||
|
||||
// Factory entry(s)
|
||||
template <typename CalculationType, typename Parameters>
|
||||
class aeqd_entry : public detail::factory_entry<CalculationType, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual base_v<CalculationType, Parameters>* create_new(const Parameters& par) const
|
||||
{
|
||||
bool const guam = pj_param(par.params, "bguam").i != 0;
|
||||
|
||||
if (par.es && ! guam)
|
||||
return new base_v_fi<aeqd_e<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
else if (par.es && guam)
|
||||
return new base_v_fi<aeqd_e_guam<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
else
|
||||
return new base_v_fi<aeqd_s<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename CalculationType, typename Parameters>
|
||||
inline void aeqd_init(detail::base_factory<CalculationType, Parameters>& factory)
|
||||
{
|
||||
factory.add_to_factory("aeqd", new aeqd_entry<CalculationType, Parameters>);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_AEQD_HPP
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
|
||||
// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -43,12 +47,24 @@
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/factory_entry.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
#include <boost/geometry/srs/projections/par4.hpp> // airy tag
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace srs { namespace par4
|
||||
{
|
||||
// already defined in par4.hpp as ellps name
|
||||
//struct airy {};
|
||||
|
||||
}} //namespace srs::par4
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace airy
|
||||
@@ -60,36 +76,39 @@ namespace boost { namespace geometry { namespace projections
|
||||
static const int EQUIT = 2;
|
||||
static const int OBLIQ = 3;
|
||||
|
||||
template <typename T>
|
||||
struct par_airy
|
||||
{
|
||||
double p_halfpi;
|
||||
double sinph0;
|
||||
double cosph0;
|
||||
double Cb;
|
||||
int mode;
|
||||
int no_cut; /* do not cut at hemisphere limit */
|
||||
T p_halfpi;
|
||||
T sinph0;
|
||||
T cosph0;
|
||||
T Cb;
|
||||
int mode;
|
||||
int no_cut; /* do not cut at hemisphere limit */
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_airy_spheroid : public base_t_f<base_airy_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct base_airy_spheroid : public base_t_f<base_airy_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
typedef CalculationType geographic_type;
|
||||
typedef CalculationType cartesian_type;
|
||||
|
||||
par_airy m_proj_parm;
|
||||
par_airy<CalculationType> m_proj_parm;
|
||||
|
||||
inline base_airy_spheroid(const Parameters& par)
|
||||
: base_t_f<base_airy_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
: base_t_f<base_airy_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
double sinlam, coslam, cosphi, sinphi, t, s, Krho, cosz;
|
||||
static const CalculationType HALFPI = detail::HALFPI<CalculationType>();
|
||||
|
||||
CalculationType sinlam, coslam, cosphi, sinphi, t, s, Krho, cosz;
|
||||
|
||||
sinlam = sin(lp_lon);
|
||||
coslam = cos(lp_lon);
|
||||
@@ -102,7 +121,7 @@ namespace boost { namespace geometry { namespace projections
|
||||
if (this->m_proj_parm.mode == OBLIQ)
|
||||
cosz = this->m_proj_parm.sinph0 * sinphi + this->m_proj_parm.cosph0 * cosz;
|
||||
if (!this->m_proj_parm.no_cut && cosz < -EPS)
|
||||
throw proj_exception();;
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-20) );
|
||||
if (fabs(s = 1. - cosz) > EPS) {
|
||||
t = 0.5 * (1. + cosz);
|
||||
Krho = -log(t)/s - this->m_proj_parm.Cb / t;
|
||||
@@ -118,8 +137,8 @@ namespace boost { namespace geometry { namespace projections
|
||||
case S_POLE:
|
||||
case N_POLE:
|
||||
lp_lat = fabs(this->m_proj_parm.p_halfpi - lp_lat);
|
||||
if (!this->m_proj_parm.no_cut && (lp_lat - EPS) > geometry::math::half_pi<double>())
|
||||
throw proj_exception();;
|
||||
if (!this->m_proj_parm.no_cut && (lp_lat - EPS) > HALFPI)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-20) );
|
||||
if ((lp_lat *= 0.5) > EPS) {
|
||||
t = tan(lp_lat);
|
||||
Krho = -2.*(log(cos(lp_lat)) / t + t * this->m_proj_parm.Cb);
|
||||
@@ -140,25 +159,27 @@ namespace boost { namespace geometry { namespace projections
|
||||
};
|
||||
|
||||
// Airy
|
||||
template <typename Parameters>
|
||||
void setup_airy(Parameters& par, par_airy& proj_parm)
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup_airy(Parameters& par, par_airy<T>& proj_parm)
|
||||
{
|
||||
double beta;
|
||||
static const T HALFPI = detail::HALFPI<T>();
|
||||
|
||||
T beta;
|
||||
|
||||
proj_parm.no_cut = pj_param(par.params, "bno_cut").i;
|
||||
beta = 0.5 * (geometry::math::half_pi<double>() - pj_param(par.params, "rlat_b").f);
|
||||
beta = 0.5 * (HALFPI - pj_param(par.params, "rlat_b").f);
|
||||
if (fabs(beta) < EPS)
|
||||
proj_parm.Cb = -0.5;
|
||||
else {
|
||||
proj_parm.Cb = 1./tan(beta);
|
||||
proj_parm.Cb *= proj_parm.Cb * log(cos(beta));
|
||||
}
|
||||
if (fabs(fabs(par.phi0) - geometry::math::half_pi<double>()) < EPS)
|
||||
if (fabs(fabs(par.phi0) - HALFPI) < EPS)
|
||||
if (par.phi0 < 0.) {
|
||||
proj_parm.p_halfpi = -geometry::math::half_pi<double>();
|
||||
proj_parm.p_halfpi = -HALFPI;
|
||||
proj_parm.mode = S_POLE;
|
||||
} else {
|
||||
proj_parm.p_halfpi = geometry::math::half_pi<double>();
|
||||
proj_parm.p_halfpi = HALFPI;
|
||||
proj_parm.mode = N_POLE;
|
||||
}
|
||||
else {
|
||||
@@ -173,7 +194,7 @@ namespace boost { namespace geometry { namespace projections
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::airy
|
||||
}} // namespace detail::airy
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
@@ -192,10 +213,10 @@ namespace boost { namespace geometry { namespace projections
|
||||
\par Example
|
||||
\image html ex_airy.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct airy_spheroid : public detail::airy::base_airy_spheroid<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct airy_spheroid : public detail::airy::base_airy_spheroid<CalculationType, Parameters>
|
||||
{
|
||||
inline airy_spheroid(const Parameters& par) : detail::airy::base_airy_spheroid<Geographic, Cartesian, Parameters>(par)
|
||||
inline airy_spheroid(const Parameters& par) : detail::airy::base_airy_spheroid<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::airy::setup_airy(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
@@ -205,27 +226,32 @@ namespace boost { namespace geometry { namespace projections
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::par4::airy, airy_spheroid, airy_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
class airy_entry : public detail::factory_entry<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
class airy_entry : public detail::factory_entry<CalculationType, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual projection<Geographic, Cartesian>* create_new(const Parameters& par) const
|
||||
virtual base_v<CalculationType, Parameters>* create_new(const Parameters& par) const
|
||||
{
|
||||
return new base_v_f<airy_spheroid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
return new base_v_f<airy_spheroid<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
inline void airy_init(detail::base_factory<Geographic, Cartesian, Parameters>& factory)
|
||||
template <typename CalculationType, typename Parameters>
|
||||
inline void airy_init(detail::base_factory<CalculationType, Parameters>& factory)
|
||||
{
|
||||
factory.add_to_factory("airy", new airy_entry<Geographic, Cartesian, Parameters>);
|
||||
factory.add_to_factory("airy", new airy_entry<CalculationType, Parameters>);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_AIRY_HPP
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
|
||||
// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -45,43 +49,53 @@
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/factory_entry.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace srs { namespace par4
|
||||
{
|
||||
struct aitoff {};
|
||||
struct wintri {};
|
||||
|
||||
}} //namespace srs::par4
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace aitoff
|
||||
{
|
||||
|
||||
template <typename T>
|
||||
struct par_aitoff
|
||||
{
|
||||
double cosphi1;
|
||||
int mode;
|
||||
T cosphi1;
|
||||
int mode;
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_aitoff_spheroid : public base_t_fi<base_aitoff_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct base_aitoff_spheroid : public base_t_fi<base_aitoff_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
typedef CalculationType geographic_type;
|
||||
typedef CalculationType cartesian_type;
|
||||
|
||||
par_aitoff m_proj_parm;
|
||||
par_aitoff<CalculationType> m_proj_parm;
|
||||
|
||||
inline base_aitoff_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_aitoff_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
: base_t_fi<base_aitoff_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
double c, d;
|
||||
CalculationType c, d;
|
||||
|
||||
if((d = acos(cos(lp_lat) * cos(c = 0.5 * lp_lon)))) {/* basic Aitoff */
|
||||
xy_x = 2. * d * cos(lp_lat) * sin(c) * (xy_y = 1. / sin(d));
|
||||
@@ -118,8 +132,12 @@ namespace boost { namespace geometry { namespace projections
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const
|
||||
{
|
||||
int iter, MAXITER = 10, round = 0, MAXROUND = 20;
|
||||
double EPSILON = 1e-12, D, C, f1, f2, f1p, f1l, f2p, f2l, dp, dl, sl, sp, cp, cl, x, y;
|
||||
static const CalculationType ONEPI = detail::ONEPI<CalculationType>();
|
||||
static const CalculationType TWOPI = detail::TWOPI<CalculationType>();
|
||||
static const CalculationType EPSILON = 1e-12;
|
||||
|
||||
int iter, MAXITER = 10, round = 0, MAXROUND = 20;
|
||||
CalculationType D, C, f1, f2, f1p, f1l, f2p, f2l, dp, dl, sl, sp, cp, cl, x, y;
|
||||
|
||||
if ((fabs(xy_x) < EPSILON) && (fabs(xy_y) < EPSILON )) { lp_lat = 0.; lp_lon = 0.; return; }
|
||||
|
||||
@@ -150,13 +168,13 @@ namespace boost { namespace geometry { namespace projections
|
||||
f1 -= xy_x; f2 -= xy_y;
|
||||
dl = (f2 * f1p - f1 * f2p) / (dp = f1p * f2l - f2p * f1l);
|
||||
dp = (f1 * f2l - f2 * f1l) / dp;
|
||||
while (dl > geometry::math::pi<double>()) dl -= geometry::math::pi<double>(); /* set to interval [-geometry::math::pi<double>(), geometry::math::pi<double>()] */
|
||||
while (dl < -geometry::math::pi<double>()) dl += geometry::math::pi<double>(); /* set to interval [-geometry::math::pi<double>(), geometry::math::pi<double>()] */
|
||||
while (dl > ONEPI) dl -= ONEPI; /* set to interval [-ONEPI, ONEPI] */
|
||||
while (dl < -ONEPI) dl += ONEPI; /* set to interval [-ONEPI, ONEPI] */
|
||||
lp_lat -= dp; lp_lon -= dl;
|
||||
} while ((fabs(dp) > EPSILON || fabs(dl) > EPSILON) && (iter++ < MAXITER));
|
||||
if (lp_lat > geometry::math::two_pi<double>()) lp_lat -= 2.*(lp_lat-geometry::math::two_pi<double>()); /* correct if symmetrical solution for Aitoff */
|
||||
if (lp_lat < -geometry::math::two_pi<double>()) lp_lat -= 2.*(lp_lat+geometry::math::two_pi<double>()); /* correct if symmetrical solution for Aitoff */
|
||||
if ((fabs(fabs(lp_lat) - geometry::math::two_pi<double>()) < EPSILON) && (!this->m_proj_parm.mode)) lp_lon = 0.; /* if pole in Aitoff, return longitude of 0 */
|
||||
if (lp_lat > TWOPI) lp_lat -= 2.*(lp_lat-TWOPI); /* correct if symmetrical solution for Aitoff */
|
||||
if (lp_lat < -TWOPI) lp_lat -= 2.*(lp_lat+TWOPI); /* correct if symmetrical solution for Aitoff */
|
||||
if ((fabs(fabs(lp_lat) - TWOPI) < EPSILON) && (!this->m_proj_parm.mode)) lp_lon = 0.; /* if pole in Aitoff, return longitude of 0 */
|
||||
|
||||
/* calculate x,y coordinates with solution obtained */
|
||||
if((D = acos(cos(lp_lat) * cos(C = 0.5 * lp_lon)))) {/* Aitoff */
|
||||
@@ -171,7 +189,7 @@ namespace boost { namespace geometry { namespace projections
|
||||
/* if too far from given values of x,y, repeat with better approximation of phi,lam */
|
||||
} while (((fabs(xy_x-x) > EPSILON) || (fabs(xy_y-y) > EPSILON)) && (round++ < MAXROUND));
|
||||
|
||||
if (iter == MAXITER && round == MAXROUND) fprintf(stderr, "Warning: Accuracy of 1e-12 not reached. Last increments: dlat=%e and dlon=%e\n", dp, dl);
|
||||
//if (iter == MAXITER && round == MAXROUND) fprintf(stderr, "Warning: Accuracy of 1e-12 not reached. Last increments: dlat=%e and dlon=%e\n", dp, dl);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
@@ -181,8 +199,8 @@ namespace boost { namespace geometry { namespace projections
|
||||
|
||||
};
|
||||
|
||||
template <typename Parameters>
|
||||
void setup(Parameters& par, par_aitoff& proj_parm)
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup(Parameters& par, par_aitoff<T>& proj_parm)
|
||||
{
|
||||
boost::ignore_unused(proj_parm);
|
||||
par.es = 0.;
|
||||
@@ -190,29 +208,29 @@ namespace boost { namespace geometry { namespace projections
|
||||
|
||||
|
||||
// Aitoff
|
||||
template <typename Parameters>
|
||||
void setup_aitoff(Parameters& par, par_aitoff& proj_parm)
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup_aitoff(Parameters& par, par_aitoff<T>& proj_parm)
|
||||
{
|
||||
proj_parm.mode = 0;
|
||||
setup(par, proj_parm);
|
||||
}
|
||||
|
||||
// Winkel Tripel
|
||||
template <typename Parameters>
|
||||
void setup_wintri(Parameters& par, par_aitoff& proj_parm)
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup_wintri(Parameters& par, par_aitoff<T>& proj_parm)
|
||||
{
|
||||
static const T TWO_D_PI = detail::TWO_D_PI<T>();
|
||||
|
||||
proj_parm.mode = 1;
|
||||
if (pj_param(par.params, "tlat_1").i)
|
||||
{
|
||||
if (pj_param(par.params, "tlat_1").i) {
|
||||
if ((proj_parm.cosphi1 = cos(pj_param(par.params, "rlat_1").f)) == 0.)
|
||||
throw proj_exception(-22);
|
||||
}
|
||||
else /* 50d28' or acos(2/pi) */
|
||||
proj_parm.cosphi1 = 0.636619772367581343;
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-22) );
|
||||
} else /* 50d28' or phi1=acos(2/pi) */
|
||||
proj_parm.cosphi1 = TWO_D_PI;
|
||||
setup(par, proj_parm);
|
||||
}
|
||||
|
||||
}} // namespace detail::aitoff
|
||||
}} // namespace detail::aitoff
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
@@ -227,10 +245,10 @@ namespace boost { namespace geometry { namespace projections
|
||||
\par Example
|
||||
\image html ex_aitoff.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct aitoff_spheroid : public detail::aitoff::base_aitoff_spheroid<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct aitoff_spheroid : public detail::aitoff::base_aitoff_spheroid<CalculationType, Parameters>
|
||||
{
|
||||
inline aitoff_spheroid(const Parameters& par) : detail::aitoff::base_aitoff_spheroid<Geographic, Cartesian, Parameters>(par)
|
||||
inline aitoff_spheroid(const Parameters& par) : detail::aitoff::base_aitoff_spheroid<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::aitoff::setup_aitoff(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
@@ -250,10 +268,10 @@ namespace boost { namespace geometry { namespace projections
|
||||
\par Example
|
||||
\image html ex_wintri.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct wintri_spheroid : public detail::aitoff::base_aitoff_spheroid<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct wintri_spheroid : public detail::aitoff::base_aitoff_spheroid<CalculationType, Parameters>
|
||||
{
|
||||
inline wintri_spheroid(const Parameters& par) : detail::aitoff::base_aitoff_spheroid<Geographic, Cartesian, Parameters>(par)
|
||||
inline wintri_spheroid(const Parameters& par) : detail::aitoff::base_aitoff_spheroid<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::aitoff::setup_wintri(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
@@ -263,38 +281,44 @@ namespace boost { namespace geometry { namespace projections
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::par4::aitoff, aitoff_spheroid, aitoff_spheroid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::par4::wintri, wintri_spheroid, wintri_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
class aitoff_entry : public detail::factory_entry<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
class aitoff_entry : public detail::factory_entry<CalculationType, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual projection<Geographic, Cartesian>* create_new(const Parameters& par) const
|
||||
virtual base_v<CalculationType, Parameters>* create_new(const Parameters& par) const
|
||||
{
|
||||
return new base_v_fi<aitoff_spheroid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
return new base_v_fi<aitoff_spheroid<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
class wintri_entry : public detail::factory_entry<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
class wintri_entry : public detail::factory_entry<CalculationType, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual projection<Geographic, Cartesian>* create_new(const Parameters& par) const
|
||||
virtual base_v<CalculationType, Parameters>* create_new(const Parameters& par) const
|
||||
{
|
||||
return new base_v_fi<wintri_spheroid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
return new base_v_fi<wintri_spheroid<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
inline void aitoff_init(detail::base_factory<Geographic, Cartesian, Parameters>& factory)
|
||||
template <typename CalculationType, typename Parameters>
|
||||
inline void aitoff_init(detail::base_factory<CalculationType, Parameters>& factory)
|
||||
{
|
||||
factory.add_to_factory("aitoff", new aitoff_entry<Geographic, Cartesian, Parameters>);
|
||||
factory.add_to_factory("wintri", new wintri_entry<Geographic, Cartesian, Parameters>);
|
||||
factory.add_to_factory("aitoff", new aitoff_entry<CalculationType, Parameters>);
|
||||
factory.add_to_factory("wintri", new wintri_entry<CalculationType, Parameters>);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_AITOFF_HPP
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
|
||||
// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -37,38 +41,49 @@
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/factory_entry.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace srs { namespace par4
|
||||
{
|
||||
struct august {};
|
||||
|
||||
}} //namespace srs::par4
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace august
|
||||
{
|
||||
|
||||
static const double M = 1.333333333333333;
|
||||
//static const double M = 1.333333333333333;
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_august_spheroid : public base_t_f<base_august_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct base_august_spheroid : public base_t_f<base_august_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
typedef CalculationType geographic_type;
|
||||
typedef CalculationType cartesian_type;
|
||||
|
||||
|
||||
inline base_august_spheroid(const Parameters& par)
|
||||
: base_t_f<base_august_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
: base_t_f<base_august_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
double t, c1, c, x1, x12, y1, y12;
|
||||
static const CalculationType M = 1.333333333333333333333333333333333333;
|
||||
|
||||
CalculationType t, c1, c, x1, x12, y1, y12;
|
||||
|
||||
t = tan(.5 * lp_lat);
|
||||
c1 = sqrt(1. - t * t);
|
||||
@@ -88,12 +103,12 @@ namespace boost { namespace geometry { namespace projections
|
||||
|
||||
// August Epicycloidal
|
||||
template <typename Parameters>
|
||||
void setup_august(Parameters& par)
|
||||
inline void setup_august(Parameters& par)
|
||||
{
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::august
|
||||
}} // namespace detail::august
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
@@ -109,10 +124,10 @@ namespace boost { namespace geometry { namespace projections
|
||||
\par Example
|
||||
\image html ex_august.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct august_spheroid : public detail::august::base_august_spheroid<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct august_spheroid : public detail::august::base_august_spheroid<CalculationType, Parameters>
|
||||
{
|
||||
inline august_spheroid(const Parameters& par) : detail::august::base_august_spheroid<Geographic, Cartesian, Parameters>(par)
|
||||
inline august_spheroid(const Parameters& par) : detail::august::base_august_spheroid<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::august::setup_august(this->m_par);
|
||||
}
|
||||
@@ -122,27 +137,32 @@ namespace boost { namespace geometry { namespace projections
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::par4::august, august_spheroid, august_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
class august_entry : public detail::factory_entry<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
class august_entry : public detail::factory_entry<CalculationType, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual projection<Geographic, Cartesian>* create_new(const Parameters& par) const
|
||||
virtual base_v<CalculationType, Parameters>* create_new(const Parameters& par) const
|
||||
{
|
||||
return new base_v_f<august_spheroid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
return new base_v_f<august_spheroid<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
inline void august_init(detail::base_factory<Geographic, Cartesian, Parameters>& factory)
|
||||
template <typename CalculationType, typename Parameters>
|
||||
inline void august_init(detail::base_factory<CalculationType, Parameters>& factory)
|
||||
{
|
||||
factory.add_to_factory("august", new august_entry<Geographic, Cartesian, Parameters>);
|
||||
factory.add_to_factory("august", new august_entry<CalculationType, Parameters>);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_AUGUST_HPP
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
|
||||
// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -39,18 +43,29 @@
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/factory_entry.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace srs { namespace par4
|
||||
{
|
||||
struct apian {};
|
||||
struct ortel {};
|
||||
struct bacon {};
|
||||
|
||||
}} //namespace srs::par4
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace bacon
|
||||
{
|
||||
|
||||
static const double HLFPI2 = 2.46740110027233965467;
|
||||
//static const double HLFPI2 = 2.46740110027233965467;
|
||||
static const double EPS = 1e-10;
|
||||
|
||||
struct par_bacon
|
||||
@@ -60,30 +75,33 @@ namespace boost { namespace geometry { namespace projections
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_bacon_spheroid : public base_t_f<base_bacon_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct base_bacon_spheroid : public base_t_f<base_bacon_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
typedef CalculationType geographic_type;
|
||||
typedef CalculationType cartesian_type;
|
||||
|
||||
par_bacon m_proj_parm;
|
||||
|
||||
inline base_bacon_spheroid(const Parameters& par)
|
||||
: base_t_f<base_bacon_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
: base_t_f<base_bacon_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
double ax, f;
|
||||
static const CalculationType HALFPI = detail::HALFPI<CalculationType>();
|
||||
static const CalculationType HLFPI2 = detail::HALFPI_SQR<CalculationType>();
|
||||
|
||||
xy_y = this->m_proj_parm.bacn ? geometry::math::half_pi<double>() * sin(lp_lat) : lp_lat;
|
||||
CalculationType ax, f;
|
||||
|
||||
xy_y = this->m_proj_parm.bacn ? HALFPI * sin(lp_lat) : lp_lat;
|
||||
if ((ax = fabs(lp_lon)) >= EPS) {
|
||||
if (this->m_proj_parm.ortl && ax >= geometry::math::half_pi<double>())
|
||||
xy_x = sqrt(HLFPI2 - lp_lat * lp_lat + EPS) + ax - geometry::math::half_pi<double>();
|
||||
if (this->m_proj_parm.ortl && ax >= HALFPI)
|
||||
xy_x = sqrt(HLFPI2 - lp_lat * lp_lat + EPS) + ax - HALFPI;
|
||||
else {
|
||||
f = 0.5 * (HLFPI2 / ax + ax);
|
||||
xy_x = ax - f + sqrt(f * f - xy_y * xy_y);
|
||||
@@ -102,7 +120,7 @@ namespace boost { namespace geometry { namespace projections
|
||||
|
||||
// Apian Globular I
|
||||
template <typename Parameters>
|
||||
void setup_apian(Parameters& par, par_bacon& proj_parm)
|
||||
inline void setup_apian(Parameters& par, par_bacon& proj_parm)
|
||||
{
|
||||
proj_parm.bacn = proj_parm.ortl = 0;
|
||||
par.es = 0.;
|
||||
@@ -110,7 +128,7 @@ namespace boost { namespace geometry { namespace projections
|
||||
|
||||
// Ortelius Oval
|
||||
template <typename Parameters>
|
||||
void setup_ortel(Parameters& par, par_bacon& proj_parm)
|
||||
inline void setup_ortel(Parameters& par, par_bacon& proj_parm)
|
||||
{
|
||||
proj_parm.bacn = 0;
|
||||
proj_parm.ortl = 1;
|
||||
@@ -119,14 +137,14 @@ namespace boost { namespace geometry { namespace projections
|
||||
|
||||
// Bacon Globular
|
||||
template <typename Parameters>
|
||||
void setup_bacon(Parameters& par, par_bacon& proj_parm)
|
||||
inline void setup_bacon(Parameters& par, par_bacon& proj_parm)
|
||||
{
|
||||
proj_parm.bacn = 1;
|
||||
proj_parm.ortl = 0;
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::bacon
|
||||
}} // namespace detail::bacon
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
@@ -142,10 +160,10 @@ namespace boost { namespace geometry { namespace projections
|
||||
\par Example
|
||||
\image html ex_apian.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct apian_spheroid : public detail::bacon::base_bacon_spheroid<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct apian_spheroid : public detail::bacon::base_bacon_spheroid<CalculationType, Parameters>
|
||||
{
|
||||
inline apian_spheroid(const Parameters& par) : detail::bacon::base_bacon_spheroid<Geographic, Cartesian, Parameters>(par)
|
||||
inline apian_spheroid(const Parameters& par) : detail::bacon::base_bacon_spheroid<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::bacon::setup_apian(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
@@ -164,10 +182,10 @@ namespace boost { namespace geometry { namespace projections
|
||||
\par Example
|
||||
\image html ex_ortel.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct ortel_spheroid : public detail::bacon::base_bacon_spheroid<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct ortel_spheroid : public detail::bacon::base_bacon_spheroid<CalculationType, Parameters>
|
||||
{
|
||||
inline ortel_spheroid(const Parameters& par) : detail::bacon::base_bacon_spheroid<Geographic, Cartesian, Parameters>(par)
|
||||
inline ortel_spheroid(const Parameters& par) : detail::bacon::base_bacon_spheroid<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::bacon::setup_ortel(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
@@ -186,10 +204,10 @@ namespace boost { namespace geometry { namespace projections
|
||||
\par Example
|
||||
\image html ex_bacon.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct bacon_spheroid : public detail::bacon::base_bacon_spheroid<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct bacon_spheroid : public detail::bacon::base_bacon_spheroid<CalculationType, Parameters>
|
||||
{
|
||||
inline bacon_spheroid(const Parameters& par) : detail::bacon::base_bacon_spheroid<Geographic, Cartesian, Parameters>(par)
|
||||
inline bacon_spheroid(const Parameters& par) : detail::bacon::base_bacon_spheroid<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::bacon::setup_bacon(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
@@ -199,49 +217,56 @@ namespace boost { namespace geometry { namespace projections
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::par4::apian, apian_spheroid, apian_spheroid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::par4::bacon, bacon_spheroid, bacon_spheroid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::par4::ortel, ortel_spheroid, ortel_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
class apian_entry : public detail::factory_entry<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
class apian_entry : public detail::factory_entry<CalculationType, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual projection<Geographic, Cartesian>* create_new(const Parameters& par) const
|
||||
virtual base_v<CalculationType, Parameters>* create_new(const Parameters& par) const
|
||||
{
|
||||
return new base_v_f<apian_spheroid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
return new base_v_f<apian_spheroid<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
class ortel_entry : public detail::factory_entry<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
class ortel_entry : public detail::factory_entry<CalculationType, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual projection<Geographic, Cartesian>* create_new(const Parameters& par) const
|
||||
virtual base_v<CalculationType, Parameters>* create_new(const Parameters& par) const
|
||||
{
|
||||
return new base_v_f<ortel_spheroid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
return new base_v_f<ortel_spheroid<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
class bacon_entry : public detail::factory_entry<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
class bacon_entry : public detail::factory_entry<CalculationType, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual projection<Geographic, Cartesian>* create_new(const Parameters& par) const
|
||||
virtual base_v<CalculationType, Parameters>* create_new(const Parameters& par) const
|
||||
{
|
||||
return new base_v_f<bacon_spheroid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
return new base_v_f<bacon_spheroid<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
inline void bacon_init(detail::base_factory<Geographic, Cartesian, Parameters>& factory)
|
||||
template <typename CalculationType, typename Parameters>
|
||||
inline void bacon_init(detail::base_factory<CalculationType, Parameters>& factory)
|
||||
{
|
||||
factory.add_to_factory("apian", new apian_entry<Geographic, Cartesian, Parameters>);
|
||||
factory.add_to_factory("ortel", new ortel_entry<Geographic, Cartesian, Parameters>);
|
||||
factory.add_to_factory("bacon", new bacon_entry<Geographic, Cartesian, Parameters>);
|
||||
factory.add_to_factory("apian", new apian_entry<CalculationType, Parameters>);
|
||||
factory.add_to_factory("ortel", new ortel_entry<CalculationType, Parameters>);
|
||||
factory.add_to_factory("bacon", new bacon_entry<CalculationType, Parameters>);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_BACON_HPP
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
|
||||
// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -40,12 +44,21 @@
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <boost/math/special_functions/hypot.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/factory_entry.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace srs { namespace par4
|
||||
{
|
||||
struct bipc {};
|
||||
|
||||
}} //namespace srs::par4
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace bipc
|
||||
@@ -77,33 +90,36 @@ namespace boost { namespace geometry { namespace projections
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_bipc_spheroid : public base_t_fi<base_bipc_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct base_bipc_spheroid : public base_t_fi<base_bipc_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
typedef CalculationType geographic_type;
|
||||
typedef CalculationType cartesian_type;
|
||||
|
||||
par_bipc m_proj_parm;
|
||||
|
||||
inline base_bipc_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_bipc_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
: base_t_fi<base_bipc_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
double cphi, sphi, tphi, t, al, Az, z, Av, cdlam, sdlam, r;
|
||||
static const CalculationType HALFPI = detail::HALFPI<CalculationType>();
|
||||
static const CalculationType ONEPI = detail::ONEPI<CalculationType>();
|
||||
|
||||
CalculationType cphi, sphi, tphi, t, al, Az, z, Av, cdlam, sdlam, r;
|
||||
int tag;
|
||||
|
||||
cphi = cos(lp_lat);
|
||||
sphi = sin(lp_lat);
|
||||
cdlam = cos(sdlam = lamB - lp_lon);
|
||||
sdlam = sin(sdlam);
|
||||
if (fabs(fabs(lp_lat) - geometry::math::half_pi<double>()) < EPS10) {
|
||||
Az = lp_lat < 0. ? geometry::math::pi<double>() : 0.;
|
||||
if (fabs(fabs(lp_lat) - HALFPI) < EPS10) {
|
||||
Az = lp_lat < 0. ? ONEPI : 0.;
|
||||
tphi = HUGE_VAL;
|
||||
} else {
|
||||
tphi = sphi / cphi;
|
||||
@@ -114,8 +130,10 @@ namespace boost { namespace geometry { namespace projections
|
||||
sdlam = sin(sdlam);
|
||||
z = S20 * sphi + C20 * cphi * cdlam;
|
||||
if (fabs(z) > 1.) {
|
||||
if (fabs(z) > ONEEPS) throw proj_exception();
|
||||
else z = z < 0. ? -1. : 1.;
|
||||
if (fabs(z) > ONEEPS)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-20) );
|
||||
else
|
||||
z = z < 0. ? -1. : 1.;
|
||||
} else
|
||||
z = acos(z);
|
||||
if (tphi != HUGE_VAL)
|
||||
@@ -125,20 +143,25 @@ namespace boost { namespace geometry { namespace projections
|
||||
} else {
|
||||
z = S45 * (sphi + cphi * cdlam);
|
||||
if (fabs(z) > 1.) {
|
||||
if (fabs(z) > ONEEPS) throw proj_exception();
|
||||
else z = z < 0. ? -1. : 1.;
|
||||
if (fabs(z) > ONEEPS)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-20) );
|
||||
else
|
||||
z = z < 0. ? -1. : 1.;
|
||||
} else
|
||||
z = acos(z);
|
||||
Av = Azba;
|
||||
xy_y = -rhoc;
|
||||
}
|
||||
if (z < 0.) throw proj_exception();;
|
||||
if (z < 0.) BOOST_THROW_EXCEPTION( projection_exception(-20) );
|
||||
r = F * (t = pow(tan(.5 * z), n));
|
||||
if ((al = .5 * (R104 - z)) < 0.) throw proj_exception();;
|
||||
if ((al = .5 * (R104 - z)) < 0.)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-20) );
|
||||
al = (t + pow(al, n)) / T;
|
||||
if (fabs(al) > 1.) {
|
||||
if (fabs(al) > ONEEPS) throw proj_exception();
|
||||
else al = al < 0. ? -1. : 1.;
|
||||
if (fabs(al) > ONEEPS)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-20) );
|
||||
else
|
||||
al = al < 0. ? -1. : 1.;
|
||||
} else
|
||||
al = acos(al);
|
||||
if (fabs(t = n * (Av - Az)) < al)
|
||||
@@ -156,7 +179,7 @@ namespace boost { namespace geometry { namespace projections
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const
|
||||
{
|
||||
double t, r, rp, rl, al, z, fAz, Az, s, c, Av;
|
||||
CalculationType t, r, rp, rl, al, z, fAz, Az, s, c, Av;
|
||||
int neg, i;
|
||||
|
||||
if (this->m_proj_parm.noskew) {
|
||||
@@ -187,7 +210,8 @@ namespace boost { namespace geometry { namespace projections
|
||||
break;
|
||||
rl = r;
|
||||
}
|
||||
if (! i) throw proj_exception();;
|
||||
if (! i)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-20) );
|
||||
Az = Av - Az / n;
|
||||
lp_lat = asin(s * cos(z) + c * sin(z) * cos(Az));
|
||||
lp_lon = atan2(sin(Az), c / tan(z) - s * cos(Az));
|
||||
@@ -206,13 +230,13 @@ namespace boost { namespace geometry { namespace projections
|
||||
|
||||
// Bipolar conic of western hemisphere
|
||||
template <typename Parameters>
|
||||
void setup_bipc(Parameters& par, par_bipc& proj_parm)
|
||||
inline void setup_bipc(Parameters& par, par_bipc& proj_parm)
|
||||
{
|
||||
proj_parm.noskew = pj_param(par.params, "bns").i;
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::bipc
|
||||
}} // namespace detail::bipc
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
@@ -229,10 +253,10 @@ namespace boost { namespace geometry { namespace projections
|
||||
\par Example
|
||||
\image html ex_bipc.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct bipc_spheroid : public detail::bipc::base_bipc_spheroid<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct bipc_spheroid : public detail::bipc::base_bipc_spheroid<CalculationType, Parameters>
|
||||
{
|
||||
inline bipc_spheroid(const Parameters& par) : detail::bipc::base_bipc_spheroid<Geographic, Cartesian, Parameters>(par)
|
||||
inline bipc_spheroid(const Parameters& par) : detail::bipc::base_bipc_spheroid<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::bipc::setup_bipc(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
@@ -242,27 +266,32 @@ namespace boost { namespace geometry { namespace projections
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::par4::bipc, bipc_spheroid, bipc_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
class bipc_entry : public detail::factory_entry<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
class bipc_entry : public detail::factory_entry<CalculationType, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual projection<Geographic, Cartesian>* create_new(const Parameters& par) const
|
||||
virtual base_v<CalculationType, Parameters>* create_new(const Parameters& par) const
|
||||
{
|
||||
return new base_v_fi<bipc_spheroid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
return new base_v_fi<bipc_spheroid<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
inline void bipc_init(detail::base_factory<Geographic, Cartesian, Parameters>& factory)
|
||||
template <typename CalculationType, typename Parameters>
|
||||
inline void bipc_init(detail::base_factory<CalculationType, Parameters>& factory)
|
||||
{
|
||||
factory.add_to_factory("bipc", new bipc_entry<Geographic, Cartesian, Parameters>);
|
||||
factory.add_to_factory("bipc", new bipc_entry<CalculationType, Parameters>);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_BIPC_HPP
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
|
||||
// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -39,12 +43,21 @@
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/factory_entry.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace srs { namespace par4
|
||||
{
|
||||
struct boggs {};
|
||||
|
||||
}} //namespace srs::par4
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace boggs
|
||||
@@ -59,31 +72,34 @@ namespace boost { namespace geometry { namespace projections
|
||||
static const double FYC2 = 1.41421356237309504880;
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_boggs_spheroid : public base_t_f<base_boggs_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct base_boggs_spheroid : public base_t_f<base_boggs_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
typedef CalculationType geographic_type;
|
||||
typedef CalculationType cartesian_type;
|
||||
|
||||
|
||||
inline base_boggs_spheroid(const Parameters& par)
|
||||
: base_t_f<base_boggs_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
: base_t_f<base_boggs_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
double theta, th1, c;
|
||||
static const CalculationType HALFPI = detail::HALFPI<CalculationType>();
|
||||
static const CalculationType ONEPI = detail::ONEPI<CalculationType>();
|
||||
|
||||
CalculationType theta, th1, c;
|
||||
int i;
|
||||
|
||||
theta = lp_lat;
|
||||
if (fabs(fabs(lp_lat) - geometry::math::half_pi<double>()) < EPS)
|
||||
if (fabs(fabs(lp_lat) - HALFPI) < EPS)
|
||||
xy_x = 0.;
|
||||
else {
|
||||
c = sin(theta) * geometry::math::pi<double>();
|
||||
c = sin(theta) * ONEPI;
|
||||
for (i = NITER; i; --i) {
|
||||
theta -= th1 = (theta + sin(theta) - c) /
|
||||
(1. + cos(theta));
|
||||
@@ -104,12 +120,12 @@ namespace boost { namespace geometry { namespace projections
|
||||
|
||||
// Boggs Eumorphic
|
||||
template <typename Parameters>
|
||||
void setup_boggs(Parameters& par)
|
||||
inline void setup_boggs(Parameters& par)
|
||||
{
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::boggs
|
||||
}} // namespace detail::boggs
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
@@ -125,10 +141,10 @@ namespace boost { namespace geometry { namespace projections
|
||||
\par Example
|
||||
\image html ex_boggs.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct boggs_spheroid : public detail::boggs::base_boggs_spheroid<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct boggs_spheroid : public detail::boggs::base_boggs_spheroid<CalculationType, Parameters>
|
||||
{
|
||||
inline boggs_spheroid(const Parameters& par) : detail::boggs::base_boggs_spheroid<Geographic, Cartesian, Parameters>(par)
|
||||
inline boggs_spheroid(const Parameters& par) : detail::boggs::base_boggs_spheroid<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::boggs::setup_boggs(this->m_par);
|
||||
}
|
||||
@@ -138,27 +154,32 @@ namespace boost { namespace geometry { namespace projections
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::par4::boggs, boggs_spheroid, boggs_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
class boggs_entry : public detail::factory_entry<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
class boggs_entry : public detail::factory_entry<CalculationType, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual projection<Geographic, Cartesian>* create_new(const Parameters& par) const
|
||||
virtual base_v<CalculationType, Parameters>* create_new(const Parameters& par) const
|
||||
{
|
||||
return new base_v_f<boggs_spheroid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
return new base_v_f<boggs_spheroid<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
inline void boggs_init(detail::base_factory<Geographic, Cartesian, Parameters>& factory)
|
||||
template <typename CalculationType, typename Parameters>
|
||||
inline void boggs_init(detail::base_factory<CalculationType, Parameters>& factory)
|
||||
{
|
||||
factory.add_to_factory("boggs", new boggs_entry<Geographic, Cartesian, Parameters>);
|
||||
factory.add_to_factory("boggs", new boggs_entry<CalculationType, Parameters>);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_BOGGS_HPP
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
|
||||
// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -40,13 +44,22 @@
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <boost/math/special_functions/hypot.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/pj_mlfn.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_mlfn.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace srs { namespace par4
|
||||
{
|
||||
struct bonne {};
|
||||
|
||||
}} //namespace srs::par4
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace bonne
|
||||
@@ -54,35 +67,36 @@ namespace boost { namespace geometry { namespace projections
|
||||
|
||||
static const double EPS10 = 1e-10;
|
||||
|
||||
template <typename T>
|
||||
struct par_bonne
|
||||
{
|
||||
double phi1;
|
||||
double cphi1;
|
||||
double am1;
|
||||
double m1;
|
||||
double en[EN_SIZE];
|
||||
T phi1;
|
||||
T cphi1;
|
||||
T am1;
|
||||
T m1;
|
||||
T en[EN_SIZE];
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_bonne_ellipsoid : public base_t_fi<base_bonne_ellipsoid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct base_bonne_ellipsoid : public base_t_fi<base_bonne_ellipsoid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
typedef CalculationType geographic_type;
|
||||
typedef CalculationType cartesian_type;
|
||||
|
||||
par_bonne m_proj_parm;
|
||||
par_bonne<CalculationType> m_proj_parm;
|
||||
|
||||
inline base_bonne_ellipsoid(const Parameters& par)
|
||||
: base_t_fi<base_bonne_ellipsoid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
: base_t_fi<base_bonne_ellipsoid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(e_forward) ellipsoid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
double rh, E, c;
|
||||
CalculationType rh, E, c;
|
||||
|
||||
rh = this->m_proj_parm.am1 + this->m_proj_parm.m1 - pj_mlfn(lp_lat, E = sin(lp_lat), c = cos(lp_lat), this->m_proj_parm.en);
|
||||
E = c * lp_lon / (rh * sqrt(1. - this->m_par.es * E * E));
|
||||
@@ -94,17 +108,20 @@ namespace boost { namespace geometry { namespace projections
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const
|
||||
{
|
||||
double s, rh;
|
||||
static const CalculationType HALFPI = detail::HALFPI<CalculationType>();
|
||||
|
||||
CalculationType s, rh;
|
||||
|
||||
rh = boost::math::hypot(xy_x, xy_y = this->m_proj_parm.am1 - xy_y);
|
||||
lp_lat = pj_inv_mlfn(this->m_proj_parm.am1 + this->m_proj_parm.m1 - rh, this->m_par.es, this->m_proj_parm.en);
|
||||
if ((s = fabs(lp_lat)) < geometry::math::half_pi<double>()) {
|
||||
if ((s = fabs(lp_lat)) < HALFPI) {
|
||||
s = sin(lp_lat);
|
||||
lp_lon = rh * atan2(xy_x, xy_y) *
|
||||
sqrt(1. - this->m_par.es * s * s) / cos(lp_lat);
|
||||
} else if (fabs(s - geometry::math::half_pi<double>()) <= EPS10)
|
||||
} else if (fabs(s - HALFPI) <= EPS10)
|
||||
lp_lon = 0.;
|
||||
else throw proj_exception();;
|
||||
else
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-20) );
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
@@ -115,25 +132,25 @@ namespace boost { namespace geometry { namespace projections
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_bonne_spheroid : public base_t_fi<base_bonne_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct base_bonne_spheroid : public base_t_fi<base_bonne_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
typedef CalculationType geographic_type;
|
||||
typedef CalculationType cartesian_type;
|
||||
|
||||
par_bonne m_proj_parm;
|
||||
par_bonne<CalculationType> m_proj_parm;
|
||||
|
||||
inline base_bonne_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_bonne_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
: base_t_fi<base_bonne_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
double E, rh;
|
||||
CalculationType E, rh;
|
||||
|
||||
rh = this->m_proj_parm.cphi1 + this->m_proj_parm.phi1 - lp_lat;
|
||||
if (fabs(rh) > EPS10) {
|
||||
@@ -147,12 +164,15 @@ namespace boost { namespace geometry { namespace projections
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const
|
||||
{
|
||||
double rh;
|
||||
static const CalculationType HALFPI = detail::HALFPI<CalculationType>();
|
||||
|
||||
CalculationType rh;
|
||||
|
||||
rh = boost::math::hypot(xy_x, xy_y = this->m_proj_parm.cphi1 - xy_y);
|
||||
lp_lat = this->m_proj_parm.cphi1 + this->m_proj_parm.phi1 - rh;
|
||||
if (fabs(lp_lat) > geometry::math::half_pi<double>()) throw proj_exception();;
|
||||
if (fabs(fabs(lp_lat) - geometry::math::half_pi<double>()) <= EPS10)
|
||||
if (fabs(lp_lat) > HALFPI)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-20) );
|
||||
if (fabs(fabs(lp_lat) - HALFPI) <= EPS10)
|
||||
lp_lon = 0.;
|
||||
else
|
||||
lp_lon = rh * atan2(xy_x, xy_y) / cos(lp_lat);
|
||||
@@ -166,27 +186,30 @@ namespace boost { namespace geometry { namespace projections
|
||||
};
|
||||
|
||||
// Bonne (Werner lat_1=90)
|
||||
template <typename Parameters>
|
||||
void setup_bonne(Parameters& par, par_bonne& proj_parm)
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup_bonne(Parameters& par, par_bonne<T>& proj_parm)
|
||||
{
|
||||
double c;
|
||||
static const T HALFPI = detail::HALFPI<T>();
|
||||
|
||||
T c;
|
||||
|
||||
proj_parm.phi1 = pj_param(par.params, "rlat_1").f;
|
||||
if (fabs(proj_parm.phi1) < EPS10) throw proj_exception(-23);
|
||||
if (fabs(proj_parm.phi1) < EPS10)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-23) );
|
||||
if (par.es) {
|
||||
pj_enfn(par.es, proj_parm.en);
|
||||
proj_parm.m1 = pj_mlfn(proj_parm.phi1, proj_parm.am1 = sin(proj_parm.phi1),
|
||||
c = cos(proj_parm.phi1), proj_parm.en);
|
||||
proj_parm.am1 = c / (sqrt(1. - par.es * proj_parm.am1 * proj_parm.am1) * proj_parm.am1);
|
||||
} else {
|
||||
if (fabs(proj_parm.phi1) + EPS10 >= geometry::math::half_pi<double>())
|
||||
if (fabs(proj_parm.phi1) + EPS10 >= HALFPI)
|
||||
proj_parm.cphi1 = 0.;
|
||||
else
|
||||
proj_parm.cphi1 = 1. / tan(proj_parm.phi1);
|
||||
}
|
||||
}
|
||||
|
||||
}} // namespace detail::bonne
|
||||
}} // namespace detail::bonne
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
@@ -204,10 +227,10 @@ namespace boost { namespace geometry { namespace projections
|
||||
\par Example
|
||||
\image html ex_bonne.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct bonne_ellipsoid : public detail::bonne::base_bonne_ellipsoid<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct bonne_ellipsoid : public detail::bonne::base_bonne_ellipsoid<CalculationType, Parameters>
|
||||
{
|
||||
inline bonne_ellipsoid(const Parameters& par) : detail::bonne::base_bonne_ellipsoid<Geographic, Cartesian, Parameters>(par)
|
||||
inline bonne_ellipsoid(const Parameters& par) : detail::bonne::base_bonne_ellipsoid<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::bonne::setup_bonne(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
@@ -228,10 +251,10 @@ namespace boost { namespace geometry { namespace projections
|
||||
\par Example
|
||||
\image html ex_bonne.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct bonne_spheroid : public detail::bonne::base_bonne_spheroid<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct bonne_spheroid : public detail::bonne::base_bonne_spheroid<CalculationType, Parameters>
|
||||
{
|
||||
inline bonne_spheroid(const Parameters& par) : detail::bonne::base_bonne_spheroid<Geographic, Cartesian, Parameters>(par)
|
||||
inline bonne_spheroid(const Parameters& par) : detail::bonne::base_bonne_spheroid<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::bonne::setup_bonne(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
@@ -241,30 +264,35 @@ namespace boost { namespace geometry { namespace projections
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::par4::bonne, bonne_spheroid, bonne_ellipsoid)
|
||||
|
||||
// Factory entry(s)
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
class bonne_entry : public detail::factory_entry<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
class bonne_entry : public detail::factory_entry<CalculationType, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual projection<Geographic, Cartesian>* create_new(const Parameters& par) const
|
||||
virtual base_v<CalculationType, Parameters>* create_new(const Parameters& par) const
|
||||
{
|
||||
if (par.es)
|
||||
return new base_v_fi<bonne_ellipsoid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
return new base_v_fi<bonne_ellipsoid<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
else
|
||||
return new base_v_fi<bonne_spheroid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
return new base_v_fi<bonne_spheroid<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
inline void bonne_init(detail::base_factory<Geographic, Cartesian, Parameters>& factory)
|
||||
template <typename CalculationType, typename Parameters>
|
||||
inline void bonne_init(detail::base_factory<CalculationType, Parameters>& factory)
|
||||
{
|
||||
factory.add_to_factory("bonne", new bonne_entry<Geographic, Cartesian, Parameters>);
|
||||
factory.add_to_factory("bonne", new bonne_entry<CalculationType, Parameters>);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_BONNE_HPP
|
||||
|
||||
292
include/boost/geometry/srs/projections/proj/cass.hpp
Normal file
292
include/boost/geometry/srs/projections/proj/cass.hpp
Normal file
@@ -0,0 +1,292 @@
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_CASS_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_CASS_HPP
|
||||
|
||||
// Boost.Geometry - extensions-gis-projections (based on PROJ4)
|
||||
// This file is automatically generated. DO NOT EDIT.
|
||||
|
||||
// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// This file is converted from PROJ4, http://trac.osgeo.org/proj
|
||||
// PROJ4 is originally written by Gerald Evenden (then of the USGS)
|
||||
// PROJ4 is maintained by Frank Warmerdam
|
||||
// PROJ4 is converted to Boost.Geometry by Barend Gehrels
|
||||
|
||||
// Last updated version of proj: 4.9.1
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the "Software"),
|
||||
// to deal in the Software without restriction, including without limitation
|
||||
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
// and/or sell copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#include <boost/geometry/srs/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_mlfn.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace srs { namespace par4
|
||||
{
|
||||
struct cass {};
|
||||
|
||||
}} //namespace srs::par4
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace cass
|
||||
{
|
||||
|
||||
//static const double EPS10 = 1e-10;
|
||||
//static const double C1 = .16666666666666666666;
|
||||
//static const double C2 = .00833333333333333333;
|
||||
//static const double C3 = .04166666666666666666;
|
||||
//static const double C4 = .33333333333333333333;
|
||||
//static const double C5 = .06666666666666666666;
|
||||
|
||||
template <typename T>
|
||||
inline T C1() { return .16666666666666666666666666666666666666; }
|
||||
template <typename T>
|
||||
inline T C2() { return .00833333333333333333333333333333333333; }
|
||||
template <typename T>
|
||||
inline T C3() { return .04166666666666666666666666666666666666; }
|
||||
template <typename T>
|
||||
inline T C4() { return .33333333333333333333333333333333333333; }
|
||||
template <typename T>
|
||||
inline T C5() { return .06666666666666666666666666666666666666; }
|
||||
|
||||
template <typename T>
|
||||
struct par_cass
|
||||
{
|
||||
T m0;
|
||||
T en[EN_SIZE];
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct base_cass_ellipsoid : public base_t_fi<base_cass_ellipsoid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>
|
||||
{
|
||||
|
||||
typedef CalculationType geographic_type;
|
||||
typedef CalculationType cartesian_type;
|
||||
|
||||
par_cass<CalculationType> m_proj_parm;
|
||||
|
||||
inline base_cass_ellipsoid(const Parameters& par)
|
||||
: base_t_fi<base_cass_ellipsoid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(e_forward) ellipsoid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
static const CalculationType C1 = cass::C1<CalculationType>();
|
||||
static const CalculationType C2 = cass::C2<CalculationType>();
|
||||
static const CalculationType C3 = cass::C3<CalculationType>();
|
||||
|
||||
CalculationType n = sin(lp_lat);
|
||||
CalculationType c = cos(lp_lat);
|
||||
xy_y = pj_mlfn(lp_lat, n, c, this->m_proj_parm.en);
|
||||
n = 1./sqrt(1. - this->m_par.es * n * n);
|
||||
CalculationType tn = tan(lp_lat); CalculationType t = tn * tn;
|
||||
CalculationType a1 = lp_lon * c;
|
||||
c *= this->m_par.es * c / (1 - this->m_par.es);
|
||||
CalculationType a2 = a1 * a1;
|
||||
xy_x = n * a1 * (1. - a2 * t *
|
||||
(C1 - (8. - t + 8. * c) * a2 * C2));
|
||||
xy_y -= this->m_proj_parm.m0 - n * tn * a2 *
|
||||
(.5 + (5. - t + 6. * c) * a2 * C3);
|
||||
}
|
||||
|
||||
// INVERSE(e_inverse) ellipsoid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const
|
||||
{
|
||||
static const CalculationType C3 = cass::C3<CalculationType>();
|
||||
static const CalculationType C4 = cass::C4<CalculationType>();
|
||||
static const CalculationType C5 = cass::C5<CalculationType>();
|
||||
|
||||
CalculationType ph1;
|
||||
|
||||
ph1 = pj_inv_mlfn(this->m_proj_parm.m0 + xy_y, this->m_par.es, this->m_proj_parm.en);
|
||||
CalculationType tn = tan(ph1); CalculationType t = tn * tn;
|
||||
CalculationType n = sin(ph1);
|
||||
CalculationType r = 1. / (1. - this->m_par.es * n * n);
|
||||
n = sqrt(r);
|
||||
r *= (1. - this->m_par.es) * n;
|
||||
CalculationType dd = xy_x / n;
|
||||
CalculationType d2 = dd * dd;
|
||||
lp_lat = ph1 - (n * tn / r) * d2 *
|
||||
(.5 - (1. + 3. * t) * d2 * C3);
|
||||
lp_lon = dd * (1. + t * d2 *
|
||||
(-C4 + (1. + 3. * t) * d2 * C5)) / cos(ph1);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "cass_ellipsoid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct base_cass_spheroid : public base_t_fi<base_cass_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>
|
||||
{
|
||||
|
||||
typedef CalculationType geographic_type;
|
||||
typedef CalculationType cartesian_type;
|
||||
|
||||
par_cass<CalculationType> m_proj_parm;
|
||||
|
||||
inline base_cass_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_cass_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
xy_x = asin(cos(lp_lat) * sin(lp_lon));
|
||||
xy_y = atan2(tan(lp_lat) , cos(lp_lon)) - this->m_par.phi0;
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const
|
||||
{
|
||||
CalculationType dd = xy_y + this->m_par.phi0;
|
||||
lp_lat = asin(sin(dd) * cos(xy_x));
|
||||
lp_lon = atan2(tan(xy_x), cos(dd));
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "cass_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Cassini
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup_cass(Parameters& par, par_cass<T>& proj_parm)
|
||||
{
|
||||
if (par.es) {
|
||||
if (!pj_enfn(par.es, proj_parm.en))
|
||||
BOOST_THROW_EXCEPTION( projection_exception(0) );
|
||||
proj_parm.m0 = pj_mlfn(par.phi0, sin(par.phi0), cos(par.phi0), proj_parm.en);
|
||||
} else {
|
||||
}
|
||||
}
|
||||
|
||||
}} // namespace detail::cass
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Cassini projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Cylindrical
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Example
|
||||
\image html ex_cass.gif
|
||||
*/
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct cass_ellipsoid : public detail::cass::base_cass_ellipsoid<CalculationType, Parameters>
|
||||
{
|
||||
inline cass_ellipsoid(const Parameters& par) : detail::cass::base_cass_ellipsoid<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::cass::setup_cass(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Cassini projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Cylindrical
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Example
|
||||
\image html ex_cass.gif
|
||||
*/
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct cass_spheroid : public detail::cass::base_cass_spheroid<CalculationType, Parameters>
|
||||
{
|
||||
inline cass_spheroid(const Parameters& par) : detail::cass::base_cass_spheroid<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::cass::setup_cass(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::par4::cass, cass_spheroid, cass_ellipsoid)
|
||||
|
||||
// Factory entry(s)
|
||||
template <typename CalculationType, typename Parameters>
|
||||
class cass_entry : public detail::factory_entry<CalculationType, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual base_v<CalculationType, Parameters>* create_new(const Parameters& par) const
|
||||
{
|
||||
if (par.es)
|
||||
return new base_v_fi<cass_ellipsoid<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
else
|
||||
return new base_v_fi<cass_spheroid<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename CalculationType, typename Parameters>
|
||||
inline void cass_init(detail::base_factory<CalculationType, Parameters>& factory)
|
||||
{
|
||||
factory.add_to_factory("cass", new cass_entry<CalculationType, Parameters>);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_CASS_HPP
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
|
||||
// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017, 2018.
|
||||
// Modifications copyright (c) 2017-2018, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -39,44 +43,49 @@
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/factory_entry.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace srs { namespace par4
|
||||
{
|
||||
struct cc {};
|
||||
|
||||
}} //namespace srs::par4
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace cc
|
||||
{
|
||||
|
||||
static const double EPS10 = 1.e-10;
|
||||
|
||||
struct par_cc
|
||||
{
|
||||
double ap;
|
||||
};
|
||||
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_cc_spheroid : public base_t_fi<base_cc_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct base_cc_spheroid : public base_t_fi<base_cc_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
|
||||
par_cc m_proj_parm;
|
||||
typedef CalculationType geographic_type;
|
||||
typedef CalculationType cartesian_type;
|
||||
|
||||
inline base_cc_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_cc_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
: base_t_fi<base_cc_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
if (fabs(fabs(lp_lat) - geometry::math::half_pi<double>()) <= EPS10) throw proj_exception();;
|
||||
static const CalculationType HALFPI = detail::HALFPI<CalculationType>();
|
||||
|
||||
if (fabs(fabs(lp_lat) - HALFPI) <= EPS10)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-20) );
|
||||
xy_x = lp_lon;
|
||||
xy_y = tan(lp_lat);
|
||||
}
|
||||
@@ -98,12 +107,12 @@ namespace boost { namespace geometry { namespace projections
|
||||
|
||||
// Central Cylindrical
|
||||
template <typename Parameters>
|
||||
void setup_cc(Parameters& par, par_cc& proj_parm)
|
||||
inline void setup_cc(Parameters& par)
|
||||
{
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::cc
|
||||
}} // namespace detail::cc
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
@@ -118,12 +127,12 @@ namespace boost { namespace geometry { namespace projections
|
||||
\par Example
|
||||
\image html ex_cc.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct cc_spheroid : public detail::cc::base_cc_spheroid<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct cc_spheroid : public detail::cc::base_cc_spheroid<CalculationType, Parameters>
|
||||
{
|
||||
inline cc_spheroid(const Parameters& par) : detail::cc::base_cc_spheroid<Geographic, Cartesian, Parameters>(par)
|
||||
inline cc_spheroid(const Parameters& par) : detail::cc::base_cc_spheroid<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::cc::setup_cc(this->m_par, this->m_proj_parm);
|
||||
detail::cc::setup_cc(this->m_par);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -131,27 +140,32 @@ namespace boost { namespace geometry { namespace projections
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::par4::cc, cc_spheroid, cc_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
class cc_entry : public detail::factory_entry<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
class cc_entry : public detail::factory_entry<CalculationType, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual projection<Geographic, Cartesian>* create_new(const Parameters& par) const
|
||||
virtual base_v<CalculationType, Parameters>* create_new(const Parameters& par) const
|
||||
{
|
||||
return new base_v_fi<cc_spheroid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
return new base_v_fi<cc_spheroid<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
inline void cc_init(detail::base_factory<Geographic, Cartesian, Parameters>& factory)
|
||||
template <typename CalculationType, typename Parameters>
|
||||
inline void cc_init(detail::base_factory<CalculationType, Parameters>& factory)
|
||||
{
|
||||
factory.add_to_factory("cc", new cc_entry<Geographic, Cartesian, Parameters>);
|
||||
factory.add_to_factory("cc", new cc_entry<CalculationType, Parameters>);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_CC_HPP
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
|
||||
// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -39,14 +43,23 @@
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/pj_auth.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/pj_qsfn.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_auth.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_qsfn.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace srs { namespace par4
|
||||
{
|
||||
struct cea {};
|
||||
|
||||
}} //namespace srs::par4
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace cea
|
||||
@@ -54,26 +67,27 @@ namespace boost { namespace geometry { namespace projections
|
||||
|
||||
static const double EPS = 1e-10;
|
||||
|
||||
template <typename T>
|
||||
struct par_cea
|
||||
{
|
||||
double qp;
|
||||
double apa[APA_SIZE];
|
||||
T qp;
|
||||
T apa[APA_SIZE];
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_cea_ellipsoid : public base_t_fi<base_cea_ellipsoid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct base_cea_ellipsoid : public base_t_fi<base_cea_ellipsoid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
typedef CalculationType geographic_type;
|
||||
typedef CalculationType cartesian_type;
|
||||
|
||||
par_cea m_proj_parm;
|
||||
par_cea<CalculationType> m_proj_parm;
|
||||
|
||||
inline base_cea_ellipsoid(const Parameters& par)
|
||||
: base_t_fi<base_cea_ellipsoid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
: base_t_fi<base_cea_ellipsoid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(e_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
@@ -99,19 +113,19 @@ namespace boost { namespace geometry { namespace projections
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_cea_spheroid : public base_t_fi<base_cea_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct base_cea_spheroid : public base_t_fi<base_cea_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
typedef CalculationType geographic_type;
|
||||
typedef CalculationType cartesian_type;
|
||||
|
||||
par_cea m_proj_parm;
|
||||
par_cea<CalculationType> m_proj_parm;
|
||||
|
||||
inline base_cea_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_cea_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
: base_t_fi<base_cea_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
@@ -125,15 +139,18 @@ namespace boost { namespace geometry { namespace projections
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const
|
||||
{
|
||||
double t;
|
||||
static const CalculationType HALFPI = detail::HALFPI<CalculationType>();
|
||||
|
||||
CalculationType t;
|
||||
|
||||
if ((t = fabs(xy_y *= this->m_par.k0)) - EPS <= 1.) {
|
||||
if (t >= 1.)
|
||||
lp_lat = xy_y < 0. ? -geometry::math::half_pi<double>() : geometry::math::half_pi<double>();
|
||||
lp_lat = xy_y < 0. ? -HALFPI : HALFPI;
|
||||
else
|
||||
lp_lat = asin(xy_y);
|
||||
lp_lon = xy_x / this->m_par.k0;
|
||||
} else throw proj_exception();;
|
||||
} else
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-20) );
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
@@ -144,25 +161,26 @@ namespace boost { namespace geometry { namespace projections
|
||||
};
|
||||
|
||||
// Equal Area Cylindrical
|
||||
template <typename Parameters>
|
||||
void setup_cea(Parameters& par, par_cea& proj_parm)
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup_cea(Parameters& par, par_cea<T>& proj_parm)
|
||||
{
|
||||
double t = 0;
|
||||
T t = 0;
|
||||
|
||||
if (pj_param(par.params, "tlat_ts").i &&
|
||||
(par.k0 = cos(t = pj_param(par.params, "rlat_ts").f)) < 0.)
|
||||
throw proj_exception(-24);
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-24) );
|
||||
if (par.es) {
|
||||
t = sin(t);
|
||||
par.k0 /= sqrt(1. - par.es * t * t);
|
||||
par.e = sqrt(par.es);
|
||||
if (!pj_authset(par.es, proj_parm.apa)) throw proj_exception(0);
|
||||
if (!pj_authset(par.es, proj_parm.apa))
|
||||
BOOST_THROW_EXCEPTION( projection_exception(0) );
|
||||
proj_parm.qp = pj_qsfn(1., par.e, par.one_es);
|
||||
} else {
|
||||
}
|
||||
}
|
||||
|
||||
}} // namespace detail::cea
|
||||
}} // namespace detail::cea
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
@@ -180,10 +198,10 @@ namespace boost { namespace geometry { namespace projections
|
||||
\par Example
|
||||
\image html ex_cea.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct cea_ellipsoid : public detail::cea::base_cea_ellipsoid<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct cea_ellipsoid : public detail::cea::base_cea_ellipsoid<CalculationType, Parameters>
|
||||
{
|
||||
inline cea_ellipsoid(const Parameters& par) : detail::cea::base_cea_ellipsoid<Geographic, Cartesian, Parameters>(par)
|
||||
inline cea_ellipsoid(const Parameters& par) : detail::cea::base_cea_ellipsoid<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::cea::setup_cea(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
@@ -204,10 +222,10 @@ namespace boost { namespace geometry { namespace projections
|
||||
\par Example
|
||||
\image html ex_cea.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct cea_spheroid : public detail::cea::base_cea_spheroid<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct cea_spheroid : public detail::cea::base_cea_spheroid<CalculationType, Parameters>
|
||||
{
|
||||
inline cea_spheroid(const Parameters& par) : detail::cea::base_cea_spheroid<Geographic, Cartesian, Parameters>(par)
|
||||
inline cea_spheroid(const Parameters& par) : detail::cea::base_cea_spheroid<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::cea::setup_cea(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
@@ -217,30 +235,35 @@ namespace boost { namespace geometry { namespace projections
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::par4::cea, cea_spheroid, cea_ellipsoid)
|
||||
|
||||
// Factory entry(s)
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
class cea_entry : public detail::factory_entry<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
class cea_entry : public detail::factory_entry<CalculationType, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual projection<Geographic, Cartesian>* create_new(const Parameters& par) const
|
||||
virtual base_v<CalculationType, Parameters>* create_new(const Parameters& par) const
|
||||
{
|
||||
if (par.es)
|
||||
return new base_v_fi<cea_ellipsoid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
return new base_v_fi<cea_ellipsoid<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
else
|
||||
return new base_v_fi<cea_spheroid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
return new base_v_fi<cea_spheroid<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
inline void cea_init(detail::base_factory<Geographic, Cartesian, Parameters>& factory)
|
||||
template <typename CalculationType, typename Parameters>
|
||||
inline void cea_init(detail::base_factory<CalculationType, Parameters>& factory)
|
||||
{
|
||||
factory.add_to_factory("cea", new cea_entry<Geographic, Cartesian, Parameters>);
|
||||
factory.add_to_factory("cea", new cea_entry<CalculationType, Parameters>);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_CEA_HPP
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
|
||||
// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -40,42 +44,56 @@
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <cstdio>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/aasincos.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/aasincos.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace srs { namespace par4
|
||||
{
|
||||
struct chamb {};
|
||||
|
||||
}} //namespace srs::par4
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace chamb
|
||||
{
|
||||
|
||||
static const double THIRD = 0.333333333333333333;
|
||||
//static const double THIRD = 0.333333333333333333;
|
||||
static const double TOL = 1e-9;
|
||||
|
||||
// specific for 'chamb'
|
||||
struct VECT { double r, Az; };
|
||||
struct XY { double x, y; };
|
||||
template <typename T>
|
||||
struct VECT { T r, Az; };
|
||||
template <typename T>
|
||||
struct XY { T x, y; };
|
||||
|
||||
template <typename T>
|
||||
struct par_chamb
|
||||
{
|
||||
struct { /* control point data */
|
||||
double phi, lam;
|
||||
double cosphi, sinphi;
|
||||
VECT v;
|
||||
XY p;
|
||||
double Az;
|
||||
T phi, lam;
|
||||
T cosphi, sinphi;
|
||||
VECT<T> v;
|
||||
XY<T> p;
|
||||
T Az;
|
||||
} c[3];
|
||||
XY p;
|
||||
double beta_0, beta_1, beta_2;
|
||||
XY<T> p;
|
||||
T beta_0, beta_1, beta_2;
|
||||
};
|
||||
|
||||
static VECT /* distance and azimuth from point 1 to point 2 */
|
||||
vect(double dphi, double c1, double s1, double c2, double s2, double dlam) {
|
||||
VECT v;
|
||||
double cdl, dp, dl;
|
||||
template <typename T>
|
||||
inline VECT<T> /* distance and azimuth from point 1 to point 2 */
|
||||
vect(T const& dphi, T const& c1, T const& s1, T const& c2, T const& s2, T const& dlam)
|
||||
{
|
||||
VECT<T> v;
|
||||
T cdl, dp, dl;
|
||||
|
||||
cdl = cos(dlam);
|
||||
if (fabs(dphi) > 1. || fabs(dlam) > 1.)
|
||||
@@ -91,32 +109,37 @@ namespace boost { namespace geometry { namespace projections
|
||||
v.r = v.Az = 0.;
|
||||
return v;
|
||||
}
|
||||
static double /* law of cosines */
|
||||
lc(double b,double c,double a) {
|
||||
|
||||
template <typename T>
|
||||
inline T /* law of cosines */
|
||||
lc(T const& b, T const& c, T const& a)
|
||||
{
|
||||
return aacos(.5 * (b * b + c * c - a * a) / (b * c));
|
||||
}
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_chamb_spheroid : public base_t_f<base_chamb_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct base_chamb_spheroid : public base_t_f<base_chamb_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
typedef CalculationType geographic_type;
|
||||
typedef CalculationType cartesian_type;
|
||||
|
||||
par_chamb m_proj_parm;
|
||||
par_chamb<CalculationType> m_proj_parm;
|
||||
|
||||
inline base_chamb_spheroid(const Parameters& par)
|
||||
: base_t_f<base_chamb_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
: base_t_f<base_chamb_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
double sinphi, cosphi, a;
|
||||
VECT v[3];
|
||||
static const CalculationType THIRD = detail::THIRD<CalculationType>();
|
||||
|
||||
CalculationType sinphi, cosphi, a;
|
||||
VECT<CalculationType> v[3];
|
||||
int i, j;
|
||||
|
||||
sinphi = sin(lp_lat);
|
||||
@@ -163,9 +186,11 @@ namespace boost { namespace geometry { namespace projections
|
||||
};
|
||||
|
||||
// Chamberlin Trimetric
|
||||
template <typename Parameters>
|
||||
void setup_chamb(Parameters& par, par_chamb& proj_parm)
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup_chamb(Parameters& par, par_chamb<T>& proj_parm)
|
||||
{
|
||||
static const T ONEPI = detail::ONEPI<T>();
|
||||
|
||||
int i, j;
|
||||
char line[10];
|
||||
|
||||
@@ -182,12 +207,13 @@ namespace boost { namespace geometry { namespace projections
|
||||
j = i == 2 ? 0 : i + 1;
|
||||
proj_parm.c[i].v = vect(proj_parm.c[j].phi - proj_parm.c[i].phi, proj_parm.c[i].cosphi, proj_parm.c[i].sinphi,
|
||||
proj_parm.c[j].cosphi, proj_parm.c[j].sinphi, proj_parm.c[j].lam - proj_parm.c[i].lam);
|
||||
if (! proj_parm.c[i].v.r) throw proj_exception(-25);
|
||||
if (! proj_parm.c[i].v.r)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-25) );
|
||||
/* co-linearity problem ignored for now */
|
||||
}
|
||||
proj_parm.beta_0 = lc(proj_parm.c[0].v.r, proj_parm.c[2].v.r, proj_parm.c[1].v.r);
|
||||
proj_parm.beta_1 = lc(proj_parm.c[0].v.r, proj_parm.c[1].v.r, proj_parm.c[2].v.r);
|
||||
proj_parm.beta_2 = geometry::math::pi<double>() - proj_parm.beta_0;
|
||||
proj_parm.beta_2 = ONEPI - proj_parm.beta_0;
|
||||
proj_parm.p.y = 2. * (proj_parm.c[0].p.y = proj_parm.c[1].p.y = proj_parm.c[2].v.r * sin(proj_parm.beta_0));
|
||||
proj_parm.c[2].p.y = 0.;
|
||||
proj_parm.c[0].p.x = - (proj_parm.c[1].p.x = 0.5 * proj_parm.c[0].v.r);
|
||||
@@ -195,7 +221,7 @@ namespace boost { namespace geometry { namespace projections
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::chamb
|
||||
}} // namespace detail::chamb
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
@@ -218,10 +244,10 @@ namespace boost { namespace geometry { namespace projections
|
||||
\par Example
|
||||
\image html ex_chamb.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct chamb_spheroid : public detail::chamb::base_chamb_spheroid<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct chamb_spheroid : public detail::chamb::base_chamb_spheroid<CalculationType, Parameters>
|
||||
{
|
||||
inline chamb_spheroid(const Parameters& par) : detail::chamb::base_chamb_spheroid<Geographic, Cartesian, Parameters>(par)
|
||||
inline chamb_spheroid(const Parameters& par) : detail::chamb::base_chamb_spheroid<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::chamb::setup_chamb(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
@@ -231,27 +257,32 @@ namespace boost { namespace geometry { namespace projections
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::par4::chamb, chamb_spheroid, chamb_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
class chamb_entry : public detail::factory_entry<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
class chamb_entry : public detail::factory_entry<CalculationType, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual projection<Geographic, Cartesian>* create_new(const Parameters& par) const
|
||||
virtual base_v<CalculationType, Parameters>* create_new(const Parameters& par) const
|
||||
{
|
||||
return new base_v_f<chamb_spheroid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
return new base_v_f<chamb_spheroid<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
inline void chamb_init(detail::base_factory<Geographic, Cartesian, Parameters>& factory)
|
||||
template <typename CalculationType, typename Parameters>
|
||||
inline void chamb_init(detail::base_factory<CalculationType, Parameters>& factory)
|
||||
{
|
||||
factory.add_to_factory("chamb", new chamb_entry<Geographic, Cartesian, Parameters>);
|
||||
factory.add_to_factory("chamb", new chamb_entry<CalculationType, Parameters>);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_CHAMB_HPP
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
|
||||
// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -39,12 +43,21 @@
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/factory_entry.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace srs { namespace par4
|
||||
{
|
||||
struct collg {};
|
||||
|
||||
}} //namespace srs::par4
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace collg
|
||||
@@ -55,18 +68,18 @@ namespace boost { namespace geometry { namespace projections
|
||||
static const double ONEEPS = 1.0000001;
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_collg_spheroid : public base_t_fi<base_collg_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct base_collg_spheroid : public base_t_fi<base_collg_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
typedef CalculationType geographic_type;
|
||||
typedef CalculationType cartesian_type;
|
||||
|
||||
|
||||
inline base_collg_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_collg_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
: base_t_fi<base_collg_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
@@ -87,8 +100,10 @@ namespace boost { namespace geometry { namespace projections
|
||||
lp_lat = xy_y / FYC - 1.;
|
||||
if (fabs(lp_lat = 1. - lp_lat * lp_lat) < 1.)
|
||||
lp_lat = asin(lp_lat);
|
||||
else if (fabs(lp_lat) > ONEEPS) throw proj_exception();
|
||||
else lp_lat = lp_lat < 0. ? -geometry::math::half_pi<double>() : geometry::math::half_pi<double>();
|
||||
else if (fabs(lp_lat) > ONEEPS)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(-20) );
|
||||
else
|
||||
lp_lat = lp_lat < 0. ? -geometry::math::half_pi<double>() : geometry::math::half_pi<double>();
|
||||
if ((lp_lon = 1. - sin(lp_lat)) <= 0.)
|
||||
lp_lon = 0.;
|
||||
else
|
||||
@@ -104,12 +119,12 @@ namespace boost { namespace geometry { namespace projections
|
||||
|
||||
// Collignon
|
||||
template <typename Parameters>
|
||||
void setup_collg(Parameters& par)
|
||||
inline void setup_collg(Parameters& par)
|
||||
{
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::collg
|
||||
}} // namespace collg
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
@@ -124,10 +139,10 @@ namespace boost { namespace geometry { namespace projections
|
||||
\par Example
|
||||
\image html ex_collg.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct collg_spheroid : public detail::collg::base_collg_spheroid<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct collg_spheroid : public detail::collg::base_collg_spheroid<CalculationType, Parameters>
|
||||
{
|
||||
inline collg_spheroid(const Parameters& par) : detail::collg::base_collg_spheroid<Geographic, Cartesian, Parameters>(par)
|
||||
inline collg_spheroid(const Parameters& par) : detail::collg::base_collg_spheroid<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::collg::setup_collg(this->m_par);
|
||||
}
|
||||
@@ -137,27 +152,32 @@ namespace boost { namespace geometry { namespace projections
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::par4::collg, collg_spheroid, collg_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
class collg_entry : public detail::factory_entry<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
class collg_entry : public detail::factory_entry<CalculationType, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual projection<Geographic, Cartesian>* create_new(const Parameters& par) const
|
||||
virtual base_v<CalculationType, Parameters>* create_new(const Parameters& par) const
|
||||
{
|
||||
return new base_v_fi<collg_spheroid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
return new base_v_fi<collg_spheroid<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
inline void collg_init(detail::base_factory<Geographic, Cartesian, Parameters>& factory)
|
||||
template <typename CalculationType, typename Parameters>
|
||||
inline void collg_init(detail::base_factory<CalculationType, Parameters>& factory)
|
||||
{
|
||||
factory.add_to_factory("collg", new collg_entry<Geographic, Cartesian, Parameters>);
|
||||
factory.add_to_factory("collg", new collg_entry<CalculationType, Parameters>);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_COLLG_HPP
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
|
||||
// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -37,12 +41,21 @@
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/factory_entry.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace srs { namespace par4
|
||||
{
|
||||
struct crast {};
|
||||
|
||||
}} //namespace srs::par4
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace crast
|
||||
@@ -52,26 +65,28 @@ namespace boost { namespace geometry { namespace projections
|
||||
static const double RXM = 1.02332670794648848847;
|
||||
static const double YM = 3.06998012383946546542;
|
||||
static const double RYM = 0.32573500793527994772;
|
||||
static const double THIRD = 0.333333333333333333;
|
||||
//static const double THIRD = 0.333333333333333333;
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_crast_spheroid : public base_t_fi<base_crast_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct base_crast_spheroid : public base_t_fi<base_crast_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
typedef CalculationType geographic_type;
|
||||
typedef CalculationType cartesian_type;
|
||||
|
||||
|
||||
inline base_crast_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_crast_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
: base_t_fi<base_crast_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
static const CalculationType THIRD = detail::THIRD<CalculationType>();
|
||||
|
||||
lp_lat *= THIRD;
|
||||
xy_x = XM * lp_lon * (2. * cos(lp_lat + lp_lat) - 1.);
|
||||
xy_y = YM * sin(lp_lat);
|
||||
@@ -81,6 +96,8 @@ namespace boost { namespace geometry { namespace projections
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(cartesian_type& xy_x, cartesian_type& xy_y, geographic_type& lp_lon, geographic_type& lp_lat) const
|
||||
{
|
||||
static const CalculationType THIRD = detail::THIRD<CalculationType>();
|
||||
|
||||
lp_lat = 3. * asin(xy_y * RYM);
|
||||
lp_lon = xy_x * RXM / (2. * cos((lp_lat + lp_lat) * THIRD) - 1);
|
||||
}
|
||||
@@ -94,12 +111,12 @@ namespace boost { namespace geometry { namespace projections
|
||||
|
||||
// Craster Parabolic (Putnins P4)
|
||||
template <typename Parameters>
|
||||
void setup_crast(Parameters& par)
|
||||
inline void setup_crast(Parameters& par)
|
||||
{
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::crast
|
||||
}} // namespace detail::crast
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
@@ -114,10 +131,10 @@ namespace boost { namespace geometry { namespace projections
|
||||
\par Example
|
||||
\image html ex_crast.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct crast_spheroid : public detail::crast::base_crast_spheroid<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct crast_spheroid : public detail::crast::base_crast_spheroid<CalculationType, Parameters>
|
||||
{
|
||||
inline crast_spheroid(const Parameters& par) : detail::crast::base_crast_spheroid<Geographic, Cartesian, Parameters>(par)
|
||||
inline crast_spheroid(const Parameters& par) : detail::crast::base_crast_spheroid<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::crast::setup_crast(this->m_par);
|
||||
}
|
||||
@@ -127,27 +144,32 @@ namespace boost { namespace geometry { namespace projections
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::par4::crast, crast_spheroid, crast_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
class crast_entry : public detail::factory_entry<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
class crast_entry : public detail::factory_entry<CalculationType, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual projection<Geographic, Cartesian>* create_new(const Parameters& par) const
|
||||
virtual base_v<CalculationType, Parameters>* create_new(const Parameters& par) const
|
||||
{
|
||||
return new base_v_fi<crast_spheroid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
return new base_v_fi<crast_spheroid<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
inline void crast_init(detail::base_factory<Geographic, Cartesian, Parameters>& factory)
|
||||
template <typename CalculationType, typename Parameters>
|
||||
inline void crast_init(detail::base_factory<CalculationType, Parameters>& factory)
|
||||
{
|
||||
factory.add_to_factory("crast", new crast_entry<Geographic, Cartesian, Parameters>);
|
||||
factory.add_to_factory("crast", new crast_entry<CalculationType, Parameters>);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_CRAST_HPP
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
|
||||
// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017.
|
||||
// Modifications copyright (c) 2017, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -37,41 +41,58 @@
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/extensions/gis/projections/impl/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_static.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/factory_entry.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace srs { namespace par4
|
||||
{
|
||||
struct denoy {};
|
||||
|
||||
}} //namespace srs::par4
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace denoy
|
||||
{
|
||||
|
||||
static const double C0 = 0.95;
|
||||
static const double C1 = -.08333333333333333333;
|
||||
static const double C3 = .00166666666666666666;
|
||||
//static const double C1 = -.08333333333333333333;
|
||||
//static const double C3 = .00166666666666666666;
|
||||
static const double D1 = 0.9;
|
||||
static const double D5 = 0.03;
|
||||
|
||||
template <typename T>
|
||||
inline T C1() { return -.0833333333333333333333333333333; }
|
||||
template <typename T>
|
||||
inline T C3() { return .0016666666666666666666666666666; }
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
struct base_denoy_spheroid : public base_t_f<base_denoy_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct base_denoy_spheroid : public base_t_f<base_denoy_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>
|
||||
{
|
||||
|
||||
typedef double geographic_type;
|
||||
typedef double cartesian_type;
|
||||
typedef CalculationType geographic_type;
|
||||
typedef CalculationType cartesian_type;
|
||||
|
||||
|
||||
inline base_denoy_spheroid(const Parameters& par)
|
||||
: base_t_f<base_denoy_spheroid<Geographic, Cartesian, Parameters>,
|
||||
Geographic, Cartesian, Parameters>(*this, par) {}
|
||||
: base_t_f<base_denoy_spheroid<CalculationType, Parameters>,
|
||||
CalculationType, Parameters>(*this, par) {}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(geographic_type& lp_lon, geographic_type& lp_lat, cartesian_type& xy_x, cartesian_type& xy_y) const
|
||||
{
|
||||
static const CalculationType C1 = denoy::C1<CalculationType>();
|
||||
static const CalculationType C3 = denoy::C3<CalculationType>();
|
||||
|
||||
xy_y = lp_lat;
|
||||
xy_x = lp_lon;
|
||||
lp_lon = fabs(lp_lon);
|
||||
@@ -88,12 +109,12 @@ namespace boost { namespace geometry { namespace projections
|
||||
|
||||
// Denoyer Semi-Elliptical
|
||||
template <typename Parameters>
|
||||
void setup_denoy(Parameters& par)
|
||||
inline void setup_denoy(Parameters& par)
|
||||
{
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::denoy
|
||||
}} // namespace detail::denoy
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
@@ -109,10 +130,10 @@ namespace boost { namespace geometry { namespace projections
|
||||
\par Example
|
||||
\image html ex_denoy.gif
|
||||
*/
|
||||
template <typename Geographic, typename Cartesian, typename Parameters = parameters>
|
||||
struct denoy_spheroid : public detail::denoy::base_denoy_spheroid<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
struct denoy_spheroid : public detail::denoy::base_denoy_spheroid<CalculationType, Parameters>
|
||||
{
|
||||
inline denoy_spheroid(const Parameters& par) : detail::denoy::base_denoy_spheroid<Geographic, Cartesian, Parameters>(par)
|
||||
inline denoy_spheroid(const Parameters& par) : detail::denoy::base_denoy_spheroid<CalculationType, Parameters>(par)
|
||||
{
|
||||
detail::denoy::setup_denoy(this->m_par);
|
||||
}
|
||||
@@ -122,27 +143,32 @@ namespace boost { namespace geometry { namespace projections
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::par4::denoy, denoy_spheroid, denoy_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
class denoy_entry : public detail::factory_entry<Geographic, Cartesian, Parameters>
|
||||
template <typename CalculationType, typename Parameters>
|
||||
class denoy_entry : public detail::factory_entry<CalculationType, Parameters>
|
||||
{
|
||||
public :
|
||||
virtual projection<Geographic, Cartesian>* create_new(const Parameters& par) const
|
||||
virtual base_v<CalculationType, Parameters>* create_new(const Parameters& par) const
|
||||
{
|
||||
return new base_v_f<denoy_spheroid<Geographic, Cartesian, Parameters>, Geographic, Cartesian, Parameters>(par);
|
||||
return new base_v_f<denoy_spheroid<CalculationType, Parameters>, CalculationType, Parameters>(par);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Geographic, typename Cartesian, typename Parameters>
|
||||
inline void denoy_init(detail::base_factory<Geographic, Cartesian, Parameters>& factory)
|
||||
template <typename CalculationType, typename Parameters>
|
||||
inline void denoy_init(detail::base_factory<CalculationType, Parameters>& factory)
|
||||
{
|
||||
factory.add_to_factory("denoy", new denoy_entry<Geographic, Cartesian, Parameters>);
|
||||
factory.add_to_factory("denoy", new denoy_entry<CalculationType, Parameters>);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_DENOY_HPP
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user