add usd-21-05-win64_py37
This commit is contained in:
1 parent
41d23e71ba
commit
66bc054336
15675 files changed
+3061008
No files matched your search
@@ -0,0 +1,68 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// 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)
|
||||
|
||||
#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 <>
|
||||
struct dynamic_parameters<srs::epsg>
|
||||
{
|
||||
static const bool is_specialized = true;
|
||||
static inline srs::dpar::parameters<> apply(srs::epsg const& params)
|
||||
{
|
||||
return projections::detail::epsg_to_parameters(params.code);
|
||||
}
|
||||
};
|
||||
|
||||
template <int Code, typename CT>
|
||||
class proj_wrapper<srs::static_epsg<Code>, CT>
|
||||
: public proj_wrapper
|
||||
<
|
||||
typename projections::detail::epsg_traits<Code>::parameters_type,
|
||||
CT
|
||||
>
|
||||
{
|
||||
typedef projections::detail::epsg_traits<Code> epsg_traits;
|
||||
|
||||
typedef proj_wrapper
|
||||
<
|
||||
typename epsg_traits::parameters_type,
|
||||
CT
|
||||
> base_t;
|
||||
|
||||
public:
|
||||
proj_wrapper()
|
||||
: base_t(epsg_traits::parameters())
|
||||
{}
|
||||
|
||||
explicit proj_wrapper(srs::static_epsg<Code> const&)
|
||||
: base_t(epsg_traits::parameters())
|
||||
{}
|
||||
};
|
||||
|
||||
} // namespace projections
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_SRS_EPSG_HPP
|
||||
@@ -0,0 +1,70 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// 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)
|
||||
|
||||
#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 <>
|
||||
struct dynamic_parameters<srs::esri>
|
||||
{
|
||||
static const bool is_specialized = true;
|
||||
static inline srs::dpar::parameters<> apply(srs::esri const& params)
|
||||
{
|
||||
return projections::detail::esri_to_parameters(params.code);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template <int Code, typename CT>
|
||||
class proj_wrapper<srs::static_esri<Code>, CT>
|
||||
: public proj_wrapper
|
||||
<
|
||||
typename projections::detail::esri_traits<Code>::parameters_type,
|
||||
CT
|
||||
>
|
||||
{
|
||||
typedef projections::detail::esri_traits<Code> esri_traits;
|
||||
|
||||
typedef proj_wrapper
|
||||
<
|
||||
typename esri_traits::parameters_type,
|
||||
CT
|
||||
> base_t;
|
||||
|
||||
public:
|
||||
proj_wrapper()
|
||||
: base_t(esri_traits::parameters())
|
||||
{}
|
||||
|
||||
explicit proj_wrapper(srs::static_esri<Code> const&)
|
||||
: base_t(esri_traits::parameters())
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
} // namespace projections
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_SRS_ESRI_HPP
|
||||
@@ -0,0 +1,68 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// 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)
|
||||
|
||||
#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 <>
|
||||
struct dynamic_parameters<srs::iau2000>
|
||||
{
|
||||
static const bool is_specialized = true;
|
||||
static inline srs::dpar::parameters<> apply(srs::iau2000 const& params)
|
||||
{
|
||||
return projections::detail::iau2000_to_parameters(params.code);
|
||||
}
|
||||
};
|
||||
|
||||
template <int Code, typename CT>
|
||||
class proj_wrapper<srs::static_iau2000<Code>, CT>
|
||||
: public proj_wrapper
|
||||
<
|
||||
typename projections::detail::iau2000_traits<Code>::parameters_type,
|
||||
CT
|
||||
>
|
||||
{
|
||||
typedef projections::detail::iau2000_traits<Code> iau2000_traits;
|
||||
|
||||
typedef proj_wrapper
|
||||
<
|
||||
typename iau2000_traits::parameters_type,
|
||||
CT
|
||||
> base_t;
|
||||
|
||||
public:
|
||||
proj_wrapper()
|
||||
: base_t(iau2000_traits::parameters())
|
||||
{}
|
||||
|
||||
explicit proj_wrapper(srs::static_iau2000<Code> const&)
|
||||
: base_t(iau2000_traits::parameters())
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_SRS_IAU2000_HPP
|
||||
@@ -0,0 +1,550 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2008-2012 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)
|
||||
|
||||
#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/dpar.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/proj4.hpp>
|
||||
#include <boost/geometry/srs/projections/spar.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>
|
||||
struct dynamic_parameters
|
||||
{
|
||||
static const bool is_specialized = false;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct dynamic_parameters<srs::proj4>
|
||||
{
|
||||
static const bool is_specialized = true;
|
||||
static inline srs::detail::proj4_parameters apply(srs::proj4 const& params)
|
||||
{
|
||||
return srs::detail::proj4_parameters(params.str());
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct dynamic_parameters<srs::dpar::parameters<T> >
|
||||
{
|
||||
static const bool is_specialized = true;
|
||||
static inline srs::dpar::parameters<T> const& apply(srs::dpar::parameters<T> const& params)
|
||||
{
|
||||
return params;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// 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),
|
||||
UNKNOWN_PROJECTION_DEFINITION,
|
||||
(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,
|
||||
typename boost::enable_if_c
|
||||
<
|
||||
dynamic_parameters<Params>::is_specialized
|
||||
>::type * = 0)
|
||||
: m_ptr(create(dynamic_parameters<Params>::apply(params)))
|
||||
{}
|
||||
|
||||
vprj_t const& proj() const { return *m_ptr; }
|
||||
vprj_t & mutable_proj() { return *m_ptr; }
|
||||
|
||||
private:
|
||||
template <typename Params>
|
||||
static vprj_t* create(Params const& params)
|
||||
{
|
||||
parameters_type parameters = projections::detail::pj_init<calc_t>(params);
|
||||
|
||||
vprj_t* result = projections::detail::create_new(params, parameters);
|
||||
|
||||
if (result == NULL)
|
||||
{
|
||||
if (parameters.id.is_unknown())
|
||||
{
|
||||
BOOST_THROW_EXCEPTION(projection_not_named_exception());
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: handle non-string projection id
|
||||
BOOST_THROW_EXCEPTION(projection_unknown_id_exception());
|
||||
}
|
||||
}
|
||||
|
||||
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::spar::detail::pick_proj_tag
|
||||
<
|
||||
StaticParameters
|
||||
>::type proj_tag;
|
||||
|
||||
typedef typename projections::detail::static_projection_type
|
||||
<
|
||||
proj_tag,
|
||||
typename projections::detail::static_srs_tag<StaticParameters>::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)
|
||||
: m_proj(s_params,
|
||||
projections::detail::pj_init<calc_t>(s_params))
|
||||
{}
|
||||
|
||||
private:
|
||||
projection_type m_proj;
|
||||
};
|
||||
|
||||
template <BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX, typename CT>
|
||||
class proj_wrapper<srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX>, CT>
|
||||
: public static_proj_wrapper_base<srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX>, CT>
|
||||
{
|
||||
typedef srs::spar::parameters<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)
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
// 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)
|
||||
{}
|
||||
|
||||
/// 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 Parameters default dynamic tag or static projection parameters
|
||||
\tparam CT calculation type used internally
|
||||
*/
|
||||
template
|
||||
<
|
||||
typename Parameters = srs::dynamic,
|
||||
typename CT = double
|
||||
>
|
||||
class projection
|
||||
: public projections::projection<Parameters, CT>
|
||||
{
|
||||
typedef projections::projection<Parameters, CT> base_t;
|
||||
|
||||
public:
|
||||
projection()
|
||||
{}
|
||||
|
||||
projection(Parameters const& parameters)
|
||||
: base_t(parameters)
|
||||
{}
|
||||
|
||||
/*!
|
||||
\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>srs::proj4("+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.
|
||||
*/
|
||||
template <typename DynamicParameters>
|
||||
projection(DynamicParameters const& dynamic_parameters,
|
||||
typename boost::enable_if_c
|
||||
<
|
||||
projections::dynamic_parameters<DynamicParameters>::is_specialized
|
||||
>::type * = 0)
|
||||
: base_t(dynamic_parameters)
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
} // namespace srs
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_SRS_PROJECTION_HPP
|
||||
@@ -0,0 +1,57 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// 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)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_CODE_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_CODE_HPP
|
||||
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <boost/geometry/srs/projections/dpar.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
struct code_element
|
||||
{
|
||||
int code;
|
||||
srs::dpar::parameters<> parameters;
|
||||
};
|
||||
|
||||
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, comp);
|
||||
return first != last && !comp(value, *first) ? first : last;
|
||||
}
|
||||
|
||||
}
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,62 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 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)
|
||||
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_CONSTANTS_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_CONSTANTS_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
|
||||
template <typename T>
|
||||
inline T fourth_pi() { return T(0.78539816339744830961566084581988); }
|
||||
template <typename T>
|
||||
inline T third_pi() { return boost::math::constants::third_pi<T>(); }
|
||||
template <typename T>
|
||||
inline T half_pi() { return boost::math::constants::half_pi<T>(); }
|
||||
template <typename T>
|
||||
inline T pi() { return boost::math::constants::pi<T>(); }
|
||||
template <typename T>
|
||||
inline T one_and_half_pi() { return T(4.7123889803846898576939650749193); }
|
||||
template <typename T>
|
||||
inline T two_pi() { return boost::math::constants::two_pi<T>(); }
|
||||
template <typename T>
|
||||
inline T two_and_half_pi() { return T(7.8539816339744830961566084581988); }
|
||||
|
||||
template <typename T>
|
||||
inline T two_div_pi() { return boost::math::constants::two_div_pi<T>(); }
|
||||
template <typename T>
|
||||
inline T half_pi_sqr() { return T(2.4674011002723396547086227499689); }
|
||||
template <typename T>
|
||||
inline T pi_sqr() { return boost::math::constants::pi_sqr<T>(); }
|
||||
|
||||
template <typename T>
|
||||
inline T sixth() { return boost::math::constants::sixth<T>(); }
|
||||
template <typename T>
|
||||
inline T third() { return boost::math::constants::third<T>(); }
|
||||
template <typename T>
|
||||
inline T two_thirds() { return boost::math::constants::two_thirds<T>(); }
|
||||
|
||||
|
||||
} // namespace detail
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_PROJECTS_HPP
|
||||
@@ -0,0 +1,855 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// 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)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_SRS_PROJECTIONS_DPAR_HPP
|
||||
#define BOOST_GEOMETRY_SRS_PROJECTIONS_DPAR_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/core/radius.hpp>
|
||||
#include <boost/geometry/core/tag.hpp>
|
||||
#include <boost/geometry/core/tags.hpp>
|
||||
|
||||
#include <boost/geometry/srs/projections/exception.hpp>
|
||||
#include <boost/geometry/srs/projections/par_data.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/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
#include <boost/range/size.hpp>
|
||||
#include <boost/range/value_type.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/is_void.hpp>
|
||||
#include <boost/variant/variant.hpp>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace boost { namespace geometry { namespace srs
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template
|
||||
<
|
||||
typename Types,
|
||||
typename T,
|
||||
typename Iter = typename boost::mpl::begin<Types>::type,
|
||||
typename End = typename boost::mpl::end<Types>::type,
|
||||
int I = 0
|
||||
>
|
||||
struct find_type_index
|
||||
{
|
||||
typedef typename boost::mpl::deref<Iter>::type type;
|
||||
static const int value = boost::is_same<type, T>::value
|
||||
? I
|
||||
: find_type_index
|
||||
<
|
||||
Types,
|
||||
T,
|
||||
typename boost::mpl::next<Iter>::type,
|
||||
End,
|
||||
I + 1
|
||||
>::value;
|
||||
|
||||
};
|
||||
|
||||
template
|
||||
<
|
||||
typename Types,
|
||||
typename T,
|
||||
typename End,
|
||||
int I
|
||||
>
|
||||
struct find_type_index<Types, T, End, End, I>
|
||||
{
|
||||
static const int value = I;
|
||||
};
|
||||
|
||||
|
||||
template
|
||||
<
|
||||
typename Range,
|
||||
typename ToValue,
|
||||
bool IsRange = boost::has_range_iterator<Range>::value
|
||||
>
|
||||
struct is_convertible_range
|
||||
: boost::is_convertible
|
||||
<
|
||||
typename boost::range_value<Range>::type,
|
||||
ToValue
|
||||
>
|
||||
{};
|
||||
|
||||
template
|
||||
<
|
||||
typename Range,
|
||||
typename ToValue
|
||||
>
|
||||
struct is_convertible_range<Range, ToValue, false>
|
||||
: boost::false_type
|
||||
{};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
|
||||
namespace dpar
|
||||
{
|
||||
|
||||
enum value_datum
|
||||
{
|
||||
datum_wgs84 = 0,
|
||||
datum_ggrs87,
|
||||
datum_nad83,
|
||||
datum_nad27,
|
||||
datum_potsdam,
|
||||
datum_carthage,
|
||||
datum_hermannskogel,
|
||||
datum_ire65,
|
||||
datum_nzgd49,
|
||||
datum_osgb36,
|
||||
};
|
||||
|
||||
enum value_ellps
|
||||
{
|
||||
ellps_merit = 0,
|
||||
ellps_sgs85,
|
||||
ellps_grs80,
|
||||
ellps_iau76,
|
||||
ellps_airy,
|
||||
ellps_apl4_9,
|
||||
ellps_nwl9d,
|
||||
ellps_mod_airy,
|
||||
ellps_andrae,
|
||||
ellps_aust_sa,
|
||||
ellps_grs67,
|
||||
ellps_bessel,
|
||||
ellps_bess_nam,
|
||||
ellps_clrk66,
|
||||
ellps_clrk80,
|
||||
ellps_clrk80ign,
|
||||
ellps_cpm,
|
||||
ellps_delmbr,
|
||||
ellps_engelis,
|
||||
ellps_evrst30,
|
||||
ellps_evrst48,
|
||||
ellps_evrst56,
|
||||
ellps_evrst69,
|
||||
ellps_evrstss,
|
||||
ellps_fschr60,
|
||||
ellps_fschr60m,
|
||||
ellps_fschr68,
|
||||
ellps_helmert,
|
||||
ellps_hough,
|
||||
ellps_intl,
|
||||
ellps_krass,
|
||||
ellps_kaula,
|
||||
ellps_lerch,
|
||||
ellps_mprts,
|
||||
ellps_new_intl,
|
||||
ellps_plessis,
|
||||
ellps_seasia,
|
||||
ellps_walbeck,
|
||||
ellps_wgs60,
|
||||
ellps_wgs66,
|
||||
ellps_wgs72,
|
||||
ellps_wgs84,
|
||||
ellps_sphere
|
||||
};
|
||||
|
||||
enum value_mode
|
||||
{
|
||||
mode_plane = 0,
|
||||
mode_di,
|
||||
mode_dd,
|
||||
mode_hex
|
||||
};
|
||||
|
||||
enum value_orient
|
||||
{
|
||||
orient_isea = 0,
|
||||
orient_pole,
|
||||
};
|
||||
|
||||
enum value_pm
|
||||
{
|
||||
pm_greenwich = 0,
|
||||
pm_lisbon,
|
||||
pm_paris,
|
||||
pm_bogota,
|
||||
pm_madrid,
|
||||
pm_rome,
|
||||
pm_bern,
|
||||
pm_jakarta,
|
||||
pm_ferro,
|
||||
pm_brussels,
|
||||
pm_stockholm,
|
||||
pm_athens,
|
||||
pm_oslo
|
||||
};
|
||||
|
||||
enum value_proj
|
||||
{
|
||||
proj_unknown = 0,
|
||||
proj_aea, proj_leac,
|
||||
proj_aeqd,
|
||||
proj_airy,
|
||||
proj_aitoff, proj_wintri,
|
||||
proj_august,
|
||||
proj_apian, proj_ortel, proj_bacon,
|
||||
proj_bipc,
|
||||
proj_boggs,
|
||||
proj_bonne,
|
||||
proj_cass,
|
||||
proj_cc,
|
||||
proj_cea,
|
||||
proj_chamb,
|
||||
proj_collg,
|
||||
proj_crast,
|
||||
proj_denoy,
|
||||
proj_eck1,
|
||||
proj_eck2,
|
||||
proj_eck3, proj_putp1, proj_wag6, proj_kav7,
|
||||
proj_eck4,
|
||||
proj_eck5,
|
||||
proj_eqc,
|
||||
proj_eqdc,
|
||||
proj_etmerc, proj_utm,
|
||||
proj_fahey,
|
||||
proj_fouc_s,
|
||||
proj_gall,
|
||||
proj_geocent,
|
||||
proj_geos,
|
||||
proj_gins8,
|
||||
proj_gn_sinu, proj_sinu, proj_eck6, proj_mbtfps,
|
||||
proj_gnom,
|
||||
proj_goode,
|
||||
proj_gstmerc,
|
||||
proj_hammer,
|
||||
proj_hatano,
|
||||
proj_healpix,
|
||||
proj_rhealpix,
|
||||
proj_igh,
|
||||
proj_imw_p,
|
||||
proj_isea,
|
||||
proj_krovak,
|
||||
proj_labrd,
|
||||
proj_laea,
|
||||
proj_lagrng,
|
||||
proj_larr,
|
||||
proj_lask,
|
||||
proj_lonlat, proj_latlon, proj_latlong, proj_longlat,
|
||||
proj_lcc,
|
||||
proj_lcca,
|
||||
proj_loxim,
|
||||
proj_lsat,
|
||||
proj_mbt_fps,
|
||||
proj_mbtfpp,
|
||||
proj_mbtfpq,
|
||||
proj_merc,
|
||||
proj_mill,
|
||||
proj_mil_os, proj_lee_os, proj_gs48, proj_alsk, proj_gs50,
|
||||
proj_moll, proj_wag4, proj_wag5,
|
||||
proj_natearth,
|
||||
proj_nell,
|
||||
proj_nell_h,
|
||||
proj_nicol,
|
||||
proj_nsper, proj_tpers,
|
||||
proj_nzmg,
|
||||
proj_ob_tran,
|
||||
proj_ocea,
|
||||
proj_oea,
|
||||
proj_omerc,
|
||||
proj_ortho,
|
||||
proj_poly,
|
||||
proj_putp2,
|
||||
proj_putp3, proj_putp3p,
|
||||
proj_putp4p, proj_weren,
|
||||
proj_putp5, proj_putp5p,
|
||||
proj_putp6, proj_putp6p,
|
||||
proj_qsc,
|
||||
proj_robin,
|
||||
proj_rouss,
|
||||
proj_rpoly,
|
||||
proj_euler, proj_murd1, proj_murd2, proj_murd3, proj_pconic, proj_tissot, proj_vitk1,
|
||||
proj_somerc,
|
||||
proj_stere, proj_ups,
|
||||
proj_sterea,
|
||||
proj_kav5, proj_qua_aut, proj_fouc, proj_mbt_s,
|
||||
proj_tcc,
|
||||
proj_tcea,
|
||||
proj_tmerc,
|
||||
proj_tpeqd,
|
||||
proj_urm5,
|
||||
proj_urmfps, proj_wag1,
|
||||
proj_vandg,
|
||||
proj_vandg2, proj_vandg3,
|
||||
proj_vandg4,
|
||||
proj_wag2,
|
||||
proj_wag3,
|
||||
proj_wag7,
|
||||
proj_wink1,
|
||||
proj_wink2
|
||||
};
|
||||
|
||||
enum value_sweep
|
||||
{
|
||||
sweep_x = 0, sweep_y
|
||||
};
|
||||
|
||||
enum value_units
|
||||
{
|
||||
units_km = 0,
|
||||
units_m,
|
||||
units_dm,
|
||||
units_cm,
|
||||
units_mm,
|
||||
units_kmi,
|
||||
units_in,
|
||||
units_ft,
|
||||
units_yd,
|
||||
units_mi,
|
||||
units_fath,
|
||||
units_ch,
|
||||
units_link,
|
||||
units_us_in,
|
||||
units_us_ft,
|
||||
units_us_yd,
|
||||
units_us_ch,
|
||||
units_us_mi,
|
||||
units_ind_yd,
|
||||
units_ind_ft,
|
||||
units_ind_ch
|
||||
};
|
||||
|
||||
enum name_f
|
||||
{
|
||||
a = 0,
|
||||
b,
|
||||
e,
|
||||
es,
|
||||
f,
|
||||
h,
|
||||
//h_0, // currently not used
|
||||
k = 7,
|
||||
k_0,
|
||||
m, // also used for M
|
||||
n,
|
||||
//phdg_0, // currently not used
|
||||
//plat_0, // currently not used
|
||||
//plon_0, // currently not used
|
||||
q = 14,
|
||||
r, // originally R
|
||||
rf,
|
||||
to_meter,
|
||||
vto_meter,
|
||||
w, // originally W
|
||||
x_0,
|
||||
y_0
|
||||
};
|
||||
|
||||
enum name_r
|
||||
{
|
||||
alpha = 22,
|
||||
azi,
|
||||
gamma,
|
||||
lat_0,
|
||||
lat_1,
|
||||
lat_2,
|
||||
lat_3,
|
||||
lat_b,
|
||||
lat_ts, // 30
|
||||
lon_0,
|
||||
lon_1,
|
||||
lon_2,
|
||||
lon_3,
|
||||
lon_wrap,
|
||||
lonc,
|
||||
o_alpha,
|
||||
o_lat_1,
|
||||
o_lat_2,
|
||||
o_lat_c, // 40
|
||||
o_lat_p,
|
||||
o_lon_1,
|
||||
o_lon_2,
|
||||
o_lon_c,
|
||||
o_lon_p,
|
||||
r_lat_a, // originally R_lat_a
|
||||
r_lat_g, // originally R_lat_g
|
||||
theta,
|
||||
tilt
|
||||
};
|
||||
|
||||
enum name_i
|
||||
{
|
||||
aperture = 50,
|
||||
lsat,
|
||||
north_square,
|
||||
path,
|
||||
resolution,
|
||||
south_square,
|
||||
zone
|
||||
};
|
||||
|
||||
enum name_be
|
||||
{
|
||||
czech = 57,
|
||||
geoc,
|
||||
guam,
|
||||
no_cut, // 60
|
||||
no_defs,
|
||||
no_rot,
|
||||
ns,
|
||||
over,
|
||||
r_au, // originally R_A
|
||||
r_a, // originally R_a
|
||||
r_g, // originally R_g
|
||||
r_h, // originally R_h
|
||||
r_v, // originally R_V
|
||||
rescale, // 70
|
||||
south
|
||||
};
|
||||
|
||||
/*enum name_catalog
|
||||
{
|
||||
catalog = 72 // currently not used
|
||||
};
|
||||
|
||||
enum name_date
|
||||
{
|
||||
date = 73 // currently not used
|
||||
};*/
|
||||
|
||||
enum name_datum
|
||||
{
|
||||
datum = 74
|
||||
};
|
||||
|
||||
enum name_ellps
|
||||
{
|
||||
ellps = 75 // id, sphere or spheroid
|
||||
};
|
||||
|
||||
/*enum name_geoidgrids
|
||||
{
|
||||
geoidgrids = 76 // currently not used
|
||||
};*/
|
||||
|
||||
enum name_mode
|
||||
{
|
||||
mode = 77
|
||||
};
|
||||
|
||||
enum name_nadgrids
|
||||
{
|
||||
nadgrids = 78 // arbitrary-length list of strings
|
||||
};
|
||||
|
||||
enum name_orient
|
||||
{
|
||||
orient = 79
|
||||
};
|
||||
|
||||
enum name_pm
|
||||
{
|
||||
pm = 80 // id or angle
|
||||
};
|
||||
|
||||
enum name_proj
|
||||
{
|
||||
o_proj = 81,
|
||||
proj
|
||||
};
|
||||
|
||||
enum name_sweep
|
||||
{
|
||||
sweep = 83
|
||||
};
|
||||
|
||||
enum name_towgs84
|
||||
{
|
||||
towgs84 = 84 // 3 or 7 element list of numbers
|
||||
};
|
||||
|
||||
enum name_units
|
||||
{
|
||||
units = 85,
|
||||
vunits
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct parameter
|
||||
{
|
||||
parameter()
|
||||
: m_id(-1), m_value(false)
|
||||
{}
|
||||
|
||||
parameter(name_f id, T const& v)
|
||||
: m_id(id), m_value(v)
|
||||
{}
|
||||
|
||||
// TODO various angle units
|
||||
parameter(name_r id, T const& v)
|
||||
: m_id(id), m_value(v)
|
||||
{}
|
||||
|
||||
parameter(name_i id, int v)
|
||||
: m_id(id), m_value(v)
|
||||
{}
|
||||
|
||||
parameter(name_be id)
|
||||
: m_id(id), m_value(true)
|
||||
{}
|
||||
|
||||
parameter(name_be id, bool v)
|
||||
: m_id(id), m_value(v)
|
||||
{}
|
||||
|
||||
parameter(name_datum id, value_datum v)
|
||||
: m_id(id), m_value(int(v))
|
||||
{}
|
||||
|
||||
parameter(value_datum v)
|
||||
: m_id(datum), m_value(int(v))
|
||||
{}
|
||||
|
||||
// TODO: store model at this point?
|
||||
parameter(name_ellps id, value_ellps v)
|
||||
: m_id(id), m_value(int(v))
|
||||
{}
|
||||
// TODO: store model at this point?
|
||||
parameter(value_ellps v)
|
||||
: m_id(ellps), m_value(int(v))
|
||||
{}
|
||||
|
||||
template <typename Sphere>
|
||||
parameter(name_ellps id, Sphere const& v,
|
||||
typename boost::enable_if_c
|
||||
<
|
||||
boost::is_same<typename geometry::tag<Sphere>::type, srs_sphere_tag>::value
|
||||
>::type * = 0)
|
||||
: m_id(id)
|
||||
, m_value(T(get_radius<0>(v)))
|
||||
{}
|
||||
|
||||
template <typename Spheroid>
|
||||
parameter(name_ellps id, Spheroid const& v,
|
||||
typename boost::enable_if_c
|
||||
<
|
||||
boost::is_same<typename geometry::tag<Spheroid>::type, srs_spheroid_tag>::value
|
||||
>::type * = 0)
|
||||
: m_id(id)
|
||||
, m_value(srs::spheroid<T>(get_radius<0>(v), get_radius<2>(v)))
|
||||
{}
|
||||
|
||||
parameter(name_mode id, value_mode v)
|
||||
: m_id(id), m_value(int(v))
|
||||
{}
|
||||
|
||||
parameter(value_mode v)
|
||||
: m_id(mode), m_value(int(v))
|
||||
{}
|
||||
|
||||
template <typename Range>
|
||||
parameter(name_nadgrids id, Range const& v,
|
||||
typename boost::enable_if_c
|
||||
<
|
||||
detail::is_convertible_range<Range const, std::string>::value
|
||||
>::type * = 0)
|
||||
: m_id(id)
|
||||
, m_value(srs::detail::nadgrids(boost::begin(v), boost::end(v)))
|
||||
{}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
parameter(name_nadgrids id, std::initializer_list<std::string> v)
|
||||
: m_id(id)
|
||||
, m_value(srs::detail::nadgrids(v))
|
||||
{}
|
||||
#endif
|
||||
|
||||
parameter(name_orient id, value_orient v)
|
||||
: m_id(id), m_value(int(v))
|
||||
{}
|
||||
|
||||
parameter(value_orient v)
|
||||
: m_id(orient), m_value(int(v))
|
||||
{}
|
||||
|
||||
// TODO: store to_meters at this point?
|
||||
parameter(name_pm id, value_pm v)
|
||||
: m_id(id), m_value(int(v))
|
||||
{}
|
||||
// TODO: store to_meters at this point?
|
||||
parameter(value_pm v)
|
||||
: m_id(pm), m_value(int(v))
|
||||
{}
|
||||
|
||||
// TODO angle units
|
||||
parameter(name_pm id, T const& v)
|
||||
: m_id(id), m_value(v)
|
||||
{}
|
||||
|
||||
parameter(name_proj id, value_proj v)
|
||||
: m_id(id), m_value(int(v))
|
||||
{}
|
||||
|
||||
parameter(value_proj v)
|
||||
: m_id(proj), m_value(int(v))
|
||||
{}
|
||||
|
||||
parameter(name_sweep id, value_sweep v)
|
||||
: m_id(id), m_value(int(v))
|
||||
{}
|
||||
|
||||
parameter(value_sweep v)
|
||||
: m_id(sweep), m_value(int(v))
|
||||
{}
|
||||
|
||||
template <typename Range>
|
||||
parameter(name_towgs84 id, Range const& v,
|
||||
typename boost::enable_if_c
|
||||
<
|
||||
detail::is_convertible_range<Range const, T>::value
|
||||
>::type * = 0)
|
||||
: m_id(id)
|
||||
, m_value(srs::detail::towgs84<T>(boost::begin(v), boost::end(v)))
|
||||
{
|
||||
std::size_t n = boost::size(v);
|
||||
if (n != 3 && n != 7)
|
||||
{
|
||||
BOOST_THROW_EXCEPTION( projection_exception("Invalid number of towgs84 elements. Should be 3 or 7.") );
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
parameter(name_towgs84 id, std::initializer_list<T> v)
|
||||
: m_id(id)
|
||||
, m_value(srs::detail::towgs84<T>(v))
|
||||
{
|
||||
std::size_t n = v.size();
|
||||
if (n != 3 && n != 7)
|
||||
{
|
||||
BOOST_THROW_EXCEPTION( projection_exception("Invalid number of towgs84 elements. Should be 3 or 7.") );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
parameter(name_units id, value_units v)
|
||||
: m_id(id), m_value(int(v))
|
||||
{}
|
||||
|
||||
parameter(value_units v)
|
||||
: m_id(units), m_value(int(v))
|
||||
{}
|
||||
|
||||
private:
|
||||
typedef boost::variant
|
||||
<
|
||||
bool,
|
||||
int,
|
||||
T,
|
||||
srs::spheroid<T>,
|
||||
srs::detail::nadgrids,
|
||||
srs::detail::towgs84<T>
|
||||
> variant_type;
|
||||
|
||||
public:
|
||||
bool is_id_equal(name_f const& id) const { return m_id == int(id); }
|
||||
bool is_id_equal(name_r const& id) const { return m_id == int(id); }
|
||||
bool is_id_equal(name_i const& id) const { return m_id == int(id); }
|
||||
bool is_id_equal(name_be const& id) const { return m_id == int(id); }
|
||||
bool is_id_equal(name_datum const& id) const { return m_id == int(id); }
|
||||
bool is_id_equal(name_ellps const& id) const { return m_id == int(id); }
|
||||
bool is_id_equal(name_mode const& id) const { return m_id == int(id); }
|
||||
bool is_id_equal(name_nadgrids const& id) const { return m_id == int(id); }
|
||||
bool is_id_equal(name_orient const& id) const { return m_id == int(id); }
|
||||
bool is_id_equal(name_pm const& id) const { return m_id == int(id); }
|
||||
bool is_id_equal(name_proj const& id) const { return m_id == int(id); }
|
||||
bool is_id_equal(name_sweep const& id) const { return m_id == int(id); }
|
||||
bool is_id_equal(name_towgs84 const& id) const { return m_id == int(id); }
|
||||
bool is_id_equal(name_units const& id) const { return m_id == int(id); }
|
||||
|
||||
template <typename V>
|
||||
V const& get_value() const
|
||||
{
|
||||
return boost::get<V>(m_value);
|
||||
}
|
||||
|
||||
template <typename V>
|
||||
bool is_value_set() const
|
||||
{
|
||||
return m_value.which() == srs::detail::find_type_index
|
||||
<
|
||||
typename variant_type::types,
|
||||
V
|
||||
>::value;
|
||||
}
|
||||
|
||||
private:
|
||||
int m_id;
|
||||
variant_type m_value;
|
||||
};
|
||||
|
||||
template <typename T = double>
|
||||
class parameters
|
||||
{
|
||||
typedef std::vector<parameter<T> > container_type;
|
||||
|
||||
public:
|
||||
typedef typename container_type::value_type value_type;
|
||||
typedef typename container_type::const_iterator const_iterator;
|
||||
typedef typename container_type::const_reference const_reference;
|
||||
typedef typename container_type::size_type size_type;
|
||||
|
||||
BOOST_DEFAULTED_FUNCTION(parameters(), {})
|
||||
|
||||
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
template <typename Id>
|
||||
explicit parameters(Id id)
|
||||
{
|
||||
add(id);
|
||||
}
|
||||
|
||||
template <typename Id>
|
||||
parameters & add(Id id)
|
||||
{
|
||||
m_params.push_back(parameter<T>(id));
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename Id>
|
||||
parameters & operator()(Id id)
|
||||
{
|
||||
return add(id);
|
||||
}
|
||||
|
||||
template <typename Id, typename V>
|
||||
parameters(Id id, V const& value)
|
||||
{
|
||||
add(id, value);
|
||||
}
|
||||
|
||||
template <typename Id, typename V>
|
||||
parameters & add(Id id, V const& value)
|
||||
{
|
||||
m_params.push_back(parameter<T>(id, value));
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename Id, typename V>
|
||||
parameters & operator()(Id id, V const& value)
|
||||
{
|
||||
return add(id, value);
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
template <typename Id, typename V>
|
||||
parameters(Id id, std::initializer_list<V> value)
|
||||
{
|
||||
add(id, value);
|
||||
}
|
||||
|
||||
template <typename Id, typename V>
|
||||
parameters & add(Id id, std::initializer_list<V> value)
|
||||
{
|
||||
m_params.push_back(parameter<T>(id, value));
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename Id, typename V>
|
||||
parameters & operator()(Id id, std::initializer_list<V> value)
|
||||
{
|
||||
return add(id, value);
|
||||
}
|
||||
#endif // BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#else // BOOST_NO_CXX11_RVALUE_REFERENCES || BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template <typename Id>
|
||||
explicit parameters(Id id)
|
||||
{
|
||||
add(id);
|
||||
}
|
||||
|
||||
template <typename Id>
|
||||
parameters & add(Id id)
|
||||
{
|
||||
m_params.emplace_back(id);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename Id>
|
||||
parameters & operator()(Id id)
|
||||
{
|
||||
return add(id);
|
||||
}
|
||||
|
||||
template <typename Id, typename V>
|
||||
parameters(Id id, V && value)
|
||||
{
|
||||
add(id, std::forward<V>(value));
|
||||
}
|
||||
|
||||
template <typename Id, typename V>
|
||||
parameters & add(Id id, V && value)
|
||||
{
|
||||
m_params.emplace_back(id, std::forward<V>(value));
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename Id, typename V>
|
||||
parameters & operator()(Id id, V && value)
|
||||
{
|
||||
return add(id, std::forward<V>(value));
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
template <typename Id, typename V>
|
||||
parameters(Id id, std::initializer_list<V> value)
|
||||
{
|
||||
add(id, value);
|
||||
}
|
||||
|
||||
template <typename Id, typename V>
|
||||
parameters & add(Id id, std::initializer_list<V> value)
|
||||
{
|
||||
m_params.emplace_back(id, value);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename Id, typename V>
|
||||
parameters & operator()(Id id, std::initializer_list<V> value)
|
||||
{
|
||||
return add(id, value);
|
||||
}
|
||||
#endif // BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#endif // BOOST_NO_CXX11_RVALUE_REFERENCES || BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
const_iterator begin() const { return m_params.begin(); }
|
||||
const_iterator end() const { return m_params.end(); }
|
||||
const_reference operator[](size_type i) const { return m_params[i]; }
|
||||
size_type size() { return m_params.size(); }
|
||||
bool empty() { return m_params.empty(); }
|
||||
|
||||
private:
|
||||
container_type m_params;
|
||||
};
|
||||
|
||||
|
||||
} // namespace dpar
|
||||
|
||||
|
||||
}}} // namespace boost::geometry::srs
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_SRS_PROJECTIONS_DPAR_HPP
|
||||
File diff suppressed because it is too large.
Load diff
@@ -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
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,493 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// 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)
|
||||
|
||||
|
||||
#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 srs::dpar::parameters<> esri_to_parameters(int code)
|
||||
{
|
||||
using namespace srs::dpar;
|
||||
|
||||
static const code_element arr[] = {
|
||||
{37001, srs::dpar::parameters<>(proj_longlat)(ellps_wgs66)(no_defs)},
|
||||
{37002, srs::dpar::parameters<>(proj_longlat)(a,6378166)(b,6356784.283607107)(no_defs)},
|
||||
{37003, srs::dpar::parameters<>(proj_longlat)(a,6378150)(b,6356768.337244385)(no_defs)},
|
||||
{37004, srs::dpar::parameters<>(proj_longlat)(ellps_fschr60m)(no_defs)},
|
||||
{37005, srs::dpar::parameters<>(proj_longlat)(a,6378270)(b,6356794.343434343)(no_defs)},
|
||||
{37006, srs::dpar::parameters<>(proj_longlat)(a,6377295.664)(b,6356094.667915204)(no_defs)},
|
||||
{37007, srs::dpar::parameters<>(proj_longlat)(a,6376896)(b,6355834.846687363)(no_defs)},
|
||||
{37008, srs::dpar::parameters<>(proj_longlat)(r,6370997)(no_defs)},
|
||||
{37201, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37202, srs::dpar::parameters<>(proj_longlat)(a,6377276.345)(b,6356075.41314024)(no_defs)},
|
||||
{37203, srs::dpar::parameters<>(proj_longlat)(a,6377301.243)(b,6356100.230165384)(no_defs)},
|
||||
{37204, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37205, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37206, srs::dpar::parameters<>(proj_longlat)(ellps_clrk80)(no_defs)},
|
||||
{37207, srs::dpar::parameters<>(proj_longlat)(ellps_fschr60m)(no_defs)},
|
||||
{37208, srs::dpar::parameters<>(proj_longlat)(ellps_clrk80)(no_defs)},
|
||||
{37211, srs::dpar::parameters<>(proj_longlat)(ellps_clrk80)(no_defs)},
|
||||
{37212, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37213, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37214, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37215, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37216, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37217, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37218, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37219, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37220, srs::dpar::parameters<>(proj_longlat)(ellps_clrk66)(no_defs)},
|
||||
{37221, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37222, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37223, srs::dpar::parameters<>(proj_longlat)(a,6378249.2)(b,6356514.999904194)(no_defs)},
|
||||
{37224, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37226, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37227, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37228, srs::dpar::parameters<>(proj_longlat)(ellps_clrk80)(no_defs)},
|
||||
{37229, srs::dpar::parameters<>(proj_longlat)(a,6378270)(b,6356794.343434343)(no_defs)},
|
||||
{37230, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37231, srs::dpar::parameters<>(proj_longlat)(ellps_aust_sa)(no_defs)},
|
||||
{37232, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37233, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37234, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37235, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37237, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37238, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37239, srs::dpar::parameters<>(proj_longlat)(ellps_clrk66)(no_defs)},
|
||||
{37240, srs::dpar::parameters<>(proj_longlat)(ellps_clrk80)(no_defs)},
|
||||
{37241, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37242, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37243, srs::dpar::parameters<>(proj_longlat)(ellps_clrk66)(no_defs)},
|
||||
{37245, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37246, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37247, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37249, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37250, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37251, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37252, srs::dpar::parameters<>(proj_longlat)(ellps_clrk66)(no_defs)},
|
||||
{37253, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37254, srs::dpar::parameters<>(proj_longlat)(ellps_clrk80)(no_defs)},
|
||||
{37255, srs::dpar::parameters<>(proj_longlat)(ellps_bessel)(no_defs)},
|
||||
{37257, srs::dpar::parameters<>(proj_longlat)(ellps_krass)(no_defs)},
|
||||
{37259, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{37260, srs::dpar::parameters<>(proj_longlat)(ellps_clrk66)(no_defs)},
|
||||
//{53001},
|
||||
{53002, srs::dpar::parameters<>(proj_eqc)(lat_ts,60)(lat_0,0)(lon_0,0)(x_0,0)(y_0,0)(r,6371000)(units_m)(no_defs)},
|
||||
{53003, srs::dpar::parameters<>(proj_mill)(lat_0,0)(lon_0,0)(x_0,0)(y_0,0)(r_au)(r,6371000)(units_m)(no_defs)},
|
||||
{53004, srs::dpar::parameters<>(proj_merc)(lon_0,0)(k,1)(x_0,0)(y_0,0)(r,6371000)(units_m)(no_defs)},
|
||||
{53008, srs::dpar::parameters<>(proj_sinu)(lon_0,0)(x_0,0)(y_0,0)(r,6371000)(units_m)(no_defs)},
|
||||
{53009, srs::dpar::parameters<>(proj_moll)(lon_0,0)(x_0,0)(y_0,0)(r,6371000)(units_m)(no_defs)},
|
||||
{53010, srs::dpar::parameters<>(proj_eck6)(lon_0,0)(x_0,0)(y_0,0)(r,6371000)(units_m)(no_defs)},
|
||||
//{53011},
|
||||
{53012, srs::dpar::parameters<>(proj_eck4)(lon_0,0)(x_0,0)(y_0,0)(r,6371000)(units_m)(no_defs)},
|
||||
//{53013},
|
||||
//{53014},
|
||||
//{53015},
|
||||
{53016, srs::dpar::parameters<>(proj_gall)(lon_0,0)(x_0,0)(y_0,0)(r,6371000)(units_m)(no_defs)},
|
||||
//{53017},
|
||||
//{53018},
|
||||
//{53019},
|
||||
{53021, srs::dpar::parameters<>(proj_poly)(lat_0,0)(lon_0,0)(x_0,0)(y_0,0)(r,6371000)(units_m)(no_defs)},
|
||||
//{53022},
|
||||
//{53023},
|
||||
{53024, srs::dpar::parameters<>(proj_bonne)(lon_0,0)(lat_1,60)(x_0,0)(y_0,0)(r,6371000)(units_m)(no_defs)},
|
||||
{53025, srs::dpar::parameters<>(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)(r,6371000)(units_m)(no_defs)},
|
||||
{53026, srs::dpar::parameters<>(proj_stere)(lat_0,0)(lon_0,0)(k,1)(x_0,0)(y_0,0)(r,6371000)(units_m)(no_defs)},
|
||||
{53027, srs::dpar::parameters<>(proj_eqdc)(lat_0,0)(lon_0,0)(lat_1,60)(lat_2,60)(x_0,0)(y_0,0)(r,6371000)(units_m)(no_defs)},
|
||||
{53028, srs::dpar::parameters<>(proj_cass)(lat_0,0)(lon_0,0)(x_0,0)(y_0,0)(r,6371000)(units_m)(no_defs)},
|
||||
{53029, srs::dpar::parameters<>(proj_vandg)(lon_0,0)(x_0,0)(y_0,0)(r_au)(r,6371000)(units_m)(no_defs)},
|
||||
{53030, srs::dpar::parameters<>(proj_robin)(lon_0,0)(x_0,0)(y_0,0)(r,6371000)(units_m)(no_defs)},
|
||||
{53031, srs::dpar::parameters<>(proj_tpeqd)(lat_1,0)(lon_1,0)(lat_2,60)(lon_2,60)(x_0,0)(y_0,0)(r,6371000)(units_m)(no_defs)},
|
||||
{53032, srs::dpar::parameters<>(proj_aeqd)(lat_0,0)(lon_0,0)(x_0,0)(y_0,0)(r,6371000)(units_m)(no_defs)},
|
||||
//{54001},
|
||||
{54002, srs::dpar::parameters<>(proj_eqc)(lat_ts,60)(lat_0,0)(lon_0,0)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{54003, srs::dpar::parameters<>(proj_mill)(lat_0,0)(lon_0,0)(x_0,0)(y_0,0)(r_au)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{54004, srs::dpar::parameters<>(proj_merc)(lon_0,0)(k,1)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{54008, srs::dpar::parameters<>(proj_sinu)(lon_0,0)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{54009, srs::dpar::parameters<>(proj_moll)(lon_0,0)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{54010, srs::dpar::parameters<>(proj_eck6)(lon_0,0)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
//{54011},
|
||||
{54012, srs::dpar::parameters<>(proj_eck4)(lon_0,0)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
//{54013},
|
||||
//{54014},
|
||||
//{54015},
|
||||
{54016, srs::dpar::parameters<>(proj_gall)(lon_0,0)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
//{54017},
|
||||
//{54018},
|
||||
//{54019},
|
||||
{54021, srs::dpar::parameters<>(proj_poly)(lat_0,0)(lon_0,0)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
//{54022},
|
||||
//{54023},
|
||||
{54024, srs::dpar::parameters<>(proj_bonne)(lon_0,0)(lat_1,60)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{54025, srs::dpar::parameters<>(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)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{54026, srs::dpar::parameters<>(proj_stere)(lat_0,0)(lon_0,0)(k,1)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{54027, srs::dpar::parameters<>(proj_eqdc)(lat_0,0)(lon_0,0)(lat_1,60)(lat_2,60)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{54028, srs::dpar::parameters<>(proj_cass)(lat_0,0)(lon_0,0)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{54029, srs::dpar::parameters<>(proj_vandg)(lon_0,0)(x_0,0)(y_0,0)(r_au)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{54030, srs::dpar::parameters<>(proj_robin)(lon_0,0)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{54031, srs::dpar::parameters<>(proj_tpeqd)(lat_1,0)(lon_1,0)(lat_2,60)(lon_2,60)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{54032, srs::dpar::parameters<>(proj_aeqd)(lat_0,0)(lon_0,0)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{65061, srs::dpar::parameters<>(proj_poly)(lat_0,13.47246635277778)(lon_0,-144.7487507055556)(x_0,50000.00000000001)(y_0,50000.00000000001)(ellps_clrk66)(srs::dpar::datum_nad27)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{65161, srs::dpar::parameters<>(proj_poly)(lat_0,13.47246635277778)(lon_0,-144.7487507055556)(x_0,50000)(y_0,50000)(ellps_grs80)(srs::dpar::datum_nad83)(units_m)(no_defs)},
|
||||
{102001, srs::dpar::parameters<>(proj_aea)(lat_1,50)(lat_2,70)(lat_0,40)(lon_0,-96)(x_0,0)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(units_m)(no_defs)},
|
||||
{102002, srs::dpar::parameters<>(proj_lcc)(lat_1,50)(lat_2,70)(lat_0,40)(lon_0,-96)(x_0,0)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(units_m)(no_defs)},
|
||||
{102003, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(units_m)(no_defs)},
|
||||
{102004, srs::dpar::parameters<>(proj_lcc)(lat_1,33)(lat_2,45)(lat_0,39)(lon_0,-96)(x_0,0)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(units_m)(no_defs)},
|
||||
{102005, srs::dpar::parameters<>(proj_eqdc)(lat_0,0)(lon_0,0)(lat_1,33)(lat_2,45)(x_0,0)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(units_m)(no_defs)},
|
||||
{102006, srs::dpar::parameters<>(proj_aea)(lat_1,55)(lat_2,65)(lat_0,50)(lon_0,-154)(x_0,0)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(units_m)(no_defs)},
|
||||
{102007, srs::dpar::parameters<>(proj_aea)(lat_1,8)(lat_2,18)(lat_0,13)(lon_0,-157)(x_0,0)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(units_m)(no_defs)},
|
||||
{102008, srs::dpar::parameters<>(proj_aea)(lat_1,20)(lat_2,60)(lat_0,40)(lon_0,-96)(x_0,0)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(units_m)(no_defs)},
|
||||
{102009, srs::dpar::parameters<>(proj_lcc)(lat_1,20)(lat_2,60)(lat_0,40)(lon_0,-96)(x_0,0)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(units_m)(no_defs)},
|
||||
{102010, srs::dpar::parameters<>(proj_eqdc)(lat_0,0)(lon_0,0)(lat_1,20)(lat_2,60)(x_0,0)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(units_m)(no_defs)},
|
||||
{102011, srs::dpar::parameters<>(proj_sinu)(lon_0,0)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{102012, srs::dpar::parameters<>(proj_lcc)(lat_1,30)(lat_2,62)(lat_0,0)(lon_0,105)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{102013, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(proj_aeqd)(lat_0,90)(lon_0,0)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{102017, srs::dpar::parameters<>(proj_laea)(lat_0,90)(lon_0,0)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{102018, srs::dpar::parameters<>(proj_stere)(lat_0,90)(lon_0,0)(k,1)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{102019, srs::dpar::parameters<>(proj_aeqd)(lat_0,-90)(lon_0,0)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{102020, srs::dpar::parameters<>(proj_laea)(lat_0,-90)(lon_0,0)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{102021, srs::dpar::parameters<>(proj_stere)(lat_0,-90)(lon_0,0)(k,1)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{102022, srs::dpar::parameters<>(proj_aea)(lat_1,20)(lat_2,-23)(lat_0,0)(lon_0,25)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{102023, srs::dpar::parameters<>(proj_eqdc)(lat_0,0)(lon_0,0)(lat_1,20)(lat_2,-23)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{102024, srs::dpar::parameters<>(proj_lcc)(lat_1,20)(lat_2,-23)(lat_0,0)(lon_0,25)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{102025, srs::dpar::parameters<>(proj_aea)(lat_1,15)(lat_2,65)(lat_0,30)(lon_0,95)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{102026, srs::dpar::parameters<>(proj_eqdc)(lat_0,0)(lon_0,0)(lat_1,15)(lat_2,65)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{102027, srs::dpar::parameters<>(proj_lcc)(lat_1,15)(lat_2,65)(lat_0,30)(lon_0,95)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{102028, srs::dpar::parameters<>(proj_aea)(lat_1,7)(lat_2,-32)(lat_0,-15)(lon_0,125)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{102029, srs::dpar::parameters<>(proj_eqdc)(lat_0,0)(lon_0,0)(lat_1,7)(lat_2,-32)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{102030, srs::dpar::parameters<>(proj_lcc)(lat_1,7)(lat_2,-32)(lat_0,-15)(lon_0,125)(x_0,0)(y_0,0)(ellps_wgs84)(srs::dpar::datum_wgs84)(units_m)(no_defs)},
|
||||
{102031, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(proj_tmerc)(lat_0,0)(lon_0,9)(k,0.9996)(x_0,1500000)(y_0,0)(ellps_intl)(units_m)(no_defs)},
|
||||
{102092, srs::dpar::parameters<>(proj_tmerc)(lat_0,0)(lon_0,15)(k,0.9996)(x_0,2520000)(y_0,0)(ellps_intl)(units_m)(no_defs)},
|
||||
{102101, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(proj_utm)(zone,4)(ellps_clrk66)(units_m)(no_defs)},
|
||||
{102115, srs::dpar::parameters<>(proj_utm)(zone,5)(ellps_clrk66)(units_m)(no_defs)},
|
||||
{102120, srs::dpar::parameters<>(proj_omerc)(lat_0,45.30916666666666)(lonc,-86)(alpha,337.255555555556)(k,0.9996)(x_0,2546731.495961392)(y_0,-4354009.816002033)(ellps_clrk66)(srs::dpar::datum_nad27)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102121, srs::dpar::parameters<>(proj_omerc)(lat_0,45.30916666666666)(lonc,-86)(alpha,337.255555555556)(k,0.9996)(x_0,2546731.495961392)(y_0,-4354009.816002033)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102122, srs::dpar::parameters<>(proj_omerc)(lat_0,45.30916666666666)(lonc,-86)(alpha,337.255555555556)(k,0.9996)(x_0,2546731.496)(y_0,-4354009.816)(ellps_clrk66)(srs::dpar::datum_nad27)(units_m)(no_defs)},
|
||||
{102123, srs::dpar::parameters<>(proj_omerc)(lat_0,45.30916666666666)(lonc,-86)(alpha,337.255555555556)(k,0.9996)(x_0,2546731.496)(y_0,-4354009.816)(ellps_grs80)(srs::dpar::datum_nad83)(units_m)(no_defs)},
|
||||
{102132, srs::dpar::parameters<>(proj_utm)(zone,32)(a,6377492.018)(b,6356173.508712696)(units_m)(no_defs)},
|
||||
{102133, srs::dpar::parameters<>(proj_utm)(zone,33)(a,6377492.018)(b,6356173.508712696)(units_m)(no_defs)},
|
||||
{102134, srs::dpar::parameters<>(proj_utm)(zone,34)(a,6377492.018)(b,6356173.508712696)(units_m)(no_defs)},
|
||||
{102135, srs::dpar::parameters<>(proj_utm)(zone,35)(a,6377492.018)(b,6356173.508712696)(units_m)(no_defs)},
|
||||
{102140, srs::dpar::parameters<>(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, srs::dpar::parameters<>(proj_utm)(zone,49)(ellps_intl)(units_m)(no_defs)},
|
||||
{102142, srs::dpar::parameters<>(proj_utm)(zone,50)(ellps_intl)(units_m)(no_defs)},
|
||||
{102151, srs::dpar::parameters<>(proj_utm)(zone,51)(ellps_bessel)(units_m)(no_defs)},
|
||||
{102152, srs::dpar::parameters<>(proj_utm)(zone,52)(ellps_bessel)(units_m)(no_defs)},
|
||||
{102153, srs::dpar::parameters<>(proj_utm)(zone,53)(ellps_bessel)(units_m)(no_defs)},
|
||||
{102154, srs::dpar::parameters<>(proj_utm)(zone,54)(ellps_bessel)(units_m)(no_defs)},
|
||||
{102155, srs::dpar::parameters<>(proj_utm)(zone,55)(ellps_bessel)(units_m)(no_defs)},
|
||||
{102156, srs::dpar::parameters<>(proj_utm)(zone,56)(ellps_bessel)(units_m)(no_defs)},
|
||||
{102160, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(proj_utm)(zone,26)(ellps_intl)(units_m)(no_defs)},
|
||||
{102163, srs::dpar::parameters<>(proj_bonne)(lon_0,-8.131906111111112)(lat_1,39.66666666666666)(x_0,0)(y_0,0)(ellps_bessel)(units_m)(no_defs)},
|
||||
{102164, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(proj_utm)(zone,25)(ellps_intl)(units_m)(no_defs)},
|
||||
{102167, srs::dpar::parameters<>(proj_utm)(zone,28)(ellps_intl)(units_m)(no_defs)},
|
||||
{102168, srs::dpar::parameters<>(proj_utm)(zone,26)(ellps_intl)(units_m)(no_defs)},
|
||||
{102169, srs::dpar::parameters<>(proj_utm)(zone,28)(ellps_intl)(units_m)(no_defs)},
|
||||
{102191, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(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, srs::dpar::parameters<>(proj_tmerc)(lat_0,30.5)(lon_0,-85.83333333333333)(k,0.99996)(x_0,200000)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102630, srs::dpar::parameters<>(proj_tmerc)(lat_0,30)(lon_0,-87.5)(k,0.9999333333333333)(x_0,600000.0000000001)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102631, srs::dpar::parameters<>(proj_omerc)(lat_0,57)(lonc,-133.6666666666667)(alpha,-36.86989764583333)(k,0.9999)(x_0,4999999.999999999)(y_0,-4999999.999999999)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102632, srs::dpar::parameters<>(proj_tmerc)(lat_0,54)(lon_0,-142)(k,0.9999)(x_0,500000.0000000002)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102633, srs::dpar::parameters<>(proj_tmerc)(lat_0,54)(lon_0,-146)(k,0.9999)(x_0,500000.0000000002)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102634, srs::dpar::parameters<>(proj_tmerc)(lat_0,54)(lon_0,-150)(k,0.9999)(x_0,500000.0000000002)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102635, srs::dpar::parameters<>(proj_tmerc)(lat_0,54)(lon_0,-154)(k,0.9999)(x_0,500000.0000000002)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102636, srs::dpar::parameters<>(proj_tmerc)(lat_0,54)(lon_0,-158)(k,0.9999)(x_0,500000.0000000002)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102637, srs::dpar::parameters<>(proj_tmerc)(lat_0,54)(lon_0,-162)(k,0.9999)(x_0,500000.0000000002)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102638, srs::dpar::parameters<>(proj_tmerc)(lat_0,54)(lon_0,-166)(k,0.9999)(x_0,500000.0000000002)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102639, srs::dpar::parameters<>(proj_tmerc)(lat_0,54)(lon_0,-170)(k,0.9999)(x_0,500000.0000000002)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102640, srs::dpar::parameters<>(proj_lcc)(lat_1,51.83333333333334)(lat_2,53.83333333333334)(lat_0,51)(lon_0,-176)(x_0,1000000)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102641, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102642, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102643, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102644, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102645, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102646, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102648, srs::dpar::parameters<>(proj_tmerc)(lat_0,31)(lon_0,-110.1666666666667)(k,0.9999)(x_0,213360)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102649, srs::dpar::parameters<>(proj_tmerc)(lat_0,31)(lon_0,-111.9166666666667)(k,0.9999)(x_0,213360)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102650, srs::dpar::parameters<>(proj_tmerc)(lat_0,31)(lon_0,-113.75)(k,0.9999333333333333)(x_0,213360)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102651, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102652, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102653, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102654, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102655, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102656, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102657, srs::dpar::parameters<>(proj_tmerc)(lat_0,38)(lon_0,-75.41666666666667)(k,0.999995)(x_0,200000)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102658, srs::dpar::parameters<>(proj_tmerc)(lat_0,24.33333333333333)(lon_0,-81)(k,0.9999411764705882)(x_0,200000)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102659, srs::dpar::parameters<>(proj_tmerc)(lat_0,24.33333333333333)(lon_0,-82)(k,0.9999411764705882)(x_0,200000)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102660, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102661, srs::dpar::parameters<>(proj_tmerc)(lat_0,18.83333333333333)(lon_0,-155.5)(k,0.9999666666666667)(x_0,500000.0000000002)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102662, srs::dpar::parameters<>(proj_tmerc)(lat_0,20.33333333333333)(lon_0,-156.6666666666667)(k,0.9999666666666667)(x_0,500000.0000000002)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102663, srs::dpar::parameters<>(proj_tmerc)(lat_0,21.16666666666667)(lon_0,-158)(k,0.99999)(x_0,500000.0000000002)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102664, srs::dpar::parameters<>(proj_tmerc)(lat_0,21.83333333333333)(lon_0,-159.5)(k,0.99999)(x_0,500000.0000000002)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102665, srs::dpar::parameters<>(proj_tmerc)(lat_0,21.66666666666667)(lon_0,-160.1666666666667)(k,1)(x_0,500000.0000000002)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102666, srs::dpar::parameters<>(proj_tmerc)(lat_0,30)(lon_0,-82.16666666666667)(k,0.9999)(x_0,200000)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102667, srs::dpar::parameters<>(proj_tmerc)(lat_0,30)(lon_0,-84.16666666666667)(k,0.9999)(x_0,700000)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102668, srs::dpar::parameters<>(proj_tmerc)(lat_0,41.66666666666666)(lon_0,-112.1666666666667)(k,0.9999473684210526)(x_0,200000)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102669, srs::dpar::parameters<>(proj_tmerc)(lat_0,41.66666666666666)(lon_0,-114)(k,0.9999473684210526)(x_0,500000.0000000002)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102670, srs::dpar::parameters<>(proj_tmerc)(lat_0,41.66666666666666)(lon_0,-115.75)(k,0.9999333333333333)(x_0,799999.9999999999)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102671, srs::dpar::parameters<>(proj_tmerc)(lat_0,36.66666666666666)(lon_0,-88.33333333333333)(k,0.9999749999999999)(x_0,300000)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102672, srs::dpar::parameters<>(proj_tmerc)(lat_0,36.66666666666666)(lon_0,-90.16666666666667)(k,0.9999411764705882)(x_0,700000)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102673, srs::dpar::parameters<>(proj_tmerc)(lat_0,37.5)(lon_0,-85.66666666666667)(k,0.9999666666666667)(x_0,100000)(y_0,250000)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102674, srs::dpar::parameters<>(proj_tmerc)(lat_0,37.5)(lon_0,-87.08333333333333)(k,0.9999666666666667)(x_0,900000.0000000001)(y_0,250000)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102675, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102676, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102677, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102678, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102679, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102680, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102681, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102682, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102683, srs::dpar::parameters<>(proj_tmerc)(lat_0,43.66666666666666)(lon_0,-68.5)(k,0.9999)(x_0,300000)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102684, srs::dpar::parameters<>(proj_tmerc)(lat_0,42.83333333333334)(lon_0,-70.16666666666667)(k,0.9999666666666667)(x_0,900000.0000000001)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102685, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102686, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102687, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102688, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102689, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102690, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102691, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102692, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102693, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102694, srs::dpar::parameters<>(proj_tmerc)(lat_0,29.5)(lon_0,-88.83333333333333)(k,0.99995)(x_0,300000)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102695, srs::dpar::parameters<>(proj_tmerc)(lat_0,29.5)(lon_0,-90.33333333333333)(k,0.99995)(x_0,700000)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102696, srs::dpar::parameters<>(proj_tmerc)(lat_0,35.83333333333334)(lon_0,-90.5)(k,0.9999333333333333)(x_0,250000)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102697, srs::dpar::parameters<>(proj_tmerc)(lat_0,35.83333333333334)(lon_0,-92.5)(k,0.9999333333333333)(x_0,500000.0000000002)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102698, srs::dpar::parameters<>(proj_tmerc)(lat_0,36.16666666666666)(lon_0,-94.5)(k,0.9999411764705882)(x_0,850000)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102700, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102704, srs::dpar::parameters<>(proj_lcc)(lat_1,40)(lat_2,43)(lat_0,39.83333333333334)(lon_0,-100)(x_0,500000.0000000002)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102707, srs::dpar::parameters<>(proj_tmerc)(lat_0,34.75)(lon_0,-115.5833333333333)(k,0.9999)(x_0,200000)(y_0,7999999.999999999)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102708, srs::dpar::parameters<>(proj_tmerc)(lat_0,34.75)(lon_0,-116.6666666666667)(k,0.9999)(x_0,500000.0000000002)(y_0,6000000.000000001)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102709, srs::dpar::parameters<>(proj_tmerc)(lat_0,34.75)(lon_0,-118.5833333333333)(k,0.9999)(x_0,799999.9999999999)(y_0,4000000)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102710, srs::dpar::parameters<>(proj_tmerc)(lat_0,42.5)(lon_0,-71.66666666666667)(k,0.9999666666666667)(x_0,300000)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102711, srs::dpar::parameters<>(proj_tmerc)(lat_0,38.83333333333334)(lon_0,-74.5)(k,0.9999)(x_0,150000)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102712, srs::dpar::parameters<>(proj_tmerc)(lat_0,31)(lon_0,-104.3333333333333)(k,0.9999090909090909)(x_0,165000)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102713, srs::dpar::parameters<>(proj_tmerc)(lat_0,31)(lon_0,-106.25)(k,0.9999)(x_0,500000.0000000002)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102714, srs::dpar::parameters<>(proj_tmerc)(lat_0,31)(lon_0,-107.8333333333333)(k,0.9999166666666667)(x_0,829999.9999999999)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102715, srs::dpar::parameters<>(proj_tmerc)(lat_0,38.83333333333334)(lon_0,-74.5)(k,0.9999)(x_0,150000)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102716, srs::dpar::parameters<>(proj_tmerc)(lat_0,40)(lon_0,-76.58333333333333)(k,0.9999375)(x_0,250000)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102717, srs::dpar::parameters<>(proj_tmerc)(lat_0,40)(lon_0,-78.58333333333333)(k,0.9999375)(x_0,350000.0000000001)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102718, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102719, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102720, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102721, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102722, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102723, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102724, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102725, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102726, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102727, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102728, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102729, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102730, srs::dpar::parameters<>(proj_tmerc)(lat_0,41.08333333333334)(lon_0,-71.5)(k,0.99999375)(x_0,100000)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102733, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102734, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102735, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102736, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102737, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102738, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102739, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102740, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102741, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102742, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102743, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102744, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102745, srs::dpar::parameters<>(proj_tmerc)(lat_0,42.5)(lon_0,-72.5)(k,0.9999642857142857)(x_0,500000.0000000002)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102746, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102747, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102748, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102749, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102750, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102751, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102752, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102753, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102754, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102755, srs::dpar::parameters<>(proj_tmerc)(lat_0,40.5)(lon_0,-105.1666666666667)(k,0.9999375)(x_0,200000)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102756, srs::dpar::parameters<>(proj_tmerc)(lat_0,40.5)(lon_0,-107.3333333333333)(k,0.9999375)(x_0,399999.9999999999)(y_0,100000)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102757, srs::dpar::parameters<>(proj_tmerc)(lat_0,40.5)(lon_0,-108.75)(k,0.9999375)(x_0,600000.0000000001)(y_0,0)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102758, srs::dpar::parameters<>(proj_tmerc)(lat_0,40.5)(lon_0,-110.0833333333333)(k,0.9999375)(x_0,799999.9999999999)(y_0,100000)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102761, srs::dpar::parameters<>(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)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{102766, srs::dpar::parameters<>(proj_poly)(lat_0,13.47246635277778)(lon_0,-144.7487507055556)(x_0,49999.99999999999)(y_0,49999.99999999999)(ellps_grs80)(srs::dpar::datum_nad83)(to_meter,0.3048006096012192)(no_defs)},
|
||||
{103300, srs::dpar::parameters<>(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, srs::dpar::parameters<>(proj_longlat)(ellps_clrk66)(srs::dpar::datum_nad27)(no_defs)},
|
||||
{104101, srs::dpar::parameters<>(proj_longlat)(ellps_bessel)(no_defs)},
|
||||
{104102, srs::dpar::parameters<>(proj_longlat)(ellps_bessel)(no_defs)},
|
||||
{104103, srs::dpar::parameters<>(proj_longlat)(ellps_clrk80)(no_defs)},
|
||||
{104104, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{104105, srs::dpar::parameters<>(proj_longlat)(ellps_bessel)(no_defs)},
|
||||
{104106, srs::dpar::parameters<>(proj_longlat)(ellps_intl)(no_defs)},
|
||||
{104107, srs::dpar::parameters<>(proj_longlat)(ellps_grs80)(no_defs)},
|
||||
{104108, srs::dpar::parameters<>(proj_longlat)(ellps_grs80)(no_defs)},
|
||||
{104261, srs::dpar::parameters<>(proj_longlat)(a,6378249.2)(b,6356514.999904194)(no_defs)},
|
||||
{104304, srs::dpar::parameters<>(proj_longlat)(a,6378249.2)(b,6356514.999904194)(no_defs)},
|
||||
{104305, srs::dpar::parameters<>(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->parameters : srs::dpar::parameters<>();
|
||||
}
|
||||
|
||||
}
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif
|
||||
@@ -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
|
||||
@@ -0,0 +1,500 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// 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)
|
||||
|
||||
#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/spar.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 <int ESRI>
|
||||
struct esri_traits
|
||||
{
|
||||
// Specializations define:
|
||||
// - type to get projection type
|
||||
// - function par to get parameters
|
||||
};
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37001) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_wgs66,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37002) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::a<>,srs::spar::b<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_longlat(),srs::spar::a<>(6378166),srs::spar::b<>(6356784.283607107)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37003) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::a<>,srs::spar::b<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_longlat(),srs::spar::a<>(6378150),srs::spar::b<>(6356768.337244385)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37004) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_fschr60m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37005) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::a<>,srs::spar::b<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_longlat(),srs::spar::a<>(6378270),srs::spar::b<>(6356794.343434343)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37006) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::a<>,srs::spar::b<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_longlat(),srs::spar::a<>(6377295.664),srs::spar::b<>(6356094.667915204)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37007) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::a<>,srs::spar::b<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_longlat(),srs::spar::a<>(6376896),srs::spar::b<>(6355834.846687363)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37008) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::r<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_longlat(),srs::spar::r<>(6370997)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37201) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37202) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::a<>,srs::spar::b<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_longlat(),srs::spar::a<>(6377276.345),srs::spar::b<>(6356075.41314024)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37203) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::a<>,srs::spar::b<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_longlat(),srs::spar::a<>(6377301.243),srs::spar::b<>(6356100.230165384)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37204) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37205) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37206) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_clrk80,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37207) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_fschr60m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37208) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_clrk80,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37211) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_clrk80,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37212) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37213) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37214) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37215) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37216) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37217) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37218) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37219) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37220) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_clrk66,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37221) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37222) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37223) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::a<>,srs::spar::b<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_longlat(),srs::spar::a<>(6378249.2),srs::spar::b<>(6356514.999904194)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37224) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37226) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37227) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37228) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_clrk80,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37229) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::a<>,srs::spar::b<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_longlat(),srs::spar::a<>(6378270),srs::spar::b<>(6356794.343434343)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37230) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37231) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_aust_sa,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37232) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37233) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37234) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37235) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37237) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37238) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37239) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_clrk66,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37240) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_clrk80,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37241) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37242) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37243) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_clrk66,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37245) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37246) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37247) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37249) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37250) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37251) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37252) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_clrk66,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37253) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37254) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_clrk80,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37255) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_bessel,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37257) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_krass,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37259) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 37260) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_clrk66,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53001)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53002) srs::spar::parameters<srs::spar::proj_eqc,srs::spar::lat_ts<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::r<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_eqc(),srs::spar::lat_ts<>(60),srs::spar::lat_0<>(0),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::r<>(6371000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53003) srs::spar::parameters<srs::spar::proj_mill,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::r_au,srs::spar::r<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_mill(),srs::spar::lat_0<>(0),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::r_au(),srs::spar::r<>(6371000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53004) srs::spar::parameters<srs::spar::proj_merc,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::r<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_merc(),srs::spar::lon_0<>(0),srs::spar::k<>(1),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::r<>(6371000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53008) srs::spar::parameters<srs::spar::proj_sinu,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::r<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_sinu(),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::r<>(6371000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53009) srs::spar::parameters<srs::spar::proj_moll,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::r<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_moll(),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::r<>(6371000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53010) srs::spar::parameters<srs::spar::proj_eck6,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::r<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_eck6(),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::r<>(6371000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53011)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53012) srs::spar::parameters<srs::spar::proj_eck4,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::r<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_eck4(),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::r<>(6371000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53013)
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53014)
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53015)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53016) srs::spar::parameters<srs::spar::proj_gall,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::r<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_gall(),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::r<>(6371000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53017)
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53018)
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53019)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53021) srs::spar::parameters<srs::spar::proj_poly,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::r<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_poly(),srs::spar::lat_0<>(0),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::r<>(6371000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53022)
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53023)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53024) srs::spar::parameters<srs::spar::proj_bonne,srs::spar::lon_0<>,srs::spar::lat_1<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::r<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_bonne(),srs::spar::lon_0<>(0),srs::spar::lat_1<>(60),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::r<>(6371000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53025) srs::spar::parameters<srs::spar::proj_omerc,srs::spar::lat_0<>,srs::spar::lon_1<>,srs::spar::lat_1<>,srs::spar::lon_2<>,srs::spar::lat_2<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::r<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_omerc(),srs::spar::lat_0<>(40),srs::spar::lon_1<>(0),srs::spar::lat_1<>(0),srs::spar::lon_2<>(0),srs::spar::lat_2<>(0),srs::spar::k<>(1),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::r<>(6371000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53026) srs::spar::parameters<srs::spar::proj_stere,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::r<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_stere(),srs::spar::lat_0<>(0),srs::spar::lon_0<>(0),srs::spar::k<>(1),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::r<>(6371000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53027) srs::spar::parameters<srs::spar::proj_eqdc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::r<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_eqdc(),srs::spar::lat_0<>(0),srs::spar::lon_0<>(0),srs::spar::lat_1<>(60),srs::spar::lat_2<>(60),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::r<>(6371000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53028) srs::spar::parameters<srs::spar::proj_cass,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::r<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_cass(),srs::spar::lat_0<>(0),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::r<>(6371000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53029) srs::spar::parameters<srs::spar::proj_vandg,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::r_au,srs::spar::r<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_vandg(),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::r_au(),srs::spar::r<>(6371000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53030) srs::spar::parameters<srs::spar::proj_robin,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::r<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_robin(),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::r<>(6371000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53031) srs::spar::parameters<srs::spar::proj_tpeqd,srs::spar::lat_1<>,srs::spar::lon_1<>,srs::spar::lat_2<>,srs::spar::lon_2<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::r<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tpeqd(),srs::spar::lat_1<>(0),srs::spar::lon_1<>(0),srs::spar::lat_2<>(60),srs::spar::lon_2<>(60),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::r<>(6371000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 53032) srs::spar::parameters<srs::spar::proj_aeqd,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::r<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_aeqd(),srs::spar::lat_0<>(0),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::r<>(6371000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54001)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54002) srs::spar::parameters<srs::spar::proj_eqc,srs::spar::lat_ts<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_eqc(),srs::spar::lat_ts<>(60),srs::spar::lat_0<>(0),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54003) srs::spar::parameters<srs::spar::proj_mill,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::r_au,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_mill(),srs::spar::lat_0<>(0),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54004) srs::spar::parameters<srs::spar::proj_merc,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_merc(),srs::spar::lon_0<>(0),srs::spar::k<>(1),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54008) srs::spar::parameters<srs::spar::proj_sinu,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_sinu(),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54009) srs::spar::parameters<srs::spar::proj_moll,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_moll(),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54010) srs::spar::parameters<srs::spar::proj_eck6,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_eck6(),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54011)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54012) srs::spar::parameters<srs::spar::proj_eck4,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_eck4(),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54013)
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54014)
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54015)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54016) srs::spar::parameters<srs::spar::proj_gall,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_gall(),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54017)
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54018)
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54019)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54021) srs::spar::parameters<srs::spar::proj_poly,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_poly(),srs::spar::lat_0<>(0),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54022)
|
||||
//BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54023)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54024) srs::spar::parameters<srs::spar::proj_bonne,srs::spar::lon_0<>,srs::spar::lat_1<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_bonne(),srs::spar::lon_0<>(0),srs::spar::lat_1<>(60),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54025) srs::spar::parameters<srs::spar::proj_omerc,srs::spar::lat_0<>,srs::spar::lon_1<>,srs::spar::lat_1<>,srs::spar::lon_2<>,srs::spar::lat_2<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_omerc(),srs::spar::lat_0<>(40),srs::spar::lon_1<>(0),srs::spar::lat_1<>(0),srs::spar::lon_2<>(0),srs::spar::lat_2<>(0),srs::spar::k<>(1),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54026) srs::spar::parameters<srs::spar::proj_stere,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_stere(),srs::spar::lat_0<>(0),srs::spar::lon_0<>(0),srs::spar::k<>(1),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54027) srs::spar::parameters<srs::spar::proj_eqdc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_eqdc(),srs::spar::lat_0<>(0),srs::spar::lon_0<>(0),srs::spar::lat_1<>(60),srs::spar::lat_2<>(60),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54028) srs::spar::parameters<srs::spar::proj_cass,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_cass(),srs::spar::lat_0<>(0),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54029) srs::spar::parameters<srs::spar::proj_vandg,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::r_au,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_vandg(),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54030) srs::spar::parameters<srs::spar::proj_robin,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_robin(),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54031) srs::spar::parameters<srs::spar::proj_tpeqd,srs::spar::lat_1<>,srs::spar::lon_1<>,srs::spar::lat_2<>,srs::spar::lon_2<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tpeqd(),srs::spar::lat_1<>(0),srs::spar::lon_1<>(0),srs::spar::lat_2<>(60),srs::spar::lon_2<>(60),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 54032) srs::spar::parameters<srs::spar::proj_aeqd,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_aeqd(),srs::spar::lat_0<>(0),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 65061) srs::spar::parameters<srs::spar::proj_poly,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_clrk66,srs::spar::datum_nad27,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_poly(),srs::spar::lat_0<>(13.47246635277778),srs::spar::lon_0<>(-144.7487507055556),srs::spar::x_0<>(50000.00000000001),srs::spar::y_0<>(50000.00000000001),srs::spar::ellps_clrk66(),srs::spar::datum_nad27(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 65161) srs::spar::parameters<srs::spar::proj_poly,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_poly(),srs::spar::lat_0<>(13.47246635277778),srs::spar::lon_0<>(-144.7487507055556),srs::spar::x_0<>(50000),srs::spar::y_0<>(50000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102001) srs::spar::parameters<srs::spar::proj_aea,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_aea(),srs::spar::lat_1<>(50),srs::spar::lat_2<>(70),srs::spar::lat_0<>(40),srs::spar::lon_0<>(-96),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102002) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(50),srs::spar::lat_2<>(70),srs::spar::lat_0<>(40),srs::spar::lon_0<>(-96),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102003) srs::spar::parameters<srs::spar::proj_aea,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_aea(),srs::spar::lat_1<>(29.5),srs::spar::lat_2<>(45.5),srs::spar::lat_0<>(37.5),srs::spar::lon_0<>(-96),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102004) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(33),srs::spar::lat_2<>(45),srs::spar::lat_0<>(39),srs::spar::lon_0<>(-96),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102005) srs::spar::parameters<srs::spar::proj_eqdc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_eqdc(),srs::spar::lat_0<>(0),srs::spar::lon_0<>(0),srs::spar::lat_1<>(33),srs::spar::lat_2<>(45),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102006) srs::spar::parameters<srs::spar::proj_aea,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_aea(),srs::spar::lat_1<>(55),srs::spar::lat_2<>(65),srs::spar::lat_0<>(50),srs::spar::lon_0<>(-154),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102007) srs::spar::parameters<srs::spar::proj_aea,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_aea(),srs::spar::lat_1<>(8),srs::spar::lat_2<>(18),srs::spar::lat_0<>(13),srs::spar::lon_0<>(-157),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102008) srs::spar::parameters<srs::spar::proj_aea,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_aea(),srs::spar::lat_1<>(20),srs::spar::lat_2<>(60),srs::spar::lat_0<>(40),srs::spar::lon_0<>(-96),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102009) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(20),srs::spar::lat_2<>(60),srs::spar::lat_0<>(40),srs::spar::lon_0<>(-96),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102010) srs::spar::parameters<srs::spar::proj_eqdc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_eqdc(),srs::spar::lat_0<>(0),srs::spar::lon_0<>(0),srs::spar::lat_1<>(20),srs::spar::lat_2<>(60),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102011) srs::spar::parameters<srs::spar::proj_sinu,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_sinu(),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102012) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(30),srs::spar::lat_2<>(62),srs::spar::lat_0<>(0),srs::spar::lon_0<>(105),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102013) srs::spar::parameters<srs::spar::proj_aea,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_intl,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_aea(),srs::spar::lat_1<>(43),srs::spar::lat_2<>(62),srs::spar::lat_0<>(30),srs::spar::lon_0<>(10),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102014) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_intl,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(43),srs::spar::lat_2<>(62),srs::spar::lat_0<>(30),srs::spar::lon_0<>(10),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102015) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_aust_sa,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(-5),srs::spar::lat_2<>(-42),srs::spar::lat_0<>(-32),srs::spar::lon_0<>(-60),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102016) srs::spar::parameters<srs::spar::proj_aeqd,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_aeqd(),srs::spar::lat_0<>(90),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102017) srs::spar::parameters<srs::spar::proj_laea,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_laea(),srs::spar::lat_0<>(90),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102018) srs::spar::parameters<srs::spar::proj_stere,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_stere(),srs::spar::lat_0<>(90),srs::spar::lon_0<>(0),srs::spar::k<>(1),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102019) srs::spar::parameters<srs::spar::proj_aeqd,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_aeqd(),srs::spar::lat_0<>(-90),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102020) srs::spar::parameters<srs::spar::proj_laea,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_laea(),srs::spar::lat_0<>(-90),srs::spar::lon_0<>(0),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102021) srs::spar::parameters<srs::spar::proj_stere,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_stere(),srs::spar::lat_0<>(-90),srs::spar::lon_0<>(0),srs::spar::k<>(1),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102022) srs::spar::parameters<srs::spar::proj_aea,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_aea(),srs::spar::lat_1<>(20),srs::spar::lat_2<>(-23),srs::spar::lat_0<>(0),srs::spar::lon_0<>(25),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102023) srs::spar::parameters<srs::spar::proj_eqdc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_eqdc(),srs::spar::lat_0<>(0),srs::spar::lon_0<>(0),srs::spar::lat_1<>(20),srs::spar::lat_2<>(-23),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102024) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(20),srs::spar::lat_2<>(-23),srs::spar::lat_0<>(0),srs::spar::lon_0<>(25),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102025) srs::spar::parameters<srs::spar::proj_aea,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_aea(),srs::spar::lat_1<>(15),srs::spar::lat_2<>(65),srs::spar::lat_0<>(30),srs::spar::lon_0<>(95),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102026) srs::spar::parameters<srs::spar::proj_eqdc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_eqdc(),srs::spar::lat_0<>(0),srs::spar::lon_0<>(0),srs::spar::lat_1<>(15),srs::spar::lat_2<>(65),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102027) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(15),srs::spar::lat_2<>(65),srs::spar::lat_0<>(30),srs::spar::lon_0<>(95),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102028) srs::spar::parameters<srs::spar::proj_aea,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_aea(),srs::spar::lat_1<>(7),srs::spar::lat_2<>(-32),srs::spar::lat_0<>(-15),srs::spar::lon_0<>(125),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102029) srs::spar::parameters<srs::spar::proj_eqdc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_eqdc(),srs::spar::lat_0<>(0),srs::spar::lon_0<>(0),srs::spar::lat_1<>(7),srs::spar::lat_2<>(-32),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102030) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_wgs84,srs::spar::datum_wgs84,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(7),srs::spar::lat_2<>(-32),srs::spar::lat_0<>(-15),srs::spar::lon_0<>(125),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102031) srs::spar::parameters<srs::spar::proj_eqdc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_intl,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_eqdc(),srs::spar::lat_0<>(0),srs::spar::lon_0<>(0),srs::spar::lat_1<>(43),srs::spar::lat_2<>(62),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102032) srs::spar::parameters<srs::spar::proj_eqdc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_aust_sa,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_eqdc(),srs::spar::lat_0<>(0),srs::spar::lon_0<>(0),srs::spar::lat_1<>(-5),srs::spar::lat_2<>(-42),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102033) srs::spar::parameters<srs::spar::proj_aea,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_aust_sa,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_aea(),srs::spar::lat_1<>(-5),srs::spar::lat_2<>(-42),srs::spar::lat_0<>(-32),srs::spar::lon_0<>(-60),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102065) srs::spar::parameters<srs::spar::proj_krovak,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::alpha<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_bessel,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_krovak(),srs::spar::lat_0<>(49.5),srs::spar::lon_0<>(24.83333333333333),srs::spar::alpha<>(30.28813975277778),srs::spar::k<>(0.9999),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102066) srs::spar::parameters<srs::spar::proj_krovak,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::alpha<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_bessel,srs::spar::pm<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_krovak(),srs::spar::lat_0<>(49.5),srs::spar::lon_0<>(42.5),srs::spar::alpha<>(30.28813975277778),srs::spar::k<>(0.9999),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::ellps_bessel(),srs::spar::pm<>(-17.66666666666667)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102067) srs::spar::parameters<srs::spar::proj_krovak,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::alpha<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_bessel,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_krovak(),srs::spar::lat_0<>(49.5),srs::spar::lon_0<>(24.83333333333333),srs::spar::alpha<>(30.28813975277778),srs::spar::k<>(0.9999),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102091) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_intl,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(0),srs::spar::lon_0<>(9),srs::spar::k<>(0.9996),srs::spar::x_0<>(1500000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102092) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_intl,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(0),srs::spar::lon_0<>(15),srs::spar::k<>(0.9996),srs::spar::x_0<>(2520000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102101) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::a<>,srs::spar::b<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(58),srs::spar::lon_0<>(6.05625),srs::spar::k<>(1),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::a<>(6377492.018),srs::spar::b<>(6356173.508712696)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102102) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::a<>,srs::spar::b<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(58),srs::spar::lon_0<>(8.389583333333333),srs::spar::k<>(1),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::a<>(6377492.018),srs::spar::b<>(6356173.508712696)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102103) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::a<>,srs::spar::b<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(58),srs::spar::lon_0<>(10.72291666666667),srs::spar::k<>(1),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::a<>(6377492.018),srs::spar::b<>(6356173.508712696)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102104) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::a<>,srs::spar::b<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(58),srs::spar::lon_0<>(13.22291666666667),srs::spar::k<>(1),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::a<>(6377492.018),srs::spar::b<>(6356173.508712696)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102105) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::a<>,srs::spar::b<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(58),srs::spar::lon_0<>(16.88958333333333),srs::spar::k<>(1),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::a<>(6377492.018),srs::spar::b<>(6356173.508712696)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102106) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::a<>,srs::spar::b<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(58),srs::spar::lon_0<>(20.88958333333333),srs::spar::k<>(1),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::a<>(6377492.018),srs::spar::b<>(6356173.508712696)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102107) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::a<>,srs::spar::b<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(58),srs::spar::lon_0<>(24.88958333333333),srs::spar::k<>(1),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::a<>(6377492.018),srs::spar::b<>(6356173.508712696)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102108) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::a<>,srs::spar::b<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(58),srs::spar::lon_0<>(29.05625),srs::spar::k<>(1),srs::spar::x_0<>(0),srs::spar::y_0<>(0),srs::spar::a<>(6377492.018),srs::spar::b<>(6356173.508712696)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102110) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(44),srs::spar::lat_2<>(49),srs::spar::lat_0<>(46.5),srs::spar::lon_0<>(3),srs::spar::x_0<>(700000),srs::spar::y_0<>(6600000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102114) srs::spar::parameters<srs::spar::proj_utm,srs::spar::zone<4>,srs::spar::ellps_clrk66,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102115) srs::spar::parameters<srs::spar::proj_utm,srs::spar::zone<5>,srs::spar::ellps_clrk66,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102120) srs::spar::parameters<srs::spar::proj_omerc,srs::spar::lat_0<>,srs::spar::lonc<>,srs::spar::alpha<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_clrk66,srs::spar::datum_nad27,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_omerc(),srs::spar::lat_0<>(45.30916666666666),srs::spar::lonc<>(-86),srs::spar::alpha<>(337.255555555556),srs::spar::k<>(0.9996),srs::spar::x_0<>(2546731.495961392),srs::spar::y_0<>(-4354009.816002033),srs::spar::ellps_clrk66(),srs::spar::datum_nad27(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102121) srs::spar::parameters<srs::spar::proj_omerc,srs::spar::lat_0<>,srs::spar::lonc<>,srs::spar::alpha<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_omerc(),srs::spar::lat_0<>(45.30916666666666),srs::spar::lonc<>(-86),srs::spar::alpha<>(337.255555555556),srs::spar::k<>(0.9996),srs::spar::x_0<>(2546731.495961392),srs::spar::y_0<>(-4354009.816002033),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102122) srs::spar::parameters<srs::spar::proj_omerc,srs::spar::lat_0<>,srs::spar::lonc<>,srs::spar::alpha<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_clrk66,srs::spar::datum_nad27,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_omerc(),srs::spar::lat_0<>(45.30916666666666),srs::spar::lonc<>(-86),srs::spar::alpha<>(337.255555555556),srs::spar::k<>(0.9996),srs::spar::x_0<>(2546731.496),srs::spar::y_0<>(-4354009.816)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102123) srs::spar::parameters<srs::spar::proj_omerc,srs::spar::lat_0<>,srs::spar::lonc<>,srs::spar::alpha<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_omerc(),srs::spar::lat_0<>(45.30916666666666),srs::spar::lonc<>(-86),srs::spar::alpha<>(337.255555555556),srs::spar::k<>(0.9996),srs::spar::x_0<>(2546731.496),srs::spar::y_0<>(-4354009.816)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102132) srs::spar::parameters<srs::spar::proj_utm,srs::spar::zone<32>,srs::spar::a<>,srs::spar::b<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_utm(),srs::spar::zone<32>(),srs::spar::a<>(6377492.018),srs::spar::b<>(6356173.508712696)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102133) srs::spar::parameters<srs::spar::proj_utm,srs::spar::zone<33>,srs::spar::a<>,srs::spar::b<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_utm(),srs::spar::zone<33>(),srs::spar::a<>(6377492.018),srs::spar::b<>(6356173.508712696)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102134) srs::spar::parameters<srs::spar::proj_utm,srs::spar::zone<34>,srs::spar::a<>,srs::spar::b<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_utm(),srs::spar::zone<34>(),srs::spar::a<>(6377492.018),srs::spar::b<>(6356173.508712696)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102135) srs::spar::parameters<srs::spar::proj_utm,srs::spar::zone<35>,srs::spar::a<>,srs::spar::b<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_utm(),srs::spar::zone<35>(),srs::spar::a<>(6377492.018),srs::spar::b<>(6356173.508712696)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102140) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_intl,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(22.31213333333334),srs::spar::lon_0<>(114.1785555555556),srs::spar::k<>(1),srs::spar::x_0<>(836694.05),srs::spar::y_0<>(819069.8)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102141) srs::spar::parameters<srs::spar::proj_utm,srs::spar::zone<49>,srs::spar::ellps_intl,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102142) srs::spar::parameters<srs::spar::proj_utm,srs::spar::zone<50>,srs::spar::ellps_intl,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102151) srs::spar::parameters<srs::spar::proj_utm,srs::spar::zone<51>,srs::spar::ellps_bessel,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102152) srs::spar::parameters<srs::spar::proj_utm,srs::spar::zone<52>,srs::spar::ellps_bessel,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102153) srs::spar::parameters<srs::spar::proj_utm,srs::spar::zone<53>,srs::spar::ellps_bessel,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102154) srs::spar::parameters<srs::spar::proj_utm,srs::spar::zone<54>,srs::spar::ellps_bessel,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102155) srs::spar::parameters<srs::spar::proj_utm,srs::spar::zone<55>,srs::spar::ellps_bessel,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102156) srs::spar::parameters<srs::spar::proj_utm,srs::spar::zone<56>,srs::spar::ellps_bessel,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102160) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_intl,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(39.66666666666666),srs::spar::lon_0<>(-8.131906111111112),srs::spar::k<>(1),srs::spar::x_0<>(200180.598),srs::spar::y_0<>(299913.01)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102161) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_intl,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(39.66666666666666),srs::spar::lon_0<>(-8.131906111111112),srs::spar::k<>(1),srs::spar::x_0<>(180.598),srs::spar::y_0<>(-86.98999999999999)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102162) srs::spar::parameters<srs::spar::proj_utm,srs::spar::zone<26>,srs::spar::ellps_intl,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102163) srs::spar::parameters<srs::spar::proj_bonne,srs::spar::lon_0<>,srs::spar::lat_1<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_bessel,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_bonne(),srs::spar::lon_0<>(-8.131906111111112),srs::spar::lat_1<>(39.66666666666666),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102164) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_intl,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(39.66666666666666),srs::spar::lon_0<>(-8.131906111111112),srs::spar::k<>(1),srs::spar::x_0<>(200000),srs::spar::y_0<>(300000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102165) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_intl,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(39.66666666666666),srs::spar::lon_0<>(-8.131906111111112),srs::spar::k<>(1),srs::spar::x_0<>(0),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102166) srs::spar::parameters<srs::spar::proj_utm,srs::spar::zone<25>,srs::spar::ellps_intl,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102167) srs::spar::parameters<srs::spar::proj_utm,srs::spar::zone<28>,srs::spar::ellps_intl,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102168) srs::spar::parameters<srs::spar::proj_utm,srs::spar::zone<26>,srs::spar::ellps_intl,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102169) srs::spar::parameters<srs::spar::proj_utm,srs::spar::zone<28>,srs::spar::ellps_intl,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102191) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::a<>,srs::spar::b<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(33.3),srs::spar::lat_0<>(33.3),srs::spar::lon_0<>(-5.4),srs::spar::k_0<>(0.999625769),srs::spar::x_0<>(500000),srs::spar::y_0<>(300000),srs::spar::a<>(6378249.2),srs::spar::b<>(6356514.999904194)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102192) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::a<>,srs::spar::b<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(29.7),srs::spar::lat_0<>(29.7),srs::spar::lon_0<>(-5.4),srs::spar::k_0<>(0.9996155960000001),srs::spar::x_0<>(500000),srs::spar::y_0<>(300000),srs::spar::a<>(6378249.2),srs::spar::b<>(6356514.999904194)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102193) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::a<>,srs::spar::b<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(26.1),srs::spar::lat_0<>(26.1),srs::spar::lon_0<>(-5.4),srs::spar::k_0<>(0.9996),srs::spar::x_0<>(1200000),srs::spar::y_0<>(400000),srs::spar::a<>(6378249.2),srs::spar::b<>(6356514.999904194)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102229) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(30.5),srs::spar::lon_0<>(-85.83333333333333),srs::spar::k<>(0.99996),srs::spar::x_0<>(200000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102230) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(30),srs::spar::lon_0<>(-87.5),srs::spar::k<>(0.9999333333333333),srs::spar::x_0<>(600000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102241) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(40),srs::spar::lat_2<>(41.66666666666666),srs::spar::lat_0<>(39.33333333333334),srs::spar::lon_0<>(-122),srs::spar::x_0<>(2000000),srs::spar::y_0<>(500000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102242) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(38.33333333333334),srs::spar::lat_2<>(39.83333333333334),srs::spar::lat_0<>(37.66666666666666),srs::spar::lon_0<>(-122),srs::spar::x_0<>(2000000),srs::spar::y_0<>(500000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102243) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(37.06666666666667),srs::spar::lat_2<>(38.43333333333333),srs::spar::lat_0<>(36.5),srs::spar::lon_0<>(-120.5),srs::spar::x_0<>(2000000),srs::spar::y_0<>(500000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102244) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(36),srs::spar::lat_2<>(37.25),srs::spar::lat_0<>(35.33333333333334),srs::spar::lon_0<>(-119),srs::spar::x_0<>(2000000),srs::spar::y_0<>(500000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102245) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(34.03333333333333),srs::spar::lat_2<>(35.46666666666667),srs::spar::lat_0<>(33.5),srs::spar::lon_0<>(-118),srs::spar::x_0<>(2000000),srs::spar::y_0<>(500000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102246) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(32.78333333333333),srs::spar::lat_2<>(33.88333333333333),srs::spar::lat_0<>(32.16666666666666),srs::spar::lon_0<>(-116.25),srs::spar::x_0<>(2000000),srs::spar::y_0<>(500000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102248) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(31),srs::spar::lon_0<>(-110.1666666666667),srs::spar::k<>(0.9999),srs::spar::x_0<>(213360),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102249) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(31),srs::spar::lon_0<>(-111.9166666666667),srs::spar::k<>(0.9999),srs::spar::x_0<>(213360),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102250) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(31),srs::spar::lon_0<>(-113.75),srs::spar::k<>(0.9999333333333333),srs::spar::x_0<>(213360),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102251) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(34.93333333333333),srs::spar::lat_2<>(36.23333333333333),srs::spar::lat_0<>(34.33333333333334),srs::spar::lon_0<>(-92),srs::spar::x_0<>(400000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102252) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(33.3),srs::spar::lat_2<>(34.76666666666667),srs::spar::lat_0<>(32.66666666666666),srs::spar::lon_0<>(-92),srs::spar::x_0<>(400000),srs::spar::y_0<>(400000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102253) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(39.71666666666667),srs::spar::lat_2<>(40.78333333333333),srs::spar::lat_0<>(39.33333333333334),srs::spar::lon_0<>(-105.5),srs::spar::x_0<>(914401.8289),srs::spar::y_0<>(304800.6096)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102254) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(38.45),srs::spar::lat_2<>(39.75),srs::spar::lat_0<>(37.83333333333334),srs::spar::lon_0<>(-105.5),srs::spar::x_0<>(914401.8289),srs::spar::y_0<>(304800.6096)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102255) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(37.23333333333333),srs::spar::lat_2<>(38.43333333333333),srs::spar::lat_0<>(36.66666666666666),srs::spar::lon_0<>(-105.5),srs::spar::x_0<>(914401.8289),srs::spar::y_0<>(304800.6096)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102256) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(41.2),srs::spar::lat_2<>(41.86666666666667),srs::spar::lat_0<>(40.83333333333334),srs::spar::lon_0<>(-72.75),srs::spar::x_0<>(304800.6096),srs::spar::y_0<>(152400.3048)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102257) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(38),srs::spar::lon_0<>(-75.41666666666667),srs::spar::k<>(0.999995),srs::spar::x_0<>(200000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102258) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(24.33333333333333),srs::spar::lon_0<>(-81),srs::spar::k<>(0.9999411764705882),srs::spar::x_0<>(200000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102259) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(24.33333333333333),srs::spar::lon_0<>(-82),srs::spar::k<>(0.9999411764705882),srs::spar::x_0<>(200000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102260) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(29.58333333333333),srs::spar::lat_2<>(30.75),srs::spar::lat_0<>(29),srs::spar::lon_0<>(-84.5),srs::spar::x_0<>(600000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102261) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(18.83333333333333),srs::spar::lon_0<>(-155.5),srs::spar::k<>(0.9999666666666667),srs::spar::x_0<>(500000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102262) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(20.33333333333333),srs::spar::lon_0<>(-156.6666666666667),srs::spar::k<>(0.9999666666666667),srs::spar::x_0<>(500000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102263) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(21.16666666666667),srs::spar::lon_0<>(-158),srs::spar::k<>(0.99999),srs::spar::x_0<>(500000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102264) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(21.83333333333333),srs::spar::lon_0<>(-159.5),srs::spar::k<>(0.99999),srs::spar::x_0<>(500000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102265) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(21.66666666666667),srs::spar::lon_0<>(-160.1666666666667),srs::spar::k<>(1),srs::spar::x_0<>(500000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102266) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(30),srs::spar::lon_0<>(-82.16666666666667),srs::spar::k<>(0.9999),srs::spar::x_0<>(200000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102267) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(30),srs::spar::lon_0<>(-84.16666666666667),srs::spar::k<>(0.9999),srs::spar::x_0<>(700000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102268) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(41.66666666666666),srs::spar::lon_0<>(-112.1666666666667),srs::spar::k<>(0.9999473684210526),srs::spar::x_0<>(200000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102269) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(41.66666666666666),srs::spar::lon_0<>(-114),srs::spar::k<>(0.9999473684210526),srs::spar::x_0<>(500000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102270) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(41.66666666666666),srs::spar::lon_0<>(-115.75),srs::spar::k<>(0.9999333333333333),srs::spar::x_0<>(800000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102271) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(36.66666666666666),srs::spar::lon_0<>(-88.33333333333333),srs::spar::k<>(0.9999749999999999),srs::spar::x_0<>(300000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102272) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(36.66666666666666),srs::spar::lon_0<>(-90.16666666666667),srs::spar::k<>(0.9999411764705882),srs::spar::x_0<>(700000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102273) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(37.5),srs::spar::lon_0<>(-85.66666666666667),srs::spar::k<>(0.9999666666666667),srs::spar::x_0<>(100000),srs::spar::y_0<>(250000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102274) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(37.5),srs::spar::lon_0<>(-87.08333333333333),srs::spar::k<>(0.9999666666666667),srs::spar::x_0<>(900000),srs::spar::y_0<>(250000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102277) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(38.71666666666667),srs::spar::lat_2<>(39.78333333333333),srs::spar::lat_0<>(38.33333333333334),srs::spar::lon_0<>(-98),srs::spar::x_0<>(400000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102278) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(37.26666666666667),srs::spar::lat_2<>(38.56666666666667),srs::spar::lat_0<>(36.66666666666666),srs::spar::lon_0<>(-98.5),srs::spar::x_0<>(400000),srs::spar::y_0<>(400000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102279) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(37.96666666666667),srs::spar::lat_2<>(38.96666666666667),srs::spar::lat_0<>(37.5),srs::spar::lon_0<>(-84.25),srs::spar::x_0<>(500000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102280) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(36.73333333333333),srs::spar::lat_2<>(37.93333333333333),srs::spar::lat_0<>(36.33333333333334),srs::spar::lon_0<>(-85.75),srs::spar::x_0<>(500000),srs::spar::y_0<>(500000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102281) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(31.16666666666667),srs::spar::lat_2<>(32.66666666666666),srs::spar::lat_0<>(30.5),srs::spar::lon_0<>(-92.5),srs::spar::x_0<>(1000000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102282) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(29.3),srs::spar::lat_2<>(30.7),srs::spar::lat_0<>(28.5),srs::spar::lon_0<>(-91.33333333333333),srs::spar::x_0<>(1000000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102283) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(43.66666666666666),srs::spar::lon_0<>(-68.5),srs::spar::k<>(0.9999),srs::spar::x_0<>(300000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102284) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(42.83333333333334),srs::spar::lon_0<>(-70.16666666666667),srs::spar::k<>(0.9999666666666667),srs::spar::x_0<>(900000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102285) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(38.3),srs::spar::lat_2<>(39.45),srs::spar::lat_0<>(37.66666666666666),srs::spar::lon_0<>(-77),srs::spar::x_0<>(400000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102286) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(41.71666666666667),srs::spar::lat_2<>(42.68333333333333),srs::spar::lat_0<>(41),srs::spar::lon_0<>(-71.5),srs::spar::x_0<>(200000),srs::spar::y_0<>(750000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102287) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(41.28333333333333),srs::spar::lat_2<>(41.48333333333333),srs::spar::lat_0<>(41),srs::spar::lon_0<>(-70.5),srs::spar::x_0<>(500000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102288) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(45.48333333333333),srs::spar::lat_2<>(47.08333333333334),srs::spar::lat_0<>(44.78333333333333),srs::spar::lon_0<>(-87),srs::spar::x_0<>(8000000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102289) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(44.18333333333333),srs::spar::lat_2<>(45.7),srs::spar::lat_0<>(43.31666666666667),srs::spar::lon_0<>(-84.36666666666666),srs::spar::x_0<>(6000000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102290) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(42.1),srs::spar::lat_2<>(43.66666666666666),srs::spar::lat_0<>(41.5),srs::spar::lon_0<>(-84.36666666666666),srs::spar::x_0<>(4000000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102291) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(47.03333333333333),srs::spar::lat_2<>(48.63333333333333),srs::spar::lat_0<>(46.5),srs::spar::lon_0<>(-93.09999999999999),srs::spar::x_0<>(800000),srs::spar::y_0<>(100000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102292) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(45.61666666666667),srs::spar::lat_2<>(47.05),srs::spar::lat_0<>(45),srs::spar::lon_0<>(-94.25),srs::spar::x_0<>(800000),srs::spar::y_0<>(100000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102293) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(43.78333333333333),srs::spar::lat_2<>(45.21666666666667),srs::spar::lat_0<>(43),srs::spar::lon_0<>(-94),srs::spar::x_0<>(800000),srs::spar::y_0<>(100000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102294) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(29.5),srs::spar::lon_0<>(-88.83333333333333),srs::spar::k<>(0.99995),srs::spar::x_0<>(300000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102295) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(29.5),srs::spar::lon_0<>(-90.33333333333333),srs::spar::k<>(0.99995),srs::spar::x_0<>(700000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102296) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(35.83333333333334),srs::spar::lon_0<>(-90.5),srs::spar::k<>(0.9999333333333333),srs::spar::x_0<>(250000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102297) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(35.83333333333334),srs::spar::lon_0<>(-92.5),srs::spar::k<>(0.9999333333333333),srs::spar::x_0<>(500000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102298) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(36.16666666666666),srs::spar::lon_0<>(-94.5),srs::spar::k<>(0.9999411764705882),srs::spar::x_0<>(850000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102300) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(45),srs::spar::lat_2<>(49),srs::spar::lat_0<>(44.25),srs::spar::lon_0<>(-109.5),srs::spar::x_0<>(600000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102304) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(40),srs::spar::lat_2<>(43),srs::spar::lat_0<>(39.83333333333334),srs::spar::lon_0<>(-100),srs::spar::x_0<>(500000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102307) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(34.75),srs::spar::lon_0<>(-115.5833333333333),srs::spar::k<>(0.9999),srs::spar::x_0<>(200000),srs::spar::y_0<>(8000000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102308) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(34.75),srs::spar::lon_0<>(-116.6666666666667),srs::spar::k<>(0.9999),srs::spar::x_0<>(500000),srs::spar::y_0<>(6000000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102309) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(34.75),srs::spar::lon_0<>(-118.5833333333333),srs::spar::k<>(0.9999),srs::spar::x_0<>(800000),srs::spar::y_0<>(4000000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102310) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(42.5),srs::spar::lon_0<>(-71.66666666666667),srs::spar::k<>(0.9999666666666667),srs::spar::x_0<>(300000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102311) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(38.83333333333334),srs::spar::lon_0<>(-74.5),srs::spar::k<>(0.9999),srs::spar::x_0<>(150000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102312) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(31),srs::spar::lon_0<>(-104.3333333333333),srs::spar::k<>(0.9999090909090909),srs::spar::x_0<>(165000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102313) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(31),srs::spar::lon_0<>(-106.25),srs::spar::k<>(0.9999),srs::spar::x_0<>(500000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102314) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(31),srs::spar::lon_0<>(-107.8333333333333),srs::spar::k<>(0.9999166666666667),srs::spar::x_0<>(830000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102315) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(38.83333333333334),srs::spar::lon_0<>(-74.5),srs::spar::k<>(0.9999),srs::spar::x_0<>(150000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102316) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(40),srs::spar::lon_0<>(-76.58333333333333),srs::spar::k<>(0.9999375),srs::spar::x_0<>(250000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102317) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(40),srs::spar::lon_0<>(-78.58333333333333),srs::spar::k<>(0.9999375),srs::spar::x_0<>(350000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102318) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(40.66666666666666),srs::spar::lat_2<>(41.03333333333333),srs::spar::lat_0<>(40.16666666666666),srs::spar::lon_0<>(-74),srs::spar::x_0<>(300000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102320) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(47.43333333333333),srs::spar::lat_2<>(48.73333333333333),srs::spar::lat_0<>(47),srs::spar::lon_0<>(-100.5),srs::spar::x_0<>(600000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102321) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(46.18333333333333),srs::spar::lat_2<>(47.48333333333333),srs::spar::lat_0<>(45.66666666666666),srs::spar::lon_0<>(-100.5),srs::spar::x_0<>(600000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102322) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(40.43333333333333),srs::spar::lat_2<>(41.7),srs::spar::lat_0<>(39.66666666666666),srs::spar::lon_0<>(-82.5),srs::spar::x_0<>(600000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102323) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(38.73333333333333),srs::spar::lat_2<>(40.03333333333333),srs::spar::lat_0<>(38),srs::spar::lon_0<>(-82.5),srs::spar::x_0<>(600000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102324) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(35.56666666666667),srs::spar::lat_2<>(36.76666666666667),srs::spar::lat_0<>(35),srs::spar::lon_0<>(-98),srs::spar::x_0<>(600000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102325) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(33.93333333333333),srs::spar::lat_2<>(35.23333333333333),srs::spar::lat_0<>(33.33333333333334),srs::spar::lon_0<>(-98),srs::spar::x_0<>(600000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102326) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(44.33333333333334),srs::spar::lat_2<>(46),srs::spar::lat_0<>(43.66666666666666),srs::spar::lon_0<>(-120.5),srs::spar::x_0<>(2500000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102327) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(42.33333333333334),srs::spar::lat_2<>(44),srs::spar::lat_0<>(41.66666666666666),srs::spar::lon_0<>(-120.5),srs::spar::x_0<>(1500000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102330) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(41.08333333333334),srs::spar::lon_0<>(-71.5),srs::spar::k<>(0.99999375),srs::spar::x_0<>(100000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102334) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(44.41666666666666),srs::spar::lat_2<>(45.68333333333333),srs::spar::lat_0<>(43.83333333333334),srs::spar::lon_0<>(-100),srs::spar::x_0<>(600000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102335) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(42.83333333333334),srs::spar::lat_2<>(44.4),srs::spar::lat_0<>(42.33333333333334),srs::spar::lon_0<>(-100.3333333333333),srs::spar::x_0<>(600000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102336) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(35.25),srs::spar::lat_2<>(36.41666666666666),srs::spar::lat_0<>(34.33333333333334),srs::spar::lon_0<>(-86),srs::spar::x_0<>(600000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102337) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(34.65),srs::spar::lat_2<>(36.18333333333333),srs::spar::lat_0<>(34),srs::spar::lon_0<>(-101.5),srs::spar::x_0<>(200000),srs::spar::y_0<>(1000000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102338) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(32.13333333333333),srs::spar::lat_2<>(33.96666666666667),srs::spar::lat_0<>(31.66666666666667),srs::spar::lon_0<>(-98.5),srs::spar::x_0<>(600000),srs::spar::y_0<>(2000000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102339) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(30.11666666666667),srs::spar::lat_2<>(31.88333333333333),srs::spar::lat_0<>(29.66666666666667),srs::spar::lon_0<>(-100.3333333333333),srs::spar::x_0<>(700000),srs::spar::y_0<>(3000000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102340) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(28.38333333333333),srs::spar::lat_2<>(30.28333333333334),srs::spar::lat_0<>(27.83333333333333),srs::spar::lon_0<>(-99),srs::spar::x_0<>(600000),srs::spar::y_0<>(4000000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102341) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(26.16666666666667),srs::spar::lat_2<>(27.83333333333333),srs::spar::lat_0<>(25.66666666666667),srs::spar::lon_0<>(-98.5),srs::spar::x_0<>(300000),srs::spar::y_0<>(5000000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102342) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(40.71666666666667),srs::spar::lat_2<>(41.78333333333333),srs::spar::lat_0<>(40.33333333333334),srs::spar::lon_0<>(-111.5),srs::spar::x_0<>(500000),srs::spar::y_0<>(1000000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102343) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(39.01666666666667),srs::spar::lat_2<>(40.65),srs::spar::lat_0<>(38.33333333333334),srs::spar::lon_0<>(-111.5),srs::spar::x_0<>(500000),srs::spar::y_0<>(2000000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102344) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(37.21666666666667),srs::spar::lat_2<>(38.35),srs::spar::lat_0<>(36.66666666666666),srs::spar::lon_0<>(-111.5),srs::spar::x_0<>(500000),srs::spar::y_0<>(3000000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102345) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(42.5),srs::spar::lon_0<>(-72.5),srs::spar::k<>(0.9999642857142857),srs::spar::x_0<>(500000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102346) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(38.03333333333333),srs::spar::lat_2<>(39.2),srs::spar::lat_0<>(37.66666666666666),srs::spar::lon_0<>(-78.5),srs::spar::x_0<>(3500000),srs::spar::y_0<>(2000000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102347) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(36.76666666666667),srs::spar::lat_2<>(37.96666666666667),srs::spar::lat_0<>(36.33333333333334),srs::spar::lon_0<>(-78.5),srs::spar::x_0<>(3500000),srs::spar::y_0<>(1000000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102348) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(47.5),srs::spar::lat_2<>(48.73333333333333),srs::spar::lat_0<>(47),srs::spar::lon_0<>(-120.8333333333333),srs::spar::x_0<>(500000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102349) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(45.83333333333334),srs::spar::lat_2<>(47.33333333333334),srs::spar::lat_0<>(45.33333333333334),srs::spar::lon_0<>(-120.5),srs::spar::x_0<>(500000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102350) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(39),srs::spar::lat_2<>(40.25),srs::spar::lat_0<>(38.5),srs::spar::lon_0<>(-79.5),srs::spar::x_0<>(600000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102351) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(37.48333333333333),srs::spar::lat_2<>(38.88333333333333),srs::spar::lat_0<>(37),srs::spar::lon_0<>(-81),srs::spar::x_0<>(600000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102352) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(45.56666666666667),srs::spar::lat_2<>(46.76666666666667),srs::spar::lat_0<>(45.16666666666666),srs::spar::lon_0<>(-90),srs::spar::x_0<>(600000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102353) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(44.25),srs::spar::lat_2<>(45.5),srs::spar::lat_0<>(43.83333333333334),srs::spar::lon_0<>(-90),srs::spar::x_0<>(600000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102354) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(42.73333333333333),srs::spar::lat_2<>(44.06666666666667),srs::spar::lat_0<>(42),srs::spar::lon_0<>(-90),srs::spar::x_0<>(600000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102355) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(40.5),srs::spar::lon_0<>(-105.1666666666667),srs::spar::k<>(0.9999375),srs::spar::x_0<>(200000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102356) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(40.5),srs::spar::lon_0<>(-107.3333333333333),srs::spar::k<>(0.9999375),srs::spar::x_0<>(400000),srs::spar::y_0<>(100000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102357) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(40.5),srs::spar::lon_0<>(-108.75),srs::spar::k<>(0.9999375),srs::spar::x_0<>(600000),srs::spar::y_0<>(0)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102358) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(40.5),srs::spar::lon_0<>(-110.0833333333333),srs::spar::k<>(0.9999375),srs::spar::x_0<>(800000),srs::spar::y_0<>(100000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102361) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(18.03333333333334),srs::spar::lat_2<>(18.43333333333333),srs::spar::lat_0<>(17.83333333333333),srs::spar::lon_0<>(-66.43333333333334),srs::spar::x_0<>(200000),srs::spar::y_0<>(200000)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102491) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::a<>,srs::spar::b<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(36),srs::spar::lat_0<>(36),srs::spar::lon_0<>(2.7),srs::spar::k_0<>(0.999625544),srs::spar::x_0<>(500000),srs::spar::y_0<>(300000),srs::spar::a<>(6378249.2),srs::spar::b<>(6356514.999904194)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102492) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::a<>,srs::spar::b<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(33.3),srs::spar::lat_0<>(33.3),srs::spar::lon_0<>(2.7),srs::spar::k_0<>(0.999625769),srs::spar::x_0<>(500000),srs::spar::y_0<>(300000),srs::spar::a<>(6378249.2),srs::spar::b<>(6356514.999904194)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102581) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::a<>,srs::spar::b<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(49.5),srs::spar::lat_0<>(49.5),srs::spar::lon_0<>(2.337229166666667),srs::spar::k_0<>(0.999877341),srs::spar::x_0<>(600000),srs::spar::y_0<>(1200000),srs::spar::a<>(6378249.2),srs::spar::b<>(6356514.999904194)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102582) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::a<>,srs::spar::b<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(46.8),srs::spar::lat_0<>(46.8),srs::spar::lon_0<>(2.337229166666667),srs::spar::k_0<>(0.99987742),srs::spar::x_0<>(600000),srs::spar::y_0<>(2200000),srs::spar::a<>(6378249.2),srs::spar::b<>(6356514.999904194)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102583) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::a<>,srs::spar::b<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(44.1),srs::spar::lat_0<>(44.1),srs::spar::lon_0<>(2.337229166666667),srs::spar::k_0<>(0.999877499),srs::spar::x_0<>(600000),srs::spar::y_0<>(3200000),srs::spar::a<>(6378249.2),srs::spar::b<>(6356514.999904194)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102584) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::a<>,srs::spar::b<>,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(42.165),srs::spar::lat_0<>(42.165),srs::spar::lon_0<>(2.337229166666667),srs::spar::k_0<>(0.99994471),srs::spar::x_0<>(234.358),srs::spar::y_0<>(4185861.369),srs::spar::a<>(6378249.2),srs::spar::b<>(6356514.999904194)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102591) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_clrk80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(36),srs::spar::lat_0<>(36),srs::spar::lon_0<>(2.7),srs::spar::k_0<>(0.999625544),srs::spar::x_0<>(500135),srs::spar::y_0<>(300090)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102592) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_clrk80,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(33.3),srs::spar::lat_0<>(33.3),srs::spar::lon_0<>(2.7),srs::spar::k_0<>(0.999625769),srs::spar::x_0<>(500135),srs::spar::y_0<>(300090)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102629) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(30.5),srs::spar::lon_0<>(-85.83333333333333),srs::spar::k<>(0.99996),srs::spar::x_0<>(200000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102630) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(30),srs::spar::lon_0<>(-87.5),srs::spar::k<>(0.9999333333333333),srs::spar::x_0<>(600000.0000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102631) srs::spar::parameters<srs::spar::proj_omerc,srs::spar::lat_0<>,srs::spar::lonc<>,srs::spar::alpha<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_omerc(),srs::spar::lat_0<>(57),srs::spar::lonc<>(-133.6666666666667),srs::spar::alpha<>(-36.86989764583333),srs::spar::k<>(0.9999),srs::spar::x_0<>(4999999.999999999),srs::spar::y_0<>(-4999999.999999999),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102632) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(54),srs::spar::lon_0<>(-142),srs::spar::k<>(0.9999),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102633) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(54),srs::spar::lon_0<>(-146),srs::spar::k<>(0.9999),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102634) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(54),srs::spar::lon_0<>(-150),srs::spar::k<>(0.9999),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102635) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(54),srs::spar::lon_0<>(-154),srs::spar::k<>(0.9999),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102636) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(54),srs::spar::lon_0<>(-158),srs::spar::k<>(0.9999),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102637) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(54),srs::spar::lon_0<>(-162),srs::spar::k<>(0.9999),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102638) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(54),srs::spar::lon_0<>(-166),srs::spar::k<>(0.9999),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102639) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(54),srs::spar::lon_0<>(-170),srs::spar::k<>(0.9999),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102640) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(51.83333333333334),srs::spar::lat_2<>(53.83333333333334),srs::spar::lat_0<>(51),srs::spar::lon_0<>(-176),srs::spar::x_0<>(1000000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102641) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(40),srs::spar::lat_2<>(41.66666666666666),srs::spar::lat_0<>(39.33333333333334),srs::spar::lon_0<>(-122),srs::spar::x_0<>(2000000),srs::spar::y_0<>(500000.0000000002),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102642) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(38.33333333333334),srs::spar::lat_2<>(39.83333333333334),srs::spar::lat_0<>(37.66666666666666),srs::spar::lon_0<>(-122),srs::spar::x_0<>(2000000),srs::spar::y_0<>(500000.0000000002),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102643) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(37.06666666666667),srs::spar::lat_2<>(38.43333333333333),srs::spar::lat_0<>(36.5),srs::spar::lon_0<>(-120.5),srs::spar::x_0<>(2000000),srs::spar::y_0<>(500000.0000000002),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102644) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(36),srs::spar::lat_2<>(37.25),srs::spar::lat_0<>(35.33333333333334),srs::spar::lon_0<>(-119),srs::spar::x_0<>(2000000),srs::spar::y_0<>(500000.0000000002),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102645) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(34.03333333333333),srs::spar::lat_2<>(35.46666666666667),srs::spar::lat_0<>(33.5),srs::spar::lon_0<>(-118),srs::spar::x_0<>(2000000),srs::spar::y_0<>(500000.0000000002),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102646) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(32.78333333333333),srs::spar::lat_2<>(33.88333333333333),srs::spar::lat_0<>(32.16666666666666),srs::spar::lon_0<>(-116.25),srs::spar::x_0<>(2000000),srs::spar::y_0<>(500000.0000000002),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102648) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(31),srs::spar::lon_0<>(-110.1666666666667),srs::spar::k<>(0.9999),srs::spar::x_0<>(213360),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102649) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(31),srs::spar::lon_0<>(-111.9166666666667),srs::spar::k<>(0.9999),srs::spar::x_0<>(213360),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102650) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(31),srs::spar::lon_0<>(-113.75),srs::spar::k<>(0.9999333333333333),srs::spar::x_0<>(213360),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102651) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(34.93333333333333),srs::spar::lat_2<>(36.23333333333333),srs::spar::lat_0<>(34.33333333333334),srs::spar::lon_0<>(-92),srs::spar::x_0<>(399999.9999999999),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102652) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(33.3),srs::spar::lat_2<>(34.76666666666667),srs::spar::lat_0<>(32.66666666666666),srs::spar::lon_0<>(-92),srs::spar::x_0<>(399999.9999999999),srs::spar::y_0<>(399999.9999999999),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102653) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(39.71666666666667),srs::spar::lat_2<>(40.78333333333333),srs::spar::lat_0<>(39.33333333333334),srs::spar::lon_0<>(-105.5),srs::spar::x_0<>(914401.8289),srs::spar::y_0<>(304800.6096),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102654) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(38.45),srs::spar::lat_2<>(39.75),srs::spar::lat_0<>(37.83333333333334),srs::spar::lon_0<>(-105.5),srs::spar::x_0<>(914401.8289),srs::spar::y_0<>(304800.6096),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102655) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(37.23333333333333),srs::spar::lat_2<>(38.43333333333333),srs::spar::lat_0<>(36.66666666666666),srs::spar::lon_0<>(-105.5),srs::spar::x_0<>(914401.8289),srs::spar::y_0<>(304800.6096),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102656) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(41.2),srs::spar::lat_2<>(41.86666666666667),srs::spar::lat_0<>(40.83333333333334),srs::spar::lon_0<>(-72.75),srs::spar::x_0<>(304800.6096),srs::spar::y_0<>(152400.3048),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102657) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(38),srs::spar::lon_0<>(-75.41666666666667),srs::spar::k<>(0.999995),srs::spar::x_0<>(200000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102658) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(24.33333333333333),srs::spar::lon_0<>(-81),srs::spar::k<>(0.9999411764705882),srs::spar::x_0<>(200000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102659) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(24.33333333333333),srs::spar::lon_0<>(-82),srs::spar::k<>(0.9999411764705882),srs::spar::x_0<>(200000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102660) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(29.58333333333333),srs::spar::lat_2<>(30.75),srs::spar::lat_0<>(29),srs::spar::lon_0<>(-84.5),srs::spar::x_0<>(600000.0000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102661) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(18.83333333333333),srs::spar::lon_0<>(-155.5),srs::spar::k<>(0.9999666666666667),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102662) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(20.33333333333333),srs::spar::lon_0<>(-156.6666666666667),srs::spar::k<>(0.9999666666666667),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102663) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(21.16666666666667),srs::spar::lon_0<>(-158),srs::spar::k<>(0.99999),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102664) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(21.83333333333333),srs::spar::lon_0<>(-159.5),srs::spar::k<>(0.99999),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102665) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(21.66666666666667),srs::spar::lon_0<>(-160.1666666666667),srs::spar::k<>(1),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102666) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(30),srs::spar::lon_0<>(-82.16666666666667),srs::spar::k<>(0.9999),srs::spar::x_0<>(200000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102667) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(30),srs::spar::lon_0<>(-84.16666666666667),srs::spar::k<>(0.9999),srs::spar::x_0<>(700000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102668) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(41.66666666666666),srs::spar::lon_0<>(-112.1666666666667),srs::spar::k<>(0.9999473684210526),srs::spar::x_0<>(200000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102669) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(41.66666666666666),srs::spar::lon_0<>(-114),srs::spar::k<>(0.9999473684210526),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102670) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(41.66666666666666),srs::spar::lon_0<>(-115.75),srs::spar::k<>(0.9999333333333333),srs::spar::x_0<>(799999.9999999999),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102671) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(36.66666666666666),srs::spar::lon_0<>(-88.33333333333333),srs::spar::k<>(0.9999749999999999),srs::spar::x_0<>(300000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102672) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(36.66666666666666),srs::spar::lon_0<>(-90.16666666666667),srs::spar::k<>(0.9999411764705882),srs::spar::x_0<>(700000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102673) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(37.5),srs::spar::lon_0<>(-85.66666666666667),srs::spar::k<>(0.9999666666666667),srs::spar::x_0<>(100000),srs::spar::y_0<>(250000),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102674) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(37.5),srs::spar::lon_0<>(-87.08333333333333),srs::spar::k<>(0.9999666666666667),srs::spar::x_0<>(900000.0000000001),srs::spar::y_0<>(250000),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102675) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(42.06666666666667),srs::spar::lat_2<>(43.26666666666667),srs::spar::lat_0<>(41.5),srs::spar::lon_0<>(-93.5),srs::spar::x_0<>(1500000),srs::spar::y_0<>(1000000),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102676) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(40.61666666666667),srs::spar::lat_2<>(41.78333333333333),srs::spar::lat_0<>(40),srs::spar::lon_0<>(-93.5),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102677) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(38.71666666666667),srs::spar::lat_2<>(39.78333333333333),srs::spar::lat_0<>(38.33333333333334),srs::spar::lon_0<>(-98),srs::spar::x_0<>(399999.9999999999),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102678) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(37.26666666666667),srs::spar::lat_2<>(38.56666666666667),srs::spar::lat_0<>(36.66666666666666),srs::spar::lon_0<>(-98.5),srs::spar::x_0<>(399999.9999999999),srs::spar::y_0<>(399999.9999999999),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102679) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(37.96666666666667),srs::spar::lat_2<>(38.96666666666667),srs::spar::lat_0<>(37.5),srs::spar::lon_0<>(-84.25),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102680) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(36.73333333333333),srs::spar::lat_2<>(37.93333333333333),srs::spar::lat_0<>(36.33333333333334),srs::spar::lon_0<>(-85.75),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(500000.0000000002),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102681) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(31.16666666666667),srs::spar::lat_2<>(32.66666666666666),srs::spar::lat_0<>(30.5),srs::spar::lon_0<>(-92.5),srs::spar::x_0<>(1000000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102682) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(29.3),srs::spar::lat_2<>(30.7),srs::spar::lat_0<>(28.5),srs::spar::lon_0<>(-91.33333333333333),srs::spar::x_0<>(1000000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102683) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(43.66666666666666),srs::spar::lon_0<>(-68.5),srs::spar::k<>(0.9999),srs::spar::x_0<>(300000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102684) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(42.83333333333334),srs::spar::lon_0<>(-70.16666666666667),srs::spar::k<>(0.9999666666666667),srs::spar::x_0<>(900000.0000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102685) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(38.3),srs::spar::lat_2<>(39.45),srs::spar::lat_0<>(37.66666666666666),srs::spar::lon_0<>(-77),srs::spar::x_0<>(399999.9999999999),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102686) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(41.71666666666667),srs::spar::lat_2<>(42.68333333333333),srs::spar::lat_0<>(41),srs::spar::lon_0<>(-71.5),srs::spar::x_0<>(200000),srs::spar::y_0<>(750000.0000000001),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102687) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(41.28333333333333),srs::spar::lat_2<>(41.48333333333333),srs::spar::lat_0<>(41),srs::spar::lon_0<>(-70.5),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102688) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(45.48333333333333),srs::spar::lat_2<>(47.08333333333334),srs::spar::lat_0<>(44.78333333333333),srs::spar::lon_0<>(-87),srs::spar::x_0<>(7999999.999999999),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102689) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(44.18333333333333),srs::spar::lat_2<>(45.7),srs::spar::lat_0<>(43.31666666666667),srs::spar::lon_0<>(-84.36666666666666),srs::spar::x_0<>(6000000.000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102690) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(42.1),srs::spar::lat_2<>(43.66666666666666),srs::spar::lat_0<>(41.5),srs::spar::lon_0<>(-84.36666666666666),srs::spar::x_0<>(4000000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102691) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(47.03333333333333),srs::spar::lat_2<>(48.63333333333333),srs::spar::lat_0<>(46.5),srs::spar::lon_0<>(-93.09999999999999),srs::spar::x_0<>(799999.9999999999),srs::spar::y_0<>(100000),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102692) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(45.61666666666667),srs::spar::lat_2<>(47.05),srs::spar::lat_0<>(45),srs::spar::lon_0<>(-94.25),srs::spar::x_0<>(799999.9999999999),srs::spar::y_0<>(100000),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102693) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(43.78333333333333),srs::spar::lat_2<>(45.21666666666667),srs::spar::lat_0<>(43),srs::spar::lon_0<>(-94),srs::spar::x_0<>(799999.9999999999),srs::spar::y_0<>(100000),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102694) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(29.5),srs::spar::lon_0<>(-88.83333333333333),srs::spar::k<>(0.99995),srs::spar::x_0<>(300000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102695) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(29.5),srs::spar::lon_0<>(-90.33333333333333),srs::spar::k<>(0.99995),srs::spar::x_0<>(700000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102696) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(35.83333333333334),srs::spar::lon_0<>(-90.5),srs::spar::k<>(0.9999333333333333),srs::spar::x_0<>(250000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102697) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(35.83333333333334),srs::spar::lon_0<>(-92.5),srs::spar::k<>(0.9999333333333333),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102698) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(36.16666666666666),srs::spar::lon_0<>(-94.5),srs::spar::k<>(0.9999411764705882),srs::spar::x_0<>(850000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102700) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(45),srs::spar::lat_2<>(49),srs::spar::lat_0<>(44.25),srs::spar::lon_0<>(-109.5),srs::spar::x_0<>(600000.0000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102704) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(40),srs::spar::lat_2<>(43),srs::spar::lat_0<>(39.83333333333334),srs::spar::lon_0<>(-100),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102707) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(34.75),srs::spar::lon_0<>(-115.5833333333333),srs::spar::k<>(0.9999),srs::spar::x_0<>(200000),srs::spar::y_0<>(7999999.999999999),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102708) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(34.75),srs::spar::lon_0<>(-116.6666666666667),srs::spar::k<>(0.9999),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(6000000.000000001),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102709) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(34.75),srs::spar::lon_0<>(-118.5833333333333),srs::spar::k<>(0.9999),srs::spar::x_0<>(799999.9999999999),srs::spar::y_0<>(4000000),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102710) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(42.5),srs::spar::lon_0<>(-71.66666666666667),srs::spar::k<>(0.9999666666666667),srs::spar::x_0<>(300000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102711) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(38.83333333333334),srs::spar::lon_0<>(-74.5),srs::spar::k<>(0.9999),srs::spar::x_0<>(150000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102712) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(31),srs::spar::lon_0<>(-104.3333333333333),srs::spar::k<>(0.9999090909090909),srs::spar::x_0<>(165000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102713) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(31),srs::spar::lon_0<>(-106.25),srs::spar::k<>(0.9999),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102714) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(31),srs::spar::lon_0<>(-107.8333333333333),srs::spar::k<>(0.9999166666666667),srs::spar::x_0<>(829999.9999999999),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102715) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(38.83333333333334),srs::spar::lon_0<>(-74.5),srs::spar::k<>(0.9999),srs::spar::x_0<>(150000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102716) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(40),srs::spar::lon_0<>(-76.58333333333333),srs::spar::k<>(0.9999375),srs::spar::x_0<>(250000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102717) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(40),srs::spar::lon_0<>(-78.58333333333333),srs::spar::k<>(0.9999375),srs::spar::x_0<>(350000.0000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102718) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(40.66666666666666),srs::spar::lat_2<>(41.03333333333333),srs::spar::lat_0<>(40.16666666666666),srs::spar::lon_0<>(-74),srs::spar::x_0<>(300000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102719) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(34.33333333333334),srs::spar::lat_2<>(36.16666666666666),srs::spar::lat_0<>(33.75),srs::spar::lon_0<>(-79),srs::spar::x_0<>(609601.2199999999),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102720) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(47.43333333333333),srs::spar::lat_2<>(48.73333333333333),srs::spar::lat_0<>(47),srs::spar::lon_0<>(-100.5),srs::spar::x_0<>(600000.0000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102721) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(46.18333333333333),srs::spar::lat_2<>(47.48333333333333),srs::spar::lat_0<>(45.66666666666666),srs::spar::lon_0<>(-100.5),srs::spar::x_0<>(600000.0000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102722) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(40.43333333333333),srs::spar::lat_2<>(41.7),srs::spar::lat_0<>(39.66666666666666),srs::spar::lon_0<>(-82.5),srs::spar::x_0<>(600000.0000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102723) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(38.73333333333333),srs::spar::lat_2<>(40.03333333333333),srs::spar::lat_0<>(38),srs::spar::lon_0<>(-82.5),srs::spar::x_0<>(600000.0000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102724) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(35.56666666666667),srs::spar::lat_2<>(36.76666666666667),srs::spar::lat_0<>(35),srs::spar::lon_0<>(-98),srs::spar::x_0<>(600000.0000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102725) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(33.93333333333333),srs::spar::lat_2<>(35.23333333333333),srs::spar::lat_0<>(33.33333333333334),srs::spar::lon_0<>(-98),srs::spar::x_0<>(600000.0000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102726) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(44.33333333333334),srs::spar::lat_2<>(46),srs::spar::lat_0<>(43.66666666666666),srs::spar::lon_0<>(-120.5),srs::spar::x_0<>(2500000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102727) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(42.33333333333334),srs::spar::lat_2<>(44),srs::spar::lat_0<>(41.66666666666666),srs::spar::lon_0<>(-120.5),srs::spar::x_0<>(1500000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102728) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(40.88333333333333),srs::spar::lat_2<>(41.95),srs::spar::lat_0<>(40.16666666666666),srs::spar::lon_0<>(-77.75),srs::spar::x_0<>(600000.0000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102729) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(39.93333333333333),srs::spar::lat_2<>(40.96666666666667),srs::spar::lat_0<>(39.33333333333334),srs::spar::lon_0<>(-77.75),srs::spar::x_0<>(600000.0000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102730) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(41.08333333333334),srs::spar::lon_0<>(-71.5),srs::spar::k<>(0.99999375),srs::spar::x_0<>(100000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102733) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(32.5),srs::spar::lat_2<>(34.83333333333334),srs::spar::lat_0<>(31.83333333333333),srs::spar::lon_0<>(-81),srs::spar::x_0<>(609600.0000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102734) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(44.41666666666666),srs::spar::lat_2<>(45.68333333333333),srs::spar::lat_0<>(43.83333333333334),srs::spar::lon_0<>(-100),srs::spar::x_0<>(600000.0000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102735) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(42.83333333333334),srs::spar::lat_2<>(44.4),srs::spar::lat_0<>(42.33333333333334),srs::spar::lon_0<>(-100.3333333333333),srs::spar::x_0<>(600000.0000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102736) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(35.25),srs::spar::lat_2<>(36.41666666666666),srs::spar::lat_0<>(34.33333333333334),srs::spar::lon_0<>(-86),srs::spar::x_0<>(600000.0000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102737) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(34.65),srs::spar::lat_2<>(36.18333333333333),srs::spar::lat_0<>(34),srs::spar::lon_0<>(-101.5),srs::spar::x_0<>(200000),srs::spar::y_0<>(1000000),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102738) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(32.13333333333333),srs::spar::lat_2<>(33.96666666666667),srs::spar::lat_0<>(31.66666666666667),srs::spar::lon_0<>(-98.5),srs::spar::x_0<>(600000.0000000001),srs::spar::y_0<>(2000000),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102739) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(30.11666666666667),srs::spar::lat_2<>(31.88333333333333),srs::spar::lat_0<>(29.66666666666667),srs::spar::lon_0<>(-100.3333333333333),srs::spar::x_0<>(700000),srs::spar::y_0<>(3000000),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102740) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(28.38333333333333),srs::spar::lat_2<>(30.28333333333334),srs::spar::lat_0<>(27.83333333333333),srs::spar::lon_0<>(-99),srs::spar::x_0<>(600000.0000000001),srs::spar::y_0<>(4000000),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102741) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(26.16666666666667),srs::spar::lat_2<>(27.83333333333333),srs::spar::lat_0<>(25.66666666666667),srs::spar::lon_0<>(-98.5),srs::spar::x_0<>(300000),srs::spar::y_0<>(4999999.999999999),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102742) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(40.71666666666667),srs::spar::lat_2<>(41.78333333333333),srs::spar::lat_0<>(40.33333333333334),srs::spar::lon_0<>(-111.5),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(1000000),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102743) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(39.01666666666667),srs::spar::lat_2<>(40.65),srs::spar::lat_0<>(38.33333333333334),srs::spar::lon_0<>(-111.5),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(2000000),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102744) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(37.21666666666667),srs::spar::lat_2<>(38.35),srs::spar::lat_0<>(36.66666666666666),srs::spar::lon_0<>(-111.5),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(3000000),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102745) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(42.5),srs::spar::lon_0<>(-72.5),srs::spar::k<>(0.9999642857142857),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102746) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(38.03333333333333),srs::spar::lat_2<>(39.2),srs::spar::lat_0<>(37.66666666666666),srs::spar::lon_0<>(-78.5),srs::spar::x_0<>(3499999.999999999),srs::spar::y_0<>(2000000),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102747) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(36.76666666666667),srs::spar::lat_2<>(37.96666666666667),srs::spar::lat_0<>(36.33333333333334),srs::spar::lon_0<>(-78.5),srs::spar::x_0<>(3499999.999999999),srs::spar::y_0<>(1000000),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102748) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(47.5),srs::spar::lat_2<>(48.73333333333333),srs::spar::lat_0<>(47),srs::spar::lon_0<>(-120.8333333333333),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102749) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(45.83333333333334),srs::spar::lat_2<>(47.33333333333334),srs::spar::lat_0<>(45.33333333333334),srs::spar::lon_0<>(-120.5),srs::spar::x_0<>(500000.0000000002),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102750) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(39),srs::spar::lat_2<>(40.25),srs::spar::lat_0<>(38.5),srs::spar::lon_0<>(-79.5),srs::spar::x_0<>(600000.0000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102751) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(37.48333333333333),srs::spar::lat_2<>(38.88333333333333),srs::spar::lat_0<>(37),srs::spar::lon_0<>(-81),srs::spar::x_0<>(600000.0000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102752) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(45.56666666666667),srs::spar::lat_2<>(46.76666666666667),srs::spar::lat_0<>(45.16666666666666),srs::spar::lon_0<>(-90),srs::spar::x_0<>(600000.0000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102753) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(44.25),srs::spar::lat_2<>(45.5),srs::spar::lat_0<>(43.83333333333334),srs::spar::lon_0<>(-90),srs::spar::x_0<>(600000.0000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102754) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(42.73333333333333),srs::spar::lat_2<>(44.06666666666667),srs::spar::lat_0<>(42),srs::spar::lon_0<>(-90),srs::spar::x_0<>(600000.0000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102755) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(40.5),srs::spar::lon_0<>(-105.1666666666667),srs::spar::k<>(0.9999375),srs::spar::x_0<>(200000),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102756) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(40.5),srs::spar::lon_0<>(-107.3333333333333),srs::spar::k<>(0.9999375),srs::spar::x_0<>(399999.9999999999),srs::spar::y_0<>(100000),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102757) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(40.5),srs::spar::lon_0<>(-108.75),srs::spar::k<>(0.9999375),srs::spar::x_0<>(600000.0000000001),srs::spar::y_0<>(0),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102758) srs::spar::parameters<srs::spar::proj_tmerc,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::k<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_tmerc(),srs::spar::lat_0<>(40.5),srs::spar::lon_0<>(-110.0833333333333),srs::spar::k<>(0.9999375),srs::spar::x_0<>(799999.9999999999),srs::spar::y_0<>(100000),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102761) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(18.03333333333334),srs::spar::lat_2<>(18.43333333333333),srs::spar::lat_0<>(17.83333333333333),srs::spar::lon_0<>(-66.43333333333334),srs::spar::x_0<>(200000),srs::spar::y_0<>(200000),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 102766) srs::spar::parameters<srs::spar::proj_poly,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_grs80,srs::spar::datum_nad83,srs::spar::to_meter<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_poly(),srs::spar::lat_0<>(13.47246635277778),srs::spar::lon_0<>(-144.7487507055556),srs::spar::x_0<>(49999.99999999999),srs::spar::y_0<>(49999.99999999999),srs::spar::ellps_grs80(),srs::spar::datum_nad83(),srs::spar::to_meter<>(0.3048006096012192)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 103300) srs::spar::parameters<srs::spar::proj_lcc,srs::spar::lat_1<>,srs::spar::lat_2<>,srs::spar::lat_0<>,srs::spar::lon_0<>,srs::spar::x_0<>,srs::spar::y_0<>,srs::spar::ellps_intl,srs::spar::units_m,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_lcc(),srs::spar::lat_1<>(49.8333339),srs::spar::lat_2<>(51.16666733333333),srs::spar::lat_0<>(90),srs::spar::lon_0<>(4.367486666666666),srs::spar::x_0<>(150000.01256),srs::spar::y_0<>(5400088.4378)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 104000) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_clrk66,srs::spar::datum_nad27,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 104101) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_bessel,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 104102) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_bessel,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 104103) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_clrk80,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 104104) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 104105) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_bessel,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 104106) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_intl,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 104107) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_grs80,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 104108) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_grs80,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 104261) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::a<>,srs::spar::b<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_longlat(),srs::spar::a<>(6378249.2),srs::spar::b<>(6356514.999904194)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 104304) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::a<>,srs::spar::b<>,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() (srs::spar::proj_longlat(),srs::spar::a<>(6378249.2),srs::spar::b<>(6356514.999904194)) BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_BEG(esri, 104305) srs::spar::parameters<srs::spar::proj_longlat,srs::spar::ellps_clrk80,srs::spar::no_defs> BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_MID() () BOOST_GEOMETRY_PROJECTIONS_DETAIL_SRID_TRAITS_END()
|
||||
|
||||
} // namespace detail
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2008-2012 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)
|
||||
|
||||
#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(projections::detail::error_proj_not_named)
|
||||
{}
|
||||
};
|
||||
|
||||
struct projection_unknown_id_exception
|
||||
: projection_exception
|
||||
{
|
||||
projection_unknown_id_exception()
|
||||
: projection_exception(projections::detail::error_unknown_projection_id,
|
||||
msg())
|
||||
{}
|
||||
|
||||
projection_unknown_id_exception(std::string const& proj_name)
|
||||
: projection_exception(projections::detail::error_unknown_projection_id,
|
||||
msg(proj_name))
|
||||
{}
|
||||
|
||||
private:
|
||||
static std::string msg()
|
||||
{
|
||||
using namespace projections::detail;
|
||||
return pj_strerrno(error_unknown_projection_id);
|
||||
}
|
||||
static std::string msg(std::string const& proj_name)
|
||||
{
|
||||
using namespace projections::detail;
|
||||
return pj_strerrno(error_unknown_projection_id) + " (" + proj_name + ")";
|
||||
}
|
||||
};
|
||||
|
||||
struct projection_not_invertible_exception
|
||||
: projection_exception
|
||||
{
|
||||
// NOTE: There is no error code in proj4 which could be used here
|
||||
// Proj4 sets points as invalid (HUGE_VAL) and last errno to EINVAL
|
||||
// in pj_inv() if inverse projection is not available.
|
||||
projection_not_invertible_exception(std::string const& proj_name)
|
||||
: projection_exception(projections::detail::error_non_conv_inv_meri_dist,
|
||||
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
|
||||
@@ -0,0 +1,295 @@
|
||||
// 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/dpar.hpp>
|
||||
#include <boost/geometry/srs/projections/factory_key.hpp>
|
||||
#include <boost/geometry/srs/projections/proj4.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 Params, typename CT, typename ProjParams>
|
||||
class factory
|
||||
{
|
||||
private:
|
||||
typedef detail::factory_entry
|
||||
<
|
||||
Params,
|
||||
CT,
|
||||
ProjParams
|
||||
> entry_base;
|
||||
|
||||
typedef typename factory_key_util<Params>::type key_type;
|
||||
typedef boost::shared_ptr<entry_base> entry_ptr;
|
||||
|
||||
typedef std::map<key_type, entry_ptr> entries_map;
|
||||
|
||||
entries_map m_entries;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
void add_to_factory(key_type const& key, entry_base* entry)
|
||||
{
|
||||
// The pointer has to be owned before std::map::operator[] in case it thrown an exception.
|
||||
entry_ptr ptr(entry);
|
||||
m_entries[key] = ptr;
|
||||
}
|
||||
|
||||
detail::base_v<CT, ProjParams>* create_new(Params const& params, ProjParams const& proj_par) const
|
||||
{
|
||||
typename factory_key_util<Params>::type key = factory_key_util<Params>::get(proj_par);
|
||||
typename entries_map::const_iterator it = m_entries.find(key);
|
||||
if (it != m_entries.end())
|
||||
{
|
||||
return it->second->create_new(params, proj_par);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
inline detail::base_v<T, projections::parameters<T> >*
|
||||
create_new(srs::detail::proj4_parameters const& params,
|
||||
projections::parameters<T> const& parameters)
|
||||
{
|
||||
static factory<srs::detail::proj4_parameters, T, projections::parameters<T> > const fac;
|
||||
return fac.create_new(params, parameters);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline detail::base_v<T, projections::parameters<T> >*
|
||||
create_new(srs::dpar::parameters<T> const& params,
|
||||
projections::parameters<T> const& parameters)
|
||||
{
|
||||
static factory<srs::dpar::parameters<T>, T, projections::parameters<T> > const fac;
|
||||
return fac.create_new(params, parameters);
|
||||
}
|
||||
|
||||
|
||||
} // namespace detail
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_FACTORY_HPP
|
||||
@@ -0,0 +1,83 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 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)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_FACTORY_KEY_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_FACTORY_KEY_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <boost/geometry/srs/projections/dpar.hpp>
|
||||
#include <boost/geometry/srs/projections/proj4.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template <typename Params>
|
||||
struct factory_key_util
|
||||
{
|
||||
BOOST_MPL_ASSERT_MSG((false), INVALID_PARAMETERS_TYPE, (Params));
|
||||
};
|
||||
|
||||
template <>
|
||||
struct factory_key_util<srs::detail::proj4_parameters>
|
||||
{
|
||||
typedef std::string type;
|
||||
template <typename ProjParams>
|
||||
static type const& get(ProjParams const& par)
|
||||
{
|
||||
return par.id.name;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct factory_key_util<srs::dpar::parameters<T> >
|
||||
{
|
||||
typedef srs::dpar::value_proj type;
|
||||
template <typename ProjParams>
|
||||
static type const& get(ProjParams const& par)
|
||||
{
|
||||
return par.id.id;
|
||||
}
|
||||
};
|
||||
|
||||
struct factory_key
|
||||
{
|
||||
factory_key(const char* name, srs::dpar::value_proj id)
|
||||
: m_name(name), m_id(id)
|
||||
{}
|
||||
|
||||
operator const char*() const
|
||||
{
|
||||
return m_name;
|
||||
}
|
||||
|
||||
operator std::string() const
|
||||
{
|
||||
return std::string(m_name);
|
||||
}
|
||||
|
||||
operator srs::dpar::value_proj() const
|
||||
{
|
||||
return m_id;
|
||||
}
|
||||
|
||||
private:
|
||||
const char* m_name;
|
||||
srs::dpar::value_proj m_id;
|
||||
};
|
||||
|
||||
|
||||
} // namespace detail
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_FACTORY_KEY_HPP
|
||||
@@ -0,0 +1,188 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 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)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_SRS_PROJECTIONS_GRIDS_HPP
|
||||
#define BOOST_GEOMETRY_SRS_PROJECTIONS_GRIDS_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/srs/projections/impl/pj_gridinfo.hpp>
|
||||
|
||||
#include <fstream>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace srs
|
||||
{
|
||||
|
||||
// Forward declarations for functions declarations below
|
||||
class grids;
|
||||
|
||||
template <typename GridsStorage>
|
||||
class projection_grids;
|
||||
|
||||
} // namespace srs
|
||||
namespace projections { namespace detail
|
||||
{
|
||||
|
||||
// Forward declaratios of grids friends
|
||||
template <typename StreamPolicy>
|
||||
inline bool pj_gridlist_merge_gridfile(std::string const& gridname,
|
||||
StreamPolicy const& stream_policy,
|
||||
srs::grids & grids,
|
||||
std::vector<std::size_t> & gridindexes);
|
||||
template <bool Inverse, typename CalcT, typename StreamPolicy, typename Range>
|
||||
inline bool pj_apply_gridshift_3(StreamPolicy const& stream_policy,
|
||||
Range & range,
|
||||
srs::grids & grids,
|
||||
std::vector<std::size_t> const& gridindexes);
|
||||
|
||||
// Forward declaratios of projection_grids friends
|
||||
template <typename Par, typename GridsStorage>
|
||||
inline void pj_gridlist_from_nadgrids(Par const& defn,
|
||||
srs::projection_grids<GridsStorage> & grids);
|
||||
template <bool Inverse, typename Par, typename Range, typename Grids>
|
||||
inline bool pj_apply_gridshift_2(Par const& defn, Range & range, Grids const& grids);
|
||||
|
||||
}} // namespace projections::detail
|
||||
|
||||
namespace srs
|
||||
{
|
||||
|
||||
class grids
|
||||
{
|
||||
public:
|
||||
std::size_t size() const
|
||||
{
|
||||
return gridinfo.size();
|
||||
}
|
||||
|
||||
bool empty() const
|
||||
{
|
||||
return gridinfo.empty();
|
||||
}
|
||||
|
||||
private:
|
||||
template <typename StreamPolicy>
|
||||
friend inline bool projections::detail::pj_gridlist_merge_gridfile(
|
||||
std::string const& gridname,
|
||||
StreamPolicy const& stream_policy,
|
||||
srs::grids & grids,
|
||||
std::vector<std::size_t> & gridindexes);
|
||||
template <bool Inverse, typename CalcT, typename StreamPolicy, typename Range>
|
||||
friend inline bool projections::detail::pj_apply_gridshift_3(
|
||||
StreamPolicy const& stream_policy,
|
||||
Range & range,
|
||||
srs::grids & grids,
|
||||
std::vector<std::size_t> const& gridindexes);
|
||||
|
||||
projections::detail::pj_gridinfo gridinfo;
|
||||
|
||||
};
|
||||
|
||||
struct ifstream_policy
|
||||
{
|
||||
typedef std::ifstream stream_type;
|
||||
|
||||
static inline void open(stream_type & is, std::string const& gridname)
|
||||
{
|
||||
is.open(gridname.c_str(), std::ios::binary);
|
||||
}
|
||||
};
|
||||
|
||||
template
|
||||
<
|
||||
typename StreamPolicy = srs::ifstream_policy,
|
||||
typename Grids = grids
|
||||
>
|
||||
struct grids_storage
|
||||
{
|
||||
typedef StreamPolicy stream_policy_type;
|
||||
typedef Grids grids_type;
|
||||
|
||||
grids_storage()
|
||||
{}
|
||||
|
||||
explicit grids_storage(stream_policy_type const& policy)
|
||||
: stream_policy(policy)
|
||||
{}
|
||||
|
||||
stream_policy_type stream_policy;
|
||||
grids_type hgrids;
|
||||
};
|
||||
|
||||
|
||||
template <typename GridsStorage = grids_storage<> >
|
||||
class projection_grids
|
||||
{
|
||||
public:
|
||||
projection_grids(GridsStorage & storage)
|
||||
: storage_ptr(boost::addressof(storage))
|
||||
{}
|
||||
|
||||
std::size_t size() const
|
||||
{
|
||||
return hindexes.size();
|
||||
}
|
||||
|
||||
bool empty() const
|
||||
{
|
||||
return hindexes.empty();
|
||||
}
|
||||
|
||||
private:
|
||||
template <typename Par, typename GridsStor>
|
||||
friend inline void projections::detail::pj_gridlist_from_nadgrids(
|
||||
Par const& defn,
|
||||
srs::projection_grids<GridsStor> & grids);
|
||||
template <bool Inverse, typename Par, typename Range, typename Grids>
|
||||
friend inline bool projections::detail::pj_apply_gridshift_2(
|
||||
Par const& defn, Range & range, Grids const& grids);
|
||||
|
||||
GridsStorage * const storage_ptr;
|
||||
std::vector<std::size_t> hindexes;
|
||||
};
|
||||
|
||||
|
||||
template <typename GridsStorage = grids_storage<> >
|
||||
struct transformation_grids
|
||||
{
|
||||
explicit transformation_grids(GridsStorage & storage)
|
||||
: src_grids(storage)
|
||||
, dst_grids(storage)
|
||||
{}
|
||||
|
||||
projection_grids<GridsStorage> src_grids;
|
||||
projection_grids<GridsStorage> dst_grids;
|
||||
};
|
||||
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
struct empty_grids_storage {};
|
||||
struct empty_projection_grids {};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
|
||||
template <>
|
||||
struct transformation_grids<detail::empty_grids_storage>
|
||||
{
|
||||
detail::empty_projection_grids src_grids;
|
||||
detail::empty_projection_grids dst_grids;
|
||||
};
|
||||
|
||||
|
||||
}}} // namespace boost::geometry::srs
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_SRS_PROJECTIONS_GRIDS_HPP
|
||||
File diff suppressed because it is too large.
Load diff
@@ -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
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,120 @@
|
||||
// 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 2018.
|
||||
// Modifications copyright (c) 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)
|
||||
|
||||
// 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_AASINCOS_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_AASINCOS_HPP
|
||||
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include <boost/geometry/srs/projections/exception.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_strerrno.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
namespace aasincos
|
||||
{
|
||||
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; }
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T aasin(T const& v)
|
||||
{
|
||||
T av = 0;
|
||||
|
||||
if ((av = geometry::math::abs(v)) >= 1.0)
|
||||
{
|
||||
if (av > aasincos::ONE_TOL<T>())
|
||||
{
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_acos_asin_arg_too_large) );
|
||||
}
|
||||
return (v < 0.0 ? -geometry::math::half_pi<T>() : geometry::math::half_pi<T>());
|
||||
}
|
||||
|
||||
return asin(v);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T aacos(T const& v)
|
||||
{
|
||||
T av = 0;
|
||||
|
||||
if ((av = geometry::math::abs(v)) >= 1.0)
|
||||
{
|
||||
if (av > aasincos::ONE_TOL<T>())
|
||||
{
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_acos_asin_arg_too_large) );
|
||||
}
|
||||
return (v < 0.0 ? geometry::math::pi<T>() : 0.0);
|
||||
}
|
||||
|
||||
return acos(v);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T asqrt(T const& v)
|
||||
{
|
||||
return ((v <= 0) ? 0 : sqrt(v));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T aatan2(T const& n, T const& d)
|
||||
{
|
||||
return ((geometry::math::abs(n) < aasincos::ATOL<T>()
|
||||
&& geometry::math::abs(d) < aasincos::ATOL<T>()) ? 0.0 : atan2(n, d));
|
||||
}
|
||||
|
||||
|
||||
} // namespace detail
|
||||
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_AASINCOS_HPP
|
||||
@@ -0,0 +1,70 @@
|
||||
// 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_ADJLON_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_ADJLON_HPP
|
||||
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
/* reduce argument to range +/- PI */
|
||||
template <typename T>
|
||||
inline T adjlon (T lon)
|
||||
{
|
||||
if (geometry::math::abs(lon) <= boost::math::constants::pi<T>())
|
||||
{
|
||||
return lon;
|
||||
}
|
||||
|
||||
/* adjust to 0..2pi rad */
|
||||
lon += boost::math::constants::pi<T>();
|
||||
/* remove integral # of 'revolutions'*/
|
||||
lon -= boost::math::constants::two_pi<T>() *
|
||||
std::floor(lon / boost::math::constants::two_pi<T>());
|
||||
/* adjust back to -pi..pi rad */
|
||||
lon -= boost::math::constants::pi<T>();
|
||||
|
||||
return lon;
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_ADJLON_HPP
|
||||
@@ -0,0 +1,162 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2012 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)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_IMPL_BASE_DYNAMIC_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_BASE_DYNAMIC_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <boost/geometry/srs/projections/exception.hpp>
|
||||
#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 const& lp_lon, CT const& lp_lat, CT& xy_x, CT& xy_y) const = 0;
|
||||
|
||||
/// Inverse projection using x / y and lon / lat
|
||||
virtual void inv(CT const& xy_x, CT const& 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:
|
||||
explicit base_v_f(P const& p)
|
||||
: m_proj(p)
|
||||
{}
|
||||
|
||||
template <typename P1, typename P2>
|
||||
base_v_f(P1 const& p1, P2 const& p2)
|
||||
: m_proj(p1, p2)
|
||||
{}
|
||||
|
||||
template <typename P1, typename P2, typename P3>
|
||||
base_v_f(P1 const& p1, P2 const& p2, P3 const& p3)
|
||||
: m_proj(p1, p2, p3)
|
||||
{}
|
||||
|
||||
virtual void fwd(CT const& lp_lon, CT const& lp_lat, CT& xy_x, CT& xy_y) const
|
||||
{
|
||||
m_proj.fwd(lp_lon, lp_lat, xy_x, xy_y);
|
||||
}
|
||||
|
||||
virtual void inv(CT const& , CT const& , CT& , CT& ) const
|
||||
{
|
||||
BOOST_THROW_EXCEPTION(projection_not_invertible_exception(params().id.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:
|
||||
explicit base_v_fi(P const& p)
|
||||
: base_t(p)
|
||||
{}
|
||||
|
||||
template <typename P1, typename P2>
|
||||
base_v_fi(P1 const& p1, P2 const& p2)
|
||||
: base_t(p1, p2)
|
||||
{}
|
||||
|
||||
template <typename P1, typename P2, typename P3>
|
||||
base_v_fi(P1 const& p1, P2 const& p2, P3 const& p3)
|
||||
: base_t(p1, p2, p3)
|
||||
{}
|
||||
|
||||
virtual void inv(CT const& xy_x, CT const& 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
|
||||
@@ -0,0 +1,139 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2012 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)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_IMPL_BASE_STATIC_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_BASE_STATIC_HPP
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
// For CRTP, *this is acceptable in constructor -> turn warning off
|
||||
#pragma warning( disable : 4355 )
|
||||
#endif // defined(_MSC_VER)
|
||||
|
||||
|
||||
#include <string>
|
||||
|
||||
#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
|
||||
{
|
||||
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template <typename Prj, typename CSTag, typename SP, 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 SP, typename CT, typename P> \
|
||||
struct static_projection_type<PROJ, srs_sphere_tag, SP, CT, P> \
|
||||
{ \
|
||||
typedef P_SPHERE<CT, P> type; \
|
||||
}; \
|
||||
template <typename SP, typename CT, typename P> \
|
||||
struct static_projection_type<PROJ, srs_spheroid_tag, SP, CT, P> \
|
||||
{ \
|
||||
typedef P_SPHEROID<CT, P> type; \
|
||||
}; \
|
||||
|
||||
// Base-template-forward
|
||||
template <typename Prj, typename CT, typename P>
|
||||
struct base_t_f
|
||||
{
|
||||
public:
|
||||
|
||||
inline base_t_f(Prj const& prj, P const& params)
|
||||
: m_par(params), m_prj(prj)
|
||||
{}
|
||||
|
||||
inline P const& params() const { return m_par; }
|
||||
|
||||
inline P& mutable_params() { return m_par; }
|
||||
|
||||
template <typename LL, typename XY>
|
||||
inline bool forward(LL const& lp, XY& xy) const
|
||||
{
|
||||
try
|
||||
{
|
||||
pj_fwd(m_prj, m_par, lp, xy);
|
||||
return true;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
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.id.name;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
P m_par;
|
||||
const Prj& m_prj;
|
||||
};
|
||||
|
||||
// Base-template-forward/inverse
|
||||
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, CT, P>(prj, params)
|
||||
{}
|
||||
|
||||
template <typename XY, typename LL>
|
||||
inline bool inverse(XY const& xy, LL& lp) const
|
||||
{
|
||||
try
|
||||
{
|
||||
pj_inv(this->m_prj, this->m_par, xy, lp);
|
||||
return true;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_BASE_STATIC_HPP
|
||||
@@ -0,0 +1,268 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2012 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)
|
||||
|
||||
#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/algorithm/string.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
#include <boost/geometry/core/config.hpp>
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
#include <boost/geometry/srs/projections/str_cast.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()
|
||||
#ifdef BOOST_GEOMETRY_CXX11_ARRAY_UNIFIED_INITIALIZATION
|
||||
: dms{0, 0, 0}
|
||||
, has_dms{false, false, false}
|
||||
{}
|
||||
#else
|
||||
{
|
||||
std::fill(dms, dms + 3, T(0));
|
||||
std::fill(has_dms, has_dms + 3, false);
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
template <size_t I>
|
||||
static inline void assign_dms(dms_value& dms, std::string& value, bool& has_value)
|
||||
{
|
||||
dms.dms[I] = geometry::str_cast<T>(value);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
static inline dms_result<T> apply(std::string const& is)
|
||||
{
|
||||
return apply(is.c_str());
|
||||
}
|
||||
|
||||
static inline dms_result<T> apply(const char* is)
|
||||
{
|
||||
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
|
||||
@@ -0,0 +1,86 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2012 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)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_IMPL_FACTORY_ENTRY_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_FACTORY_ENTRY_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <boost/geometry/srs/projections/factory_key.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// forward declaration needed by some projections
|
||||
template <typename Params, typename CT, typename Parameters>
|
||||
class factory;
|
||||
|
||||
template <typename Params, typename CT, typename Parameters>
|
||||
struct factory_entry
|
||||
{
|
||||
virtual ~factory_entry() {}
|
||||
virtual base_v<CT, Parameters>* create_new(Params const& , Parameters const& ) const = 0;
|
||||
};
|
||||
|
||||
// Macros for entries definition
|
||||
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_BEGIN(ENTRY) \
|
||||
template <typename Params, typename T, typename Parameters> \
|
||||
struct ENTRY : projections::detail::factory_entry<Params, T, Parameters> \
|
||||
{ \
|
||||
projections::detail::base_v<T, Parameters>* create_new(Params const& params, \
|
||||
Parameters const& parameters) const
|
||||
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_END };
|
||||
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(ENTRY, PROJ) \
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_BEGIN(ENTRY) \
|
||||
{ \
|
||||
return new projections::detail::base_v_f<PROJ<T, Parameters>, T, Parameters>(params, parameters); \
|
||||
} \
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_END
|
||||
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(ENTRY, PROJ) \
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_BEGIN(ENTRY) \
|
||||
{ \
|
||||
return new projections::detail::base_v_fi<PROJ<T, Parameters>, T, Parameters>(params, parameters); \
|
||||
} \
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_END
|
||||
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI2(ENTRY, PROJ_S, PROJ_E) \
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_BEGIN(ENTRY) \
|
||||
{ \
|
||||
if (parameters.es != 0.0) \
|
||||
return new projections::detail::base_v_fi<PROJ_E<T, Parameters>, T, Parameters>(params, parameters); \
|
||||
else \
|
||||
return new projections::detail::base_v_fi<PROJ_S<T, Parameters>, T, Parameters>(params, parameters); \
|
||||
} \
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_END
|
||||
|
||||
// Macros for factory initialization
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(FUN_NAME) \
|
||||
template <typename Params, typename T, typename Parameters> \
|
||||
inline void FUN_NAME(projections::detail::factory<Params, T, Parameters>& factory)
|
||||
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(PROJ_NAME, ENTRY) \
|
||||
factory.add_to_factory(projections::detail::factory_key(#PROJ_NAME, \
|
||||
srs::dpar::proj_##PROJ_NAME), \
|
||||
new ENTRY<Params, T, Parameters>);
|
||||
|
||||
} // namespace detail
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_FACTORY_ENTRY_HPP
|
||||
@@ -0,0 +1,40 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
|
||||
// Copyright (c) 2007-2012 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)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_IMPL_FUNCTION_OVERLOADS_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_FUNCTION_OVERLOADS_HPP
|
||||
|
||||
#include <cmath>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
// Functions to resolve ambiguity when compiling with coordinates of different types
|
||||
/*
|
||||
template <typename T>
|
||||
inline T atan2(T const& a, T const& b)
|
||||
{
|
||||
using std::atan2;
|
||||
return atan2(a, b);
|
||||
}
|
||||
*/
|
||||
|
||||
template <typename T>
|
||||
inline int int_floor(T const& f)
|
||||
{
|
||||
using std::floor;
|
||||
return int(floor(f));
|
||||
}
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_FUNCTION_OVERLOADS_HPP
|
||||
@@ -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
|
||||
@@ -0,0 +1,433 @@
|
||||
// Boost.Geometry
|
||||
// This file is manually converted from PROJ4
|
||||
|
||||
// This file was modified by Oracle on 2018, 2019.
|
||||
// Modifications copyright (c) 2018-2019, 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:
|
||||
// Author: Frank Warmerdam, warmerdam@pobox.com
|
||||
|
||||
// Copyright (c) 2000, Frank Warmerdam
|
||||
|
||||
// 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_SRS_PROJECTIONS_IMPL_PJ_APPLY_GRIDSHIFT_HPP
|
||||
#define BOOST_GEOMETRY_SRS_PROJECTIONS_IMPL_PJ_APPLY_GRIDSHIFT_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
#include <boost/geometry/core/radian_access.hpp>
|
||||
|
||||
#include <boost/geometry/srs/projections/impl/adjlon.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/function_overloads.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_gridlist.hpp>
|
||||
|
||||
#include <boost/geometry/util/range.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Originally implemented in nad_intr.c
|
||||
template <typename CalcT>
|
||||
inline void nad_intr(CalcT in_lon, CalcT in_lat,
|
||||
CalcT & out_lon, CalcT & out_lat,
|
||||
pj_ctable const& ct)
|
||||
{
|
||||
pj_ctable::lp_t frct;
|
||||
pj_ctable::ilp_t indx;
|
||||
boost::int32_t in;
|
||||
|
||||
indx.lam = int_floor(in_lon /= ct.del.lam);
|
||||
indx.phi = int_floor(in_lat /= ct.del.phi);
|
||||
frct.lam = in_lon - indx.lam;
|
||||
frct.phi = in_lat - indx.phi;
|
||||
// TODO: implement differently
|
||||
out_lon = out_lat = HUGE_VAL;
|
||||
if (indx.lam < 0) {
|
||||
if (indx.lam == -1 && frct.lam > 0.99999999999) {
|
||||
++indx.lam;
|
||||
frct.lam = 0.;
|
||||
} else
|
||||
return;
|
||||
} else if ((in = indx.lam + 1) >= ct.lim.lam) {
|
||||
if (in == ct.lim.lam && frct.lam < 1e-11) {
|
||||
--indx.lam;
|
||||
frct.lam = 1.;
|
||||
} else
|
||||
return;
|
||||
}
|
||||
if (indx.phi < 0) {
|
||||
if (indx.phi == -1 && frct.phi > 0.99999999999) {
|
||||
++indx.phi;
|
||||
frct.phi = 0.;
|
||||
} else
|
||||
return;
|
||||
} else if ((in = indx.phi + 1) >= ct.lim.phi) {
|
||||
if (in == ct.lim.phi && frct.phi < 1e-11) {
|
||||
--indx.phi;
|
||||
frct.phi = 1.;
|
||||
} else
|
||||
return;
|
||||
}
|
||||
boost::int32_t index = indx.phi * ct.lim.lam + indx.lam;
|
||||
pj_ctable::flp_t const& f00 = ct.cvs[index++];
|
||||
pj_ctable::flp_t const& f10 = ct.cvs[index];
|
||||
index += ct.lim.lam;
|
||||
pj_ctable::flp_t const& f11 = ct.cvs[index--];
|
||||
pj_ctable::flp_t const& f01 = ct.cvs[index];
|
||||
CalcT m00, m10, m01, m11;
|
||||
m11 = m10 = frct.lam;
|
||||
m00 = m01 = 1. - frct.lam;
|
||||
m11 *= frct.phi;
|
||||
m01 *= frct.phi;
|
||||
frct.phi = 1. - frct.phi;
|
||||
m00 *= frct.phi;
|
||||
m10 *= frct.phi;
|
||||
out_lon = m00 * f00.lam + m10 * f10.lam +
|
||||
m01 * f01.lam + m11 * f11.lam;
|
||||
out_lat = m00 * f00.phi + m10 * f10.phi +
|
||||
m01 * f01.phi + m11 * f11.phi;
|
||||
}
|
||||
|
||||
// Originally implemented in nad_cvt.c
|
||||
template <bool Inverse, typename CalcT>
|
||||
inline void nad_cvt(CalcT const& in_lon, CalcT const& in_lat,
|
||||
CalcT & out_lon, CalcT & out_lat,
|
||||
pj_gi const& gi)
|
||||
{
|
||||
static const int max_iterations = 10;
|
||||
static const CalcT tol = 1e-12;
|
||||
static const CalcT toltol = tol * tol;
|
||||
static const CalcT pi = math::pi<CalcT>();
|
||||
|
||||
// horizontal grid expected
|
||||
BOOST_GEOMETRY_ASSERT_MSG(gi.format != pj_gi::gtx,
|
||||
"Vertical grid cannot be used in horizontal shift.");
|
||||
|
||||
pj_ctable const& ct = gi.ct;
|
||||
|
||||
// TODO: implement differently
|
||||
if (in_lon == HUGE_VAL)
|
||||
{
|
||||
out_lon = HUGE_VAL;
|
||||
out_lat = HUGE_VAL;
|
||||
return;
|
||||
}
|
||||
|
||||
// normalize input to ll origin
|
||||
pj_ctable::lp_t tb;
|
||||
tb.lam = in_lon - ct.ll.lam;
|
||||
tb.phi = in_lat - ct.ll.phi;
|
||||
tb.lam = adjlon (tb.lam - pi) + pi;
|
||||
|
||||
pj_ctable::lp_t t;
|
||||
nad_intr(tb.lam, tb.phi, t.lam, t.phi, ct);
|
||||
if (t.lam == HUGE_VAL)
|
||||
{
|
||||
out_lon = HUGE_VAL;
|
||||
out_lat = HUGE_VAL;
|
||||
return;
|
||||
}
|
||||
|
||||
if (! Inverse)
|
||||
{
|
||||
out_lon = in_lon - t.lam;
|
||||
out_lat = in_lat - t.phi;
|
||||
return;
|
||||
}
|
||||
|
||||
t.lam = tb.lam + t.lam;
|
||||
t.phi = tb.phi - t.phi;
|
||||
|
||||
int i = max_iterations;
|
||||
pj_ctable::lp_t del, dif;
|
||||
do
|
||||
{
|
||||
nad_intr(t.lam, t.phi, del.lam, del.phi, ct);
|
||||
|
||||
// This case used to return failure, but I have
|
||||
// changed it to return the first order approximation
|
||||
// of the inverse shift. This avoids cases where the
|
||||
// grid shift *into* this grid came from another grid.
|
||||
// While we aren't returning optimally correct results
|
||||
// I feel a close result in this case is better than
|
||||
// no result. NFW
|
||||
// To demonstrate use -112.5839956 49.4914451 against
|
||||
// the NTv2 grid shift file from Canada.
|
||||
if (del.lam == HUGE_VAL)
|
||||
{
|
||||
// Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.
|
||||
break;
|
||||
}
|
||||
|
||||
dif.lam = t.lam - del.lam - tb.lam;
|
||||
dif.phi = t.phi + del.phi - tb.phi;
|
||||
t.lam -= dif.lam;
|
||||
t.phi -= dif.phi;
|
||||
|
||||
}
|
||||
while (--i && (dif.lam*dif.lam + dif.phi*dif.phi > toltol)); // prob. slightly faster than hypot()
|
||||
|
||||
if (i==0)
|
||||
{
|
||||
// Inverse grid shift iterator failed to converge.
|
||||
out_lon = HUGE_VAL;
|
||||
out_lat = HUGE_VAL;
|
||||
return;
|
||||
}
|
||||
|
||||
out_lon = adjlon (t.lam + ct.ll.lam);
|
||||
out_lat = t.phi + ct.ll.phi;
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* find_grid() */
|
||||
/* */
|
||||
/* Determine which grid is the correct given an input coordinate. */
|
||||
/************************************************************************/
|
||||
|
||||
// Originally find_ctable()
|
||||
// here divided into grid_disjoint(), find_grid() and load_grid()
|
||||
|
||||
template <typename T>
|
||||
inline bool grid_disjoint(T const& lam, T const& phi,
|
||||
pj_ctable const& ct)
|
||||
{
|
||||
double epsilon = (fabs(ct.del.phi)+fabs(ct.del.lam))/10000.0;
|
||||
return ct.ll.phi - epsilon > phi
|
||||
|| ct.ll.lam - epsilon > lam
|
||||
|| (ct.ll.phi + (ct.lim.phi-1) * ct.del.phi + epsilon < phi)
|
||||
|| (ct.ll.lam + (ct.lim.lam-1) * ct.del.lam + epsilon < lam);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline pj_gi * find_grid(T const& lam,
|
||||
T const& phi,
|
||||
std::vector<pj_gi>::iterator first,
|
||||
std::vector<pj_gi>::iterator last)
|
||||
{
|
||||
pj_gi * gip = NULL;
|
||||
|
||||
for( ; first != last ; ++first )
|
||||
{
|
||||
// skip tables that don't match our point at all.
|
||||
if (! grid_disjoint(lam, phi, first->ct))
|
||||
{
|
||||
// skip vertical grids
|
||||
if (first->format != pj_gi::gtx)
|
||||
{
|
||||
gip = boost::addressof(*first);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If we didn't find a child then nothing more to do
|
||||
if( gip == NULL )
|
||||
return gip;
|
||||
|
||||
// Otherwise use the child, first checking it's children
|
||||
pj_gi * child = find_grid(lam, phi, first->children.begin(), first->children.end());
|
||||
if (child != NULL)
|
||||
gip = child;
|
||||
|
||||
return gip;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline pj_gi * find_grid(T const& lam,
|
||||
T const& phi,
|
||||
pj_gridinfo & grids,
|
||||
std::vector<std::size_t> const& gridindexes)
|
||||
{
|
||||
pj_gi * gip = NULL;
|
||||
|
||||
// keep trying till we find a table that works
|
||||
for (std::size_t i = 0 ; i < gridindexes.size() ; ++i)
|
||||
{
|
||||
pj_gi & gi = grids[gridindexes[i]];
|
||||
|
||||
// skip tables that don't match our point at all.
|
||||
if (! grid_disjoint(lam, phi, gi.ct))
|
||||
{
|
||||
// skip vertical grids
|
||||
if (gi.format != pj_gi::gtx)
|
||||
{
|
||||
gip = boost::addressof(gi);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (gip == NULL)
|
||||
return gip;
|
||||
|
||||
// If we have child nodes, check to see if any of them apply.
|
||||
pj_gi * child = find_grid(lam, phi, gip->children.begin(), gip->children.end());
|
||||
if (child != NULL)
|
||||
gip = child;
|
||||
|
||||
// if we get this far we have found a suitable grid
|
||||
return gip;
|
||||
}
|
||||
|
||||
|
||||
template <typename StreamPolicy>
|
||||
inline bool load_grid(StreamPolicy const& stream_policy, pj_gi_load & gi)
|
||||
{
|
||||
// load the grid shift info if we don't have it.
|
||||
if (gi.ct.cvs.empty())
|
||||
{
|
||||
typename StreamPolicy::stream_type is;
|
||||
stream_policy.open(is, gi.gridname);
|
||||
|
||||
if (! pj_gridinfo_load(is, gi))
|
||||
{
|
||||
//pj_ctx_set_errno( ctx, PJD_ERR_FAILED_TO_LOAD_GRID );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_apply_gridshift_3() */
|
||||
/* */
|
||||
/* This is the real workhorse, given a gridlist. */
|
||||
/************************************************************************/
|
||||
|
||||
template <bool Inverse, typename CalcT, typename StreamPolicy, typename Range>
|
||||
inline bool pj_apply_gridshift_3(StreamPolicy const& stream_policy,
|
||||
Range & range,
|
||||
srs::grids & grids,
|
||||
std::vector<std::size_t> const& gridindexes)
|
||||
{
|
||||
typedef typename boost::range_size<Range>::type size_type;
|
||||
|
||||
// If the grids are empty the indexes are as well
|
||||
if (gridindexes.empty())
|
||||
{
|
||||
//pj_ctx_set_errno(ctx, PJD_ERR_FAILED_TO_LOAD_GRID);
|
||||
//return PJD_ERR_FAILED_TO_LOAD_GRID;
|
||||
return false;
|
||||
}
|
||||
|
||||
size_type point_count = boost::size(range);
|
||||
|
||||
for (size_type i = 0 ; i < point_count ; ++i)
|
||||
{
|
||||
typename boost::range_reference<Range>::type
|
||||
point = range::at(range, i);
|
||||
|
||||
CalcT in_lon = geometry::get_as_radian<0>(point);
|
||||
CalcT in_lat = geometry::get_as_radian<1>(point);
|
||||
|
||||
pj_gi * gip = find_grid(in_lon, in_lat, grids.gridinfo, gridindexes);
|
||||
|
||||
if ( gip != NULL )
|
||||
{
|
||||
// load the grid shift info if we don't have it.
|
||||
if (! gip->ct.cvs.empty() || load_grid(stream_policy, *gip))
|
||||
{
|
||||
// TODO: use set_invalid_point() or similar mechanism
|
||||
CalcT out_lon = HUGE_VAL;
|
||||
CalcT out_lat = HUGE_VAL;
|
||||
|
||||
nad_cvt<Inverse>(in_lon, in_lat, out_lon, out_lat, *gip);
|
||||
|
||||
// TODO: check differently
|
||||
if ( out_lon != HUGE_VAL )
|
||||
{
|
||||
geometry::set_from_radian<0>(point, out_lon);
|
||||
geometry::set_from_radian<1>(point, out_lat);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_apply_gridshift_2() */
|
||||
/* */
|
||||
/* This implementation uses the gridlist from a coordinate */
|
||||
/* system definition. If the gridlist has not yet been */
|
||||
/* populated in the coordinate system definition we set it up */
|
||||
/* now. */
|
||||
/************************************************************************/
|
||||
|
||||
template <bool Inverse, typename Par, typename Range, typename ProjGrids>
|
||||
inline bool pj_apply_gridshift_2(Par const& /*defn*/, Range & range, ProjGrids const& grids)
|
||||
{
|
||||
/*if( defn->catalog_name != NULL )
|
||||
return pj_gc_apply_gridshift( defn, inverse, point_count, point_offset,
|
||||
x, y, z );*/
|
||||
|
||||
/*std::vector<std::size_t> gridindexes;
|
||||
pj_gridlist_from_nadgrids(pj_get_param_s(defn.params, "nadgrids"),
|
||||
grids.storage_ptr->stream_policy,
|
||||
grids.storage_ptr->grids,
|
||||
gridindexes);*/
|
||||
|
||||
BOOST_GEOMETRY_ASSERT(grids.storage_ptr != NULL);
|
||||
|
||||
// At this point the grids should be initialized
|
||||
if (grids.hindexes.empty())
|
||||
return false;
|
||||
|
||||
return pj_apply_gridshift_3
|
||||
<
|
||||
Inverse, typename Par::type
|
||||
>(grids.storage_ptr->stream_policy,
|
||||
range,
|
||||
grids.storage_ptr->hgrids,
|
||||
grids.hindexes);
|
||||
}
|
||||
|
||||
template <bool Inverse, typename Par, typename Range>
|
||||
inline bool pj_apply_gridshift_2(Par const& , Range & , srs::detail::empty_projection_grids const& )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
} // namespace detail
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_SRS_PROJECTIONS_IMPL_PJ_APPLY_GRIDSHIFT_HPP
|
||||
@@ -0,0 +1,157 @@
|
||||
// Boost.Geometry
|
||||
// This file is manually converted from PROJ4
|
||||
|
||||
// This file was modified by Oracle on 2018, 2019.
|
||||
// Modifications copyright (c) 2018-2019, 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:
|
||||
// Author: Frank Warmerdam, warmerdam@pobox.com
|
||||
|
||||
// Copyright (c) 2000, Frank Warmerdam
|
||||
|
||||
// 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_SRS_PROJECTIONS_IMPL_PJ_APPLY_GRIDSHIFT_SHARED_HPP
|
||||
#define BOOST_GEOMETRY_SRS_PROJECTIONS_IMPL_PJ_APPLY_GRIDSHIFT_SHARED_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
#include <boost/geometry/core/radian_access.hpp>
|
||||
|
||||
#include <boost/geometry/srs/projections/impl/pj_apply_gridshift.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_gridlist_shared.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template <bool Inverse, typename CalcT, typename StreamPolicy, typename Range>
|
||||
inline bool pj_apply_gridshift_3(StreamPolicy const& stream_policy,
|
||||
Range & range,
|
||||
shared_grids & grids,
|
||||
std::vector<std::size_t> const& gridindexes)
|
||||
{
|
||||
typedef typename boost::range_size<Range>::type size_type;
|
||||
|
||||
// If the grids are empty the indexes are as well
|
||||
if (gridindexes.empty())
|
||||
{
|
||||
//pj_ctx_set_errno(ctx, PJD_ERR_FAILED_TO_LOAD_GRID);
|
||||
//return PJD_ERR_FAILED_TO_LOAD_GRID;
|
||||
return false;
|
||||
}
|
||||
|
||||
size_type point_count = boost::size(range);
|
||||
|
||||
// local storage
|
||||
pj_gi_load local_gi;
|
||||
|
||||
for (size_type i = 0 ; i < point_count ; )
|
||||
{
|
||||
bool load_needed = false;
|
||||
|
||||
CalcT in_lon = 0;
|
||||
CalcT in_lat = 0;
|
||||
|
||||
{
|
||||
boost::shared_lock<boost::shared_mutex> lock(grids.mutex);
|
||||
|
||||
for ( ; i < point_count ; ++i )
|
||||
{
|
||||
typename boost::range_reference<Range>::type
|
||||
point = range::at(range, i);
|
||||
|
||||
in_lon = geometry::get_as_radian<0>(point);
|
||||
in_lat = geometry::get_as_radian<1>(point);
|
||||
|
||||
pj_gi * gip = find_grid(in_lon, in_lat, grids.gridinfo, gridindexes);
|
||||
|
||||
if (gip == NULL)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
else if (! gip->ct.cvs.empty())
|
||||
{
|
||||
// TODO: use set_invalid_point() or similar mechanism
|
||||
CalcT out_lon = HUGE_VAL;
|
||||
CalcT out_lat = HUGE_VAL;
|
||||
|
||||
nad_cvt<Inverse>(in_lon, in_lat, out_lon, out_lat, *gip);
|
||||
|
||||
// TODO: check differently
|
||||
if (out_lon != HUGE_VAL)
|
||||
{
|
||||
geometry::set_from_radian<0>(point, out_lon);
|
||||
geometry::set_from_radian<1>(point, out_lat);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// loading is needed
|
||||
local_gi = *gip;
|
||||
load_needed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (load_needed)
|
||||
{
|
||||
if (load_grid(stream_policy, local_gi))
|
||||
{
|
||||
boost::unique_lock<boost::shared_mutex> lock(grids.mutex);
|
||||
|
||||
// check again in case other thread already loaded the grid.
|
||||
pj_gi * gip = find_grid(in_lon, in_lat, grids.gridinfo, gridindexes);
|
||||
|
||||
if (gip != NULL && gip->ct.cvs.empty())
|
||||
{
|
||||
// swap loaded local storage with empty grid
|
||||
local_gi.swap(*gip);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
++i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
} // namespace detail
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_SRS_PROJECTIONS_IMPL_PJ_APPLY_GRIDSHIFT_SHARED_HPP
|
||||
@@ -0,0 +1,102 @@
|
||||
// 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, 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)
|
||||
|
||||
// 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_AUTH_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_AUTH_HPP
|
||||
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
|
||||
namespace detail {
|
||||
|
||||
template <typename T>
|
||||
struct apa
|
||||
{
|
||||
static const std::size_t size = 3;
|
||||
|
||||
T const& operator[](size_t i) const { return data[i]; }
|
||||
T & operator[](size_t i) { return data[i]; }
|
||||
|
||||
private:
|
||||
T data[3];
|
||||
};
|
||||
|
||||
/* determine latitude from authalic latitude */
|
||||
template <typename T>
|
||||
inline detail::apa<T> pj_authset(T const& es)
|
||||
{
|
||||
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;
|
||||
detail::apa<T> apa;
|
||||
|
||||
{
|
||||
apa[0] = es * P00;
|
||||
t = es * es;
|
||||
apa[0] += t * P01;
|
||||
apa[1] = t * P10;
|
||||
t *= es;
|
||||
apa[0] += t * P02;
|
||||
apa[1] += t * P11;
|
||||
apa[2] = t * P20;
|
||||
}
|
||||
|
||||
return apa;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T pj_authlat(T const& beta, detail::apa<T> const& apa)
|
||||
{
|
||||
T const t = beta + beta;
|
||||
|
||||
return(beta + apa[0] * sin(t) + apa[1] * sin(t + t) + apa[2] * sin(t + t + t));
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_AUTH_HPP
|
||||
@@ -0,0 +1,455 @@
|
||||
// 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, 2018, 2019.
|
||||
// Modifications copyright (c) 2017-2019, 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_DATUM_SET_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_DATUM_SET_HPP
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <boost/geometry/srs/projections/dpar.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/proj4.hpp>
|
||||
#include <boost/geometry/srs/projections/spar.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
|
||||
namespace detail {
|
||||
|
||||
|
||||
/* SEC_TO_RAD = Pi/180/3600 */
|
||||
template <typename T>
|
||||
inline T sec_to_rad() { return 4.84813681109535993589914102357e-6; }
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_datum_find_datum() */
|
||||
/************************************************************************/
|
||||
|
||||
template <typename T>
|
||||
inline const pj_datums_type<T>* pj_datum_find_datum(srs::detail::proj4_parameters const& params)
|
||||
{
|
||||
std::string name = pj_get_param_s(params, "datum");
|
||||
if(! name.empty())
|
||||
{
|
||||
/* find the datum definition */
|
||||
const pj_datums_type<T>* pj_datums = pj_get_datums<T>().first;
|
||||
const int n = pj_get_datums<T>().second;
|
||||
int index = -1;
|
||||
for (int i = 0; i < n && index == -1; i++)
|
||||
{
|
||||
if(pj_datums[i].id == name)
|
||||
{
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (index != -1)
|
||||
{
|
||||
return pj_datums + index;
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_unknown_ellp_param) );
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline const pj_datums_type<T>* pj_datum_find_datum(srs::dpar::parameters<T> const& params)
|
||||
{
|
||||
typename srs::dpar::parameters<T>::const_iterator
|
||||
it = pj_param_find(params, srs::dpar::datum);
|
||||
|
||||
if (it != params.end())
|
||||
{
|
||||
const pj_datums_type<T>* pj_datums = pj_get_datums<T>().first;
|
||||
const int n = pj_get_datums<T>().second;
|
||||
int i = it->template get_value<int>();
|
||||
if (i >= 0 && i < n)
|
||||
{
|
||||
return pj_datums + i;
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_unknown_ellp_param) );
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename Params,
|
||||
typename Param = typename srs::spar::detail::tuples_find_if
|
||||
<
|
||||
Params,
|
||||
srs::spar::detail::is_param_tr<srs::spar::detail::datum_traits>::pred
|
||||
>::type,
|
||||
bool IsFound = srs::spar::detail::tuples_is_found<Param>::value
|
||||
>
|
||||
struct pj_datum_find_datum_static
|
||||
{
|
||||
template <typename T>
|
||||
static const pj_datums_type<T>* apply(Params const& )
|
||||
{
|
||||
const pj_datums_type<T>* pj_datums = pj_get_datums<T>().first;
|
||||
const int n = pj_get_datums<T>().second;
|
||||
const int i = srs::spar::detail::datum_traits<Param>::id;
|
||||
if (i >= 0 && i < n)
|
||||
{
|
||||
return pj_datums + i;
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: Implemnt as MPL_ASSERT instead
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_unknown_ellp_param) );
|
||||
}
|
||||
}
|
||||
};
|
||||
template <typename Params, typename Param>
|
||||
struct pj_datum_find_datum_static<Params, Param, false>
|
||||
{
|
||||
template <typename T>
|
||||
static const pj_datums_type<T>* apply(Params const& )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX>
|
||||
inline const pj_datums_type<T>* pj_datum_find_datum(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& params)
|
||||
{
|
||||
return pj_datum_find_datum_static
|
||||
<
|
||||
srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX>
|
||||
>::template apply<T>(params);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_datum_find_nadgrids() */
|
||||
/************************************************************************/
|
||||
|
||||
inline bool pj_datum_find_nadgrids(srs::detail::proj4_parameters const& params,
|
||||
srs::detail::nadgrids & out)
|
||||
{
|
||||
std::string snadgrids = pj_get_param_s(params, "nadgrids");
|
||||
if (! snadgrids.empty())
|
||||
{
|
||||
for (std::string::size_type i = 0 ; i < snadgrids.size() ; )
|
||||
{
|
||||
std::string::size_type end = snadgrids.find(',', i);
|
||||
std::string name = snadgrids.substr(i, end - i);
|
||||
|
||||
i = end;
|
||||
if (end != std::string::npos)
|
||||
++i;
|
||||
|
||||
if (! name.empty())
|
||||
out.push_back(name);
|
||||
}
|
||||
}
|
||||
|
||||
return ! out.empty();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline bool pj_datum_find_nadgrids(srs::dpar::parameters<T> const& params,
|
||||
srs::detail::nadgrids & out)
|
||||
{
|
||||
typename srs::dpar::parameters<T>::const_iterator
|
||||
it = pj_param_find(params, srs::dpar::nadgrids);
|
||||
if (it != params.end())
|
||||
{
|
||||
out = it->template get_value<srs::detail::nadgrids>();
|
||||
}
|
||||
|
||||
return ! out.empty();
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename Params,
|
||||
int I = srs::spar::detail::tuples_find_index_if
|
||||
<
|
||||
Params,
|
||||
srs::spar::detail::is_param<srs::spar::nadgrids>::pred
|
||||
>::value,
|
||||
int N = boost::tuples::length<Params>::value
|
||||
>
|
||||
struct pj_datum_find_nadgrids_static
|
||||
{
|
||||
static void apply(Params const& params, srs::detail::nadgrids & out)
|
||||
{
|
||||
out = boost::tuples::get<I>(params);
|
||||
}
|
||||
};
|
||||
template <typename Params, int N>
|
||||
struct pj_datum_find_nadgrids_static<Params, N, N>
|
||||
{
|
||||
static void apply(Params const& , srs::detail::nadgrids & )
|
||||
{}
|
||||
};
|
||||
|
||||
template <BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX>
|
||||
inline bool pj_datum_find_nadgrids(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& params,
|
||||
srs::detail::nadgrids & out)
|
||||
{
|
||||
pj_datum_find_nadgrids_static
|
||||
<
|
||||
srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX>
|
||||
>::apply(params, out);
|
||||
|
||||
return ! out.empty();
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_datum_find_towgs84() */
|
||||
/************************************************************************/
|
||||
|
||||
template <typename T>
|
||||
inline bool pj_datum_find_towgs84(srs::detail::proj4_parameters const& params,
|
||||
srs::detail::towgs84<T> & out)
|
||||
{
|
||||
std::string towgs84 = pj_get_param_s(params, "towgs84");
|
||||
if(! towgs84.empty())
|
||||
{
|
||||
std::vector<std::string> parm;
|
||||
boost::split(parm, towgs84, boost::is_any_of(" ,"));
|
||||
|
||||
std::size_t n = (std::min<std::size_t>)(parm.size(), 7);
|
||||
std::size_t z = n <= 3 ? 3 : 7;
|
||||
|
||||
/* parse out the pvalues */
|
||||
for (std::size_t i = 0 ; i < n; ++i)
|
||||
{
|
||||
out.push_back(geometry::str_cast<T>(parm[i]));
|
||||
}
|
||||
for (std::size_t i = out.size() ; i < z; ++i)
|
||||
{
|
||||
out.push_back(T(0));
|
||||
}
|
||||
}
|
||||
|
||||
return ! out.empty();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline bool pj_datum_find_towgs84(srs::dpar::parameters<T> const& params,
|
||||
srs::detail::towgs84<T> & out)
|
||||
{
|
||||
typename srs::dpar::parameters<T>::const_iterator
|
||||
it = pj_param_find(params, srs::dpar::towgs84);
|
||||
|
||||
if (it != params.end())
|
||||
{
|
||||
srs::detail::towgs84<T> const&
|
||||
towgs84 = it->template get_value<srs::detail::towgs84<T> >();
|
||||
|
||||
std::size_t n = (std::min<std::size_t>)(towgs84.size(), 7u);
|
||||
std::size_t z = n <= 3 ? 3 : 7;
|
||||
|
||||
for (std::size_t i = 0 ; i < n; ++i)
|
||||
{
|
||||
out.push_back(towgs84[i]);
|
||||
}
|
||||
for (std::size_t i = out.size() ; i < z; ++i)
|
||||
{
|
||||
out.push_back(T(0));
|
||||
}
|
||||
}
|
||||
|
||||
return ! out.empty();
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename Params,
|
||||
int I = srs::spar::detail::tuples_find_index_if
|
||||
<
|
||||
Params,
|
||||
srs::spar::detail::is_param_t<srs::spar::towgs84>::pred
|
||||
>::value,
|
||||
int N = boost::tuples::length<Params>::value
|
||||
>
|
||||
struct pj_datum_find_towgs84_static
|
||||
{
|
||||
template <typename T>
|
||||
static void apply(Params const& params, srs::detail::towgs84<T> & out)
|
||||
{
|
||||
typename boost::tuples::element<I, Params>::type const&
|
||||
towgs84 = boost::tuples::get<I>(params);
|
||||
|
||||
std::size_t n = (std::min<std::size_t>)(towgs84.size(), 7u);
|
||||
std::size_t z = n <= 3 ? 3 : 7;
|
||||
|
||||
for (std::size_t i = 0 ; i < n; ++i)
|
||||
{
|
||||
out.push_back(towgs84[i]);
|
||||
}
|
||||
for (std::size_t i = out.size() ; i < z; ++i)
|
||||
{
|
||||
out.push_back(T(0));
|
||||
}
|
||||
}
|
||||
};
|
||||
template <typename Params, int N>
|
||||
struct pj_datum_find_towgs84_static<Params, N, N>
|
||||
{
|
||||
template <typename T>
|
||||
static void apply(Params const& , srs::detail::towgs84<T> & )
|
||||
{}
|
||||
};
|
||||
|
||||
template <typename T, BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX>
|
||||
inline bool pj_datum_find_towgs84(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& params,
|
||||
srs::detail::towgs84<T> & out)
|
||||
{
|
||||
pj_datum_find_towgs84_static
|
||||
<
|
||||
srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX>
|
||||
>::apply(params, out);
|
||||
|
||||
return ! out.empty();
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_datum_prepare_towgs84() */
|
||||
/************************************************************************/
|
||||
|
||||
template <typename T>
|
||||
inline bool pj_datum_prepare_towgs84(srs::detail::towgs84<T> & towgs84)
|
||||
{
|
||||
if( towgs84.size() == 7
|
||||
&& (towgs84[3] != 0.0
|
||||
|| towgs84[4] != 0.0
|
||||
|| towgs84[5] != 0.0
|
||||
|| towgs84[6] != 0.0) )
|
||||
{
|
||||
static const T sec_to_rad = detail::sec_to_rad<T>();
|
||||
|
||||
/* transform from arc seconds to radians */
|
||||
towgs84[3] *= sec_to_rad;
|
||||
towgs84[4] *= sec_to_rad;
|
||||
towgs84[5] *= sec_to_rad;
|
||||
/* transform from parts per million to scaling factor */
|
||||
towgs84[6] = (towgs84[6]/1000000.0) + 1;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_datum_init() */
|
||||
/************************************************************************/
|
||||
|
||||
// This function works differently than the original pj_datum_set().
|
||||
// It doesn't push parameters defined in datum into params list.
|
||||
// Instead it tries to use nadgrids and towgs84 and only then
|
||||
// falls back to nadgrid or towgs84 defiend in datum parameter.
|
||||
template <typename Params, typename T>
|
||||
inline void pj_datum_init(Params const& params, parameters<T> & projdef)
|
||||
{
|
||||
projdef.datum_type = datum_unknown;
|
||||
|
||||
// Check for nadgrids parameter.
|
||||
if(pj_datum_find_nadgrids(params, projdef.nadgrids))
|
||||
{
|
||||
// NOTE: It's different than in the original proj4.
|
||||
// Nadgrids names are stored in projection definition.
|
||||
|
||||
projdef.datum_type = datum_gridshift;
|
||||
}
|
||||
// Check for towgs84 parameter.
|
||||
else if(pj_datum_find_towgs84(params, projdef.datum_params))
|
||||
{
|
||||
if (pj_datum_prepare_towgs84(projdef.datum_params))
|
||||
{
|
||||
projdef.datum_type = datum_7param;
|
||||
}
|
||||
else
|
||||
{
|
||||
projdef.datum_type = datum_3param;
|
||||
}
|
||||
|
||||
/* Note that pj_init() will later switch datum_type to
|
||||
PJD_WGS84 if shifts are all zero, and ellipsoid is WGS84 or GRS80 */
|
||||
}
|
||||
// Check for datum parameter.
|
||||
else
|
||||
{
|
||||
const pj_datums_type<T>* datum = pj_datum_find_datum<T>(params);
|
||||
if (datum != NULL)
|
||||
{
|
||||
if (! datum->nadgrids.empty())
|
||||
{
|
||||
projdef.nadgrids = datum->nadgrids;
|
||||
projdef.datum_type = datum_gridshift;
|
||||
}
|
||||
else if ( ! datum->towgs84.empty() )
|
||||
{
|
||||
projdef.datum_params = datum->towgs84;
|
||||
if (pj_datum_prepare_towgs84(projdef.datum_params))
|
||||
{
|
||||
projdef.datum_type = datum_7param;
|
||||
}
|
||||
else
|
||||
{
|
||||
projdef.datum_type = datum_3param;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_DATUM_SET_HPP
|
||||
@@ -0,0 +1,175 @@
|
||||
// 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, 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)
|
||||
|
||||
// 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_DATUMS_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_DATUMS_HPP
|
||||
|
||||
#include <boost/geometry/srs/projections/par_data.hpp>
|
||||
#include <boost/geometry/srs/projections/dpar.hpp>
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
|
||||
namespace detail {
|
||||
|
||||
// Originally defined in projects.h
|
||||
template <typename T>
|
||||
struct pj_datums_type
|
||||
{
|
||||
std::string id; /* datum keyword */
|
||||
//std::string defn_n; /* e.g. "to_wgs84" */
|
||||
//std::string defn_v; /* e.g. "0,0,0" */
|
||||
//std::string ellipse_id; /* ie from ellipse table */
|
||||
//std::string comments; /* EPSG code, etc */
|
||||
srs::detail::nadgrids nadgrids;
|
||||
srs::detail::towgs84<T> towgs84;
|
||||
srs::dpar::value_ellps ellps;
|
||||
};
|
||||
|
||||
// Originally defined in projects.h
|
||||
struct pj_prime_meridians_type
|
||||
{
|
||||
std::string id; /* prime meridian keyword */
|
||||
//std::string defn; /* offset from greenwich in DMS format. */
|
||||
double deg;
|
||||
};
|
||||
|
||||
inline double dms2d(double d, double m, double s, bool east)
|
||||
{
|
||||
return (east ? 1 : -1) * (d + m / 60.0 + s / 3600.0);
|
||||
}
|
||||
|
||||
/*
|
||||
* The ellipse code must match one from pj_ellps.c. The datum id should
|
||||
* be kept to 12 characters or less if possible. Use the official OGC
|
||||
* datum name for the comments if available.
|
||||
*/
|
||||
|
||||
template <typename T>
|
||||
inline std::pair<const pj_datums_type<T>*, int> pj_get_datums()
|
||||
{
|
||||
static const pj_datums_type<T> pj_datums[] =
|
||||
{
|
||||
{"WGS84", //"towgs84", "0,0,0",
|
||||
//"WGS84", "",
|
||||
srs::detail::nadgrids(),
|
||||
srs::detail::towgs84<T>(0,0,0),
|
||||
srs::dpar::ellps_wgs84},
|
||||
|
||||
{"GGRS87", //"towgs84", "-199.87,74.79,246.62",
|
||||
//"GRS80", "Greek_Geodetic_Reference_System_1987",
|
||||
srs::detail::nadgrids(),
|
||||
srs::detail::towgs84<T>(-199.87,74.79,246.62),
|
||||
srs::dpar::ellps_grs80},
|
||||
|
||||
{"NAD83", //"towgs84", "0,0,0",
|
||||
//"GRS80", "North_American_Datum_1983",
|
||||
srs::detail::nadgrids(),
|
||||
srs::detail::towgs84<T>(0,0,0),
|
||||
srs::dpar::ellps_grs80},
|
||||
|
||||
{"NAD27", //"nadgrids", "@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",
|
||||
//"clrk66", "North_American_Datum_1927",
|
||||
srs::detail::nadgrids("@conus","@alaska","@ntv2_0.gsb","@ntv1_can.dat"),
|
||||
srs::detail::towgs84<T>(),
|
||||
srs::dpar::ellps_clrk66},
|
||||
|
||||
{"potsdam", //"towgs84", "598.1,73.7,418.2,0.202,0.045,-2.455,6.7",
|
||||
//"bessel", "Potsdam Rauenberg 1950 DHDN",
|
||||
srs::detail::nadgrids(),
|
||||
srs::detail::towgs84<T>(598.1,73.7,418.2,0.202,0.045,-2.455,6.7),
|
||||
srs::dpar::ellps_bessel},
|
||||
|
||||
{"carthage", //"towgs84", "-263.0,6.0,431.0",
|
||||
//"clrk80ign", "Carthage 1934 Tunisia",
|
||||
srs::detail::nadgrids(),
|
||||
srs::detail::towgs84<T>(-263.0,6.0,431.0),
|
||||
srs::dpar::ellps_clrk80ign},
|
||||
|
||||
{"hermannskogel", //"towgs84", "577.326,90.129,463.919,5.137,1.474,5.297,2.4232",
|
||||
//"bessel", "Hermannskogel",
|
||||
srs::detail::nadgrids(),
|
||||
srs::detail::towgs84<T>(577.326,90.129,463.919,5.137,1.474,5.297,2.4232),
|
||||
srs::dpar::ellps_bessel},
|
||||
|
||||
{"ire65", //"towgs84", "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",
|
||||
//"mod_airy", "Ireland 1965",
|
||||
srs::detail::nadgrids(),
|
||||
srs::detail::towgs84<T>(482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15),
|
||||
srs::dpar::ellps_mod_airy},
|
||||
|
||||
{"nzgd49", //"towgs84", "59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",
|
||||
//"intl", "New Zealand Geodetic Datum 1949",
|
||||
srs::detail::nadgrids(),
|
||||
srs::detail::towgs84<T>(59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993),
|
||||
srs::dpar::ellps_intl},
|
||||
|
||||
{"OSGB36", //"towgs84", "446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",
|
||||
//"airy", "Airy 1830",
|
||||
srs::detail::nadgrids(),
|
||||
srs::detail::towgs84<T>(446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894),
|
||||
srs::dpar::ellps_airy}
|
||||
};
|
||||
|
||||
return std::make_pair(pj_datums, sizeof(pj_datums) / sizeof(pj_datums[0]));
|
||||
}
|
||||
|
||||
static const pj_prime_meridians_type pj_prime_meridians[] =
|
||||
{
|
||||
/* id definition */
|
||||
/* -- ---------- */
|
||||
{ "greenwich", /*"0dE",*/ 0 },
|
||||
{ "lisbon", /*"9d07'54.862\"W",*/ dms2d( 9, 7,54.862,false) },
|
||||
{ "paris", /*"2d20'14.025\"E",*/ dms2d( 2,20,14.025,true) },
|
||||
{ "bogota", /*"74d04'51.3\"W",*/ dms2d( 74, 4,51.3, false) },
|
||||
{ "madrid", /*"3d41'16.58\"W",*/ dms2d( 3,41,16.58, false) },
|
||||
{ "rome", /*"12d27'8.4\"E",*/ dms2d( 12,27, 8.4, true) },
|
||||
{ "bern", /*"7d26'22.5\"E",*/ dms2d( 7,26,22.5, true) },
|
||||
{ "jakarta", /*"106d48'27.79\"E",*/ dms2d(106,48,27.79, true) },
|
||||
{ "ferro", /*"17d40'W",*/ dms2d( 17,40, 0, false) },
|
||||
{ "brussels", /*"4d22'4.71\"E",*/ dms2d( 4,22,4.71, true) },
|
||||
{ "stockholm", /*"18d3'29.8\"E",*/ dms2d( 18, 3,29.8, true) },
|
||||
{ "athens", /*"23d42'58.815\"E",*/ dms2d( 23,42,58.815,true) },
|
||||
{ "oslo", /*"10d43'22.5\"E",*/ dms2d( 10,43,22.5, true) }
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_DATUMS_HPP
|
||||
@@ -0,0 +1,597 @@
|
||||
// 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, 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)
|
||||
|
||||
// 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)
|
||||
// Adam Wulkiewicz
|
||||
|
||||
// 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_ELL_SET_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_ELL_SET_HPP
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/geometry/formulas/eccentricity_sqr.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/geometry/srs/projections/dpar.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_datum_set.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>
|
||||
#include <boost/geometry/srs/projections/spar.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
|
||||
namespace detail {
|
||||
|
||||
/* set ellipsoid parameters a and es */
|
||||
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 */
|
||||
|
||||
template <typename T>
|
||||
inline T pj_ell_b_to_es(T const& a, T const& b)
|
||||
{
|
||||
return 1. - (b * b) / (a * a);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_ell_init_ellps() */
|
||||
/************************************************************************/
|
||||
|
||||
// Originally a part of pj_ell_set()
|
||||
template <typename T>
|
||||
inline bool pj_ell_init_ellps(srs::detail::proj4_parameters const& params, T &a, T &b)
|
||||
{
|
||||
/* check if ellps present and temporarily append its values to pl */
|
||||
std::string name = pj_get_param_s(params, "ellps");
|
||||
if (! name.empty())
|
||||
{
|
||||
const pj_ellps_type<T>* pj_ellps = pj_get_ellps<T>().first;
|
||||
const int n = pj_get_ellps<T>().second;
|
||||
int index = -1;
|
||||
for (int i = 0; i < n && index == -1; i++)
|
||||
{
|
||||
if(pj_ellps[i].id == name)
|
||||
{
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (index == -1) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_unknown_ellp_param) );
|
||||
}
|
||||
|
||||
pj_ellps_type<T> const& pj_ellp = pj_ellps[index];
|
||||
a = pj_ellp.a;
|
||||
b = pj_ellp.b;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline bool pj_ell_init_ellps(srs::dpar::parameters<T> const& params, T &a, T &b)
|
||||
{
|
||||
/* check if ellps present and temporarily append its values to pl */
|
||||
typename srs::dpar::parameters<T>::const_iterator
|
||||
it = pj_param_find(params, srs::dpar::ellps);
|
||||
if (it != params.end())
|
||||
{
|
||||
if (it->template is_value_set<int>())
|
||||
{
|
||||
const pj_ellps_type<T>* pj_ellps = pj_get_ellps<T>().first;
|
||||
const int n = pj_get_ellps<T>().second;
|
||||
int i = it->template get_value<int>();
|
||||
|
||||
if (i < 0 || i >= n) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_unknown_ellp_param) );
|
||||
}
|
||||
|
||||
pj_ellps_type<T> const& pj_ellp = pj_ellps[i];
|
||||
a = pj_ellp.a;
|
||||
b = pj_ellp.b;
|
||||
}
|
||||
else if (it->template is_value_set<T>())
|
||||
{
|
||||
a = it->template get_value<T>();
|
||||
b = a;
|
||||
}
|
||||
else if (it->template is_value_set<srs::spheroid<T> >())
|
||||
{
|
||||
srs::spheroid<T> const& s = it->template get_value<srs::spheroid<T> >();
|
||||
a = geometry::get_radius<0>(s);
|
||||
b = geometry::get_radius<2>(s);
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_unknown_ellp_param) );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename Params,
|
||||
int I = srs::spar::detail::tuples_find_index_if
|
||||
<
|
||||
Params,
|
||||
srs::spar::detail::is_param_tr<srs::spar::detail::ellps_traits>::pred
|
||||
>::value,
|
||||
int N = boost::tuples::length<Params>::value
|
||||
>
|
||||
struct pj_ell_init_ellps_static
|
||||
{
|
||||
template <typename T>
|
||||
static bool apply(Params const& params, T &a, T &b)
|
||||
{
|
||||
typedef typename boost::tuples::element<I, Params>::type param_type;
|
||||
typedef srs::spar::detail::ellps_traits<param_type> traits_type;
|
||||
typedef typename traits_type::template model_type<T>::type model_type;
|
||||
|
||||
param_type const& param = boost::tuples::get<I>(params);
|
||||
model_type const& model = traits_type::template model<T>(param);
|
||||
|
||||
a = geometry::get_radius<0>(model);
|
||||
b = geometry::get_radius<2>(model);
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
template <typename Params, int N>
|
||||
struct pj_ell_init_ellps_static<Params, N, N>
|
||||
{
|
||||
template <typename T>
|
||||
static bool apply(Params const& , T & , T & )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX>
|
||||
inline bool pj_ell_init_ellps(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& params,
|
||||
T &a, T &b)
|
||||
{
|
||||
return pj_ell_init_ellps_static
|
||||
<
|
||||
srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX>
|
||||
>::apply(params, a, b);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_ell_init() */
|
||||
/************************************************************************/
|
||||
|
||||
/* initialize geographic shape parameters */
|
||||
// This function works differently than the original pj_ell_set().
|
||||
// It doesn't push parameters defined in ellps into params list.
|
||||
// Instead it tries to use size (a, R) and shape (es, e, rf, f, b) parameters
|
||||
// and then if needed falls back to ellps, then to datum and then to the default WGS84
|
||||
template <typename Params, typename T>
|
||||
inline void pj_ell_init(Params const& params, T &a, T &es)
|
||||
{
|
||||
/* check for varying forms of ellipsoid input */
|
||||
a = es = 0.;
|
||||
|
||||
/* R takes precedence */
|
||||
if (pj_param_f<srs::spar::r>(params, "R", srs::dpar::r, a)) {
|
||||
/* empty */
|
||||
} else { /* probable elliptical figure */
|
||||
|
||||
// Set ellipsoid's size parameter
|
||||
a = pj_get_param_f<T, srs::spar::a>(params, "a", srs::dpar::a);
|
||||
bool is_a_set = a != 0.0;
|
||||
|
||||
// Set ellipsoid's shape parameter
|
||||
T b = 0.0;
|
||||
bool is_ell_set = false;
|
||||
if (pj_param_f<srs::spar::es>(params, "es", srs::dpar::es, es)) {/* eccentricity squared */
|
||||
/* empty */
|
||||
is_ell_set = true;
|
||||
} else if (pj_param_f<srs::spar::e>(params, "e", srs::dpar::e, es)) { /* eccentricity */
|
||||
es = es * es;
|
||||
is_ell_set = true;
|
||||
} else if (pj_param_f<srs::spar::rf>(params, "rf", srs::dpar::rf, es)) { /* recip flattening */
|
||||
if (es == 0.0) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_rev_flattening_is_zero) );
|
||||
}
|
||||
es = 1./ es;
|
||||
es = es * (2. - es);
|
||||
is_ell_set = true;
|
||||
} else if (pj_param_f<srs::spar::f>(params, "f", srs::dpar::f, es)) { /* flattening */
|
||||
es = es * (2. - es);
|
||||
is_ell_set = true;
|
||||
} else if (pj_param_f<srs::spar::b>(params, "b", srs::dpar::b, b)) { /* minor axis */
|
||||
es = pj_ell_b_to_es(a, b);
|
||||
is_ell_set = true;
|
||||
} /* else es == 0. and sphere of radius a */
|
||||
|
||||
// NOTE: Below when ellps is used to initialize a and es
|
||||
// b is not set because it only has sense together with a
|
||||
// but a could have been set separately before, e.g. consider passing:
|
||||
// a=1 ellps=airy (a=6377563.396 b=6356256.910)
|
||||
// after setting size parameter a and shape parameter from ellps
|
||||
// b has to be recalculated
|
||||
|
||||
// If ellipsoid's parameters are not set directly
|
||||
// use ellps parameter
|
||||
if (! is_a_set || ! is_ell_set) {
|
||||
T ellps_a = 0, ellps_b = 0;
|
||||
if (pj_ell_init_ellps(params, ellps_a, ellps_b)) {
|
||||
if (! is_a_set) {
|
||||
a = ellps_a;
|
||||
is_a_set = true;
|
||||
}
|
||||
if (! is_ell_set) {
|
||||
es = pj_ell_b_to_es(ellps_a, ellps_b);
|
||||
is_ell_set = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If ellipsoid's parameters are not set
|
||||
// use ellps defined by datum parameter
|
||||
if (! is_a_set || ! is_ell_set)
|
||||
{
|
||||
const pj_datums_type<T>* datum = pj_datum_find_datum<T>(params);
|
||||
if (datum != NULL)
|
||||
{
|
||||
pj_ellps_type<T> const& pj_ellp = pj_get_ellps<T>().first[datum->ellps];
|
||||
if (! is_a_set) {
|
||||
a = pj_ellp.a;
|
||||
is_a_set = true;
|
||||
}
|
||||
if (! is_ell_set) {
|
||||
es = pj_ell_b_to_es(pj_ellp.a, pj_ellp.b);
|
||||
is_ell_set = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If ellipsoid's parameters are still not set
|
||||
// use default WGS84
|
||||
if ((! is_a_set || ! is_ell_set)
|
||||
&& ! pj_get_param_b<srs::spar::no_defs>(params, "no_defs", srs::dpar::no_defs))
|
||||
{
|
||||
pj_ellps_type<T> const& pj_ellp = pj_get_ellps<T>().first[srs::dpar::ellps_wgs84];
|
||||
if (! is_a_set) {
|
||||
a = pj_ellp.a;
|
||||
is_a_set = true;
|
||||
}
|
||||
if (! is_ell_set) {
|
||||
es = pj_ell_b_to_es(pj_ellp.a, pj_ellp.b);
|
||||
is_ell_set = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (b == 0.0)
|
||||
b = a * sqrt(1. - es);
|
||||
|
||||
/* following options turn ellipsoid into equivalent sphere */
|
||||
if (pj_get_param_b<srs::spar::r_au>(params, "R_A", srs::dpar::r_au)) { /* sphere--area of ellipsoid */
|
||||
a *= 1. - es * (SIXTH<T>() + es * (RA4<T>() + es * RA6<T>()));
|
||||
es = 0.;
|
||||
} else if (pj_get_param_b<srs::spar::r_v>(params, "R_V", srs::dpar::r_v)) { /* sphere--vol. of ellipsoid */
|
||||
a *= 1. - es * (SIXTH<T>() + es * (RV4<T>() + es * RV6<T>()));
|
||||
es = 0.;
|
||||
} else if (pj_get_param_b<srs::spar::r_a>(params, "R_a", srs::dpar::r_a)) { /* sphere--arithmetic mean */
|
||||
a = .5 * (a + b);
|
||||
es = 0.;
|
||||
} else if (pj_get_param_b<srs::spar::r_g>(params, "R_g", srs::dpar::r_g)) { /* sphere--geometric mean */
|
||||
a = sqrt(a * b);
|
||||
es = 0.;
|
||||
} else if (pj_get_param_b<srs::spar::r_h>(params, "R_h", srs::dpar::r_h)) { /* sphere--harmonic mean */
|
||||
a = 2. * a * b / (a + b);
|
||||
es = 0.;
|
||||
} else {
|
||||
T tmp;
|
||||
bool i = pj_param_r<srs::spar::r_lat_a>(params, "R_lat_a", srs::dpar::r_lat_a, tmp);
|
||||
if (i || /* sphere--arith. */
|
||||
pj_param_r<srs::spar::r_lat_g>(params, "R_lat_g", srs::dpar::r_lat_g, tmp)) { /* or geom. mean at latitude */
|
||||
|
||||
tmp = sin(tmp);
|
||||
if (geometry::math::abs(tmp) > geometry::math::half_pi<T>()) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_ref_rad_larger_than_90) );
|
||||
}
|
||||
tmp = 1. - es * tmp * tmp;
|
||||
a *= i ? .5 * (1. - es + tmp) / ( tmp * sqrt(tmp)) :
|
||||
sqrt(1. - es) / tmp;
|
||||
es = 0.;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* some remaining checks */
|
||||
if (es < 0.) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_es_less_than_zero) );
|
||||
}
|
||||
if (a <= 0.) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_major_axis_not_given) );
|
||||
}
|
||||
}
|
||||
|
||||
template <typename Params>
|
||||
struct static_srs_tag_check_nonexpanded
|
||||
{
|
||||
typedef typename boost::mpl::if_c
|
||||
<
|
||||
srs::spar::detail::tuples_exists_if
|
||||
<
|
||||
Params, srs::spar::detail::is_param_t<srs::spar::r>::pred
|
||||
>::value
|
||||
|| srs::spar::detail::tuples_exists_if
|
||||
<
|
||||
Params, srs::spar::detail::is_param<srs::spar::r_au>::pred
|
||||
>::value
|
||||
|| srs::spar::detail::tuples_exists_if
|
||||
<
|
||||
Params, srs::spar::detail::is_param<srs::spar::r_v>::pred
|
||||
>::value
|
||||
|| srs::spar::detail::tuples_exists_if
|
||||
<
|
||||
Params, srs::spar::detail::is_param<srs::spar::r_a>::pred
|
||||
>::value
|
||||
|| srs::spar::detail::tuples_exists_if
|
||||
<
|
||||
Params, srs::spar::detail::is_param<srs::spar::r_g>::pred
|
||||
>::value
|
||||
|| srs::spar::detail::tuples_exists_if
|
||||
<
|
||||
Params, srs::spar::detail::is_param<srs::spar::r_h>::pred
|
||||
>::value
|
||||
|| srs::spar::detail::tuples_exists_if
|
||||
<
|
||||
Params, srs::spar::detail::is_param_t<srs::spar::r_lat_a>::pred
|
||||
>::value
|
||||
|| srs::spar::detail::tuples_exists_if
|
||||
<
|
||||
Params, srs::spar::detail::is_param_t<srs::spar::r_lat_g>::pred
|
||||
>::value,
|
||||
srs_sphere_tag,
|
||||
// NOTE: The assumption here is that if the user defines either one of:
|
||||
// b, es, e, f, rf parameters then he wants to define spheroid, not sphere
|
||||
typename boost::mpl::if_c
|
||||
<
|
||||
srs::spar::detail::tuples_exists_if
|
||||
<
|
||||
Params, srs::spar::detail::is_param_t<srs::spar::b>::pred
|
||||
>::value
|
||||
|| srs::spar::detail::tuples_exists_if
|
||||
<
|
||||
Params, srs::spar::detail::is_param_t<srs::spar::es>::pred
|
||||
>::value
|
||||
|| srs::spar::detail::tuples_exists_if
|
||||
<
|
||||
Params, srs::spar::detail::is_param_t<srs::spar::e>::pred
|
||||
>::value
|
||||
|| srs::spar::detail::tuples_exists_if
|
||||
<
|
||||
Params, srs::spar::detail::is_param_t<srs::spar::rf>::pred
|
||||
>::value
|
||||
|| srs::spar::detail::tuples_exists_if
|
||||
<
|
||||
Params, srs::spar::detail::is_param_t<srs::spar::f>::pred
|
||||
>::value,
|
||||
srs_spheroid_tag,
|
||||
void
|
||||
>::type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
template <typename Params>
|
||||
struct static_srs_tag_check_ellps
|
||||
{
|
||||
typedef typename geometry::tag
|
||||
<
|
||||
typename srs::spar::detail::ellps_traits
|
||||
<
|
||||
typename srs::spar::detail::tuples_find_if
|
||||
<
|
||||
Params,
|
||||
srs::spar::detail::is_param_tr<srs::spar::detail::ellps_traits>::pred
|
||||
>::type
|
||||
>::template model_type<double>::type // dummy type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
template <typename Params>
|
||||
struct static_srs_tag_check_datum
|
||||
{
|
||||
typedef typename geometry::tag
|
||||
<
|
||||
typename srs::spar::detail::ellps_traits
|
||||
<
|
||||
typename srs::spar::detail::datum_traits
|
||||
<
|
||||
typename srs::spar::detail::tuples_find_if
|
||||
<
|
||||
Params,
|
||||
srs::spar::detail::is_param_tr<srs::spar::detail::datum_traits>::pred
|
||||
>::type
|
||||
>::ellps_type
|
||||
>::template model_type<double>::type // dummy type
|
||||
>::type type;
|
||||
};
|
||||
|
||||
template
|
||||
<
|
||||
typename Params,
|
||||
typename NonExpandedTag = typename static_srs_tag_check_nonexpanded
|
||||
<
|
||||
Params
|
||||
>::type,
|
||||
typename EllpsTag = typename static_srs_tag_check_ellps
|
||||
<
|
||||
Params
|
||||
>::type,
|
||||
typename DatumTag = typename static_srs_tag_check_datum
|
||||
<
|
||||
Params
|
||||
>::type
|
||||
>
|
||||
struct static_srs_tag
|
||||
{
|
||||
// User passed one of the non-ellps, non-datum parameters
|
||||
typedef NonExpandedTag type;
|
||||
};
|
||||
|
||||
template <typename Params, typename EllpsTag, typename DatumTag>
|
||||
struct static_srs_tag<Params, void, EllpsTag, DatumTag>
|
||||
{
|
||||
// User didn't pass neither one of the non-ellps, non-datum parameters
|
||||
// but passed ellps
|
||||
typedef EllpsTag type;
|
||||
};
|
||||
|
||||
template <typename Params, typename DatumTag>
|
||||
struct static_srs_tag<Params, void, void, DatumTag>
|
||||
{
|
||||
// User didn't pass neither one of the non-ellps, non-datum parameters
|
||||
// nor ellps parameter but passed datum parameter
|
||||
typedef DatumTag type;
|
||||
};
|
||||
|
||||
template <typename Params>
|
||||
struct static_srs_tag<Params, void, void, void>
|
||||
{
|
||||
// User didn't pass any parameter defining model
|
||||
// so use default or generate error
|
||||
typedef typename boost::mpl::if_c
|
||||
<
|
||||
srs::spar::detail::tuples_exists_if
|
||||
<
|
||||
Params, srs::spar::detail::is_param<srs::spar::no_defs>::pred
|
||||
>::value,
|
||||
void,
|
||||
srs_spheroid_tag // WGS84
|
||||
>::type type;
|
||||
|
||||
static const bool is_found = ! boost::is_same<type, void>::value;
|
||||
BOOST_MPL_ASSERT_MSG((is_found), UNKNOWN_ELLP_PARAM, (Params));
|
||||
};
|
||||
|
||||
|
||||
template <typename T>
|
||||
inline void pj_calc_ellipsoid_params(parameters<T> & p, T const& a, T const& es) {
|
||||
/****************************************************************************************
|
||||
Calculate a large number of ancillary ellipsoidal parameters, in addition to
|
||||
the two traditional PROJ defining parameters: Semimajor axis, a, and the
|
||||
eccentricity squared, es.
|
||||
|
||||
Most of these parameters are fairly cheap to compute in comparison to the overall
|
||||
effort involved in initializing a PJ object. They may, however, take a substantial
|
||||
part of the time taken in computing an individual point transformation.
|
||||
|
||||
So by providing them up front, we can amortize the (already modest) cost over all
|
||||
transformations carried out over the entire lifetime of a PJ object, rather than
|
||||
incur that cost for every single transformation.
|
||||
|
||||
Most of the parameter calculations here are based on the "angular eccentricity",
|
||||
i.e. the angle, measured from the semiminor axis, of a line going from the north
|
||||
pole to one of the foci of the ellipsoid - or in other words: The arc sine of the
|
||||
eccentricity.
|
||||
|
||||
The formulae used are mostly taken from:
|
||||
|
||||
Richard H. Rapp: Geometric Geodesy, Part I, (178 pp, 1991).
|
||||
Columbus, Ohio: Dept. of Geodetic Science
|
||||
and Surveying, Ohio State University.
|
||||
|
||||
****************************************************************************************/
|
||||
|
||||
p.a = a;
|
||||
p.es = es;
|
||||
|
||||
/* Compute some ancillary ellipsoidal parameters */
|
||||
if (p.e==0)
|
||||
p.e = sqrt(p.es); /* eccentricity */
|
||||
//p.alpha = asin (p.e); /* angular eccentricity */
|
||||
|
||||
/* second eccentricity */
|
||||
//p.e2 = tan (p.alpha);
|
||||
//p.e2s = p.e2 * p.e2;
|
||||
|
||||
/* third eccentricity */
|
||||
//p.e3 = (0!=p.alpha)? sin (p.alpha) / sqrt(2 - sin (p.alpha)*sin (p.alpha)): 0;
|
||||
//p.e3s = p.e3 * p.e3;
|
||||
|
||||
/* flattening */
|
||||
//if (0==p.f)
|
||||
// p.f = 1 - cos (p.alpha); /* = 1 - sqrt (1 - PIN->es); */
|
||||
//p.rf = p.f != 0.0 ? 1.0/p.f: HUGE_VAL;
|
||||
|
||||
/* second flattening */
|
||||
//p.f2 = (cos(p.alpha)!=0)? 1/cos (p.alpha) - 1: 0;
|
||||
//p.rf2 = p.f2 != 0.0 ? 1/p.f2: HUGE_VAL;
|
||||
|
||||
/* third flattening */
|
||||
//p.n = pow (tan (p.alpha/2), 2);
|
||||
//p.rn = p.n != 0.0 ? 1/p.n: HUGE_VAL;
|
||||
|
||||
/* ...and a few more */
|
||||
//if (0==p.b)
|
||||
// p.b = (1 - p.f)*p.a;
|
||||
//p.rb = 1. / p.b;
|
||||
p.ra = 1. / p.a;
|
||||
|
||||
p.one_es = 1. - p.es;
|
||||
if (p.one_es == 0.) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_eccentricity_is_one) );
|
||||
}
|
||||
|
||||
p.rone_es = 1./p.one_es;
|
||||
}
|
||||
|
||||
|
||||
} // namespace detail
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_ELL_SET_HPP
|
||||
@@ -0,0 +1,130 @@
|
||||
// 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, 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)
|
||||
|
||||
// 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 <string>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
|
||||
namespace detail {
|
||||
|
||||
// Originally defined in projects.h
|
||||
template <typename T>
|
||||
struct pj_ellps_type
|
||||
{
|
||||
std::string id; /* ellipse keyword name */
|
||||
//std::string major; /* a's value */
|
||||
//std::string ell; /* elliptical parameter value */
|
||||
//bool is_rf; /* rf or b? */
|
||||
T a;
|
||||
T b;
|
||||
//std::string name; /* comments */
|
||||
};
|
||||
|
||||
inline double b_from_a_rf(double a, double rf)
|
||||
{
|
||||
return a * (1.0 - 1.0 / rf);
|
||||
}
|
||||
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF(ID, A, RF, NAME) \
|
||||
{ID, /*#A, #RF, true,*/ A, b_from_a_rf(A, RF), /*NAME*/}
|
||||
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_B(ID, A, B, NAME) \
|
||||
{ID, /*#A, #B, false,*/ A, B, /*NAME*/}
|
||||
|
||||
template <typename T>
|
||||
inline std::pair<const pj_ellps_type<T>*, int> pj_get_ellps()
|
||||
{
|
||||
static const pj_ellps_type<T> pj_ellps[] =
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("MERIT", 6378137.0, 298.257, "MERIT 1983"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("SGS85", 6378136.0, 298.257, "Soviet Geodetic System 85"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("GRS80", 6378137.0, 298.257222101, "GRS 1980(IUGG, 1980)"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("IAU76", 6378140.0, 298.257, "IAU 1976"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_B ("airy", 6377563.396, 6356256.910, "Airy 1830"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("APL4.9", 6378137.0, 298.25, "Appl. Physics. 1965"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("NWL9D", 6378145.0, 298.25, "Naval Weapons Lab., 1965"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_B ("mod_airy", 6377340.189, 6356034.446, "Modified Airy"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("andrae", 6377104.43, 300.0, "Andrae 1876 (Den., Iclnd.)"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("aust_SA", 6378160.0, 298.25, "Australian Natl & S. Amer. 1969"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("GRS67", 6378160.0, 298.2471674270, "GRS 67(IUGG 1967)"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("bessel", 6377397.155, 299.1528128, "Bessel 1841"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("bess_nam", 6377483.865, 299.1528128, "Bessel 1841 (Namibia)"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_B ("clrk66", 6378206.4, 6356583.8, "Clarke 1866"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("clrk80", 6378249.145, 293.4663, "Clarke 1880 mod."),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("clrk80ign", 6378249.2, 293.4660212936269, "Clarke 1880 (IGN)."),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("CPM", 6375738.7, 334.29, "Comm. des Poids et Mesures 1799"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("delmbr", 6376428.0, 311.5, "Delambre 1810 (Belgium)"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("engelis", 6378136.05, 298.2566, "Engelis 1985"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("evrst30", 6377276.345, 300.8017, "Everest 1830"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("evrst48", 6377304.063, 300.8017, "Everest 1948"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("evrst56", 6377301.243, 300.8017, "Everest 1956"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("evrst69", 6377295.664, 300.8017, "Everest 1969"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("evrstSS", 6377298.556, 300.8017, "Everest (Sabah & Sarawak)"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("fschr60", 6378166.0, 298.3, "Fischer (Mercury Datum) 1960"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("fschr60m", 6378155.0, 298.3, "Modified Fischer 1960"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("fschr68", 6378150.0, 298.3, "Fischer 1968"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("helmert", 6378200.0, 298.3, "Helmert 1906"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("hough", 6378270.0, 297.0, "Hough"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("intl", 6378388.0, 297.0, "International 1909 (Hayford)"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("krass", 6378245.0, 298.3, "Krassovsky, 1942"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("kaula", 6378163.0, 298.24, "Kaula 1961"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("lerch", 6378139.0, 298.257, "Lerch 1979"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("mprts", 6397300.0, 191.0, "Maupertius 1738"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_B ("new_intl", 6378157.5, 6356772.2, "New International 1967"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_B ("plessis", 6376523.0, 6355863.0, "Plessis 1817 (France)"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_B ("SEasia", 6378155.0, 6356773.3205, "Southeast Asia"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_B ("walbeck", 6376896.0, 6355834.8467, "Walbeck"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("WGS60", 6378165.0, 298.3, "WGS 60"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("WGS66", 6378145.0, 298.25, "WGS 66"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_RF("WGS72", 6378135.0, 298.26, "WGS 72"),
|
||||
// This has to be consistent with default spheroid and values in pj_datum_transform
|
||||
// TODO: Define in one place
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_B ("WGS84", 6378137.0, 6356752.3142451793, "WGS 84"),
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_PJ_ELLPS_B ("sphere", 6370997.0, 6370997.0, "Normal Sphere (r=6370997)")
|
||||
};
|
||||
|
||||
return std::make_pair(pj_ellps, sizeof(pj_ellps) / sizeof(pj_ellps[0]));
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_ELLPS_HPP
|
||||
@@ -0,0 +1,101 @@
|
||||
// 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, 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)
|
||||
|
||||
// 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_FWD_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_FWD_HPP
|
||||
|
||||
#include <boost/geometry/core/radian_access.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/geometry/srs/projections/impl/adjlon.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
|
||||
/* general forward projection */
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
|
||||
namespace detail {
|
||||
|
||||
/* 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;
|
||||
|
||||
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 > EPS || geometry::math::abs(lp_lon) > 10.)
|
||||
{
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_lat_or_lon_exceed_limit) );
|
||||
}
|
||||
|
||||
if (geometry::math::abs(t) <= EPS)
|
||||
{
|
||||
lp_lat = lp_lat < 0. ? -geometry::math::half_pi<calc_t>() : geometry::math::half_pi<calc_t>();
|
||||
}
|
||||
else if (par.geoc)
|
||||
{
|
||||
lp_lat = atan(par.rone_es * tan(lp_lat));
|
||||
}
|
||||
|
||||
lp_lon -= par.lam0; /* compute del lp.lam */
|
||||
if (! par.over)
|
||||
{
|
||||
lp_lon = adjlon(lp_lon); /* post_forward del longitude */
|
||||
}
|
||||
|
||||
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));
|
||||
geometry::set<1>(xy, par.fr_meter * (par.a * y + par.y0));
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_FWD_HPP
|
||||
@@ -0,0 +1,145 @@
|
||||
// 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, 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)
|
||||
|
||||
// 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_GAUSS_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_GAUSS_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/srs/projections/constants.hpp>
|
||||
#include <boost/geometry/srs/projections/exception.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
|
||||
namespace detail {
|
||||
|
||||
|
||||
template <typename T>
|
||||
struct gauss
|
||||
{
|
||||
T C;
|
||||
T K;
|
||||
T e;
|
||||
T ratexp;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
inline T srat(T const& esinp, T const& exp)
|
||||
{
|
||||
return (math::pow((T(1) - esinp) / (T(1) + esinp), exp));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline gauss<T> gauss_ini(T const& e, T const& phi0, T& chi, T& rc)
|
||||
{
|
||||
static const T fourth_pi = detail::fourth_pi<T>();
|
||||
|
||||
using std::asin;
|
||||
using std::cos;
|
||||
using std::sin;
|
||||
using std::sqrt;
|
||||
using std::tan;
|
||||
|
||||
T sphi = 0;
|
||||
T cphi = 0;
|
||||
T es = 0;
|
||||
|
||||
gauss<T> en;
|
||||
es = e * e;
|
||||
en.e = e;
|
||||
sphi = sin(phi0);
|
||||
cphi = cos(phi0);
|
||||
cphi *= cphi;
|
||||
|
||||
rc = sqrt(1.0 - es) / (1.0 - es * sphi * sphi);
|
||||
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 + fourth_pi)
|
||||
/ (math::pow(tan(T(0.5) * phi0 + fourth_pi), en.C) * srat(en.e * sphi, en.ratexp));
|
||||
|
||||
return en;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline void gauss_fwd(gauss<T> const& en, T& lam, T& phi)
|
||||
{
|
||||
static const T fourth_pi = detail::fourth_pi<T>();
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
|
||||
phi = T(2) * atan(en.K * math::pow(tan(T(0.5) * phi + fourth_pi), en.C)
|
||||
* srat(en.e * sin(phi), en.ratexp) ) - half_pi;
|
||||
|
||||
lam *= en.C;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline void gauss_inv(gauss<T> const& en, T& lam, T& phi)
|
||||
{
|
||||
static const int max_iter = 20;
|
||||
static const T fourth_pi = detail::fourth_pi<T>();
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
static const T del_tol = 1e-14;
|
||||
|
||||
lam /= en.C;
|
||||
const T num = math::pow(tan(T(0.5) * phi + fourth_pi) / en.K, T(1) / en.C);
|
||||
|
||||
int i = 0;
|
||||
for (i = max_iter; i; --i)
|
||||
{
|
||||
const T elp_phi = 2.0 * atan(num * srat(en.e * sin(phi), - 0.5 * en.e)) - half_pi;
|
||||
|
||||
if (geometry::math::abs(elp_phi - phi) < del_tol)
|
||||
{
|
||||
break;
|
||||
}
|
||||
phi = elp_phi;
|
||||
}
|
||||
|
||||
/* convergence failed */
|
||||
if (!i)
|
||||
{
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_non_conv_inv_meri_dist) );
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_GAUSS_HPP
|
||||
@@ -0,0 +1,961 @@
|
||||
// Boost.Geometry
|
||||
// This file is manually converted from PROJ4
|
||||
|
||||
// This file was modified by Oracle on 2018, 2019.
|
||||
// Modifications copyright (c) 2018-2019, 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:
|
||||
// Author: Frank Warmerdam, warmerdam@pobox.com
|
||||
|
||||
// Copyright (c) 2000, Frank Warmerdam
|
||||
|
||||
// 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_SRS_PROJECTIONS_IMPL_PJ_GRIDINFO_HPP
|
||||
#define BOOST_GEOMETRY_SRS_PROJECTIONS_IMPL_PJ_GRIDINFO_HPP
|
||||
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/cstdint.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
/************************************************************************/
|
||||
/* swap_words() */
|
||||
/* */
|
||||
/* Convert the byte order of the given word(s) in place. */
|
||||
/************************************************************************/
|
||||
|
||||
inline bool is_lsb()
|
||||
{
|
||||
static const int byte_order_test = 1;
|
||||
static bool result = (1 == ((const unsigned char *) (&byte_order_test))[0]);
|
||||
return result;
|
||||
}
|
||||
|
||||
inline void swap_words( char *data, int word_size, int word_count )
|
||||
{
|
||||
for (int word = 0; word < word_count; word++)
|
||||
{
|
||||
for (int i = 0; i < word_size/2; i++)
|
||||
{
|
||||
std::swap(data[i], data[word_size-i-1]);
|
||||
}
|
||||
|
||||
data += word_size;
|
||||
}
|
||||
}
|
||||
|
||||
inline bool cstr_equal(const char * s1, const char * s2, std::size_t n)
|
||||
{
|
||||
return std::equal(s1, s1 + n, s2);
|
||||
}
|
||||
|
||||
struct is_trimmable_char
|
||||
{
|
||||
inline bool operator()(char ch)
|
||||
{
|
||||
return ch == '\n' || ch == ' ';
|
||||
}
|
||||
};
|
||||
|
||||
// structs originally defined in projects.h
|
||||
|
||||
struct pj_ctable
|
||||
{
|
||||
struct lp_t { double lam, phi; };
|
||||
struct flp_t { float lam, phi; };
|
||||
struct ilp_t { boost::int32_t lam, phi; };
|
||||
|
||||
std::string id; // ascii info
|
||||
lp_t ll; // lower left corner coordinates
|
||||
lp_t del; // size of cells
|
||||
ilp_t lim; // limits of conversion matrix
|
||||
std::vector<flp_t> cvs; // conversion matrix
|
||||
|
||||
inline void swap(pj_ctable & r)
|
||||
{
|
||||
id.swap(r.id);
|
||||
std::swap(ll, r.ll);
|
||||
std::swap(del, r.del);
|
||||
std::swap(lim, r.lim);
|
||||
cvs.swap(r.cvs);
|
||||
}
|
||||
};
|
||||
|
||||
struct pj_gi_load
|
||||
{
|
||||
enum format_t { missing = 0, ntv1, ntv2, gtx, ctable, ctable2 };
|
||||
typedef boost::long_long_type offset_t;
|
||||
|
||||
explicit pj_gi_load(std::string const& gname = "",
|
||||
format_t f = missing,
|
||||
offset_t off = 0,
|
||||
bool swap = false)
|
||||
: gridname(gname)
|
||||
, format(f)
|
||||
, grid_offset(off)
|
||||
, must_swap(swap)
|
||||
{}
|
||||
|
||||
std::string gridname; // identifying name of grid, eg "conus" or ntv2_0.gsb
|
||||
|
||||
format_t format; // format of this grid, ie "ctable", "ntv1", "ntv2" or "missing".
|
||||
|
||||
offset_t grid_offset; // offset in file, for delayed loading
|
||||
bool must_swap; // only for NTv2
|
||||
|
||||
pj_ctable ct;
|
||||
|
||||
inline void swap(pj_gi_load & r)
|
||||
{
|
||||
gridname.swap(r.gridname);
|
||||
std::swap(format, r.format);
|
||||
std::swap(grid_offset, r.grid_offset);
|
||||
std::swap(must_swap, r.must_swap);
|
||||
ct.swap(r.ct);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
struct pj_gi
|
||||
: pj_gi_load
|
||||
{
|
||||
explicit pj_gi(std::string const& gname = "",
|
||||
pj_gi_load::format_t f = missing,
|
||||
pj_gi_load::offset_t off = 0,
|
||||
bool swap = false)
|
||||
: pj_gi_load(gname, f, off, swap)
|
||||
{}
|
||||
|
||||
std::vector<pj_gi> children;
|
||||
|
||||
inline void swap(pj_gi & r)
|
||||
{
|
||||
pj_gi_load::swap(r);
|
||||
children.swap(r.children);
|
||||
}
|
||||
};
|
||||
|
||||
typedef std::vector<pj_gi> pj_gridinfo;
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_gridinfo_load_ctable() */
|
||||
/* */
|
||||
/* Load the data portion of a ctable formatted grid. */
|
||||
/************************************************************************/
|
||||
|
||||
// Originally nad_ctable_load() defined in nad_init.c
|
||||
template <typename IStream>
|
||||
bool pj_gridinfo_load_ctable(IStream & is, pj_gi_load & gi)
|
||||
{
|
||||
pj_ctable & ct = gi.ct;
|
||||
|
||||
// Move the input stream by the size of the proj4 original CTABLE
|
||||
std::size_t header_size = 80
|
||||
+ 2 * sizeof(pj_ctable::lp_t)
|
||||
+ sizeof(pj_ctable::ilp_t)
|
||||
+ sizeof(pj_ctable::flp_t*);
|
||||
is.seekg(header_size);
|
||||
|
||||
// read all the actual shift values
|
||||
std::size_t a_size = ct.lim.lam * ct.lim.phi;
|
||||
ct.cvs.resize(a_size);
|
||||
|
||||
std::size_t ch_size = sizeof(pj_ctable::flp_t) * a_size;
|
||||
is.read(reinterpret_cast<char*>(&ct.cvs[0]), ch_size);
|
||||
|
||||
if (is.fail() || std::size_t(is.gcount()) != ch_size)
|
||||
{
|
||||
ct.cvs.clear();
|
||||
//ctable loading failed on fread() - binary incompatible?
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_gridinfo_load_ctable2() */
|
||||
/* */
|
||||
/* Load the data portion of a ctable2 formatted grid. */
|
||||
/************************************************************************/
|
||||
|
||||
// Originally nad_ctable2_load() defined in nad_init.c
|
||||
template <typename IStream>
|
||||
bool pj_gridinfo_load_ctable2(IStream & is, pj_gi_load & gi)
|
||||
{
|
||||
pj_ctable & ct = gi.ct;
|
||||
|
||||
is.seekg(160);
|
||||
|
||||
// read all the actual shift values
|
||||
std::size_t a_size = ct.lim.lam * ct.lim.phi;
|
||||
ct.cvs.resize(a_size);
|
||||
|
||||
std::size_t ch_size = sizeof(pj_ctable::flp_t) * a_size;
|
||||
is.read(reinterpret_cast<char*>(&ct.cvs[0]), ch_size);
|
||||
|
||||
if (is.fail() || std::size_t(is.gcount()) != ch_size)
|
||||
{
|
||||
//ctable2 loading failed on fread() - binary incompatible?
|
||||
ct.cvs.clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (! is_lsb())
|
||||
{
|
||||
swap_words(reinterpret_cast<char*>(&ct.cvs[0]), 4, (int)a_size * 2);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_gridinfo_load_ntv1() */
|
||||
/* */
|
||||
/* NTv1 format. */
|
||||
/* We process one line at a time. Note that the array storage */
|
||||
/* direction (e-w) is different in the NTv1 file and what */
|
||||
/* the CTABLE is supposed to have. The phi/lam are also */
|
||||
/* reversed, and we have to be aware of byte swapping. */
|
||||
/************************************************************************/
|
||||
|
||||
// originally in pj_gridinfo_load() function
|
||||
template <typename IStream>
|
||||
inline bool pj_gridinfo_load_ntv1(IStream & is, pj_gi_load & gi)
|
||||
{
|
||||
static const double s2r = math::d2r<double>() / 3600.0;
|
||||
|
||||
std::size_t const r_size = gi.ct.lim.lam * 2;
|
||||
std::size_t const ch_size = sizeof(double) * r_size;
|
||||
|
||||
is.seekg(gi.grid_offset);
|
||||
|
||||
std::vector<double> row_buf(r_size);
|
||||
gi.ct.cvs.resize(gi.ct.lim.lam * gi.ct.lim.phi);
|
||||
|
||||
for (boost::int32_t row = 0; row < gi.ct.lim.phi; row++ )
|
||||
{
|
||||
is.read(reinterpret_cast<char*>(&row_buf[0]), ch_size);
|
||||
|
||||
if (is.fail() || std::size_t(is.gcount()) != ch_size)
|
||||
{
|
||||
gi.ct.cvs.clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_lsb())
|
||||
swap_words(reinterpret_cast<char*>(&row_buf[0]), 8, (int)r_size);
|
||||
|
||||
// convert seconds to radians
|
||||
for (boost::int32_t i = 0; i < gi.ct.lim.lam; i++ )
|
||||
{
|
||||
pj_ctable::flp_t & cvs = gi.ct.cvs[row * gi.ct.lim.lam + (gi.ct.lim.lam - i - 1)];
|
||||
|
||||
cvs.phi = (float) (row_buf[i*2] * s2r);
|
||||
cvs.lam = (float) (row_buf[i*2+1] * s2r);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* pj_gridinfo_load_ntv2() */
|
||||
/* */
|
||||
/* NTv2 format. */
|
||||
/* We process one line at a time. Note that the array storage */
|
||||
/* direction (e-w) is different in the NTv2 file and what */
|
||||
/* the CTABLE is supposed to have. The phi/lam are also */
|
||||
/* reversed, and we have to be aware of byte swapping. */
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
// originally in pj_gridinfo_load() function
|
||||
template <typename IStream>
|
||||
inline bool pj_gridinfo_load_ntv2(IStream & is, pj_gi_load & gi)
|
||||
{
|
||||
static const double s2r = math::d2r<double>() / 3600.0;
|
||||
|
||||
std::size_t const r_size = gi.ct.lim.lam * 4;
|
||||
std::size_t const ch_size = sizeof(float) * r_size;
|
||||
|
||||
is.seekg(gi.grid_offset);
|
||||
|
||||
std::vector<float> row_buf(r_size);
|
||||
gi.ct.cvs.resize(gi.ct.lim.lam * gi.ct.lim.phi);
|
||||
|
||||
for (boost::int32_t row = 0; row < gi.ct.lim.phi; row++ )
|
||||
{
|
||||
is.read(reinterpret_cast<char*>(&row_buf[0]), ch_size);
|
||||
|
||||
if (is.fail() || std::size_t(is.gcount()) != ch_size)
|
||||
{
|
||||
gi.ct.cvs.clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (gi.must_swap)
|
||||
{
|
||||
swap_words(reinterpret_cast<char*>(&row_buf[0]), 4, (int)r_size);
|
||||
}
|
||||
|
||||
// convert seconds to radians
|
||||
for (boost::int32_t i = 0; i < gi.ct.lim.lam; i++ )
|
||||
{
|
||||
pj_ctable::flp_t & cvs = gi.ct.cvs[row * gi.ct.lim.lam + (gi.ct.lim.lam - i - 1)];
|
||||
|
||||
// skip accuracy values
|
||||
cvs.phi = (float) (row_buf[i*4] * s2r);
|
||||
cvs.lam = (float) (row_buf[i*4+1] * s2r);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_gridinfo_load_gtx() */
|
||||
/* */
|
||||
/* GTX format. */
|
||||
/************************************************************************/
|
||||
|
||||
// originally in pj_gridinfo_load() function
|
||||
template <typename IStream>
|
||||
inline bool pj_gridinfo_load_gtx(IStream & is, pj_gi_load & gi)
|
||||
{
|
||||
boost::int32_t words = gi.ct.lim.lam * gi.ct.lim.phi;
|
||||
std::size_t const ch_size = sizeof(float) * words;
|
||||
|
||||
is.seekg(gi.grid_offset);
|
||||
|
||||
// TODO: Consider changing this unintuitive code
|
||||
// NOTE: Vertical shift data (one float per point) is stored in a container
|
||||
// holding horizontal shift data (two floats per point).
|
||||
gi.ct.cvs.resize((words + 1) / 2);
|
||||
|
||||
is.read(reinterpret_cast<char*>(&gi.ct.cvs[0]), ch_size);
|
||||
|
||||
if (is.fail() || std::size_t(is.gcount()) != ch_size)
|
||||
{
|
||||
gi.ct.cvs.clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_lsb())
|
||||
{
|
||||
swap_words(reinterpret_cast<char*>(&gi.ct.cvs[0]), 4, words);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_gridinfo_load() */
|
||||
/* */
|
||||
/* This function is intended to implement delayed loading of */
|
||||
/* the data contents of a grid file. The header and related */
|
||||
/* stuff are loaded by pj_gridinfo_init(). */
|
||||
/************************************************************************/
|
||||
|
||||
template <typename IStream>
|
||||
inline bool pj_gridinfo_load(IStream & is, pj_gi_load & gi)
|
||||
{
|
||||
if (! gi.ct.cvs.empty())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (! is.is_open())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Original platform specific CTable format.
|
||||
if (gi.format == pj_gi::ctable)
|
||||
{
|
||||
return pj_gridinfo_load_ctable(is, gi);
|
||||
}
|
||||
// CTable2 format.
|
||||
else if (gi.format == pj_gi::ctable2)
|
||||
{
|
||||
return pj_gridinfo_load_ctable2(is, gi);
|
||||
}
|
||||
// NTv1 format.
|
||||
else if (gi.format == pj_gi::ntv1)
|
||||
{
|
||||
return pj_gridinfo_load_ntv1(is, gi);
|
||||
}
|
||||
// NTv2 format.
|
||||
else if (gi.format == pj_gi::ntv2)
|
||||
{
|
||||
return pj_gridinfo_load_ntv2(is, gi);
|
||||
}
|
||||
// GTX format.
|
||||
else if (gi.format == pj_gi::gtx)
|
||||
{
|
||||
return pj_gridinfo_load_gtx(is, gi);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_gridinfo_parent() */
|
||||
/* */
|
||||
/* Seek a parent grid file by name from a grid list */
|
||||
/************************************************************************/
|
||||
|
||||
template <typename It>
|
||||
inline It pj_gridinfo_parent(It first, It last, std::string const& name)
|
||||
{
|
||||
for ( ; first != last ; ++first)
|
||||
{
|
||||
if (first->ct.id == name)
|
||||
return first;
|
||||
|
||||
It parent = pj_gridinfo_parent(first->children.begin(), first->children.end(), name);
|
||||
if( parent != first->children.end() )
|
||||
return parent;
|
||||
}
|
||||
|
||||
return last;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_gridinfo_init_ntv2() */
|
||||
/* */
|
||||
/* Load a ntv2 (.gsb) file. */
|
||||
/************************************************************************/
|
||||
|
||||
template <typename IStream>
|
||||
inline bool pj_gridinfo_init_ntv2(std::string const& gridname,
|
||||
IStream & is,
|
||||
pj_gridinfo & gridinfo)
|
||||
{
|
||||
BOOST_STATIC_ASSERT( sizeof(boost::int32_t) == 4 );
|
||||
BOOST_STATIC_ASSERT( sizeof(double) == 8 );
|
||||
|
||||
static const double s2r = math::d2r<double>() / 3600.0;
|
||||
|
||||
std::size_t gridinfo_orig_size = gridinfo.size();
|
||||
|
||||
// Read the overview header.
|
||||
char header[11*16];
|
||||
|
||||
is.read(header, sizeof(header));
|
||||
if( is.fail() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool must_swap = (header[8] == 11)
|
||||
? !is_lsb()
|
||||
: is_lsb();
|
||||
|
||||
// NOTE: This check is not implemented in proj4
|
||||
if (! cstr_equal(header + 56, "SECONDS", 7))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Byte swap interesting fields if needed.
|
||||
if( must_swap )
|
||||
{
|
||||
swap_words( header+8, 4, 1 );
|
||||
swap_words( header+8+16, 4, 1 );
|
||||
swap_words( header+8+32, 4, 1 );
|
||||
swap_words( header+8+7*16, 8, 1 );
|
||||
swap_words( header+8+8*16, 8, 1 );
|
||||
swap_words( header+8+9*16, 8, 1 );
|
||||
swap_words( header+8+10*16, 8, 1 );
|
||||
}
|
||||
|
||||
// Get the subfile count out ... all we really use for now.
|
||||
boost::int32_t num_subfiles;
|
||||
memcpy( &num_subfiles, header+8+32, 4 );
|
||||
|
||||
// Step through the subfiles, creating a PJ_GRIDINFO for each.
|
||||
for( boost::int32_t subfile = 0; subfile < num_subfiles; subfile++ )
|
||||
{
|
||||
// Read header.
|
||||
is.read(header, sizeof(header));
|
||||
if( is.fail() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(! cstr_equal(header, "SUB_NAME", 8))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Byte swap interesting fields if needed.
|
||||
if( must_swap )
|
||||
{
|
||||
swap_words( header+8+16*4, 8, 1 );
|
||||
swap_words( header+8+16*5, 8, 1 );
|
||||
swap_words( header+8+16*6, 8, 1 );
|
||||
swap_words( header+8+16*7, 8, 1 );
|
||||
swap_words( header+8+16*8, 8, 1 );
|
||||
swap_words( header+8+16*9, 8, 1 );
|
||||
swap_words( header+8+16*10, 4, 1 );
|
||||
}
|
||||
|
||||
// Initialize a corresponding "ct" structure.
|
||||
pj_ctable ct;
|
||||
pj_ctable::lp_t ur;
|
||||
|
||||
ct.id = std::string(header + 8, 8);
|
||||
|
||||
ct.ll.lam = - *((double *) (header+7*16+8)); /* W_LONG */
|
||||
ct.ll.phi = *((double *) (header+4*16+8)); /* S_LAT */
|
||||
|
||||
ur.lam = - *((double *) (header+6*16+8)); /* E_LONG */
|
||||
ur.phi = *((double *) (header+5*16+8)); /* N_LAT */
|
||||
|
||||
ct.del.lam = *((double *) (header+9*16+8));
|
||||
ct.del.phi = *((double *) (header+8*16+8));
|
||||
|
||||
ct.lim.lam = (boost::int32_t) (fabs(ur.lam-ct.ll.lam)/ct.del.lam + 0.5) + 1;
|
||||
ct.lim.phi = (boost::int32_t) (fabs(ur.phi-ct.ll.phi)/ct.del.phi + 0.5) + 1;
|
||||
|
||||
ct.ll.lam *= s2r;
|
||||
ct.ll.phi *= s2r;
|
||||
ct.del.lam *= s2r;
|
||||
ct.del.phi *= s2r;
|
||||
|
||||
boost::int32_t gs_count;
|
||||
memcpy( &gs_count, header + 8 + 16*10, 4 );
|
||||
if( gs_count != ct.lim.lam * ct.lim.phi )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//ct.cvs.clear();
|
||||
|
||||
// Create a new gridinfo for this if we aren't processing the
|
||||
// 1st subfile, and initialize our grid info.
|
||||
|
||||
// Attach to the correct list or sublist.
|
||||
|
||||
// TODO is offset needed?
|
||||
pj_gi gi(gridname, pj_gi::ntv2, is.tellg(), must_swap);
|
||||
gi.ct = ct;
|
||||
|
||||
if( subfile == 0 )
|
||||
{
|
||||
gridinfo.push_back(gi);
|
||||
}
|
||||
else if( cstr_equal(header+24, "NONE", 4) )
|
||||
{
|
||||
gridinfo.push_back(gi);
|
||||
}
|
||||
else
|
||||
{
|
||||
pj_gridinfo::iterator git = pj_gridinfo_parent(gridinfo.begin() + gridinfo_orig_size,
|
||||
gridinfo.end(),
|
||||
std::string((const char*)header+24, 8));
|
||||
|
||||
if( git == gridinfo.end() )
|
||||
{
|
||||
gridinfo.push_back(gi);
|
||||
}
|
||||
else
|
||||
{
|
||||
git->children.push_back(gi);
|
||||
}
|
||||
}
|
||||
|
||||
// Seek past the data.
|
||||
is.seekg(gs_count * 16, std::ios::cur);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_gridinfo_init_ntv1() */
|
||||
/* */
|
||||
/* Load an NTv1 style Canadian grid shift file. */
|
||||
/************************************************************************/
|
||||
|
||||
template <typename IStream>
|
||||
inline bool pj_gridinfo_init_ntv1(std::string const& gridname,
|
||||
IStream & is,
|
||||
pj_gridinfo & gridinfo)
|
||||
{
|
||||
BOOST_STATIC_ASSERT( sizeof(boost::int32_t) == 4 );
|
||||
BOOST_STATIC_ASSERT( sizeof(double) == 8 );
|
||||
|
||||
static const double d2r = math::d2r<double>();
|
||||
|
||||
// Read the header.
|
||||
char header[176];
|
||||
|
||||
is.read(header, sizeof(header));
|
||||
if( is.fail() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Regularize fields of interest.
|
||||
if( is_lsb() )
|
||||
{
|
||||
swap_words( header+8, 4, 1 );
|
||||
swap_words( header+24, 8, 1 );
|
||||
swap_words( header+40, 8, 1 );
|
||||
swap_words( header+56, 8, 1 );
|
||||
swap_words( header+72, 8, 1 );
|
||||
swap_words( header+88, 8, 1 );
|
||||
swap_words( header+104, 8, 1 );
|
||||
}
|
||||
|
||||
// NTv1 grid shift file has wrong record count, corrupt?
|
||||
if( *((boost::int32_t *) (header+8)) != 12 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// NOTE: This check is not implemented in proj4
|
||||
if (! cstr_equal(header + 120, "SECONDS", 7))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Fill in CTABLE structure.
|
||||
pj_ctable ct;
|
||||
pj_ctable::lp_t ur;
|
||||
|
||||
ct.id = "NTv1 Grid Shift File";
|
||||
|
||||
ct.ll.lam = - *((double *) (header+72));
|
||||
ct.ll.phi = *((double *) (header+24));
|
||||
ur.lam = - *((double *) (header+56));
|
||||
ur.phi = *((double *) (header+40));
|
||||
ct.del.lam = *((double *) (header+104));
|
||||
ct.del.phi = *((double *) (header+88));
|
||||
ct.lim.lam = (boost::int32_t) (fabs(ur.lam-ct.ll.lam)/ct.del.lam + 0.5) + 1;
|
||||
ct.lim.phi = (boost::int32_t) (fabs(ur.phi-ct.ll.phi)/ct.del.phi + 0.5) + 1;
|
||||
|
||||
ct.ll.lam *= d2r;
|
||||
ct.ll.phi *= d2r;
|
||||
ct.del.lam *= d2r;
|
||||
ct.del.phi *= d2r;
|
||||
//ct.cvs.clear();
|
||||
|
||||
// is offset needed?
|
||||
gridinfo.push_back(pj_gi(gridname, pj_gi::ntv1, is.tellg()));
|
||||
gridinfo.back().ct = ct;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_gridinfo_init_gtx() */
|
||||
/* */
|
||||
/* Load a NOAA .gtx vertical datum shift file. */
|
||||
/************************************************************************/
|
||||
|
||||
template <typename IStream>
|
||||
inline bool pj_gridinfo_init_gtx(std::string const& gridname,
|
||||
IStream & is,
|
||||
pj_gridinfo & gridinfo)
|
||||
{
|
||||
BOOST_STATIC_ASSERT( sizeof(boost::int32_t) == 4 );
|
||||
BOOST_STATIC_ASSERT( sizeof(double) == 8 );
|
||||
|
||||
static const double d2r = math::d2r<double>();
|
||||
|
||||
// Read the header.
|
||||
char header[40];
|
||||
|
||||
is.read(header, sizeof(header));
|
||||
if( is.fail() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Regularize fields of interest and extract.
|
||||
double xorigin, yorigin, xstep, ystep;
|
||||
boost::int32_t rows, columns;
|
||||
|
||||
if( is_lsb() )
|
||||
{
|
||||
swap_words( header+0, 8, 4 );
|
||||
swap_words( header+32, 4, 2 );
|
||||
}
|
||||
|
||||
memcpy( &yorigin, header+0, 8 );
|
||||
memcpy( &xorigin, header+8, 8 );
|
||||
memcpy( &ystep, header+16, 8 );
|
||||
memcpy( &xstep, header+24, 8 );
|
||||
|
||||
memcpy( &rows, header+32, 4 );
|
||||
memcpy( &columns, header+36, 4 );
|
||||
|
||||
// gtx file header has invalid extents, corrupt?
|
||||
if( xorigin < -360 || xorigin > 360
|
||||
|| yorigin < -90 || yorigin > 90 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Fill in CTABLE structure.
|
||||
pj_ctable ct;
|
||||
|
||||
ct.id = "GTX Vertical Grid Shift File";
|
||||
|
||||
ct.ll.lam = xorigin;
|
||||
ct.ll.phi = yorigin;
|
||||
ct.del.lam = xstep;
|
||||
ct.del.phi = ystep;
|
||||
ct.lim.lam = columns;
|
||||
ct.lim.phi = rows;
|
||||
|
||||
// some GTX files come in 0-360 and we shift them back into the
|
||||
// expected -180 to 180 range if possible. This does not solve
|
||||
// problems with grids spanning the dateline.
|
||||
if( ct.ll.lam >= 180.0 )
|
||||
ct.ll.lam -= 360.0;
|
||||
|
||||
if( ct.ll.lam >= 0.0 && ct.ll.lam + ct.del.lam * ct.lim.lam > 180.0 )
|
||||
{
|
||||
//"This GTX spans the dateline! This will cause problems." );
|
||||
}
|
||||
|
||||
ct.ll.lam *= d2r;
|
||||
ct.ll.phi *= d2r;
|
||||
ct.del.lam *= d2r;
|
||||
ct.del.phi *= d2r;
|
||||
//ct.cvs.clear();
|
||||
|
||||
// is offset needed?
|
||||
gridinfo.push_back(pj_gi(gridname, pj_gi::gtx, 40));
|
||||
gridinfo.back().ct = ct;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_gridinfo_init_ctable2() */
|
||||
/* */
|
||||
/* Read the header portion of a "ctable2" format grid. */
|
||||
/************************************************************************/
|
||||
|
||||
// Originally nad_ctable2_init() defined in nad_init.c
|
||||
template <typename IStream>
|
||||
inline bool pj_gridinfo_init_ctable2(std::string const& gridname,
|
||||
IStream & is,
|
||||
pj_gridinfo & gridinfo)
|
||||
{
|
||||
BOOST_STATIC_ASSERT( sizeof(boost::int32_t) == 4 );
|
||||
BOOST_STATIC_ASSERT( sizeof(double) == 8 );
|
||||
|
||||
char header[160];
|
||||
|
||||
is.read(header, sizeof(header));
|
||||
if( is.fail() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if( !is_lsb() )
|
||||
{
|
||||
swap_words( header + 96, 8, 4 );
|
||||
swap_words( header + 128, 4, 2 );
|
||||
}
|
||||
|
||||
// ctable2 - wrong header!
|
||||
if (! cstr_equal(header, "CTABLE V2", 9))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// read the table header
|
||||
pj_ctable ct;
|
||||
|
||||
ct.id = std::string(header + 16, std::find(header + 16, header + 16 + 80, '\0'));
|
||||
//memcpy( &ct.ll.lam, header + 96, 8 );
|
||||
//memcpy( &ct.ll.phi, header + 104, 8 );
|
||||
//memcpy( &ct.del.lam, header + 112, 8 );
|
||||
//memcpy( &ct.del.phi, header + 120, 8 );
|
||||
//memcpy( &ct.lim.lam, header + 128, 4 );
|
||||
//memcpy( &ct.lim.phi, header + 132, 4 );
|
||||
memcpy( &ct.ll, header + 96, 40 );
|
||||
|
||||
// do some minimal validation to ensure the structure isn't corrupt
|
||||
if ( (ct.lim.lam < 1) || (ct.lim.lam > 100000)
|
||||
|| (ct.lim.phi < 1) || (ct.lim.phi > 100000) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// trim white space and newlines off id
|
||||
boost::trim_right_if(ct.id, is_trimmable_char());
|
||||
|
||||
//ct.cvs.clear();
|
||||
|
||||
gridinfo.push_back(pj_gi(gridname, pj_gi::ctable2));
|
||||
gridinfo.back().ct = ct;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_gridinfo_init_ctable() */
|
||||
/* */
|
||||
/* Read the header portion of a "ctable" format grid. */
|
||||
/************************************************************************/
|
||||
|
||||
// Originally nad_ctable_init() defined in nad_init.c
|
||||
template <typename IStream>
|
||||
inline bool pj_gridinfo_init_ctable(std::string const& gridname,
|
||||
IStream & is,
|
||||
pj_gridinfo & gridinfo)
|
||||
{
|
||||
BOOST_STATIC_ASSERT( sizeof(boost::int32_t) == 4 );
|
||||
BOOST_STATIC_ASSERT( sizeof(double) == 8 );
|
||||
|
||||
// 80 + 2*8 + 2*8 + 2*4
|
||||
char header[120];
|
||||
|
||||
// NOTE: in proj4 data is loaded directly into CTABLE
|
||||
|
||||
is.read(header, sizeof(header));
|
||||
if( is.fail() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// NOTE: in proj4 LSB is not checked here
|
||||
|
||||
// read the table header
|
||||
pj_ctable ct;
|
||||
|
||||
ct.id = std::string(header, std::find(header, header + 80, '\0'));
|
||||
memcpy( &ct.ll, header + 80, 40 );
|
||||
|
||||
// do some minimal validation to ensure the structure isn't corrupt
|
||||
if ( (ct.lim.lam < 1) || (ct.lim.lam > 100000)
|
||||
|| (ct.lim.phi < 1) || (ct.lim.phi > 100000) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// trim white space and newlines off id
|
||||
boost::trim_right_if(ct.id, is_trimmable_char());
|
||||
|
||||
//ct.cvs.clear();
|
||||
|
||||
gridinfo.push_back(pj_gi(gridname, pj_gi::ctable));
|
||||
gridinfo.back().ct = ct;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_gridinfo_init() */
|
||||
/* */
|
||||
/* Open and parse header details from a datum gridshift file */
|
||||
/* returning a list of PJ_GRIDINFOs for the grids in that */
|
||||
/* file. This superceeds use of nad_init() for modern */
|
||||
/* applications. */
|
||||
/************************************************************************/
|
||||
|
||||
template <typename IStream>
|
||||
inline bool pj_gridinfo_init(std::string const& gridname,
|
||||
IStream & is,
|
||||
pj_gridinfo & gridinfo)
|
||||
{
|
||||
char header[160];
|
||||
|
||||
// Check if the stream is opened.
|
||||
if (! is.is_open()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Load a header, to determine the file type.
|
||||
is.read(header, sizeof(header));
|
||||
|
||||
if ( is.fail() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
is.seekg(0);
|
||||
|
||||
// Determine file type.
|
||||
if ( cstr_equal(header + 0, "HEADER", 6)
|
||||
&& cstr_equal(header + 96, "W GRID", 6)
|
||||
&& cstr_equal(header + 144, "TO NAD83 ", 16) )
|
||||
{
|
||||
return pj_gridinfo_init_ntv1(gridname, is, gridinfo);
|
||||
}
|
||||
else if( cstr_equal(header + 0, "NUM_OREC", 8)
|
||||
&& cstr_equal(header + 48, "GS_TYPE", 7) )
|
||||
{
|
||||
return pj_gridinfo_init_ntv2(gridname, is, gridinfo);
|
||||
}
|
||||
else if( boost::algorithm::ends_with(gridname, "gtx")
|
||||
|| boost::algorithm::ends_with(gridname, "GTX") )
|
||||
{
|
||||
return pj_gridinfo_init_gtx(gridname, is, gridinfo);
|
||||
}
|
||||
else if( cstr_equal(header + 0, "CTABLE V2", 9) )
|
||||
{
|
||||
return pj_gridinfo_init_ctable2(gridname, is, gridinfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
return pj_gridinfo_init_ctable(gridname, is, gridinfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace detail
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_SRS_PROJECTIONS_IMPL_PJ_GRIDINFO_HPP
|
||||
@@ -0,0 +1,174 @@
|
||||
// Boost.Geometry
|
||||
// This file is manually converted from PROJ4
|
||||
|
||||
// This file was modified by Oracle on 2018.
|
||||
// Modifications copyright (c) 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)
|
||||
|
||||
// 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:
|
||||
// Author: Frank Warmerdam, warmerdam@pobox.com
|
||||
|
||||
// Copyright (c) 2000, Frank Warmerdam
|
||||
|
||||
// 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_SRS_PROJECTIONS_IMPL_PJ_GRIDLIST_HPP
|
||||
#define BOOST_GEOMETRY_SRS_PROJECTIONS_IMPL_PJ_GRIDLIST_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/srs/projections/exception.hpp>
|
||||
#include <boost/geometry/srs/projections/grids.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_gridinfo.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_strerrno.hpp>
|
||||
#include <boost/geometry/srs/projections/par_data.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_gridlist_merge_grid() */
|
||||
/* */
|
||||
/* Find/load the named gridfile and merge it into the */
|
||||
/* last_nadgrids_list. */
|
||||
/************************************************************************/
|
||||
|
||||
// Originally one function, here divided into several functions
|
||||
// with overloads for various types of grids and stream policies
|
||||
|
||||
inline bool pj_gridlist_find_all(std::string const& gridname,
|
||||
pj_gridinfo const& grids,
|
||||
std::vector<std::size_t> & gridindexes)
|
||||
{
|
||||
bool result = false;
|
||||
for (std::size_t i = 0 ; i < grids.size() ; ++i)
|
||||
{
|
||||
if (grids[i].gridname == gridname)
|
||||
{
|
||||
result = true;
|
||||
gridindexes.push_back(i);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// Fill container with sequentially increasing numbers
|
||||
inline void pj_gridlist_add_seq_inc(std::vector<std::size_t> & gridindexes,
|
||||
std::size_t first, std::size_t last)
|
||||
{
|
||||
gridindexes.reserve(gridindexes.size() + (last - first));
|
||||
for ( ; first < last ; ++first)
|
||||
{
|
||||
gridindexes.push_back(first);
|
||||
}
|
||||
}
|
||||
|
||||
// Generic stream policy and standard grids
|
||||
template <typename StreamPolicy>
|
||||
inline bool pj_gridlist_merge_gridfile(std::string const& gridname,
|
||||
StreamPolicy const& stream_policy,
|
||||
srs::grids & grids,
|
||||
std::vector<std::size_t> & gridindexes)
|
||||
{
|
||||
// Try to find in the existing list of loaded grids. Add all
|
||||
// matching grids as with NTv2 we can get many grids from one
|
||||
// file (one shared gridname).
|
||||
if (pj_gridlist_find_all(gridname, grids.gridinfo, gridindexes))
|
||||
return true;
|
||||
|
||||
std::size_t orig_size = grids.gridinfo.size();
|
||||
|
||||
// Try to load the named grid.
|
||||
typename StreamPolicy::stream_type is;
|
||||
stream_policy.open(is, gridname);
|
||||
|
||||
if (! pj_gridinfo_init(gridname, is, grids.gridinfo))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Add the grid now that it is loaded.
|
||||
pj_gridlist_add_seq_inc(gridindexes, orig_size, grids.gridinfo.size());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_gridlist_from_nadgrids() */
|
||||
/* */
|
||||
/* This functions loads the list of grids corresponding to a */
|
||||
/* particular nadgrids string into a list, and returns it. The */
|
||||
/* list is kept around till a request is made with a different */
|
||||
/* string in order to cut down on the string parsing cost, and */
|
||||
/* the cost of building the list of tables each time. */
|
||||
/************************************************************************/
|
||||
|
||||
template <typename StreamPolicy, typename Grids>
|
||||
inline void pj_gridlist_from_nadgrids(srs::detail::nadgrids const& nadgrids,
|
||||
StreamPolicy const& stream_policy,
|
||||
Grids & grids,
|
||||
std::vector<std::size_t> & gridindexes)
|
||||
|
||||
{
|
||||
// Loop processing names out of nadgrids one at a time.
|
||||
for (srs::detail::nadgrids::const_iterator it = nadgrids.begin() ;
|
||||
it != nadgrids.end() ; ++it)
|
||||
{
|
||||
bool required = (*it)[0] != '@';
|
||||
|
||||
std::string name(it->begin() + (required ? 0 : 1), it->end());
|
||||
|
||||
if ( ! pj_gridlist_merge_gridfile(name, stream_policy, grids, gridindexes)
|
||||
&& required )
|
||||
{
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_failed_to_load_grid) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <typename Par, typename GridsStorage>
|
||||
inline void pj_gridlist_from_nadgrids(Par const& defn, srs::projection_grids<GridsStorage> & grids)
|
||||
{
|
||||
BOOST_GEOMETRY_ASSERT(grids.storage_ptr != NULL);
|
||||
|
||||
pj_gridlist_from_nadgrids(defn.nadgrids,
|
||||
grids.storage_ptr->stream_policy,
|
||||
grids.storage_ptr->hgrids,
|
||||
grids.hindexes);
|
||||
}
|
||||
|
||||
|
||||
} // namespace detail
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_SRS_PROJECTIONS_IMPL_PJ_GRIDLIST_HPP
|
||||
@@ -0,0 +1,122 @@
|
||||
// Boost.Geometry
|
||||
// This file is manually converted from PROJ4
|
||||
|
||||
// This file was modified by Oracle on 2018, 2019.
|
||||
// Modifications copyright (c) 2018-2019, 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:
|
||||
// Author: Frank Warmerdam, warmerdam@pobox.com
|
||||
|
||||
// Copyright (c) 2000, Frank Warmerdam
|
||||
|
||||
// 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_SRS_PROJECTIONS_IMPL_PJ_GRIDLIST_SHARED_HPP
|
||||
#define BOOST_GEOMETRY_SRS_PROJECTIONS_IMPL_PJ_GRIDLIST_SHARED_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/srs/projections/shared_grids.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_gridinfo.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_gridlist.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_gridlist_merge_grid() */
|
||||
/* */
|
||||
/* Find/load the named gridfile and merge it into the */
|
||||
/* last_nadgrids_list. */
|
||||
/************************************************************************/
|
||||
|
||||
// Generic stream policy and shared grids
|
||||
template <typename StreamPolicy>
|
||||
inline bool pj_gridlist_merge_gridfile(std::string const& gridname,
|
||||
StreamPolicy const& stream_policy,
|
||||
shared_grids & grids,
|
||||
std::vector<std::size_t> & gridindexes)
|
||||
{
|
||||
// Try to find in the existing list of loaded grids. Add all
|
||||
// matching grids as with NTv2 we can get many grids from one
|
||||
// file (one shared gridname).
|
||||
{
|
||||
boost::shared_lock<boost::shared_mutex> lock(grids.mutex);
|
||||
|
||||
if (pj_gridlist_find_all(gridname, grids.gridinfo, gridindexes))
|
||||
return true;
|
||||
}
|
||||
|
||||
// Try to load the named grid.
|
||||
typename StreamPolicy::stream_type is;
|
||||
stream_policy.open(is, gridname);
|
||||
|
||||
pj_gridinfo new_grids;
|
||||
|
||||
if (! pj_gridinfo_init(gridname, is, new_grids))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Add the grid now that it is loaded.
|
||||
|
||||
std::size_t orig_size = 0;
|
||||
std::size_t new_size = 0;
|
||||
|
||||
{
|
||||
boost::unique_lock<boost::shared_mutex> lock(grids.mutex);
|
||||
|
||||
// Try to find in the existing list of loaded grids again
|
||||
// in case other thread already added it.
|
||||
if (pj_gridlist_find_all(gridname, grids.gridinfo, gridindexes))
|
||||
return true;
|
||||
|
||||
orig_size = grids.gridinfo.size();
|
||||
new_size = orig_size + new_grids.size();
|
||||
|
||||
grids.gridinfo.resize(new_size);
|
||||
for (std::size_t i = 0 ; i < new_grids.size() ; ++ i)
|
||||
new_grids[i].swap(grids.gridinfo[i + orig_size]);
|
||||
}
|
||||
|
||||
pj_gridlist_add_seq_inc(gridindexes, orig_size, new_size);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
} // namespace detail
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_SRS_PROJECTIONS_IMPL_PJ_GRIDLIST_SHARED_HPP
|
||||
@@ -0,0 +1,525 @@
|
||||
// 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, 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)
|
||||
|
||||
// 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_INIT_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_INIT_HPP
|
||||
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/mpl/find.hpp>
|
||||
#include <boost/mpl/if.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/srs/projections/dpar.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>
|
||||
#include <boost/geometry/srs/projections/spar.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_init_proj() */
|
||||
/************************************************************************/
|
||||
|
||||
template <typename T>
|
||||
inline void pj_init_proj(srs::detail::proj4_parameters const& params,
|
||||
parameters<T> & par)
|
||||
{
|
||||
par.id = pj_get_param_s(params, "proj");
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline void pj_init_proj(srs::dpar::parameters<T> const& params,
|
||||
parameters<T> & par)
|
||||
{
|
||||
typename srs::dpar::parameters<T>::const_iterator it = pj_param_find(params, srs::dpar::proj);
|
||||
if (it != params.end())
|
||||
{
|
||||
par.id = static_cast<srs::dpar::value_proj>(it->template get_value<int>());
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T, BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX>
|
||||
inline void pj_init_proj(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& ,
|
||||
parameters<T> & par)
|
||||
{
|
||||
typedef srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> params_type;
|
||||
typedef typename srs::spar::detail::tuples_find_if
|
||||
<
|
||||
params_type,
|
||||
srs::spar::detail::is_param_tr<srs::spar::detail::proj_traits>::pred
|
||||
>::type proj_type;
|
||||
|
||||
static const bool is_found = srs::spar::detail::tuples_is_found<proj_type>::value;
|
||||
|
||||
BOOST_MPL_ASSERT_MSG((is_found), PROJECTION_NOT_NAMED, (params_type));
|
||||
|
||||
par.id = srs::spar::detail::proj_traits<proj_type>::id;
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_init_units() */
|
||||
/************************************************************************/
|
||||
|
||||
template <typename T, bool Vertical>
|
||||
inline void pj_init_units(srs::detail::proj4_parameters const& params,
|
||||
T & to_meter,
|
||||
T & fr_meter,
|
||||
T const& default_to_meter,
|
||||
T const& default_fr_meter)
|
||||
{
|
||||
std::string s;
|
||||
std::string units = pj_get_param_s(params, Vertical ? "vunits" : "units");
|
||||
if (! units.empty())
|
||||
{
|
||||
static 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(error_unknow_unit_id) );
|
||||
}
|
||||
s = pj_units[index].to_meter;
|
||||
}
|
||||
|
||||
if (s.empty())
|
||||
{
|
||||
s = pj_get_param_s(params, Vertical ? "vto_meter" : "to_meter");
|
||||
}
|
||||
|
||||
// TODO: numerator and denominator could be taken from pj_units
|
||||
if (! s.empty())
|
||||
{
|
||||
std::size_t const pos = s.find('/');
|
||||
if (pos == std::string::npos)
|
||||
{
|
||||
to_meter = geometry::str_cast<T>(s);
|
||||
}
|
||||
else
|
||||
{
|
||||
T const numerator = geometry::str_cast<T>(s.substr(0, pos));
|
||||
T const denominator = geometry::str_cast<T>(s.substr(pos + 1));
|
||||
if (numerator == 0.0 || denominator == 0.0)
|
||||
{
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_unit_factor_less_than_0) );
|
||||
}
|
||||
to_meter = numerator / denominator;
|
||||
}
|
||||
if (to_meter == 0.0)
|
||||
{
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_unit_factor_less_than_0) );
|
||||
}
|
||||
fr_meter = 1. / to_meter;
|
||||
}
|
||||
else
|
||||
{
|
||||
to_meter = default_to_meter;
|
||||
fr_meter = default_fr_meter;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T, bool Vertical>
|
||||
inline void pj_init_units(srs::dpar::parameters<T> const& params,
|
||||
T & to_meter,
|
||||
T & fr_meter,
|
||||
T const& default_to_meter,
|
||||
T const& default_fr_meter)
|
||||
{
|
||||
typename srs::dpar::parameters<T>::const_iterator
|
||||
it = pj_param_find(params, Vertical ? srs::dpar::vunits : srs::dpar::units);
|
||||
if (it != params.end())
|
||||
{
|
||||
static const int n = sizeof(pj_units) / sizeof(pj_units[0]);
|
||||
const int i = it->template get_value<int>();
|
||||
if (i >= 0 && i < n)
|
||||
{
|
||||
T const numerator = pj_units[i].numerator;
|
||||
T const denominator = pj_units[i].denominator;
|
||||
if (numerator == 0.0 || denominator == 0.0)
|
||||
{
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_unit_factor_less_than_0) );
|
||||
}
|
||||
to_meter = numerator / denominator;
|
||||
fr_meter = 1. / to_meter;
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_unknow_unit_id) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
it = pj_param_find(params, Vertical ? srs::dpar::vto_meter : srs::dpar::to_meter);
|
||||
if (it != params.end())
|
||||
{
|
||||
to_meter = it->template get_value<T>();
|
||||
fr_meter = 1. / to_meter;
|
||||
}
|
||||
else
|
||||
{
|
||||
to_meter = default_to_meter;
|
||||
fr_meter = default_fr_meter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename Params,
|
||||
bool Vertical,
|
||||
int UnitsI = srs::spar::detail::tuples_find_index_if
|
||||
<
|
||||
Params,
|
||||
boost::mpl::if_c
|
||||
<
|
||||
Vertical,
|
||||
srs::spar::detail::is_param_t<srs::spar::vunits>,
|
||||
srs::spar::detail::is_param_tr<srs::spar::detail::units_traits>
|
||||
>::type::template pred
|
||||
>::value,
|
||||
int ToMeterI = srs::spar::detail::tuples_find_index_if
|
||||
<
|
||||
Params,
|
||||
boost::mpl::if_c
|
||||
<
|
||||
Vertical,
|
||||
srs::spar::detail::is_param_t<srs::spar::vto_meter>,
|
||||
srs::spar::detail::is_param_t<srs::spar::to_meter>
|
||||
>::type::template pred
|
||||
>::value,
|
||||
int N = boost::tuples::length<Params>::value
|
||||
>
|
||||
struct pj_init_units_static
|
||||
: pj_init_units_static<Params, Vertical, UnitsI, N, N>
|
||||
{};
|
||||
|
||||
template <typename Params, bool Vertical, int UnitsI, int N>
|
||||
struct pj_init_units_static<Params, Vertical, UnitsI, N, N>
|
||||
{
|
||||
static const int n = sizeof(pj_units) / sizeof(pj_units[0]);
|
||||
static const int i = srs::spar::detail::units_traits
|
||||
<
|
||||
typename boost::tuples::element<UnitsI, Params>::type
|
||||
>::id;
|
||||
static const bool is_valid = i >= 0 && i < n;
|
||||
|
||||
BOOST_MPL_ASSERT_MSG((is_valid), UNKNOWN_UNIT_ID, (Params));
|
||||
|
||||
template <typename T>
|
||||
static void apply(Params const& ,
|
||||
T & to_meter, T & fr_meter,
|
||||
T const& , T const& )
|
||||
{
|
||||
T const numerator = pj_units[i].numerator;
|
||||
T const denominator = pj_units[i].denominator;
|
||||
if (numerator == 0.0 || denominator == 0.0)
|
||||
{
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_unit_factor_less_than_0) );
|
||||
}
|
||||
to_meter = numerator / denominator;
|
||||
fr_meter = 1. / to_meter;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Params, bool Vertical, int ToMeterI, int N>
|
||||
struct pj_init_units_static<Params, Vertical, N, ToMeterI, N>
|
||||
{
|
||||
template <typename T>
|
||||
static void apply(Params const& params,
|
||||
T & to_meter, T & fr_meter,
|
||||
T const& , T const& )
|
||||
{
|
||||
to_meter = boost::tuples::get<ToMeterI>(params).value;
|
||||
fr_meter = 1. / to_meter;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Params, bool Vertical, int N>
|
||||
struct pj_init_units_static<Params, Vertical, N, N, N>
|
||||
{
|
||||
template <typename T>
|
||||
static void apply(Params const& ,
|
||||
T & to_meter, T & fr_meter,
|
||||
T const& default_to_meter, T const& default_fr_meter)
|
||||
{
|
||||
to_meter = default_to_meter;
|
||||
fr_meter = default_fr_meter;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, bool Vertical, BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX>
|
||||
inline void pj_init_units(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& params,
|
||||
T & to_meter,
|
||||
T & fr_meter,
|
||||
T const& default_to_meter,
|
||||
T const& default_fr_meter)
|
||||
{
|
||||
pj_init_units_static
|
||||
<
|
||||
srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX>,
|
||||
Vertical
|
||||
>::apply(params, to_meter, fr_meter, default_to_meter, default_fr_meter);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_init_pm() */
|
||||
/************************************************************************/
|
||||
|
||||
template <typename T>
|
||||
inline void pj_init_pm(srs::detail::proj4_parameters const& params, T& val)
|
||||
{
|
||||
std::string pm = pj_get_param_s(params, "pm");
|
||||
if (! pm.empty())
|
||||
{
|
||||
int n = sizeof(pj_prime_meridians) / sizeof(pj_prime_meridians[0]);
|
||||
for (int i = 0; i < n ; i++)
|
||||
{
|
||||
if(pj_prime_meridians[i].id == pm)
|
||||
{
|
||||
val = pj_prime_meridians[i].deg * math::d2r<T>();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Is this try-catch needed?
|
||||
// In other cases the bad_str_cast exception is simply thrown
|
||||
BOOST_TRY
|
||||
{
|
||||
val = dms_parser<T, true>::apply(pm).angle();
|
||||
return;
|
||||
}
|
||||
BOOST_CATCH(geometry::bad_str_cast const&)
|
||||
{
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_unknown_prime_meridian) );
|
||||
}
|
||||
BOOST_CATCH_END
|
||||
}
|
||||
|
||||
val = 0.0;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline void pj_init_pm(srs::dpar::parameters<T> const& params, T& val)
|
||||
{
|
||||
typename srs::dpar::parameters<T>::const_iterator it = pj_param_find(params, srs::dpar::pm);
|
||||
if (it != params.end())
|
||||
{
|
||||
if (it->template is_value_set<int>())
|
||||
{
|
||||
int n = sizeof(pj_prime_meridians) / sizeof(pj_prime_meridians[0]);
|
||||
int i = it->template get_value<int>();
|
||||
if (i >= 0 && i < n)
|
||||
{
|
||||
val = pj_prime_meridians[i].deg * math::d2r<T>();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_unknown_prime_meridian) );
|
||||
}
|
||||
}
|
||||
else if (it->template is_value_set<T>())
|
||||
{
|
||||
val = it->template get_value<T>() * math::d2r<T>();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
val = 0.0;
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename Params,
|
||||
int I = srs::spar::detail::tuples_find_index_if
|
||||
<
|
||||
Params,
|
||||
srs::spar::detail::is_param_tr<srs::spar::detail::pm_traits>::pred
|
||||
>::value,
|
||||
int N = boost::tuples::length<Params>::value
|
||||
>
|
||||
struct pj_init_pm_static
|
||||
{
|
||||
template <typename T>
|
||||
static void apply(Params const& params, T & val)
|
||||
{
|
||||
typedef typename boost::tuples::element<I, Params>::type param_type;
|
||||
|
||||
val = srs::spar::detail::pm_traits<param_type>::value(boost::tuples::get<I>(params));
|
||||
}
|
||||
};
|
||||
template <typename Params, int N>
|
||||
struct pj_init_pm_static<Params, N, N>
|
||||
{
|
||||
template <typename T>
|
||||
static void apply(Params const& , T & val)
|
||||
{
|
||||
val = 0;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX>
|
||||
inline void pj_init_pm(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& params, T& val)
|
||||
{
|
||||
pj_init_pm_static
|
||||
<
|
||||
srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX>
|
||||
>::apply(params, val);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* pj_init() */
|
||||
/* */
|
||||
/* Main entry point for initialing a PJ projections */
|
||||
/* definition. */
|
||||
/************************************************************************/
|
||||
template <typename T, typename Params>
|
||||
inline parameters<T> pj_init(Params const& params)
|
||||
{
|
||||
parameters<T> pin;
|
||||
|
||||
// find projection -> implemented in projection factory
|
||||
pj_init_proj(params, pin);
|
||||
// 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())
|
||||
//{ BOOST_THROW_EXCEPTION( projection_not_named_exception() ); }
|
||||
|
||||
// NOTE: proj4 gets defaults from "proj_def.dat".
|
||||
// In Boost.Geometry this is emulated by manually setting them in
|
||||
// pj_ell_init and projections aea, lcc and lagrng
|
||||
|
||||
/* set datum parameters */
|
||||
pj_datum_init(params, pin);
|
||||
|
||||
/* set ellipsoid/sphere parameters */
|
||||
pj_ell_init(params, pin.a, pin.es);
|
||||
|
||||
pin.a_orig = pin.a;
|
||||
pin.es_orig = pin.es;
|
||||
|
||||
pin.e = sqrt(pin.es);
|
||||
pin.ra = 1. / pin.a;
|
||||
pin.one_es = 1. - pin.es;
|
||||
if (pin.one_es == 0.) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_eccentricity_is_one) );
|
||||
}
|
||||
pin.rone_es = 1./pin.one_es;
|
||||
|
||||
/* Now that we have ellipse information check for WGS84 datum */
|
||||
if( pin.datum_type == datum_3param
|
||||
&& pin.datum_params[0] == 0.0
|
||||
&& pin.datum_params[1] == 0.0
|
||||
&& pin.datum_params[2] == 0.0
|
||||
&& pin.a == 6378137.0
|
||||
&& geometry::math::abs(pin.es - 0.006694379990) < 0.000000000050 )/*WGS84/GRS80*/
|
||||
{
|
||||
pin.datum_type = datum_wgs84;
|
||||
}
|
||||
|
||||
/* set pin.geoc coordinate system */
|
||||
pin.geoc = (pin.es && pj_get_param_b<srs::spar::geoc>(params, "geoc", srs::dpar::geoc));
|
||||
|
||||
/* over-ranging flag */
|
||||
pin.over = pj_get_param_b<srs::spar::over>(params, "over", srs::dpar::over);
|
||||
|
||||
/* longitude center for wrapping */
|
||||
pin.is_long_wrap_set = pj_param_r<srs::spar::lon_wrap>(params, "lon_wrap", srs::dpar::lon_wrap, pin.long_wrap_center);
|
||||
|
||||
/* central meridian */
|
||||
pin.lam0 = pj_get_param_r<T, srs::spar::lon_0>(params, "lon_0", srs::dpar::lon_0);
|
||||
|
||||
/* central latitude */
|
||||
pin.phi0 = pj_get_param_r<T, srs::spar::lat_0>(params, "lat_0", srs::dpar::lat_0);
|
||||
|
||||
/* false easting and northing */
|
||||
pin.x0 = pj_get_param_f<T, srs::spar::x_0>(params, "x_0", srs::dpar::x_0);
|
||||
pin.y0 = pj_get_param_f<T, srs::spar::y_0>(params, "y_0", srs::dpar::y_0);
|
||||
|
||||
/* general scaling factor */
|
||||
if (pj_param_f<srs::spar::k_0>(params, "k_0", srs::dpar::k_0, pin.k0)) {
|
||||
/* empty */
|
||||
} else if (pj_param_f<srs::spar::k>(params, "k", srs::dpar::k, pin.k0)) {
|
||||
/* empty */
|
||||
} else
|
||||
pin.k0 = 1.;
|
||||
if (pin.k0 <= 0.) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_k_less_than_zero) );
|
||||
}
|
||||
|
||||
/* set units */
|
||||
pj_init_units<T, false>(params, pin.to_meter, pin.fr_meter, 1., 1.);
|
||||
pj_init_units<T, true>(params, pin.vto_meter, pin.vfr_meter, pin.to_meter, pin.fr_meter);
|
||||
|
||||
/* prime meridian */
|
||||
pj_init_pm(params, pin.from_greenwich);
|
||||
|
||||
return pin;
|
||||
}
|
||||
|
||||
|
||||
} // namespace detail
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_INIT_HPP
|
||||
@@ -0,0 +1,82 @@
|
||||
// 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_PJ_INV_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_PJ_INV_HPP
|
||||
|
||||
|
||||
|
||||
#include <boost/geometry/srs/projections/impl/adjlon.hpp>
|
||||
#include <boost/geometry/core/radian_access.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
/* general inverse projection */
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
/* 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 */
|
||||
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(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);
|
||||
geometry::set_from_radian<1>(ll, lat);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,135 @@
|
||||
// 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, 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)
|
||||
|
||||
// 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.
|
||||
|
||||
/* meridional distance for ellipsoid and inverse
|
||||
** 8th degree - accurate to < 1e-5 meters when used in conjunction
|
||||
** with typical major axis values.
|
||||
** Inverse determines phi to EPS (1e-11) radians, about 1e-6 seconds.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_PJ_MLFN_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_PJ_MLFN_HPP
|
||||
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
#include <boost/geometry/srs/projections/exception.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_strerrno.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
|
||||
namespace detail {
|
||||
|
||||
template <typename T>
|
||||
struct en
|
||||
{
|
||||
static const std::size_t size = 5;
|
||||
|
||||
T const& operator[](size_t i) const { return data[i]; }
|
||||
T & operator[](size_t i) { return data[i]; }
|
||||
|
||||
private:
|
||||
T data[5];
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
inline en<T> pj_enfn(T const& es)
|
||||
{
|
||||
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;
|
||||
detail::en<T> en;
|
||||
|
||||
{
|
||||
en[0] = C00 - es * (C02 + es * (C04 + es * (C06 + es * C08)));
|
||||
en[1] = es * (C22 - es * (C04 + es * (C06 + es * C08)));
|
||||
en[2] = (t = es * es) * (C44 - es * (C46 + es * C48));
|
||||
en[3] = (t *= es) * (C66 - es * C68);
|
||||
en[4] = t * es * C88;
|
||||
}
|
||||
|
||||
return en;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T pj_mlfn(T const& phi, T sphi, T cphi, detail::en<T> const& en)
|
||||
{
|
||||
cphi *= sphi;
|
||||
sphi *= sphi;
|
||||
return(en[0] * phi - cphi * (en[1] + sphi*(en[2]
|
||||
+ sphi*(en[3] + sphi*en[4]))));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T pj_inv_mlfn(T const& arg, T const& es, detail::en<T> const& en)
|
||||
{
|
||||
static const T EPS = 1e-11;
|
||||
static const int MAX_ITER = 10;
|
||||
|
||||
T s, t, phi, k = 1./(1.-es);
|
||||
int i;
|
||||
|
||||
phi = arg;
|
||||
for (i = MAX_ITER; i ; --i) { /* rarely goes over 2 iterations */
|
||||
s = sin(phi);
|
||||
t = 1. - es * s * s;
|
||||
phi -= t = (pj_mlfn(phi, s, cos(phi), en) - arg) * (t * sqrt(t)) * k;
|
||||
if (geometry::math::abs(t) < EPS)
|
||||
return phi;
|
||||
}
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_non_conv_inv_meri_dist) );
|
||||
return phi;
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,59 @@
|
||||
// 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_PJ_MSFN_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_PJ_MSFN_HPP
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
|
||||
namespace detail {
|
||||
|
||||
|
||||
/* determine constant small m */
|
||||
template <typename T>
|
||||
inline T pj_msfn(T const& sinphi, T const& cosphi, T const& es)
|
||||
{
|
||||
return (cosphi / sqrt (1. - es * sinphi * sinphi));
|
||||
}
|
||||
|
||||
|
||||
} // namespace detail
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,653 @@
|
||||
// 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, 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)
|
||||
|
||||
// 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_PJ_PARAM_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_PJ_PARAM_HPP
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/geometry/srs/projections/exception.hpp>
|
||||
|
||||
#include <boost/geometry/srs/projections/impl/dms_parser.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
#include <boost/geometry/srs/projections/proj4.hpp>
|
||||
#include <boost/geometry/srs/projections/dpar.hpp>
|
||||
#include <boost/geometry/srs/projections/spar.hpp>
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/type_traits/is_integral.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <iterator>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
|
||||
|
||||
namespace detail {
|
||||
|
||||
inline bool pj_param_pred(srs::detail::proj4_parameter const& p, std::string const& name)
|
||||
{
|
||||
return p.name == name;
|
||||
}
|
||||
|
||||
template <typename T, typename Id>
|
||||
inline bool pj_param_pred(srs::dpar::parameter<T> const& p, Id const& id,
|
||||
typename boost::disable_if_c<boost::is_convertible<Id, std::string>::value>::type * = 0)
|
||||
{
|
||||
return p.is_id_equal(id);
|
||||
}
|
||||
|
||||
/* input exists */
|
||||
template <typename Params, typename Name>
|
||||
inline typename Params::const_iterator
|
||||
pj_param_find(Params const& params, Name const& name)
|
||||
{
|
||||
typedef typename Params::const_iterator iterator;
|
||||
for (iterator it = params.begin(); it != params.end(); it++)
|
||||
{
|
||||
if (pj_param_pred(*it, name))
|
||||
{
|
||||
//it->used = true;
|
||||
return it;
|
||||
}
|
||||
// TODO: needed for pipeline
|
||||
/*else if (it->name == "step")
|
||||
{
|
||||
return pl.end();
|
||||
}*/
|
||||
}
|
||||
|
||||
return params.end();
|
||||
}
|
||||
|
||||
/*
|
||||
template
|
||||
<
|
||||
typename StaticParams,
|
||||
typename IsParamPred,
|
||||
int I = tuples_find_index_if<StaticParams, typename IsParamPred::pred>::value,
|
||||
int N = boost::tuples::length<StaticParams>::value
|
||||
>
|
||||
struct pj_param_find_static
|
||||
{
|
||||
typedef boost::tuples::element<I, StaticParams> type;
|
||||
typedef const type* result_type;
|
||||
static result_type get(StaticParams const& params)
|
||||
{
|
||||
return boost::addressof(boost::get<I>(params));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename StaticParams, typename IsParamPred, int N>
|
||||
struct pj_param_find_static<StaticParams, IsParamPred, N>
|
||||
{
|
||||
typedef void type;
|
||||
typedef const type* result_type;
|
||||
static result_type get(StaticParams const& ) { return NULL; }
|
||||
};*/
|
||||
|
||||
|
||||
/* input exists */
|
||||
template <typename Params, typename Name>
|
||||
inline bool pj_param_exists(Params const& params, Name const& name)
|
||||
{
|
||||
return pj_param_find(params, name) != params.end();
|
||||
}
|
||||
|
||||
template <typename Param, BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX>
|
||||
inline bool pj_param_exists(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& )
|
||||
{
|
||||
return srs::spar::detail::tuples_is_found
|
||||
<
|
||||
typename srs::spar::detail::tuples_find_if
|
||||
<
|
||||
srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX>,
|
||||
srs::spar::detail::is_param<Param>::template pred
|
||||
>::type
|
||||
>::value;
|
||||
}
|
||||
|
||||
template <template <typename> class Param, BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX>
|
||||
inline bool pj_param_exists(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& )
|
||||
{
|
||||
return srs::spar::detail::tuples_is_found
|
||||
<
|
||||
typename srs::spar::detail::tuples_find_if
|
||||
<
|
||||
srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX>,
|
||||
srs::spar::detail::is_param_t<Param>::template pred
|
||||
>::type
|
||||
>::value;
|
||||
}
|
||||
|
||||
|
||||
template <typename T>
|
||||
inline void set_value(T & val, srs::detail::proj4_parameter const& p)
|
||||
{
|
||||
val = geometry::str_cast<T>(p.value);
|
||||
}
|
||||
|
||||
template <typename T, typename T2>
|
||||
inline void set_value(T & val, srs::dpar::parameter<T2> const& p)
|
||||
{
|
||||
val = p.template get_value<T>();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline void set_value_r(T & val, srs::detail::proj4_parameter const& p)
|
||||
{
|
||||
val = dms_parser<T, true>::apply(p.value.c_str()).angle();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline void set_value_r(T & val, srs::dpar::parameter<T> const& p)
|
||||
{
|
||||
val = p.template get_value<T>() * math::d2r<T>();
|
||||
}
|
||||
|
||||
template <typename Name>
|
||||
inline void check_name(Name const&)
|
||||
{
|
||||
static const bool is_ok = boost::is_convertible<Name, std::string>::value
|
||||
|| boost::is_same<Name, srs::dpar::name_i>::value
|
||||
|| boost::is_same<Name, srs::dpar::name_f>::value
|
||||
|| boost::is_same<Name, srs::dpar::name_r>::value;
|
||||
BOOST_MPL_ASSERT_MSG((is_ok), INVALID_ARGUMENT, (Name));
|
||||
}
|
||||
|
||||
|
||||
/* integer input */
|
||||
template <typename Params, typename Name>
|
||||
inline bool _pj_param_i(Params const& params, Name const& name, int & par)
|
||||
{
|
||||
check_name(name);
|
||||
typename Params::const_iterator it = pj_param_find(params, name);
|
||||
if (it != params.end())
|
||||
{
|
||||
set_value(par, *it);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* floating point input */
|
||||
template <typename T, typename Params, typename Name>
|
||||
inline bool _pj_param_f(Params const& params, Name const& name, T & par)
|
||||
{
|
||||
check_name(name);
|
||||
typename Params::const_iterator it = pj_param_find(params, name);
|
||||
if (it != params.end())
|
||||
{
|
||||
set_value(par, *it);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* radians input */
|
||||
template <typename T, typename Params, typename Name>
|
||||
inline bool _pj_param_r(Params const& params, Name const& name, T & par)
|
||||
{
|
||||
check_name(name);
|
||||
typename Params::const_iterator it = pj_param_find(params, name);
|
||||
if (it != params.end())
|
||||
{
|
||||
set_value_r(par, *it);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* bool input */
|
||||
inline bool _pj_get_param_b(srs::detail::proj4_parameters const& pl, std::string const& name)
|
||||
{
|
||||
srs::detail::proj4_parameters::const_iterator it = pj_param_find(pl, name);
|
||||
if (it != pl.end())
|
||||
{
|
||||
switch (it->value[0])
|
||||
{
|
||||
case '\0': case 'T': case 't':
|
||||
return true;
|
||||
case 'F': case 'f':
|
||||
return false;
|
||||
default:
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_invalid_boolean_param) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline bool _pj_get_param_b(srs::dpar::parameters<T> const& pl, srs::dpar::name_be const& name)
|
||||
{
|
||||
bool result = false;
|
||||
typename srs::dpar::parameters<T>::const_iterator it = pj_param_find(pl, name);
|
||||
if (it != pl.end())
|
||||
set_value(result, *it);
|
||||
return result;
|
||||
}
|
||||
|
||||
/* string input */
|
||||
inline bool pj_param_s(srs::detail::proj4_parameters const& pl, std::string const& name, std::string & par)
|
||||
{
|
||||
srs::detail::proj4_parameters::const_iterator it = pj_param_find(pl, name);
|
||||
if (it != pl.end())
|
||||
{
|
||||
par = it->value;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template
|
||||
<
|
||||
typename Params,
|
||||
template <typename> class IsSamePred,
|
||||
int I = srs::spar::detail::tuples_find_index_if<Params, IsSamePred>::value,
|
||||
int N = boost::tuples::length<Params>::value
|
||||
>
|
||||
struct _pj_param_x_static
|
||||
{
|
||||
static const bool result = true;
|
||||
template <typename T>
|
||||
static void apply(Params const& params, T & out)
|
||||
{
|
||||
// TODO: int values could be extracted directly from the type
|
||||
out = boost::tuples::get<I>(params).value;
|
||||
}
|
||||
};
|
||||
|
||||
template
|
||||
<
|
||||
typename Params,
|
||||
template <typename> class IsSamePred,
|
||||
int N
|
||||
>
|
||||
struct _pj_param_x_static<Params, IsSamePred, N, N>
|
||||
{
|
||||
static const bool result = false;
|
||||
template <typename T>
|
||||
static void apply(Params const& , T & )
|
||||
{}
|
||||
};
|
||||
|
||||
template <template <int> class Param, BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX>
|
||||
inline bool _pj_param_i(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& params, int & par)
|
||||
{
|
||||
typedef _pj_param_x_static
|
||||
<
|
||||
srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX>,
|
||||
srs::spar::detail::is_param_i<Param>::template pred
|
||||
> impl;
|
||||
impl::apply(params, par);
|
||||
return impl::result;
|
||||
}
|
||||
|
||||
template <template <typename> class Param, BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX, typename T>
|
||||
inline bool _pj_param_f(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& params, T & par)
|
||||
{
|
||||
typedef _pj_param_x_static
|
||||
<
|
||||
srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX>,
|
||||
srs::spar::detail::is_param_t<Param>::template pred
|
||||
> impl;
|
||||
impl::apply(params, par);
|
||||
return impl::result;
|
||||
}
|
||||
|
||||
template <template <typename> class Param, BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX, typename T>
|
||||
inline bool _pj_param_r(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& params, T & par)
|
||||
{
|
||||
typedef _pj_param_x_static
|
||||
<
|
||||
srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX>,
|
||||
srs::spar::detail::is_param_t<Param>::template pred
|
||||
> impl;
|
||||
impl::apply(params, par);
|
||||
if (impl::result)
|
||||
par *= math::d2r<T>();
|
||||
return impl::result;
|
||||
}
|
||||
|
||||
template <typename Param, BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX>
|
||||
inline bool _pj_get_param_b(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& params)
|
||||
{
|
||||
return pj_param_exists<Param>(params);
|
||||
}
|
||||
|
||||
//template <typename T, typename Name, typename Value>
|
||||
//inline bool pj_param_id(srs::dpar::parameters<T> const& pl, Name const& name, Value & par)
|
||||
//{
|
||||
// typename srs::dpar::parameters<T>::const_iterator it = pj_param_find(pl, name);
|
||||
// if (it != pl.end())
|
||||
// {
|
||||
// par = static_cast<Value>(it->template get_value<int>());
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
//}
|
||||
|
||||
// NOTE: In the original code, in pl_ell_set.c there is a function pj_get_param
|
||||
// which behavior is similar to pj_param but it doesn't set `user` member to TRUE
|
||||
// while pj_param does in the original code. In Boost.Geometry this member is not used.
|
||||
template <typename Params, typename Name>
|
||||
inline int _pj_get_param_i(Params const& pl, Name const& name)
|
||||
{
|
||||
int res = 0;
|
||||
_pj_param_i(pl, name, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
template <template <int> class Param, typename Params>
|
||||
inline int _pj_get_param_i(Params const& pl)
|
||||
{
|
||||
int res = 0;
|
||||
_pj_param_i<Param>(pl, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
template <typename T, typename Params, typename Name>
|
||||
inline T _pj_get_param_f(Params const& pl, Name const& name)
|
||||
{
|
||||
T res = 0;
|
||||
_pj_param_f(pl, name, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
template <typename T, template <typename> class Param, typename Params>
|
||||
inline T _pj_get_param_f(Params const& pl)
|
||||
{
|
||||
T res = 0;
|
||||
_pj_param_f<Param>(pl, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
template <typename T, typename Params, typename Name>
|
||||
inline T _pj_get_param_r(Params const& pl, Name const& name)
|
||||
{
|
||||
T res = 0;
|
||||
_pj_param_r(pl, name, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
template <typename T, template <typename> class Param, typename Params>
|
||||
inline T _pj_get_param_r(Params const& pl)
|
||||
{
|
||||
T res = 0;
|
||||
_pj_param_r<Param>(pl, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
inline std::string pj_get_param_s(srs::detail::proj4_parameters const& pl, std::string const& name)
|
||||
{
|
||||
std::string res;
|
||||
pj_param_s(pl, name, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------- //
|
||||
|
||||
template <typename Param, typename Name>
|
||||
inline bool pj_param_exists(srs::detail::proj4_parameters const& pl,
|
||||
std::string const& sn,
|
||||
Name const& )
|
||||
{
|
||||
return pj_param_exists(pl, sn);
|
||||
}
|
||||
template <template <typename> class Param, typename Name>
|
||||
inline bool pj_param_exists(srs::detail::proj4_parameters const& pl,
|
||||
std::string const& sn,
|
||||
Name const& )
|
||||
{
|
||||
return pj_param_exists(pl, sn);
|
||||
}
|
||||
template <typename Param, typename T, typename Name>
|
||||
inline bool pj_param_exists(srs::dpar::parameters<T> const& pl,
|
||||
std::string const& ,
|
||||
Name const& n)
|
||||
{
|
||||
return pj_param_exists(pl, n);
|
||||
}
|
||||
template <template <typename> class Param, typename T, typename Name>
|
||||
inline bool pj_param_exists(srs::dpar::parameters<T> const& pl,
|
||||
std::string const& ,
|
||||
Name const& n)
|
||||
{
|
||||
return pj_param_exists(pl, n);
|
||||
}
|
||||
template <typename Param, BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX, typename Name>
|
||||
inline bool pj_param_exists(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& pl,
|
||||
std::string const& ,
|
||||
Name const& )
|
||||
{
|
||||
return pj_param_exists<Param>(pl);
|
||||
}
|
||||
template <template <typename> class Param, BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX, typename Name>
|
||||
inline bool pj_param_exists(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& pl,
|
||||
std::string const& ,
|
||||
Name const& )
|
||||
{
|
||||
return pj_param_exists<Param>(pl);
|
||||
}
|
||||
|
||||
template <typename Param>
|
||||
inline bool pj_get_param_b(srs::detail::proj4_parameters const& pl,
|
||||
std::string const& sn,
|
||||
srs::dpar::name_be const& )
|
||||
{
|
||||
return _pj_get_param_b(pl, sn);
|
||||
}
|
||||
template <typename Param, typename T>
|
||||
inline bool pj_get_param_b(srs::dpar::parameters<T> const& pl,
|
||||
std::string const& ,
|
||||
srs::dpar::name_be const& n)
|
||||
{
|
||||
return _pj_get_param_b(pl, n);
|
||||
}
|
||||
template <typename Param, BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX>
|
||||
inline bool pj_get_param_b(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& pl,
|
||||
std::string const& ,
|
||||
srs::dpar::name_be const& )
|
||||
{
|
||||
return _pj_get_param_b<Param>(pl);
|
||||
}
|
||||
|
||||
//#define BOOST_GEOMETRY_GET_PARAM_B(PARAMS, NAME) pj_get_param_b(PARAMS, #NAME, srs::dpar::NAME)
|
||||
|
||||
template <template <int> class Param>
|
||||
inline bool pj_param_i(srs::detail::proj4_parameters const& pl,
|
||||
std::string const& sn,
|
||||
srs::dpar::name_i const& ,
|
||||
int & par)
|
||||
{
|
||||
return _pj_param_i(pl, sn, par);
|
||||
}
|
||||
template <template <int> class Param, typename T>
|
||||
inline bool pj_param_i(srs::dpar::parameters<T> const& pl,
|
||||
std::string const& ,
|
||||
srs::dpar::name_i const& n,
|
||||
int & par)
|
||||
{
|
||||
return _pj_param_i(pl, n, par);
|
||||
}
|
||||
template <template <int> class Param, BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX>
|
||||
inline bool pj_param_i(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& pl,
|
||||
std::string const& ,
|
||||
srs::dpar::name_i const& ,
|
||||
int & par)
|
||||
{
|
||||
return _pj_param_i<Param>(pl, par);
|
||||
}
|
||||
|
||||
//#define BOOST_GEOMETRY_PARAM_I(PARAMS, NAME, PAR) pj_param_i(PARAMS, #NAME, srs::dpar::NAME, PAR)
|
||||
|
||||
template <template <int> class Param>
|
||||
inline int pj_get_param_i(srs::detail::proj4_parameters const& pl,
|
||||
std::string const& sn,
|
||||
srs::dpar::name_i const& )
|
||||
{
|
||||
return _pj_get_param_i(pl, sn);
|
||||
}
|
||||
template <template <int> class Param, typename T>
|
||||
inline int pj_get_param_i(srs::dpar::parameters<T> const& pl,
|
||||
std::string const& ,
|
||||
srs::dpar::name_i const& n)
|
||||
{
|
||||
return _pj_get_param_i(pl, n);
|
||||
}
|
||||
template <template <int> class Param, BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX>
|
||||
inline bool pj_get_param_i(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& pl,
|
||||
std::string const& ,
|
||||
srs::dpar::name_i const& )
|
||||
{
|
||||
return _pj_get_param_i<Param>(pl);
|
||||
}
|
||||
|
||||
//#define BOOST_GEOMETRY_GET_PARAM_I(PARAMS, NAME) pj_get_param_i(PARAMS, #NAME, srs::dpar::NAME)
|
||||
|
||||
template <template <typename> class Param, typename T>
|
||||
inline bool pj_param_f(srs::detail::proj4_parameters const& pl,
|
||||
std::string const& sn,
|
||||
srs::dpar::name_f const& ,
|
||||
T & par)
|
||||
{
|
||||
return _pj_param_f(pl, sn, par);
|
||||
}
|
||||
template <template <typename> class Param, typename T>
|
||||
inline bool pj_param_f(srs::dpar::parameters<T> const& pl,
|
||||
std::string const& ,
|
||||
srs::dpar::name_f const& n,
|
||||
T & par)
|
||||
{
|
||||
return _pj_param_f(pl, n, par);
|
||||
}
|
||||
template <template <typename> class Param, BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX, typename T>
|
||||
inline bool pj_param_f(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& pl,
|
||||
std::string const& ,
|
||||
srs::dpar::name_f const& ,
|
||||
T & par)
|
||||
{
|
||||
return _pj_param_f<Param>(pl, par);
|
||||
}
|
||||
|
||||
//#define BOOST_GEOMETRY_PARAM_F(PARAMS, NAME, PAR) pj_param_f(PARAMS, #NAME, srs::dpar::NAME, PAR)
|
||||
|
||||
template <typename T, template <typename> class Param>
|
||||
inline T pj_get_param_f(srs::detail::proj4_parameters const& pl,
|
||||
std::string const& sn,
|
||||
srs::dpar::name_f const& )
|
||||
{
|
||||
return _pj_get_param_f<T>(pl, sn);
|
||||
}
|
||||
template <typename T, template <typename> class Param>
|
||||
inline T pj_get_param_f(srs::dpar::parameters<T> const& pl,
|
||||
std::string const& ,
|
||||
srs::dpar::name_f const& n)
|
||||
{
|
||||
return _pj_get_param_f<T>(pl, n);
|
||||
}
|
||||
template <typename T, template <typename> class Param, BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX>
|
||||
inline T pj_get_param_f(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& pl,
|
||||
std::string const& ,
|
||||
srs::dpar::name_f const& )
|
||||
{
|
||||
return _pj_get_param_f<T, Param>(pl);
|
||||
}
|
||||
|
||||
|
||||
//#define BOOST_GEOMETRY_GET_PARAM_F(PARAMS, NAME) pj_get_param_f<T>(PARAMS, #NAME, srs::dpar::NAME)
|
||||
|
||||
template <template <typename> class Param, typename T>
|
||||
inline bool pj_param_r(srs::detail::proj4_parameters const& pl,
|
||||
std::string const& sn,
|
||||
srs::dpar::name_r const& ,
|
||||
T & par)
|
||||
{
|
||||
return _pj_param_r(pl, sn, par);
|
||||
}
|
||||
template <template <typename> class Param, typename T>
|
||||
inline bool pj_param_r(srs::dpar::parameters<T> const& pl,
|
||||
std::string const& ,
|
||||
srs::dpar::name_r const& n,
|
||||
T & par)
|
||||
{
|
||||
return _pj_param_r(pl, n, par);
|
||||
}
|
||||
template <template <typename> class Param, BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX, typename T>
|
||||
inline bool pj_param_r(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& pl,
|
||||
std::string const& ,
|
||||
srs::dpar::name_r const& ,
|
||||
T & par)
|
||||
{
|
||||
return _pj_param_r<Param>(pl, par);
|
||||
}
|
||||
|
||||
//#define BOOST_GEOMETRY_PARAM_R(PARAMS, NAME, PAR) pj_param_r(PARAMS, #NAME, srs::dpar::NAME, PAR)
|
||||
|
||||
template <typename T, template <typename> class Param>
|
||||
inline T pj_get_param_r(srs::detail::proj4_parameters const& pl,
|
||||
std::string const& sn,
|
||||
srs::dpar::name_r const& )
|
||||
{
|
||||
return _pj_get_param_r<T>(pl, sn);
|
||||
}
|
||||
template <typename T, template <typename> class Param>
|
||||
inline T pj_get_param_r(srs::dpar::parameters<T> const& pl,
|
||||
std::string const& ,
|
||||
srs::dpar::name_r const& n)
|
||||
{
|
||||
return _pj_get_param_r<T>(pl, n);
|
||||
}
|
||||
template <typename T, template <typename> class Param, BOOST_GEOMETRY_PROJECTIONS_DETAIL_TYPENAME_PX>
|
||||
inline T pj_get_param_r(srs::spar::parameters<BOOST_GEOMETRY_PROJECTIONS_DETAIL_PX> const& pl,
|
||||
std::string const& ,
|
||||
srs::dpar::name_r const& )
|
||||
{
|
||||
return _pj_get_param_r<T, Param>(pl);
|
||||
}
|
||||
|
||||
//#define BOOST_GEOMETRY_GET_PARAM_R(PARAMS, NAME) pj_get_param_r<T>(PARAMS, #NAME, srs::dpar::NAME)
|
||||
|
||||
} // namespace detail
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,75 @@
|
||||
// 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, 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)
|
||||
|
||||
// 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_PHI2_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_PHI2_HPP
|
||||
|
||||
#include <boost/geometry/srs/projections/exception.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_strerrno.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
namespace detail {
|
||||
|
||||
template <typename T>
|
||||
inline T pj_phi2(T const& ts, T const& e)
|
||||
{
|
||||
static const T TOL = 1.0e-10;
|
||||
static const int N_ITER = 15;
|
||||
|
||||
T eccnth, Phi, con, dphi;
|
||||
int i;
|
||||
|
||||
eccnth = .5 * e;
|
||||
Phi = geometry::math::half_pi<T>() - 2. * atan (ts);
|
||||
i = N_ITER;
|
||||
do {
|
||||
con = e * sin (Phi);
|
||||
dphi = geometry::math::half_pi<T>() - 2. * atan (ts * math::pow((T(1) - con) /
|
||||
(T(1) + con), eccnth)) - Phi;
|
||||
Phi += dphi;
|
||||
} while ( geometry::math::abs(dphi) > TOL && --i);
|
||||
if (i <= 0)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_non_con_inv_phi2) );
|
||||
return Phi;
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,95 @@
|
||||
// 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_PJ_QSFN_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_PJ_QSFN_HPP
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
namespace detail {
|
||||
|
||||
/* determine small q */
|
||||
template <typename T>
|
||||
inline T pj_qsfn(T const& sinphi, T const& e, T const& one_es)
|
||||
{
|
||||
static const T EPSILON = 1.0e-7;
|
||||
|
||||
if (e >= EPSILON)
|
||||
{
|
||||
T con = e * sinphi;
|
||||
return (one_es * (sinphi / (1. - con * con) -
|
||||
(.5 / e) * log ((1. - con) / (1. + con))));
|
||||
} else
|
||||
return (sinphi + sinphi);
|
||||
}
|
||||
|
||||
|
||||
static const int MAX_C = 9;
|
||||
|
||||
template <typename T>
|
||||
struct AUTHALIC
|
||||
{
|
||||
T C[MAX_C], CP[MAX_C], CQ[MAX_C];
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief determine authalic latitude
|
||||
* @param[in] phi geographic latitude
|
||||
* @param[in] a initialized structure pointer
|
||||
* @return authalic latitude
|
||||
*/
|
||||
template <typename T>
|
||||
inline T proj_qsfn(T const& phi, AUTHALIC<T> const& a)
|
||||
{
|
||||
T s, s2, sum;
|
||||
int i = MAX_C;
|
||||
|
||||
s = sin(phi);
|
||||
s2 = s * s;
|
||||
sum = a.CQ[MAX_C - 1];
|
||||
while (--i) sum = a.CQ[i] + s2 * sum;
|
||||
return(s * sum);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,219 @@
|
||||
// Boost.Geometry
|
||||
// This file is manually converted from PROJ4
|
||||
|
||||
// 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)
|
||||
|
||||
// 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 <cerrno>
|
||||
#include <cstring>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Originally defined in projects.hpp
|
||||
/* library errors */
|
||||
enum error_type
|
||||
{
|
||||
error_no_args = -1,
|
||||
error_no_option_in_init_file = -2,
|
||||
error_no_colon_in_init_string = -3,
|
||||
error_proj_not_named = -4,
|
||||
error_unknown_projection_id = -5,
|
||||
error_eccentricity_is_one = -6,
|
||||
error_unknow_unit_id = -7,
|
||||
error_invalid_boolean_param = -8,
|
||||
error_unknown_ellp_param = -9,
|
||||
error_rev_flattening_is_zero = -10,
|
||||
error_ref_rad_larger_than_90 = -11,
|
||||
error_es_less_than_zero = -12,
|
||||
error_major_axis_not_given = -13,
|
||||
error_lat_or_lon_exceed_limit = -14,
|
||||
error_invalid_x_or_y = -15,
|
||||
error_wrong_format_dms_value = -16,
|
||||
error_non_conv_inv_meri_dist = -17,
|
||||
error_non_con_inv_phi2 = -18,
|
||||
error_acos_asin_arg_too_large = -19,
|
||||
error_tolerance_condition = -20,
|
||||
error_conic_lat_equal = -21,
|
||||
error_lat_larger_than_90 = -22,
|
||||
error_lat1_is_zero = -23,
|
||||
error_lat_ts_larger_than_90 = -24,
|
||||
error_control_point_no_dist = -25,
|
||||
error_no_rotation_proj = -26,
|
||||
error_w_or_m_zero_or_less = -27,
|
||||
error_lsat_not_in_range = -28,
|
||||
error_path_not_in_range = -29,
|
||||
error_h_less_than_zero = -30,
|
||||
error_k_less_than_zero = -31,
|
||||
error_lat_1_or_2_zero_or_90 = -32,
|
||||
error_lat_0_or_alpha_eq_90 = -33,
|
||||
error_ellipsoid_use_required = -34,
|
||||
error_invalid_utm_zone = -35,
|
||||
error_tcheby_val_out_of_range = -36,
|
||||
error_failed_to_find_proj = -37,
|
||||
error_failed_to_load_grid = -38,
|
||||
error_invalid_m_or_n = -39,
|
||||
error_n_out_of_range = -40,
|
||||
error_lat_1_2_unspecified = -41,
|
||||
error_abs_lat1_eq_abs_lat2 = -42,
|
||||
error_lat_0_half_pi_from_mean = -43,
|
||||
error_unparseable_cs_def = -44,
|
||||
error_geocentric = -45,
|
||||
error_unknown_prime_meridian = -46,
|
||||
error_axis = -47,
|
||||
error_grid_area = -48,
|
||||
error_invalid_sweep_axis = -49,
|
||||
error_malformed_pipeline = -50,
|
||||
error_unit_factor_less_than_0 = -51,
|
||||
error_invalid_scale = -52,
|
||||
error_non_convergent = -53,
|
||||
error_missing_args = -54,
|
||||
error_lat_0_is_zero = -55,
|
||||
error_ellipsoidal_unsupported = -56,
|
||||
error_too_many_inits = -57,
|
||||
error_invalid_arg = -58
|
||||
};
|
||||
|
||||
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 */
|
||||
"unit conversion factor must be > 0", /* -51 */
|
||||
"invalid scale", /* -52 */
|
||||
"non-convergent computation", /* -53 */
|
||||
"missing required arguments", /* -54 */
|
||||
"lat_0 = 0", /* -55 */
|
||||
"ellipsoidal usage unsupported", /* -56 */
|
||||
"only one +init allowed for non-pipeline operations", /* -57 */
|
||||
"argument not numerical or out of range", /* -58 */
|
||||
|
||||
/* When adding error messages, remember to update ID defines in
|
||||
projects.h, and transient_error array in pj_transform */
|
||||
};
|
||||
|
||||
inline std::string pj_generic_strerrno(std::string const& msg, int err)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << msg << " (" << err << ")";
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
inline std::string pj_strerrno(int err) {
|
||||
if (0==err)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
else if (err > 0)
|
||||
{
|
||||
// std::strerror function may be not thread-safe
|
||||
//return std::strerror(err);
|
||||
|
||||
switch(err)
|
||||
{
|
||||
#ifdef EINVAL
|
||||
case EINVAL:
|
||||
return "Invalid argument";
|
||||
#endif
|
||||
#ifdef EDOM
|
||||
case EDOM:
|
||||
return "Math argument out of domain of func";
|
||||
#endif
|
||||
#ifdef ERANGE
|
||||
case ERANGE:
|
||||
return "Math result not representable";
|
||||
#endif
|
||||
default:
|
||||
return pj_generic_strerrno("system error", err);
|
||||
}
|
||||
}
|
||||
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
|
||||
{
|
||||
return pj_generic_strerrno("invalid projection system error", err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_STRERRNO_HPP
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,58 @@
|
||||
// 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, 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)
|
||||
|
||||
// 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_PJ_TSFN_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_PJ_TSFN_HPP
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
namespace detail {
|
||||
|
||||
/* determine small t */
|
||||
template <typename T>
|
||||
inline T pj_tsfn(T const& phi, T sinphi, T const& e)
|
||||
{
|
||||
sinphi *= e;
|
||||
return (tan (.5 * (geometry::math::half_pi<T>() - phi)) /
|
||||
math::pow((T(1) - sinphi) / (T(1) + sinphi), T(0.5) * e));
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
}}} // namespace boost::geometry::projections
|
||||
#endif
|
||||
@@ -0,0 +1,89 @@
|
||||
// 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, 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)
|
||||
|
||||
// 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_UNITS_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_UNITS_HPP
|
||||
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace projections {
|
||||
namespace detail {
|
||||
|
||||
// Originally defined in projects.h
|
||||
struct pj_units_type
|
||||
{
|
||||
std::string id; /* units keyword */
|
||||
std::string to_meter; /* multiply by value to get meters */
|
||||
double numerator;
|
||||
double denominator;
|
||||
std::string name; /* comments */
|
||||
};
|
||||
|
||||
/* Field 2 that contains the multiplier to convert named units to meters
|
||||
** may be expressed by either a simple floating point constant or a
|
||||
** numerator/denomenator values (e.g. 1/1000) */
|
||||
|
||||
static const pj_units_type pj_units[] =
|
||||
{
|
||||
{ "km", "1000.", 1000.0, 1.0, "Kilometer" },
|
||||
{ "m", "1.", 1.0, 1.0, "Meter" },
|
||||
{ "dm", "1/10", 1.0, 10.0, "Decimeter" },
|
||||
{ "cm", "1/100", 1.0, 100.0, "Centimeter" },
|
||||
{ "mm", "1/1000", 1.0, 1000.0, "Millimeter" },
|
||||
{ "kmi", "1852.", 1852.0, 1.0, "International Nautical Mile" },
|
||||
{ "in", "0.0254", 0.0254, 1.0, "International Inch" },
|
||||
{ "ft", "0.3048", 0.3048, 1.0, "International Foot" },
|
||||
{ "yd", "0.9144", 0.9144, 1.0, "International Yard" },
|
||||
{ "mi", "1609.344", 1609.344, 1.0, "International Statute Mile" },
|
||||
{ "fath", "1.8288", 1.8288, 1.0, "International Fathom" },
|
||||
{ "ch", "20.1168", 20.1168, 1.0, "International Chain" },
|
||||
{ "link", "0.201168", 0.201168, 1.0, "International Link" },
|
||||
{ "us-in", "1./39.37", 1.0, 39.37, "U.S. Surveyor's Inch" },
|
||||
{ "us-ft", "0.304800609601219", 0.304800609601219, 1.0, "U.S. Surveyor's Foot" },
|
||||
{ "us-yd", "0.914401828803658", 0.914401828803658, 1.0, "U.S. Surveyor's Yard" },
|
||||
{ "us-ch", "20.11684023368047", 20.11684023368047, 1.0, "U.S. Surveyor's Chain" },
|
||||
{ "us-mi", "1609.347218694437", 1609.347218694437, 1.0, "U.S. Surveyor's Statute Mile" },
|
||||
{ "ind-yd", "0.91439523", 0.91439523, 1.0, "Indian Yard" },
|
||||
{ "ind-ft", "0.30479841", 0.30479841, 1.0, "Indian Foot" },
|
||||
{ "ind-ch", "20.11669506", 20.11669506, 1.0, "Indian Chain" }
|
||||
};
|
||||
|
||||
} // detail
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_PJ_UNITS_HPP
|
||||
@@ -0,0 +1,106 @@
|
||||
// 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, 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)
|
||||
|
||||
// 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_ZPOLY1_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_ZPOLY1_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections { namespace detail {
|
||||
|
||||
/* evaluate complex polynomial */
|
||||
|
||||
/* note: coefficients are always from C_1 to C_n
|
||||
** i.e. C_0 == (0., 0)
|
||||
** n should always be >= 1 though no checks are made
|
||||
*/
|
||||
template <typename T>
|
||||
inline pj_complex<T>
|
||||
pj_zpoly1(pj_complex<T> z, const pj_complex<T> *C, int n)
|
||||
{
|
||||
pj_complex<T> a;
|
||||
T t;
|
||||
|
||||
a = *(C += n);
|
||||
while (n-- > 0)
|
||||
{
|
||||
a.r = (--C)->r + z.r * (t = a.r) - z.i * a.i;
|
||||
a.i = C->i + z.r * a.i + z.i * t;
|
||||
}
|
||||
a.r = z.r * (t = a.r) - z.i * a.i;
|
||||
a.i = z.r * a.i + z.i * t;
|
||||
return a;
|
||||
}
|
||||
|
||||
/* evaluate complex polynomial and derivative */
|
||||
template <typename T>
|
||||
inline pj_complex<T>
|
||||
pj_zpolyd1(pj_complex<T> z, const pj_complex<T> *C, int n, pj_complex<T> *der)
|
||||
{
|
||||
T t;
|
||||
bool first = true;
|
||||
|
||||
pj_complex<T> a = *(C += n);
|
||||
pj_complex<T> b = a;
|
||||
while (n-- > 0)
|
||||
{
|
||||
if (first)
|
||||
{
|
||||
first = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
b.r = a.r + z.r * (t = b.r) - z.i * b.i;
|
||||
b.i = a.i + z.r * b.i + z.i * t;
|
||||
}
|
||||
a.r = (--C)->r + z.r * (t = a.r) - z.i * a.i;
|
||||
a.i = C->i + z.r * a.i + z.i * t;
|
||||
}
|
||||
b.r = a.r + z.r * (t = b.r) - z.i * b.i;
|
||||
b.i = a.i + z.r * b.i + z.i * t;
|
||||
a.r = z.r * (t = a.r) - z.i * a.i;
|
||||
a.i = z.r * a.i + z.i * t;
|
||||
*der = b;
|
||||
return a;
|
||||
}
|
||||
|
||||
}}}} // namespace boost::geometry::projections::detail
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,151 @@
|
||||
// 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 2018.
|
||||
// Modifications copyright (c) 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)
|
||||
|
||||
// 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_PROJ_MDIST_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_PROJ_MDIST_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/srs/projections/exception.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_strerrno.hpp>
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry { namespace projections
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
template <typename T>
|
||||
struct mdist
|
||||
{
|
||||
static const int static_size = 20;
|
||||
|
||||
int nb;
|
||||
T es;
|
||||
T E;
|
||||
T b[static_size];
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
inline bool proj_mdist_ini(T const& es, mdist<T>& b)
|
||||
{
|
||||
T numf, numfi, twon1, denf, denfi, ens, t, twon;
|
||||
T den, El, Es;
|
||||
T E[mdist<T>::static_size];
|
||||
int i, j;
|
||||
|
||||
/* generate E(e^2) and its terms E[] */
|
||||
ens = es;
|
||||
numf = twon1 = denfi = 1.;
|
||||
denf = 1.;
|
||||
twon = 4.;
|
||||
Es = El = E[0] = 1.;
|
||||
for (i = 1; i < mdist<T>::static_size ; ++i)
|
||||
{
|
||||
numf *= (twon1 * twon1);
|
||||
den = twon * denf * denf * twon1;
|
||||
t = numf/den;
|
||||
E[i] = t * ens;
|
||||
Es -= E[i];
|
||||
ens *= es;
|
||||
twon *= 4.;
|
||||
denf *= ++denfi;
|
||||
twon1 += 2.;
|
||||
if (Es == El) /* jump out if no change */
|
||||
break;
|
||||
El = Es;
|
||||
}
|
||||
b.nb = i - 1;
|
||||
b.es = es;
|
||||
b.E = Es;
|
||||
/* generate b_n coefficients--note: collapse with prefix ratios */
|
||||
b.b[0] = Es = 1. - Es;
|
||||
numf = denf = 1.;
|
||||
numfi = 2.;
|
||||
denfi = 3.;
|
||||
for (j = 1; j < i; ++j)
|
||||
{
|
||||
Es -= E[j];
|
||||
numf *= numfi;
|
||||
denf *= denfi;
|
||||
b.b[j] = Es * numf / denf;
|
||||
numfi += 2.;
|
||||
denfi += 2.;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T proj_mdist(T const& phi, T const& sphi, T const& cphi, mdist<T> const& b)
|
||||
{
|
||||
T sc, sum, sphi2, D;
|
||||
int i;
|
||||
|
||||
sc = sphi * cphi;
|
||||
sphi2 = sphi * sphi;
|
||||
D = phi * b.E - b.es * sc / sqrt(1. - b.es * sphi2);
|
||||
sum = b.b[i = b.nb];
|
||||
while (i) sum = b.b[--i] + sphi2 * sum;
|
||||
return(D + sc * sum);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T proj_inv_mdist(T const& dist, mdist<T> const& b)
|
||||
{
|
||||
static const T TOL = 1e-14;
|
||||
T s, t, phi, k;
|
||||
int i;
|
||||
|
||||
k = 1./(1.- b.es);
|
||||
i = mdist<T>::static_size;
|
||||
phi = dist;
|
||||
while ( i-- ) {
|
||||
s = sin(phi);
|
||||
t = 1. - b.es * s * s;
|
||||
phi -= t = (proj_mdist(phi, s, cos(phi), b) - dist) *
|
||||
(t * sqrt(t)) * k;
|
||||
if (geometry::math::abs(t) < TOL) /* that is no change */
|
||||
return phi;
|
||||
}
|
||||
/* convergence failed */
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_non_conv_inv_meri_dist) );
|
||||
}
|
||||
} // namespace detail
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,194 @@
|
||||
// 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, 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)
|
||||
|
||||
// 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/config.hpp>
|
||||
#include <boost/geometry/srs/projections/constants.hpp>
|
||||
#include <boost/geometry/srs/projections/dpar.hpp>
|
||||
#include <boost/geometry/srs/projections/spar.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
|
||||
{
|
||||
|
||||
/* datum_type values */
|
||||
enum datum_type
|
||||
{
|
||||
datum_unknown = 0,
|
||||
datum_3param = 1,
|
||||
datum_7param = 2,
|
||||
datum_gridshift = 3,
|
||||
datum_wgs84 = 4 /* WGS84 (or anything considered equivelent) */
|
||||
};
|
||||
|
||||
// Originally defined in proj_internal.h
|
||||
//enum pj_io_units {
|
||||
// pj_io_units_whatever = 0, /* Doesn't matter (or depends on pipeline neighbours) */
|
||||
// pj_io_units_classic = 1, /* Scaled meters (right), projected system */
|
||||
// pj_io_units_projected = 2, /* Meters, projected system */
|
||||
// pj_io_units_cartesian = 3, /* Meters, 3D cartesian system */
|
||||
// pj_io_units_angular = 4 /* Radians */
|
||||
//};
|
||||
|
||||
// Originally defined in proj_internal.h
|
||||
/* Maximum latitudinal overshoot accepted */
|
||||
//static const double pj_epsilon_lat = 1e-12;
|
||||
|
||||
template <typename T>
|
||||
struct pj_consts
|
||||
{
|
||||
// E L L I P S O I D P A R A M E T E R S
|
||||
|
||||
T a; /* semimajor axis (radius if eccentricity==0) */
|
||||
T ra; /* 1/a */
|
||||
|
||||
T e; /* first eccentricity */
|
||||
T es; /* first eccentricity squared */
|
||||
T one_es; /* 1 - e^2 */
|
||||
T rone_es; /* 1/one_es */
|
||||
|
||||
T es_orig, a_orig; /* es and a before any +proj related adjustment */
|
||||
|
||||
// C O O R D I N A T E H A N D L I N G
|
||||
|
||||
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 */
|
||||
//int need_ellps; /* 0 for operations that are purely cartesian */
|
||||
|
||||
//enum pj_io_units left; /* Flags for input/output coordinate types */
|
||||
//enum pj_io_units right;
|
||||
|
||||
// C A R T O G R A P H I C O F F S E T S
|
||||
|
||||
T lam0, phi0; /* central longitude, latitude */
|
||||
T x0, y0/*, z0, t0*/; /* false easting and northing (and height and time) */
|
||||
|
||||
// S C A L I N G
|
||||
|
||||
T k0; /* general scaling factor */
|
||||
T to_meter, fr_meter; /* cartesian scaling */
|
||||
T vto_meter, vfr_meter; /* Vertical scaling. Internal unit [m] */
|
||||
|
||||
// D A T U M S A N D H E I G H T S Y S T E M S
|
||||
|
||||
detail::datum_type datum_type; /* PJD_UNKNOWN/3PARAM/7PARAM/GRIDSHIFT/WGS84 */
|
||||
srs::detail::towgs84<T> datum_params; /* Parameters for 3PARAM and 7PARAM */
|
||||
srs::detail::nadgrids nadgrids; /* Names of horozontal grid files. */
|
||||
|
||||
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
|
||||
pj_consts()
|
||||
: a(0), ra(0)
|
||||
, e(0), es(0), one_es(0), rone_es(0)
|
||||
, es_orig(0), a_orig(0)
|
||||
, over(0), geoc(0), is_latlong(0), is_geocent(0)
|
||||
//, need_ellps(1)
|
||||
//, left(PJ_IO_UNITS_ANGULAR), right(PJ_IO_UNITS_CLASSIC)
|
||||
, lam0(0), phi0(0)
|
||||
, x0(0), y0(0)/*, z0(0), t0(0)*/
|
||||
, k0(0) , to_meter(0), fr_meter(0), vto_meter(0), vfr_meter(0)
|
||||
, datum_type(datum_unknown)
|
||||
, from_greenwich(0), long_wrap_center(0), is_long_wrap_set(false)
|
||||
{}
|
||||
};
|
||||
|
||||
// PROJ4 complex. Might be replaced with std::complex
|
||||
template <typename T>
|
||||
struct pj_complex { T r, i; };
|
||||
|
||||
} // 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_consts<T>
|
||||
{
|
||||
typedef T type;
|
||||
|
||||
struct proj_id
|
||||
{
|
||||
proj_id()
|
||||
: id(srs::dpar::proj_unknown)
|
||||
{}
|
||||
|
||||
proj_id(srs::dpar::value_proj i)
|
||||
: id(i)
|
||||
{}
|
||||
|
||||
proj_id(std::string const& s)
|
||||
: id(srs::dpar::proj_unknown)
|
||||
, name(s)
|
||||
{}
|
||||
|
||||
bool is_unknown() const
|
||||
{
|
||||
return id == srs::dpar::proj_unknown && name.empty();
|
||||
}
|
||||
|
||||
// Either one of these is set:
|
||||
srs::dpar::value_proj id; // id of projection
|
||||
std::string name; // name of projection
|
||||
};
|
||||
|
||||
proj_id id;
|
||||
};
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_PROJECTS_HPP
|
||||
@@ -0,0 +1,38 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// 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)
|
||||
|
||||
#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)
|
||||
{
|
||||
geometry::set<0>(point, HUGE_VAL);
|
||||
geometry::set<1>(point, HUGE_VAL);
|
||||
}
|
||||
|
||||
template <typename Point>
|
||||
inline bool is_invalid_point(Point const& point)
|
||||
{
|
||||
return geometry::get<0>(point) == HUGE_VAL;
|
||||
}
|
||||
|
||||
}}} // namespace boost::geometry::projections
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_INVALID_POINT_HPP
|
||||
@@ -0,0 +1,197 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 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)
|
||||
|
||||
#ifndef BOOST_GEOMETRY_SRS_PROJECTIONS_PAR_DATA_HPP
|
||||
#define BOOST_GEOMETRY_SRS_PROJECTIONS_PAR_DATA_HPP
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/geometry/core/assert.hpp>
|
||||
#include <boost/geometry/core/config.hpp>
|
||||
|
||||
namespace boost { namespace geometry { namespace srs
|
||||
{
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
struct nadgrids
|
||||
: std::vector<std::string>
|
||||
{
|
||||
typedef std::vector<std::string> base_t;
|
||||
|
||||
nadgrids()
|
||||
{}
|
||||
|
||||
template <typename It>
|
||||
nadgrids(It first, It last)
|
||||
: base_t(first, last)
|
||||
{}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
nadgrids(std::initializer_list<std::string> l)
|
||||
: base_t(l)
|
||||
{}
|
||||
#endif
|
||||
|
||||
nadgrids(std::string const& g0)
|
||||
: base_t(1)
|
||||
{
|
||||
base_t& d = *this;
|
||||
d[0] = g0;
|
||||
}
|
||||
nadgrids(std::string const& g0, std::string const& g1)
|
||||
: base_t(2)
|
||||
{
|
||||
base_t& d = *this;
|
||||
d[0] = g0; d[1] = g1;
|
||||
}
|
||||
nadgrids(std::string const& g0, std::string const& g1, std::string const& g2)
|
||||
: base_t(3)
|
||||
{
|
||||
base_t& d = *this;
|
||||
d[0] = g0; d[1] = g1; d[2] = g2;
|
||||
}
|
||||
nadgrids(std::string const& g0, std::string const& g1, std::string const& g2, std::string const& g3)
|
||||
: base_t(4)
|
||||
{
|
||||
base_t& d = *this;
|
||||
d[0] = g0; d[1] = g1; d[2] = g2; d[3] = g3;
|
||||
}
|
||||
nadgrids(std::string const& g0, std::string const& g1, std::string const& g2, std::string const& g3, std::string const& g4)
|
||||
: base_t(5)
|
||||
{
|
||||
base_t& d = *this;
|
||||
d[0] = g0; d[1] = g1; d[2] = g2; d[3] = g3; d[4] = g4;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T = double>
|
||||
struct towgs84
|
||||
{
|
||||
static const std::size_t static_capacity = 7;
|
||||
|
||||
typedef std::size_t size_type;
|
||||
typedef T value_type;
|
||||
typedef T* iterator;
|
||||
typedef const T* const_iterator;
|
||||
typedef T& reference;
|
||||
typedef const T& const_reference;
|
||||
|
||||
towgs84()
|
||||
: m_size(0)
|
||||
#ifdef BOOST_GEOMETRY_CXX11_ARRAY_UNIFIED_INITIALIZATION
|
||||
, m_data{0, 0, 0, 0, 0, 0, 0}
|
||||
{}
|
||||
#else
|
||||
{
|
||||
std::fill(m_data, m_data + 7, T(0));
|
||||
}
|
||||
#endif
|
||||
|
||||
template <typename It>
|
||||
towgs84(It first, It last)
|
||||
{
|
||||
assign(first, last);
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
towgs84(std::initializer_list<T> l)
|
||||
{
|
||||
assign(l.begin(), l.end());
|
||||
}
|
||||
#endif
|
||||
|
||||
towgs84(T const& v0, T const& v1, T const& v2)
|
||||
: m_size(3)
|
||||
{
|
||||
m_data[0] = v0;
|
||||
m_data[1] = v1;
|
||||
m_data[2] = v2;
|
||||
}
|
||||
|
||||
towgs84(T const& v0, T const& v1, T const& v2, T const& v3, T const& v4, T const& v5, T const& v6)
|
||||
: m_size(7)
|
||||
{
|
||||
m_data[0] = v0;
|
||||
m_data[1] = v1;
|
||||
m_data[2] = v2;
|
||||
m_data[3] = v3;
|
||||
m_data[4] = v4;
|
||||
m_data[5] = v5;
|
||||
m_data[6] = v6;
|
||||
}
|
||||
|
||||
void push_back(T const& v)
|
||||
{
|
||||
BOOST_GEOMETRY_ASSERT(m_size < static_capacity);
|
||||
m_data[m_size] = v;
|
||||
++m_size;
|
||||
}
|
||||
|
||||
template <typename It>
|
||||
void assign(It first, It last)
|
||||
{
|
||||
for (m_size = 0 ; first != last && m_size < 7 ; ++first, ++m_size)
|
||||
m_data[m_size] = *first;
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
void assign(std::initializer_list<T> l)
|
||||
{
|
||||
assign(l.begin(), l.end());
|
||||
}
|
||||
#endif
|
||||
|
||||
const_reference operator[](size_type i) const
|
||||
{
|
||||
BOOST_GEOMETRY_ASSERT(i < m_size);
|
||||
return m_data[i];
|
||||
}
|
||||
|
||||
reference operator[](size_type i)
|
||||
{
|
||||
BOOST_GEOMETRY_ASSERT(i < m_size);
|
||||
return m_data[i];
|
||||
}
|
||||
|
||||
size_type size() const
|
||||
{
|
||||
return m_size;
|
||||
}
|
||||
|
||||
bool empty() const
|
||||
{
|
||||
return m_size == 0;
|
||||
}
|
||||
|
||||
void clear()
|
||||
{
|
||||
m_size = 0;
|
||||
}
|
||||
|
||||
iterator begin() { return m_data; }
|
||||
iterator end() { return m_data + m_size; }
|
||||
const_iterator begin() const { return m_data; }
|
||||
const_iterator end() const { return m_data + m_size; }
|
||||
|
||||
private:
|
||||
size_type m_size;
|
||||
T m_data[7];
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
#endif // DOXYGEN_NO_DETAIL
|
||||
|
||||
}}} // namespace boost::geometry::srs
|
||||
|
||||
|
||||
#endif // BOOST_GEOMETRY_SRS_PROJECTIONS_SPAR_HPP
|
||||
@@ -0,0 +1,344 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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
|
||||
|
||||
// Author: Gerald Evenden (1995)
|
||||
// Thomas Knudsen (2016) - revise/add regression tests
|
||||
|
||||
// Last updated version of proj: 5.0.0
|
||||
|
||||
// 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.
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_AEA_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_AEA_HPP
|
||||
|
||||
#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_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_qsfn.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace aea
|
||||
{
|
||||
|
||||
static const double epsilon10 = 1.e-10;
|
||||
static const double tolerance7 = 1.e-7;
|
||||
static const double epsilon = 1.0e-7;
|
||||
static const double tolerance = 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;
|
||||
detail::en<T> en;
|
||||
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) > tolerance && --i);
|
||||
return( i ? Phi : HUGE_VAL );
|
||||
}
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_aea_ellipsoid
|
||||
: public base_t_fi<base_aea_ellipsoid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_aea<T> m_proj_parm;
|
||||
|
||||
inline base_aea_ellipsoid(const Parameters& par)
|
||||
: base_t_fi<base_aea_ellipsoid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(e_forward) ellipsoid & spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
T 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));
|
||||
if (rho < 0.)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
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(T xy_x, T xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
|
||||
T 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)) > tolerance7) {
|
||||
if ((lp_lat = phi1_(lp_lat, this->m_par.e, this->m_par.one_es)) == HUGE_VAL)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
} else
|
||||
lp_lat = lp_lat < 0. ? -half_pi : half_pi;
|
||||
} 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. ? -half_pi : half_pi;
|
||||
lp_lon = atan2(xy_x, xy_y) / this->m_proj_parm.n;
|
||||
} else {
|
||||
lp_lon = 0.;
|
||||
lp_lat = this->m_proj_parm.n > 0. ? half_pi : - half_pi;
|
||||
}
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "aea_ellipsoid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup(Parameters const& par, par_aea<T>& proj_parm)
|
||||
{
|
||||
T cosphi, sinphi;
|
||||
int secant;
|
||||
|
||||
if (fabs(proj_parm.phi1 + proj_parm.phi2) < epsilon10)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_conic_lat_equal) );
|
||||
proj_parm.n = sinphi = sin(proj_parm.phi1);
|
||||
cosphi = cos(proj_parm.phi1);
|
||||
secant = fabs(proj_parm.phi1 - proj_parm.phi2) >= epsilon10;
|
||||
if( (proj_parm.ellips = (par.es > 0.))) {
|
||||
T ml1, m1;
|
||||
|
||||
proj_parm.en = pj_enfn<T>(par.es);
|
||||
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);
|
||||
if (ml2 == ml1)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(0) );
|
||||
|
||||
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 Params, typename Parameters, typename T>
|
||||
inline void setup_aea(Params const& params, Parameters const& par, par_aea<T>& proj_parm)
|
||||
{
|
||||
proj_parm.phi1 = 0.0;
|
||||
proj_parm.phi2 = 0.0;
|
||||
bool is_phi1_set = pj_param_r<srs::spar::lat_1>(params, "lat_1", srs::dpar::lat_1, proj_parm.phi1);
|
||||
bool is_phi2_set = pj_param_r<srs::spar::lat_2>(params, "lat_2", srs::dpar::lat_2, proj_parm.phi2);
|
||||
|
||||
// Boost.Geometry specific, set default parameters manually
|
||||
if (! is_phi1_set || ! is_phi2_set) {
|
||||
bool const use_defaults = ! pj_get_param_b<srs::spar::no_defs>(params, "no_defs", srs::dpar::no_defs);
|
||||
if (use_defaults) {
|
||||
if (!is_phi1_set)
|
||||
proj_parm.phi1 = 29.5;
|
||||
if (!is_phi2_set)
|
||||
proj_parm.phi2 = 45.5;
|
||||
}
|
||||
}
|
||||
|
||||
setup(par, proj_parm);
|
||||
}
|
||||
|
||||
// Lambert Equal Area Conic
|
||||
template <typename Params, typename Parameters, typename T>
|
||||
inline void setup_leac(Params const& params, Parameters const& par, par_aea<T>& proj_parm)
|
||||
{
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
|
||||
proj_parm.phi2 = pj_get_param_r<T, srs::spar::lat_1>(params, "lat_1", srs::dpar::lat_1);
|
||||
proj_parm.phi1 = pj_get_param_b<srs::spar::south>(params, "south", srs::dpar::south) ? -half_pi : half_pi;
|
||||
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 T, typename Parameters>
|
||||
struct aea_ellipsoid : public detail::aea::base_aea_ellipsoid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline aea_ellipsoid(Params const& params, Parameters const& par)
|
||||
: detail::aea::base_aea_ellipsoid<T, Parameters>(par)
|
||||
{
|
||||
detail::aea::setup_aea(params, 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 T, typename Parameters>
|
||||
struct leac_ellipsoid : public detail::aea::base_aea_ellipsoid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline leac_ellipsoid(Params const& params, Parameters const& par)
|
||||
: detail::aea::base_aea_ellipsoid<T, Parameters>(par)
|
||||
{
|
||||
detail::aea::setup_leac(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_aea, aea_ellipsoid, aea_ellipsoid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_leac, leac_ellipsoid, leac_ellipsoid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(aea_entry, aea_ellipsoid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(leac_entry, leac_ellipsoid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(aea_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(aea, aea_entry)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(leac, leac_entry)
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_AEA_HPP
|
||||
|
||||
@@ -0,0 +1,631 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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.
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_AEQD_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_AEQD_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#include <boost/geometry/formulas/vincenty_direct.hpp>
|
||||
#include <boost/geometry/formulas/vincenty_inverse.hpp>
|
||||
|
||||
#include <boost/geometry/srs/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/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_mlfn.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/math/special_functions/hypot.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace aeqd
|
||||
{
|
||||
|
||||
static const double epsilon10 = 1.e-10;
|
||||
static const double tolerance = 1.e-14;
|
||||
enum mode_type {
|
||||
n_pole = 0,
|
||||
s_pole = 1,
|
||||
equit = 2,
|
||||
obliq = 3
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct par_aeqd
|
||||
{
|
||||
T sinph0;
|
||||
T cosph0;
|
||||
detail::en<T> en;
|
||||
T M1;
|
||||
T N1;
|
||||
T Mp;
|
||||
T He;
|
||||
T G;
|
||||
mode_type mode;
|
||||
srs::spheroid<T> spheroid;
|
||||
};
|
||||
|
||||
template <typename T, typename Par, typename ProjParm>
|
||||
inline void e_forward(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y, Par const& par, ProjParm const& proj_parm)
|
||||
{
|
||||
T coslam, cosphi, sinphi, rho;
|
||||
//T azi1, s12;
|
||||
//T lam1, phi1, lam2, phi2;
|
||||
|
||||
coslam = cos(lp_lon);
|
||||
cosphi = cos(lp_lat);
|
||||
sinphi = sin(lp_lat);
|
||||
switch (proj_parm.mode) {
|
||||
case n_pole:
|
||||
coslam = - coslam;
|
||||
BOOST_FALLTHROUGH;
|
||||
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) < epsilon10 && fabs(lp_lat - par.phi0) < epsilon10) {
|
||||
xy_x = xy_y = 0.;
|
||||
break;
|
||||
}
|
||||
|
||||
//phi1 = par.phi0; lam1 = par.lam0;
|
||||
//phi2 = lp_lat; lam2 = lp_lon + par.lam0;
|
||||
|
||||
formula::result_inverse<T> const inv =
|
||||
formula::vincenty_inverse
|
||||
<
|
||||
T, true, true
|
||||
>::apply(par.lam0, par.phi0, lp_lon + par.lam0, lp_lat, proj_parm.spheroid);
|
||||
//azi1 = inv.azimuth; s12 = inv.distance;
|
||||
xy_x = inv.distance * sin(inv.azimuth) / par.a;
|
||||
xy_y = inv.distance * cos(inv.azimuth) / par.a;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T, typename Par, typename ProjParm>
|
||||
inline void e_inverse(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat, Par const& par, ProjParm const& proj_parm)
|
||||
{
|
||||
T c;
|
||||
|
||||
if ((c = boost::math::hypot(xy_x, xy_y)) < epsilon10) {
|
||||
lp_lat = par.phi0;
|
||||
lp_lon = 0.;
|
||||
return;
|
||||
}
|
||||
if (proj_parm.mode == obliq || proj_parm.mode == equit) {
|
||||
T const x2 = xy_x * par.a;
|
||||
T const y2 = xy_y * par.a;
|
||||
//T const lat1 = par.phi0;
|
||||
//T const lon1 = par.lam0;
|
||||
T const azi1 = atan2(x2, y2);
|
||||
T const s12 = sqrt(x2 * x2 + y2 * y2);
|
||||
formula::result_direct<T> const dir =
|
||||
formula::vincenty_direct
|
||||
<
|
||||
T, true
|
||||
>::apply(par.lam0, par.phi0, s12, azi1, proj_parm.spheroid);
|
||||
lp_lat = dir.lat2;
|
||||
lp_lon = dir.lon2;
|
||||
lp_lon -= par.lam0;
|
||||
} 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 const& lp_lon, T const& 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 const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat, Par const& par, ProjParm const& proj_parm)
|
||||
{
|
||||
T x2, t = 0.0;
|
||||
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 const& lp_lon, T lp_lat, T& xy_x, T& xy_y, Par const& /*par*/, ProjParm const& proj_parm)
|
||||
{
|
||||
static const T half_pi = detail::half_pi<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.) < tolerance)
|
||||
if (xy_y < 0.)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
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;
|
||||
BOOST_FALLTHROUGH;
|
||||
case s_pole:
|
||||
if (fabs(lp_lat - half_pi) < epsilon10)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
xy_x = (xy_y = (half_pi + 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 pi = detail::pi<T>();
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
|
||||
T cosc, c_rh, sinc;
|
||||
|
||||
if ((c_rh = boost::math::hypot(xy_x, xy_y)) > pi) {
|
||||
if (c_rh - epsilon10 > pi)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
c_rh = pi;
|
||||
} else if (c_rh < epsilon10) {
|
||||
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 = xy_y == 0. ? 0. : atan2(xy_x, xy_y);
|
||||
} else if (proj_parm.mode == n_pole) {
|
||||
lp_lat = half_pi - c_rh;
|
||||
lp_lon = atan2(xy_x, -xy_y);
|
||||
} else {
|
||||
lp_lat = c_rh - half_pi;
|
||||
lp_lon = atan2(xy_x, xy_y);
|
||||
}
|
||||
}
|
||||
|
||||
// Azimuthal Equidistant
|
||||
template <typename Params, typename Parameters, typename T>
|
||||
inline void setup_aeqd(Params const& params, Parameters& par, par_aeqd<T>& proj_parm, bool is_sphere, bool is_guam)
|
||||
{
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
|
||||
par.phi0 = pj_get_param_r<T, srs::spar::lat_0>(params, "lat_0", srs::dpar::lat_0);
|
||||
if (fabs(fabs(par.phi0) - half_pi) < epsilon10) {
|
||||
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) < epsilon10) {
|
||||
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) {
|
||||
/* empty */
|
||||
} else {
|
||||
proj_parm.en = pj_enfn<T>(par.es);
|
||||
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>(half_pi, 1., 0., proj_parm.en);
|
||||
break;
|
||||
case s_pole:
|
||||
proj_parm.Mp = pj_mlfn<T>(-half_pi, -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;
|
||||
}
|
||||
// Boost.Geometry specific, in proj4 geodesic is initialized at the beginning
|
||||
T const b = math::sqrt(math::sqr(par.a) * (1. - par.es));
|
||||
proj_parm.spheroid = srs::spheroid<T>(par.a, b);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_aeqd_e
|
||||
: public base_t_fi<base_aeqd_e<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_aeqd<T> m_proj_parm;
|
||||
|
||||
inline base_aeqd_e(const Parameters& par)
|
||||
: base_t_fi<base_aeqd_e<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(e_forward) elliptical
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& 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(T const& xy_x, T const& xy_y, T& lp_lon, T& 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 T, typename Parameters>
|
||||
struct base_aeqd_e_guam
|
||||
: public base_t_fi<base_aeqd_e_guam<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_aeqd<T> m_proj_parm;
|
||||
|
||||
inline base_aeqd_e_guam(const Parameters& par)
|
||||
: base_t_fi<base_aeqd_e_guam<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(e_guam_fwd) Guam elliptical
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& 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(T const& xy_x, T const& xy_y, T& lp_lon, T& 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 T, typename Parameters>
|
||||
struct base_aeqd_e_static
|
||||
: public base_t_fi<base_aeqd_e_static<BGParameters, T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_aeqd<T> m_proj_parm;
|
||||
|
||||
static const bool is_guam = ! boost::is_same
|
||||
<
|
||||
typename srs::spar::detail::tuples_find_if
|
||||
<
|
||||
BGParameters,
|
||||
//srs::par4::detail::is_guam
|
||||
srs::spar::detail::is_param<srs::spar::guam>::pred
|
||||
>::type,
|
||||
void
|
||||
>::value;
|
||||
|
||||
inline base_aeqd_e_static(const Parameters& par)
|
||||
: base_t_fi<base_aeqd_e_static<BGParameters, T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(e_forward or e_guam_fwd) elliptical
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& 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(T const& xy_x, T const& xy_y, T& lp_lon, T& 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 T, typename Parameters>
|
||||
struct base_aeqd_s
|
||||
: public base_t_fi<base_aeqd_s<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_aeqd<T> m_proj_parm;
|
||||
|
||||
inline base_aeqd_s(const Parameters& par)
|
||||
: base_t_fi<base_aeqd_s<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spherical
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& 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(T const& xy_x, T const& xy_y, T& lp_lon, T& 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 T, typename Parameters>
|
||||
struct aeqd_e : public detail::aeqd::base_aeqd_e<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline aeqd_e(Params const& params, Parameters const& par)
|
||||
: detail::aeqd::base_aeqd_e<T, Parameters>(par)
|
||||
{
|
||||
detail::aeqd::setup_aeqd(params, 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 T, typename Parameters>
|
||||
struct aeqd_e_guam : public detail::aeqd::base_aeqd_e_guam<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline aeqd_e_guam(Params const& params, Parameters const& par)
|
||||
: detail::aeqd::base_aeqd_e_guam<T, Parameters>(par)
|
||||
{
|
||||
detail::aeqd::setup_aeqd(params, 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 SParams, typename T, typename Parameters>
|
||||
struct aeqd_e_static : public detail::aeqd::base_aeqd_e_static<SParams, T, Parameters>
|
||||
{
|
||||
inline aeqd_e_static(SParams const& params, Parameters const& par)
|
||||
: detail::aeqd::base_aeqd_e_static<SParams, T, Parameters>(par)
|
||||
{
|
||||
detail::aeqd::setup_aeqd(params, this->m_par, this->m_proj_parm,
|
||||
false,
|
||||
detail::aeqd::base_aeqd_e_static<SParams, T, 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 T, typename Parameters>
|
||||
struct aeqd_s : public detail::aeqd::base_aeqd_s<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline aeqd_s(Params const& params, Parameters const& par)
|
||||
: detail::aeqd::base_aeqd_s<T, Parameters>(par)
|
||||
{
|
||||
detail::aeqd::setup_aeqd(params, 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::spar::proj_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::spar::proj_aeqd, srs_spheroid_tag, BGP, CT, P>
|
||||
{
|
||||
typedef aeqd_e_static<BGP, CT, P> type;
|
||||
};
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_BEGIN(aeqd_entry)
|
||||
{
|
||||
bool const guam = pj_get_param_b<srs::spar::guam>(params, "guam", srs::dpar::guam);
|
||||
|
||||
if (parameters.es && ! guam)
|
||||
return new base_v_fi<aeqd_e<T, Parameters>, T, Parameters>(params, parameters);
|
||||
else if (parameters.es && guam)
|
||||
return new base_v_fi<aeqd_e_guam<T, Parameters>, T, Parameters>(params, parameters);
|
||||
else
|
||||
return new base_v_fi<aeqd_s<T, Parameters>, T, Parameters>(params, parameters);
|
||||
}
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_END
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(aeqd_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(aeqd, aeqd_entry)
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_AEQD_HPP
|
||||
|
||||
@@ -0,0 +1,242 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
// Purpose: Implementation of the airy (Airy) projection.
|
||||
// Author: Gerald Evenden (1995)
|
||||
// Thomas Knudsen (2016) - revise/add regression tests
|
||||
// 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.
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_AIRY_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_AIRY_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/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace airy
|
||||
{
|
||||
|
||||
static const double epsilon = 1.e-10;
|
||||
enum mode_type {
|
||||
n_pole = 0,
|
||||
s_pole = 1,
|
||||
equit = 2,
|
||||
obliq = 3
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct par_airy
|
||||
{
|
||||
T p_halfpi;
|
||||
T sinph0;
|
||||
T cosph0;
|
||||
T Cb;
|
||||
mode_type mode;
|
||||
int no_cut; /* do not cut at hemisphere limit */
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_airy_spheroid
|
||||
: public base_t_f<base_airy_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_airy<T> m_proj_parm;
|
||||
|
||||
inline base_airy_spheroid(const Parameters& par)
|
||||
: base_t_f<base_airy_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
|
||||
T sinlam, coslam, cosphi, sinphi, t, s, Krho, cosz;
|
||||
|
||||
sinlam = sin(lp_lon);
|
||||
coslam = cos(lp_lon);
|
||||
switch (this->m_proj_parm.mode) {
|
||||
case equit:
|
||||
case obliq:
|
||||
sinphi = sin(lp_lat);
|
||||
cosphi = cos(lp_lat);
|
||||
cosz = cosphi * coslam;
|
||||
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 < -epsilon) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
}
|
||||
if (fabs(s = 1. - cosz) > epsilon) {
|
||||
t = 0.5 * (1. + cosz);
|
||||
Krho = -log(t)/s - this->m_proj_parm.Cb / t;
|
||||
} else
|
||||
Krho = 0.5 - this->m_proj_parm.Cb;
|
||||
xy_x = Krho * cosphi * sinlam;
|
||||
if (this->m_proj_parm.mode == obliq)
|
||||
xy_y = Krho * (this->m_proj_parm.cosph0 * sinphi -
|
||||
this->m_proj_parm.sinph0 * cosphi * coslam);
|
||||
else
|
||||
xy_y = Krho * sinphi;
|
||||
break;
|
||||
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 - epsilon) > half_pi)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
if ((lp_lat *= 0.5) > epsilon) {
|
||||
t = tan(lp_lat);
|
||||
Krho = -2.*(log(cos(lp_lat)) / t + t * this->m_proj_parm.Cb);
|
||||
xy_x = Krho * sinlam;
|
||||
xy_y = Krho * coslam;
|
||||
if (this->m_proj_parm.mode == n_pole)
|
||||
xy_y = -xy_y;
|
||||
} else
|
||||
xy_x = xy_y = 0.;
|
||||
}
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "airy_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Airy
|
||||
template <typename Params, typename Parameters, typename T>
|
||||
inline void setup_airy(Params const& params, Parameters& par, par_airy<T>& proj_parm)
|
||||
{
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
|
||||
T beta;
|
||||
|
||||
proj_parm.no_cut = pj_get_param_b<srs::spar::no_cut>(params, "no_cut", srs::dpar::no_cut);
|
||||
beta = 0.5 * (half_pi - pj_get_param_r<T, srs::spar::lat_b>(params, "lat_b", srs::dpar::lat_b));
|
||||
if (fabs(beta) < epsilon)
|
||||
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) - half_pi) < epsilon)
|
||||
if (par.phi0 < 0.) {
|
||||
proj_parm.p_halfpi = -half_pi;
|
||||
proj_parm.mode = s_pole;
|
||||
} else {
|
||||
proj_parm.p_halfpi = half_pi;
|
||||
proj_parm.mode = n_pole;
|
||||
}
|
||||
else {
|
||||
if (fabs(par.phi0) < epsilon)
|
||||
proj_parm.mode = equit;
|
||||
else {
|
||||
proj_parm.mode = obliq;
|
||||
proj_parm.sinph0 = sin(par.phi0);
|
||||
proj_parm.cosph0 = cos(par.phi0);
|
||||
}
|
||||
}
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::airy
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Airy projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Miscellaneous
|
||||
- Spheroid
|
||||
- no inverse
|
||||
\par Projection parameters
|
||||
- no_cut: Do not cut at hemisphere limit (boolean)
|
||||
- lat_b (degrees)
|
||||
\par Example
|
||||
\image html ex_airy.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct airy_spheroid : public detail::airy::base_airy_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline airy_spheroid(Params const& params, Parameters const& par)
|
||||
: detail::airy::base_airy_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::airy::setup_airy(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_airy, airy_spheroid, airy_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(airy_entry, airy_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(airy_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(airy, airy_entry)
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_AIRY_HPP
|
||||
|
||||
@@ -0,0 +1,314 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
// Purpose: Implementation of the aitoff (Aitoff) and wintri (Winkel Tripel)
|
||||
// projections.
|
||||
// Author: Gerald Evenden (1995)
|
||||
// Drazen Tutic, Lovro Gradiser (2015) - add inverse
|
||||
// Thomas Knudsen (2016) - revise/add regression tests
|
||||
// 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.
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_AITOFF_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_AITOFF_HPP
|
||||
|
||||
#include <boost/core/ignore_unused.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/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace aitoff
|
||||
{
|
||||
enum mode_type {
|
||||
mode_aitoff = 0,
|
||||
mode_winkel_tripel = 1
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct par_aitoff
|
||||
{
|
||||
T cosphi1;
|
||||
mode_type mode;
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_aitoff_spheroid
|
||||
: public base_t_fi<base_aitoff_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_aitoff<T> m_proj_parm;
|
||||
|
||||
inline base_aitoff_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_aitoff_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
T 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));
|
||||
xy_y *= d * sin(lp_lat);
|
||||
} else
|
||||
xy_x = xy_y = 0.;
|
||||
if (this->m_proj_parm.mode == mode_winkel_tripel) { /* Winkel Tripel */
|
||||
xy_x = (xy_x + lp_lon * this->m_proj_parm.cosphi1) * 0.5;
|
||||
xy_y = (xy_y + lp_lat) * 0.5;
|
||||
}
|
||||
}
|
||||
/***********************************************************************************
|
||||
*
|
||||
* Inverse functions added by Drazen Tutic and Lovro Gradiser based on paper:
|
||||
*
|
||||
* I.Özbug Biklirici and Cengizhan Ipbüker. A General Algorithm for the Inverse
|
||||
* Transformation of Map Projections Using Jacobian Matrices. In Proceedings of the
|
||||
* Third International Symposium Mathematical & Computational Applications,
|
||||
* pages 175{182, Turkey, September 2002.
|
||||
*
|
||||
* Expected accuracy is defined by epsilon = 1e-12. Should be appropriate for
|
||||
* most applications of Aitoff and Winkel Tripel projections.
|
||||
*
|
||||
* Longitudes of 180W and 180E can be mixed in solution obtained.
|
||||
*
|
||||
* Inverse for Aitoff projection in poles is undefined, longitude value of 0 is assumed.
|
||||
*
|
||||
* Contact : dtutic@geof.hr
|
||||
* Date: 2015-02-16
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
// INVERSE(s_inverse) sphere
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
static const T pi = detail::pi<T>();
|
||||
static const T two_pi = detail::two_pi<T>();
|
||||
static const T epsilon = 1e-12;
|
||||
|
||||
int iter, max_iter = 10, round = 0, max_round = 20;
|
||||
T 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;
|
||||
}
|
||||
|
||||
/* intial values for Newton-Raphson method */
|
||||
lp_lat = xy_y; lp_lon = xy_x;
|
||||
do {
|
||||
iter = 0;
|
||||
do {
|
||||
sl = sin(lp_lon * 0.5); cl = cos(lp_lon * 0.5);
|
||||
sp = sin(lp_lat); cp = cos(lp_lat);
|
||||
D = cp * cl;
|
||||
C = 1. - D * D;
|
||||
D = acos(D) / math::pow(C, T(1.5));
|
||||
f1 = 2. * D * C * cp * sl;
|
||||
f2 = D * C * sp;
|
||||
f1p = 2.* (sl * cl * sp * cp / C - D * sp * sl);
|
||||
f1l = cp * cp * sl * sl / C + D * cp * cl * sp * sp;
|
||||
f2p = sp * sp * cl / C + D * sl * sl * cp;
|
||||
f2l = 0.5 * (sp * cp * sl / C - D * sp * cp * cp * sl * cl);
|
||||
if (this->m_proj_parm.mode == mode_winkel_tripel) { /* Winkel Tripel */
|
||||
f1 = 0.5 * (f1 + lp_lon * this->m_proj_parm.cosphi1);
|
||||
f2 = 0.5 * (f2 + lp_lat);
|
||||
f1p *= 0.5;
|
||||
f1l = 0.5 * (f1l + this->m_proj_parm.cosphi1);
|
||||
f2p = 0.5 * (f2p + 1.);
|
||||
f2l *= 0.5;
|
||||
}
|
||||
f1 -= xy_x; f2 -= xy_y;
|
||||
dl = (f2 * f1p - f1 * f2p) / (dp = f1p * f2l - f2p * f1l);
|
||||
dp = (f1 * f2l - f2 * f1l) / dp;
|
||||
dl = fmod(dl, pi); /* set to interval [-M_PI, M_PI] */
|
||||
lp_lat -= dp; lp_lon -= dl;
|
||||
} while ((fabs(dp) > epsilon || fabs(dl) > epsilon) && (iter++ < max_iter));
|
||||
if (lp_lat > two_pi) lp_lat -= 2.*(lp_lat-two_pi); /* correct if symmetrical solution for Aitoff */
|
||||
if (lp_lat < -two_pi) lp_lat -= 2.*(lp_lat+two_pi); /* correct if symmetrical solution for Aitoff */
|
||||
if ((fabs(fabs(lp_lat) - two_pi) < 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))) != 0.0) {/* Aitoff */
|
||||
x = 2. * D * cos(lp_lat) * sin(C) * (y = 1. / sin(D));
|
||||
y *= D * sin(lp_lat);
|
||||
} else
|
||||
x = y = 0.;
|
||||
if (this->m_proj_parm.mode == mode_winkel_tripel) { /* Winkel Tripel */
|
||||
x = (x + lp_lon * this->m_proj_parm.cosphi1) * 0.5;
|
||||
y = (y + lp_lat) * 0.5;
|
||||
}
|
||||
/* 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++ < max_round));
|
||||
|
||||
if (iter == max_iter && round == max_round)
|
||||
{
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_non_convergent) );
|
||||
//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()
|
||||
{
|
||||
return "aitoff_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
template <typename Parameters>
|
||||
inline void setup(Parameters& par)
|
||||
{
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
|
||||
// Aitoff
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup_aitoff(Parameters& par, par_aitoff<T>& proj_parm)
|
||||
{
|
||||
proj_parm.mode = mode_aitoff;
|
||||
setup(par);
|
||||
}
|
||||
|
||||
// Winkel Tripel
|
||||
template <typename Params, typename Parameters, typename T>
|
||||
inline void setup_wintri(Params& params, Parameters& par, par_aitoff<T>& proj_parm)
|
||||
{
|
||||
static const T two_div_pi = detail::two_div_pi<T>();
|
||||
|
||||
T phi1;
|
||||
|
||||
proj_parm.mode = mode_winkel_tripel;
|
||||
if (pj_param_r<srs::spar::lat_1>(params, "lat_1", srs::dpar::lat_1, phi1)) {
|
||||
if ((proj_parm.cosphi1 = cos(phi1)) == 0.)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_lat_larger_than_90) );
|
||||
} else /* 50d28' or phi1=acos(2/pi) */
|
||||
proj_parm.cosphi1 = two_div_pi;
|
||||
setup(par);
|
||||
}
|
||||
|
||||
}} // namespace detail::aitoff
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Aitoff projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Miscellaneous
|
||||
- Spheroid
|
||||
\par Example
|
||||
\image html ex_aitoff.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct aitoff_spheroid : public detail::aitoff::base_aitoff_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline aitoff_spheroid(Params const& , Parameters const& par)
|
||||
: detail::aitoff::base_aitoff_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::aitoff::setup_aitoff(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Winkel Tripel 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
|
||||
- lat_1: Latitude of first standard parallel (degrees)
|
||||
\par Example
|
||||
\image html ex_wintri.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct wintri_spheroid : public detail::aitoff::base_aitoff_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline wintri_spheroid(Params const& params, Parameters const& par)
|
||||
: detail::aitoff::base_aitoff_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::aitoff::setup_wintri(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_aitoff, aitoff_spheroid, aitoff_spheroid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_wintri, wintri_spheroid, wintri_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(aitoff_entry, aitoff_spheroid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(wintri_entry, wintri_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(aitoff_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(aitoff, aitoff_entry)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(wintri, wintri_entry)
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_AITOFF_HPP
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_AUGUST_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_AUGUST_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
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace august
|
||||
{
|
||||
|
||||
//static const double M = 1.333333333333333;
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_august_spheroid
|
||||
: public base_t_f<base_august_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
inline base_august_spheroid(const Parameters& par)
|
||||
: base_t_f<base_august_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
static const T M = 1.333333333333333333333333333333333333;
|
||||
|
||||
T t, c1, c, x1, x12, y1, y12;
|
||||
|
||||
t = tan(.5 * lp_lat);
|
||||
c1 = sqrt(1. - t * t);
|
||||
c = 1. + c1 * cos(lp_lon *= .5);
|
||||
x1 = sin(lp_lon) * c1 / c;
|
||||
y1 = t / c;
|
||||
xy_x = M * x1 * (3. + (x12 = x1 * x1) - 3. * (y12 = y1 * y1));
|
||||
xy_y = M * y1 * (3. + 3. * x12 - y12);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "august_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// August Epicycloidal
|
||||
template <typename Parameters>
|
||||
inline void setup_august(Parameters& par)
|
||||
{
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::august
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief August Epicycloidal projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Miscellaneous
|
||||
- Spheroid
|
||||
- no inverse
|
||||
\par Example
|
||||
\image html ex_august.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct august_spheroid : public detail::august::base_august_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline august_spheroid(Params const& , Parameters const& par)
|
||||
: detail::august::base_august_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::august::setup_august(this->m_par);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_august, august_spheroid, august_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(august_entry, august_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(august_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(august, august_entry)
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_AUGUST_HPP
|
||||
|
||||
@@ -0,0 +1,238 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_BACON_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_BACON_HPP
|
||||
|
||||
#include <boost/geometry/util/math.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
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace bacon
|
||||
{
|
||||
|
||||
//static const double half_pi_sqr = 2.46740110027233965467;
|
||||
static const double epsilon = 1e-10;
|
||||
|
||||
struct par_bacon
|
||||
{
|
||||
int bacn;
|
||||
int ortl;
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_bacon_spheroid
|
||||
: public base_t_f<base_bacon_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_bacon m_proj_parm;
|
||||
|
||||
inline base_bacon_spheroid(const Parameters& par)
|
||||
: base_t_f<base_bacon_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
static const T half_pi_sqr = detail::half_pi_sqr<T>();
|
||||
|
||||
T ax, f;
|
||||
|
||||
xy_y = this->m_proj_parm.bacn ? half_pi * sin(lp_lat) : lp_lat;
|
||||
if ((ax = fabs(lp_lon)) >= epsilon) {
|
||||
if (this->m_proj_parm.ortl && ax >= half_pi)
|
||||
xy_x = sqrt(half_pi_sqr - lp_lat * lp_lat + epsilon) + ax - half_pi;
|
||||
else {
|
||||
f = 0.5 * (half_pi_sqr / ax + ax);
|
||||
xy_x = ax - f + sqrt(f * f - xy_y * xy_y);
|
||||
}
|
||||
if (lp_lon < 0.) xy_x = - xy_x;
|
||||
} else
|
||||
xy_x = 0.;
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "bacon_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Apian Globular I
|
||||
template <typename Parameters>
|
||||
inline void setup_apian(Parameters& par, par_bacon& proj_parm)
|
||||
{
|
||||
proj_parm.bacn = proj_parm.ortl = 0;
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
// Ortelius Oval
|
||||
template <typename Parameters>
|
||||
inline void setup_ortel(Parameters& par, par_bacon& proj_parm)
|
||||
{
|
||||
proj_parm.bacn = 0;
|
||||
proj_parm.ortl = 1;
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
// Bacon Globular
|
||||
template <typename Parameters>
|
||||
inline void setup_bacon(Parameters& par, par_bacon& proj_parm)
|
||||
{
|
||||
proj_parm.bacn = 1;
|
||||
proj_parm.ortl = 0;
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::bacon
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Apian Globular I projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Miscellaneous
|
||||
- Spheroid
|
||||
- no inverse
|
||||
\par Example
|
||||
\image html ex_apian.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct apian_spheroid : public detail::bacon::base_bacon_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline apian_spheroid(Params const& , Parameters const& par)
|
||||
: detail::bacon::base_bacon_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::bacon::setup_apian(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Ortelius Oval projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Miscellaneous
|
||||
- Spheroid
|
||||
- no inverse
|
||||
\par Example
|
||||
\image html ex_ortel.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct ortel_spheroid : public detail::bacon::base_bacon_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline ortel_spheroid(Params const& , Parameters const& par)
|
||||
: detail::bacon::base_bacon_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::bacon::setup_ortel(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Bacon Globular projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Miscellaneous
|
||||
- Spheroid
|
||||
- no inverse
|
||||
\par Example
|
||||
\image html ex_bacon.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct bacon_spheroid : public detail::bacon::base_bacon_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline bacon_spheroid(Params const& , Parameters const& par)
|
||||
: detail::bacon::base_bacon_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::bacon::setup_bacon(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_apian, apian_spheroid, apian_spheroid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_bacon, bacon_spheroid, bacon_spheroid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_ortel, ortel_spheroid, ortel_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(apian_entry, apian_spheroid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(ortel_entry, ortel_spheroid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(bacon_entry, bacon_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(bacon_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(apian, apian_entry)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(ortel, ortel_entry)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(bacon, bacon_entry)
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_BACON_HPP
|
||||
|
||||
@@ -0,0 +1,284 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_BIPC_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_BIPC_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/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/math/special_functions/hypot.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace bipc
|
||||
{
|
||||
|
||||
static const double epsilon = 1e-10;
|
||||
static const double epsilon10 = 1e-10;
|
||||
static const double one_plus_eps = 1.000000001;
|
||||
static const int n_iter = 10;
|
||||
static const double lamB = -.34894976726250681539;
|
||||
static const double n = .63055844881274687180;
|
||||
static const double F = 1.89724742567461030582;
|
||||
static const double Azab = .81650043674686363166;
|
||||
static const double Azba = 1.82261843856185925133;
|
||||
static const double const_T = 1.27246578267089012270;
|
||||
static const double rhoc = 1.20709121521568721927;
|
||||
static const double cAzc = .69691523038678375519;
|
||||
static const double sAzc = .71715351331143607555;
|
||||
static const double C45 = .70710678118654752469;
|
||||
static const double S45 = .70710678118654752410;
|
||||
static const double C20 = .93969262078590838411;
|
||||
static const double S20 = -.34202014332566873287;
|
||||
static const double R110 = 1.91986217719376253360;
|
||||
static const double R104 = 1.81514242207410275904;
|
||||
|
||||
struct par_bipc
|
||||
{
|
||||
int noskew;
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_bipc_spheroid
|
||||
: public base_t_fi<base_bipc_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_bipc m_proj_parm;
|
||||
|
||||
inline base_bipc_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_bipc_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
static const T pi = detail::pi<T>();
|
||||
|
||||
T 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) - half_pi) < epsilon10) {
|
||||
Az = lp_lat < 0. ? pi : 0.;
|
||||
tphi = HUGE_VAL;
|
||||
} else {
|
||||
tphi = sphi / cphi;
|
||||
Az = atan2(sdlam , C45 * (tphi - cdlam));
|
||||
}
|
||||
if( (tag = (Az > Azba)) ) {
|
||||
cdlam = cos(sdlam = lp_lon + R110);
|
||||
sdlam = sin(sdlam);
|
||||
z = S20 * sphi + C20 * cphi * cdlam;
|
||||
if (fabs(z) > 1.) {
|
||||
if (fabs(z) > one_plus_eps)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
else
|
||||
z = z < 0. ? -1. : 1.;
|
||||
} else
|
||||
z = acos(z);
|
||||
if (tphi != HUGE_VAL)
|
||||
Az = atan2(sdlam, (C20 * tphi - S20 * cdlam));
|
||||
Av = Azab;
|
||||
xy_y = rhoc;
|
||||
} else {
|
||||
z = S45 * (sphi + cphi * cdlam);
|
||||
if (fabs(z) > 1.) {
|
||||
if (fabs(z) > one_plus_eps)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
else
|
||||
z = z < 0. ? -1. : 1.;
|
||||
} else
|
||||
z = acos(z);
|
||||
Av = Azba;
|
||||
xy_y = -rhoc;
|
||||
}
|
||||
if (z < 0.) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
}
|
||||
r = F * (t = math::pow(tan(T(0.5) * z), n));
|
||||
if ((al = .5 * (R104 - z)) < 0.) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
}
|
||||
al = (t + math::pow(al, n)) / const_T;
|
||||
if (fabs(al) > 1.) {
|
||||
if (fabs(al) > one_plus_eps)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
else
|
||||
al = al < 0. ? -1. : 1.;
|
||||
} else
|
||||
al = acos(al);
|
||||
if (fabs(t = n * (Av - Az)) < al)
|
||||
r /= cos(al + (tag ? t : -t));
|
||||
xy_x = r * sin(t);
|
||||
xy_y += (tag ? -r : r) * cos(t);
|
||||
if (this->m_proj_parm.noskew) {
|
||||
t = xy_x;
|
||||
xy_x = -xy_x * cAzc - xy_y * sAzc;
|
||||
xy_y = -xy_y * cAzc + t * sAzc;
|
||||
}
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T xy_x, T xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
T t, r, rp, rl, al, z, fAz, Az, s, c, Av;
|
||||
int neg, i;
|
||||
|
||||
if (this->m_proj_parm.noskew) {
|
||||
t = xy_x;
|
||||
xy_x = -xy_x * cAzc + xy_y * sAzc;
|
||||
xy_y = -xy_y * cAzc - t * sAzc;
|
||||
}
|
||||
if( (neg = (xy_x < 0.)) ) {
|
||||
xy_y = rhoc - xy_y;
|
||||
s = S20;
|
||||
c = C20;
|
||||
Av = Azab;
|
||||
} else {
|
||||
xy_y += rhoc;
|
||||
s = S45;
|
||||
c = C45;
|
||||
Av = Azba;
|
||||
}
|
||||
rl = rp = r = boost::math::hypot(xy_x, xy_y);
|
||||
fAz = fabs(Az = atan2(xy_x, xy_y));
|
||||
for (i = n_iter; i ; --i) {
|
||||
z = 2. * atan(math::pow(r / F,T(1) / n));
|
||||
al = acos((math::pow(tan(T(0.5) * z), n) +
|
||||
math::pow(tan(T(0.5) * (R104 - z)), n)) / const_T);
|
||||
if (fAz < al)
|
||||
r = rp * cos(al + (neg ? Az : -Az));
|
||||
if (fabs(rl - r) < epsilon)
|
||||
break;
|
||||
rl = r;
|
||||
}
|
||||
if (! i)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
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));
|
||||
if (neg)
|
||||
lp_lon -= R110;
|
||||
else
|
||||
lp_lon = lamB - lp_lon;
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "bipc_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Bipolar conic of western hemisphere
|
||||
template <typename Params, typename Parameters>
|
||||
inline void setup_bipc(Params const& params, Parameters& par, par_bipc& proj_parm)
|
||||
{
|
||||
proj_parm.noskew = pj_get_param_b<srs::spar::ns>(params, "ns", srs::dpar::ns);
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::bipc
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Bipolar conic of western hemisphere projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Conic
|
||||
- Spheroid
|
||||
\par Projection parameters
|
||||
- ns (boolean)
|
||||
\par Example
|
||||
\image html ex_bipc.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct bipc_spheroid : public detail::bipc::base_bipc_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline bipc_spheroid(Params const& params, Parameters const& par)
|
||||
: detail::bipc::base_bipc_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::bipc::setup_bipc(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_bipc, bipc_spheroid, bipc_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(bipc_entry, bipc_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(bipc_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(bipc, bipc_entry)
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_BIPC_HPP
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_BOGGS_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_BOGGS_HPP
|
||||
|
||||
#include <boost/geometry/util/math.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
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace boggs
|
||||
{
|
||||
|
||||
static const int n_iter = 20;
|
||||
static const double epsilon = 1e-7;
|
||||
static const double FXC = 2.00276;
|
||||
static const double FXC2 = 1.11072;
|
||||
static const double FYC = 0.49931;
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_boggs_spheroid
|
||||
: public base_t_f<base_boggs_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
inline base_boggs_spheroid(const Parameters& par)
|
||||
: base_t_f<base_boggs_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
static const T pi = detail::pi<T>();
|
||||
static const T root_two = boost::math::constants::root_two<T>();
|
||||
|
||||
T theta, th1, c;
|
||||
int i;
|
||||
|
||||
theta = lp_lat;
|
||||
if (fabs(fabs(lp_lat) - half_pi) < epsilon)
|
||||
xy_x = 0.;
|
||||
else {
|
||||
c = sin(theta) * pi;
|
||||
for (i = n_iter; i; --i) {
|
||||
theta -= th1 = (theta + sin(theta) - c) /
|
||||
(1. + cos(theta));
|
||||
if (fabs(th1) < epsilon) break;
|
||||
}
|
||||
theta *= 0.5;
|
||||
xy_x = FXC * lp_lon / (1. / cos(lp_lat) + FXC2 / cos(theta));
|
||||
}
|
||||
xy_y = FYC * (lp_lat + root_two * sin(theta));
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "boggs_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Boggs Eumorphic
|
||||
template <typename Parameters>
|
||||
inline void setup_boggs(Parameters& par)
|
||||
{
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::boggs
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Boggs Eumorphic projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Pseudocylindrical
|
||||
- no inverse
|
||||
- Spheroid
|
||||
\par Example
|
||||
\image html ex_boggs.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct boggs_spheroid : public detail::boggs::base_boggs_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline boggs_spheroid(Params const& , Parameters const& par)
|
||||
: detail::boggs::base_boggs_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::boggs::setup_boggs(this->m_par);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_boggs, boggs_spheroid, boggs_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(boggs_entry, boggs_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(boggs_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(boggs, boggs_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_BOGGS_HPP
|
||||
|
||||
@@ -0,0 +1,279 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_BONNE_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_BONNE_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/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_mlfn.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/math/special_functions/hypot.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace bonne
|
||||
{
|
||||
|
||||
static const double epsilon10 = 1e-10;
|
||||
|
||||
template <typename T>
|
||||
struct par_bonne
|
||||
{
|
||||
T phi1;
|
||||
T cphi1;
|
||||
T am1;
|
||||
T m1;
|
||||
detail::en<T> en;
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_bonne_ellipsoid
|
||||
: public base_t_fi<base_bonne_ellipsoid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_bonne<T> m_proj_parm;
|
||||
|
||||
inline base_bonne_ellipsoid(const Parameters& par)
|
||||
: base_t_fi<base_bonne_ellipsoid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(e_forward) ellipsoid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
T 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));
|
||||
xy_x = rh * sin(E);
|
||||
xy_y = this->m_proj_parm.am1 - rh * cos(E);
|
||||
}
|
||||
|
||||
// INVERSE(e_inverse) ellipsoid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
|
||||
T 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)) < half_pi) {
|
||||
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 - half_pi) <= epsilon10)
|
||||
lp_lon = 0.;
|
||||
else
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "bonne_ellipsoid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_bonne_spheroid
|
||||
: public base_t_fi<base_bonne_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_bonne<T> m_proj_parm;
|
||||
|
||||
inline base_bonne_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_bonne_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
T E, rh;
|
||||
|
||||
rh = this->m_proj_parm.cphi1 + this->m_proj_parm.phi1 - lp_lat;
|
||||
if (fabs(rh) > epsilon10) {
|
||||
xy_x = rh * sin(E = lp_lon * cos(lp_lat) / rh);
|
||||
xy_y = this->m_proj_parm.cphi1 - rh * cos(E);
|
||||
} else
|
||||
xy_x = xy_y = 0.;
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
|
||||
T 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) > half_pi) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
}
|
||||
if (fabs(fabs(lp_lat) - half_pi) <= epsilon10)
|
||||
lp_lon = 0.;
|
||||
else
|
||||
lp_lon = rh * atan2(xy_x, xy_y) / cos(lp_lat);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "bonne_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Bonne (Werner lat_1=90)
|
||||
template <typename Params, typename Parameters, typename T>
|
||||
inline void setup_bonne(Params const& params, Parameters& par, par_bonne<T>& proj_parm)
|
||||
{
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
|
||||
T c;
|
||||
|
||||
proj_parm.phi1 = pj_get_param_r<T, srs::spar::lat_1>(params, "lat_1", srs::dpar::lat_1);
|
||||
if (fabs(proj_parm.phi1) < epsilon10)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_lat1_is_zero) );
|
||||
|
||||
if (par.es != 0.0) {
|
||||
proj_parm.en = pj_enfn<T>(par.es);
|
||||
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) + epsilon10 >= half_pi)
|
||||
proj_parm.cphi1 = 0.;
|
||||
else
|
||||
proj_parm.cphi1 = 1. / tan(proj_parm.phi1);
|
||||
}
|
||||
}
|
||||
|
||||
}} // namespace detail::bonne
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Bonne (Werner lat_1=90) 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)
|
||||
\par Example
|
||||
\image html ex_bonne.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct bonne_ellipsoid : public detail::bonne::base_bonne_ellipsoid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline bonne_ellipsoid(Params const& params, Parameters const& par)
|
||||
: detail::bonne::base_bonne_ellipsoid<T, Parameters>(par)
|
||||
{
|
||||
detail::bonne::setup_bonne(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Bonne (Werner lat_1=90) 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)
|
||||
\par Example
|
||||
\image html ex_bonne.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct bonne_spheroid : public detail::bonne::base_bonne_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline bonne_spheroid(Params const& params, Parameters const& par)
|
||||
: detail::bonne::base_bonne_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::bonne::setup_bonne(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_bonne, bonne_spheroid, bonne_ellipsoid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI2(bonne_entry, bonne_spheroid, bonne_ellipsoid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(bonne_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(bonne, bonne_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_BONNE_HPP
|
||||
|
||||
@@ -0,0 +1,269 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_CASS_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_CASS_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
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace cass
|
||||
{
|
||||
|
||||
//static const double epsilon10 = 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;
|
||||
detail::en<T> en;
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_cass_ellipsoid
|
||||
: public base_t_fi<base_cass_ellipsoid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_cass<T> m_proj_parm;
|
||||
|
||||
inline base_cass_ellipsoid(const Parameters& par)
|
||||
: base_t_fi<base_cass_ellipsoid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(e_forward) ellipsoid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
static const T C1 = cass::C1<T>();
|
||||
static const T C2 = cass::C2<T>();
|
||||
static const T C3 = cass::C3<T>();
|
||||
|
||||
T n = sin(lp_lat);
|
||||
T 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);
|
||||
T tn = tan(lp_lat);
|
||||
T t = tn * tn;
|
||||
T a1 = lp_lon * c;
|
||||
c *= this->m_par.es * c / (1 - this->m_par.es);
|
||||
T 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(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
static const T C3 = cass::C3<T>();
|
||||
static const T C4 = cass::C4<T>();
|
||||
static const T C5 = cass::C5<T>();
|
||||
|
||||
T ph1;
|
||||
|
||||
ph1 = pj_inv_mlfn(this->m_proj_parm.m0 + xy_y, this->m_par.es, this->m_proj_parm.en);
|
||||
T tn = tan(ph1); T t = tn * tn;
|
||||
T n = sin(ph1);
|
||||
T r = 1. / (1. - this->m_par.es * n * n);
|
||||
n = sqrt(r);
|
||||
r *= (1. - this->m_par.es) * n;
|
||||
T dd = xy_x / n;
|
||||
T 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 T, typename Parameters>
|
||||
struct base_cass_spheroid
|
||||
: public base_t_fi<base_cass_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_cass<T> m_proj_parm;
|
||||
|
||||
inline base_cass_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_cass_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& 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(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
T 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) {
|
||||
proj_parm.en = pj_enfn<T>(par.es);
|
||||
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 T, typename Parameters>
|
||||
struct cass_ellipsoid : public detail::cass::base_cass_ellipsoid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline cass_ellipsoid(Params const& , Parameters const& par)
|
||||
: detail::cass::base_cass_ellipsoid<T, 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 T, typename Parameters>
|
||||
struct cass_spheroid : public detail::cass::base_cass_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline cass_spheroid(Params const& , Parameters const& par)
|
||||
: detail::cass::base_cass_spheroid<T, 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::spar::proj_cass, cass_spheroid, cass_ellipsoid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI2(cass_entry, cass_spheroid, cass_ellipsoid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(cass_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(cass, cass_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_CASS_HPP
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_CC_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_CC_HPP
|
||||
|
||||
#include <boost/geometry/util/math.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
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace cc
|
||||
{
|
||||
|
||||
static const double epsilon10 = 1.e-10;
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_cc_spheroid
|
||||
: public base_t_fi<base_cc_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
inline base_cc_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_cc_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
|
||||
if (fabs(fabs(lp_lat) - half_pi) <= epsilon10) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
}
|
||||
xy_x = lp_lon;
|
||||
xy_y = tan(lp_lat);
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
lp_lat = atan(xy_y);
|
||||
lp_lon = xy_x;
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "cc_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Central Cylindrical
|
||||
template <typename Parameters>
|
||||
inline void setup_cc(Parameters& par)
|
||||
{
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::cc
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Central Cylindrical projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Cylindrical
|
||||
- Spheroid
|
||||
\par Example
|
||||
\image html ex_cc.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct cc_spheroid : public detail::cc::base_cc_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline cc_spheroid(Params const& , Parameters const& par)
|
||||
: detail::cc::base_cc_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::cc::setup_cc(this->m_par);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_cc, cc_spheroid, cc_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(cc_entry, cc_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(cc_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(cc, cc_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_CC_HPP
|
||||
|
||||
@@ -0,0 +1,249 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_CEA_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_CEA_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/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_auth.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_qsfn.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace cea
|
||||
{
|
||||
|
||||
static const double epsilon = 1e-10;
|
||||
|
||||
template <typename T>
|
||||
struct par_cea
|
||||
{
|
||||
T qp;
|
||||
detail::apa<T> apa;
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_cea_ellipsoid
|
||||
: public base_t_fi<base_cea_ellipsoid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_cea<T> m_proj_parm;
|
||||
|
||||
inline base_cea_ellipsoid(const Parameters& par)
|
||||
: base_t_fi<base_cea_ellipsoid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(e_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
xy_x = this->m_par.k0 * lp_lon;
|
||||
xy_y = .5 * pj_qsfn(sin(lp_lat), this->m_par.e, this->m_par.one_es) / this->m_par.k0;
|
||||
}
|
||||
|
||||
// INVERSE(e_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
lp_lat = pj_authlat(asin( 2. * xy_y * this->m_par.k0 / this->m_proj_parm.qp), this->m_proj_parm.apa);
|
||||
lp_lon = xy_x / this->m_par.k0;
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "cea_ellipsoid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_cea_spheroid
|
||||
: public base_t_fi<base_cea_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_cea<T> m_proj_parm;
|
||||
|
||||
inline base_cea_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_cea_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
xy_x = this->m_par.k0 * lp_lon;
|
||||
xy_y = sin(lp_lat) / this->m_par.k0;
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
|
||||
T t;
|
||||
|
||||
if ((t = fabs(xy_y *= this->m_par.k0)) - epsilon <= 1.) {
|
||||
if (t >= 1.)
|
||||
lp_lat = xy_y < 0. ? -half_pi : half_pi;
|
||||
else
|
||||
lp_lat = asin(xy_y);
|
||||
lp_lon = xy_x / this->m_par.k0;
|
||||
} else
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "cea_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Equal Area Cylindrical
|
||||
template <typename Params, typename Parameters, typename T>
|
||||
inline void setup_cea(Params const& params, Parameters& par, par_cea<T>& proj_parm)
|
||||
{
|
||||
T t = 0;
|
||||
|
||||
if (pj_param_r<srs::spar::lat_ts>(params, "lat_ts", srs::dpar::lat_ts, t)) {
|
||||
par.k0 = cos(t);
|
||||
if (par.k0 < 0.) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_lat_ts_larger_than_90) );
|
||||
}
|
||||
}
|
||||
if (par.es != 0.0) {
|
||||
t = sin(t);
|
||||
par.k0 /= sqrt(1. - par.es * t * t);
|
||||
par.e = sqrt(par.es);
|
||||
proj_parm.apa = pj_authset<T>(par.es);
|
||||
|
||||
proj_parm.qp = pj_qsfn(1., par.e, par.one_es);
|
||||
}
|
||||
}
|
||||
|
||||
}} // namespace detail::cea
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Equal Area Cylindrical projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Cylindrical
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Projection parameters
|
||||
- lat_ts: Latitude of true scale (degrees)
|
||||
\par Example
|
||||
\image html ex_cea.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct cea_ellipsoid : public detail::cea::base_cea_ellipsoid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline cea_ellipsoid(Params const& params, Parameters const& par)
|
||||
: detail::cea::base_cea_ellipsoid<T, Parameters>(par)
|
||||
{
|
||||
detail::cea::setup_cea(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Equal Area Cylindrical projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Cylindrical
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Projection parameters
|
||||
- lat_ts: Latitude of true scale (degrees)
|
||||
\par Example
|
||||
\image html ex_cea.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct cea_spheroid : public detail::cea::base_cea_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline cea_spheroid(Params const& params, Parameters const& par)
|
||||
: detail::cea::base_cea_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::cea::setup_cea(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_cea, cea_spheroid, cea_ellipsoid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI2(cea_entry, cea_spheroid, cea_ellipsoid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(cea_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(cea, cea_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_CEA_HPP
|
||||
|
||||
@@ -0,0 +1,296 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_CHAMB_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_CHAMB_HPP
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include <boost/geometry/srs/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/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace chamb
|
||||
{
|
||||
|
||||
//static const double third = 0.333333333333333333;
|
||||
static const double tolerance = 1e-9;
|
||||
|
||||
// specific for 'chamb'
|
||||
template <typename T>
|
||||
struct vect_ra { T r, Az; };
|
||||
template <typename T>
|
||||
struct point_xy { T x, y; };
|
||||
|
||||
template <typename T>
|
||||
struct par_chamb
|
||||
{
|
||||
struct { /* control point data */
|
||||
T phi, lam;
|
||||
T cosphi, sinphi;
|
||||
vect_ra<T> v;
|
||||
point_xy<T> p;
|
||||
T Az;
|
||||
} c[3];
|
||||
point_xy<T> p;
|
||||
T beta_0, beta_1, beta_2;
|
||||
};
|
||||
|
||||
/* distance and azimuth from point 1 to point 2 */
|
||||
template <typename T>
|
||||
inline vect_ra<T> vect(T const& dphi, T const& c1, T const& s1, T const& c2, T const& s2, T const& dlam)
|
||||
{
|
||||
vect_ra<T> v;
|
||||
T cdl, dp, dl;
|
||||
|
||||
cdl = cos(dlam);
|
||||
if (fabs(dphi) > 1. || fabs(dlam) > 1.)
|
||||
v.r = aacos(s1 * s2 + c1 * c2 * cdl);
|
||||
else { /* more accurate for smaller distances */
|
||||
dp = sin(.5 * dphi);
|
||||
dl = sin(.5 * dlam);
|
||||
v.r = 2. * aasin(sqrt(dp * dp + c1 * c2 * dl * dl));
|
||||
}
|
||||
if (fabs(v.r) > tolerance)
|
||||
v.Az = atan2(c2 * sin(dlam), c1 * s2 - s1 * c2 * cdl);
|
||||
else
|
||||
v.r = v.Az = 0.;
|
||||
return v;
|
||||
}
|
||||
|
||||
/* law of cosines */
|
||||
template <typename T>
|
||||
inline T 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 T, typename Parameters>
|
||||
struct base_chamb_spheroid
|
||||
: public base_t_f<base_chamb_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_chamb<T> m_proj_parm;
|
||||
|
||||
inline base_chamb_spheroid(const Parameters& par)
|
||||
: base_t_f<base_chamb_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
static const T third = detail::third<T>();
|
||||
|
||||
T sinphi, cosphi, a;
|
||||
vect_ra<T> v[3];
|
||||
int i, j;
|
||||
|
||||
sinphi = sin(lp_lat);
|
||||
cosphi = cos(lp_lat);
|
||||
for (i = 0; i < 3; ++i) { /* dist/azimiths from control */
|
||||
v[i] = vect(lp_lat - this->m_proj_parm.c[i].phi, this->m_proj_parm.c[i].cosphi, this->m_proj_parm.c[i].sinphi,
|
||||
cosphi, sinphi, lp_lon - this->m_proj_parm.c[i].lam);
|
||||
if (v[i].r == 0.0)
|
||||
break;
|
||||
v[i].Az = adjlon(v[i].Az - this->m_proj_parm.c[i].v.Az);
|
||||
}
|
||||
if (i < 3) /* current point at control point */
|
||||
{ xy_x = this->m_proj_parm.c[i].p.x; xy_y = this->m_proj_parm.c[i].p.y; }
|
||||
else { /* point mean of intersepts */
|
||||
{ xy_x = this->m_proj_parm.p.x; xy_y = this->m_proj_parm.p.y; }
|
||||
for (i = 0; i < 3; ++i) {
|
||||
j = i == 2 ? 0 : i + 1;
|
||||
a = lc(this->m_proj_parm.c[i].v.r, v[i].r, v[j].r);
|
||||
if (v[i].Az < 0.)
|
||||
a = -a;
|
||||
if (! i) { /* coord comp unique to each arc */
|
||||
xy_x += v[i].r * cos(a);
|
||||
xy_y -= v[i].r * sin(a);
|
||||
} else if (i == 1) {
|
||||
a = this->m_proj_parm.beta_1 - a;
|
||||
xy_x -= v[i].r * cos(a);
|
||||
xy_y -= v[i].r * sin(a);
|
||||
} else {
|
||||
a = this->m_proj_parm.beta_2 - a;
|
||||
xy_x += v[i].r * cos(a);
|
||||
xy_y += v[i].r * sin(a);
|
||||
}
|
||||
}
|
||||
xy_x *= third; /* mean of arc intercepts */
|
||||
xy_y *= third;
|
||||
}
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "chamb_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
inline T chamb_init_lat(srs::detail::proj4_parameters const& params, int i)
|
||||
{
|
||||
static const std::string lat[3] = {"lat_1", "lat_2", "lat_3"};
|
||||
return _pj_get_param_r<T>(params, lat[i]);
|
||||
}
|
||||
template <typename T>
|
||||
inline T chamb_init_lat(srs::dpar::parameters<T> const& params, int i)
|
||||
{
|
||||
static const srs::dpar::name_r lat[3] = {srs::dpar::lat_1, srs::dpar::lat_2, srs::dpar::lat_3};
|
||||
return _pj_get_param_r<T>(params, lat[i]);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T chamb_init_lon(srs::detail::proj4_parameters const& params, int i)
|
||||
{
|
||||
static const std::string lon[3] = {"lon_1", "lon_2", "lon_3"};
|
||||
return _pj_get_param_r<T>(params, lon[i]);
|
||||
}
|
||||
template <typename T>
|
||||
inline T chamb_init_lon(srs::dpar::parameters<T> const& params, int i)
|
||||
{
|
||||
static const srs::dpar::name_r lon[3] = {srs::dpar::lon_1, srs::dpar::lon_2, srs::dpar::lon_3};
|
||||
return _pj_get_param_r<T>(params, lon[i]);
|
||||
}
|
||||
|
||||
// Chamberlin Trimetric
|
||||
template <typename Params, typename Parameters, typename T>
|
||||
inline void setup_chamb(Params const& params, Parameters& par, par_chamb<T>& proj_parm)
|
||||
{
|
||||
static const T pi = detail::pi<T>();
|
||||
|
||||
int i, j;
|
||||
|
||||
for (i = 0; i < 3; ++i) { /* get control point locations */
|
||||
proj_parm.c[i].phi = chamb_init_lat<T>(params, i);
|
||||
proj_parm.c[i].lam = chamb_init_lon<T>(params, i);
|
||||
proj_parm.c[i].lam = adjlon(proj_parm.c[i].lam - par.lam0);
|
||||
proj_parm.c[i].cosphi = cos(proj_parm.c[i].phi);
|
||||
proj_parm.c[i].sinphi = sin(proj_parm.c[i].phi);
|
||||
}
|
||||
for (i = 0; i < 3; ++i) { /* inter ctl pt. distances and azimuths */
|
||||
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 == 0.0)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_control_point_no_dist) );
|
||||
/* 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 = pi - 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);
|
||||
proj_parm.p.x = proj_parm.c[2].p.x = proj_parm.c[0].p.x + proj_parm.c[2].v.r * cos(proj_parm.beta_0);
|
||||
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::chamb
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Chamberlin Trimetric projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Miscellaneous
|
||||
- Spheroid
|
||||
- no inverse
|
||||
\par Projection parameters
|
||||
- lat_1: Latitude of control point 1 (degrees)
|
||||
- lon_1: Longitude of control point 1 (degrees)
|
||||
- lat_2: Latitude of control point 2 (degrees)
|
||||
- lon_2: Longitude of control point 2 (degrees)
|
||||
- lat_3: Latitude of control point 3 (degrees)
|
||||
- lon_3: Longitude of control point 3 (degrees)
|
||||
\par Example
|
||||
\image html ex_chamb.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct chamb_spheroid : public detail::chamb::base_chamb_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline chamb_spheroid(Params const& params, Parameters const& par)
|
||||
: detail::chamb::base_chamb_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::chamb::setup_chamb(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_chamb, chamb_spheroid, chamb_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(chamb_entry, chamb_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(chamb_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(chamb, chamb_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_CHAMB_HPP
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_COLLG_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_COLLG_HPP
|
||||
|
||||
#include <boost/geometry/util/math.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
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace collg
|
||||
{
|
||||
|
||||
static const double FXC = 1.12837916709551257390;
|
||||
static const double FYC = 1.77245385090551602729;
|
||||
static const double one_plus_eps = 1.0000001;
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_collg_spheroid
|
||||
: public base_t_fi<base_collg_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
inline base_collg_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_collg_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
if ((xy_y = 1. - sin(lp_lat)) <= 0.)
|
||||
xy_y = 0.;
|
||||
else
|
||||
xy_y = sqrt(xy_y);
|
||||
xy_x = FXC * lp_lon * xy_y;
|
||||
xy_y = FYC * (1. - xy_y);
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
static T const half_pi = detail::half_pi<T>();
|
||||
|
||||
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) > one_plus_eps) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
} else {
|
||||
lp_lat = lp_lat < 0. ? -half_pi : half_pi;
|
||||
}
|
||||
|
||||
if ((lp_lon = 1. - sin(lp_lat)) <= 0.)
|
||||
lp_lon = 0.;
|
||||
else
|
||||
lp_lon = xy_x / (FXC * sqrt(lp_lon));
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "collg_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Collignon
|
||||
template <typename Parameters>
|
||||
inline void setup_collg(Parameters& par)
|
||||
{
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace collg
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Collignon 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_collg.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct collg_spheroid : public detail::collg::base_collg_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline collg_spheroid(Params const& , Parameters const& par)
|
||||
: detail::collg::base_collg_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::collg::setup_collg(this->m_par);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_collg, collg_spheroid, collg_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(collg_entry, collg_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(collg_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(collg, collg_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_COLLG_HPP
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_CRAST_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_CRAST_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
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace crast
|
||||
{
|
||||
|
||||
static const double XM = 0.97720502380583984317;
|
||||
static const double RXM = 1.02332670794648848847;
|
||||
static const double YM = 3.06998012383946546542;
|
||||
static const double RYM = 0.32573500793527994772;
|
||||
//static const double third = 0.333333333333333333;
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_crast_spheroid
|
||||
: public base_t_fi<base_crast_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
inline base_crast_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_crast_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
static const T third = detail::third<T>();
|
||||
|
||||
lp_lat *= third;
|
||||
xy_x = XM * lp_lon * (2. * cos(lp_lat + lp_lat) - 1.);
|
||||
xy_y = YM * sin(lp_lat);
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
static const T third = detail::third<T>();
|
||||
|
||||
lp_lat = 3. * asin(xy_y * RYM);
|
||||
lp_lon = xy_x * RXM / (2. * cos((lp_lat + lp_lat) * third) - 1);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "crast_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Craster Parabolic (Putnins P4)
|
||||
template <typename Parameters>
|
||||
inline void setup_crast(Parameters& par)
|
||||
{
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::crast
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Craster Parabolic (Putnins P4) 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_crast.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct crast_spheroid : public detail::crast::base_crast_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline crast_spheroid(Params const& , Parameters const& par)
|
||||
: detail::crast::base_crast_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::crast::setup_crast(this->m_par);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_crast, crast_spheroid, crast_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(crast_entry, crast_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(crast_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(crast, crast_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_CRAST_HPP
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_DENOY_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_DENOY_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
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace denoy
|
||||
{
|
||||
|
||||
static const double C0 = 0.95;
|
||||
//static const double C1 = -0.08333333333333333333;
|
||||
//static const double C3 = 0.00166666666666666666;
|
||||
static const double D1 = 0.9;
|
||||
static const double D5 = 0.03;
|
||||
|
||||
template <typename T>
|
||||
inline T C1() { return -0.0833333333333333333333333333333; }
|
||||
template <typename T>
|
||||
inline T C3() { return 0.0016666666666666666666666666666; }
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_denoy_spheroid
|
||||
: public base_t_f<base_denoy_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
inline base_denoy_spheroid(const Parameters& par)
|
||||
: base_t_f<base_denoy_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
static const T C1 = denoy::C1<T>();
|
||||
static const T C3 = denoy::C3<T>();
|
||||
|
||||
xy_y = lp_lat;
|
||||
xy_x = lp_lon;
|
||||
lp_lon = fabs(lp_lon);
|
||||
xy_x *= cos((C0 + lp_lon * (C1 + lp_lon * lp_lon * C3)) *
|
||||
(lp_lat * (D1 + D5 * lp_lat * lp_lat * lp_lat * lp_lat)));
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "denoy_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Denoyer Semi-Elliptical
|
||||
template <typename Parameters>
|
||||
inline void setup_denoy(Parameters& par)
|
||||
{
|
||||
par.es = 0.0;
|
||||
}
|
||||
|
||||
}} // namespace detail::denoy
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Denoyer Semi-Elliptical projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Pseudocylindrical
|
||||
- no inverse
|
||||
- Spheroid
|
||||
\par Example
|
||||
\image html ex_denoy.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct denoy_spheroid : public detail::denoy::base_denoy_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline denoy_spheroid(Params const& , Parameters const& par)
|
||||
: detail::denoy::base_denoy_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::denoy::setup_denoy(this->m_par);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_denoy, denoy_spheroid, denoy_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(denoy_entry, denoy_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(denoy_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(denoy, denoy_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_DENOY_HPP
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_ECK1_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_ECK1_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
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace eck1
|
||||
{
|
||||
|
||||
static const double FC = .92131773192356127802;
|
||||
static const double RP = .31830988618379067154;
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_eck1_spheroid
|
||||
: public base_t_fi<base_eck1_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
inline base_eck1_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_eck1_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
xy_x = FC * lp_lon * (1. - RP * fabs(lp_lat));
|
||||
xy_y = FC * lp_lat;
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
lp_lat = xy_y / FC;
|
||||
lp_lon = xy_x / (FC * (1. - RP * fabs(lp_lat)));
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "eck1_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Eckert I
|
||||
template <typename Parameters>
|
||||
inline void setup_eck1(Parameters& par)
|
||||
{
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::eck1
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Eckert I 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_eck1.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct eck1_spheroid : public detail::eck1::base_eck1_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline eck1_spheroid(Params const& , Parameters const& par)
|
||||
: detail::eck1::base_eck1_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::eck1::setup_eck1(this->m_par);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_eck1, eck1_spheroid, eck1_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(eck1_entry, eck1_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(eck1_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(eck1, eck1_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_ECK1_HPP
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_ECK2_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_ECK2_HPP
|
||||
|
||||
#include <boost/geometry/util/math.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
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace eck2
|
||||
{
|
||||
|
||||
static const double FXC = 0.46065886596178063902;
|
||||
static const double FYC = 1.44720250911653531871;
|
||||
//static const double C13 = 0.33333333333333333333;
|
||||
static const double one_plus_eps = 1.0000001;
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_eck2_spheroid
|
||||
: public base_t_fi<base_eck2_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
inline base_eck2_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_eck2_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
xy_x = FXC * lp_lon * (xy_y = sqrt(4. - 3. * sin(fabs(lp_lat))));
|
||||
xy_y = FYC * (2. - xy_y);
|
||||
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(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
static const T C13 = detail::third<T>();
|
||||
|
||||
lp_lon = xy_x / (FXC * ( lp_lat = 2. - fabs(xy_y) / FYC) );
|
||||
lp_lat = (4. - lp_lat * lp_lat) * C13;
|
||||
if (fabs(lp_lat) >= 1.) {
|
||||
if (fabs(lp_lat) > one_plus_eps)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
else
|
||||
lp_lat = lp_lat < 0. ? -half_pi : half_pi;
|
||||
} else
|
||||
lp_lat = asin(lp_lat);
|
||||
if (xy_y < 0)
|
||||
lp_lat = -lp_lat;
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "eck2_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Eckert II
|
||||
template <typename Parameters>
|
||||
inline void setup_eck2(Parameters& par)
|
||||
{
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::eck2
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Eckert II 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_eck2.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct eck2_spheroid : public detail::eck2::base_eck2_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline eck2_spheroid(Params const& , Parameters const& par)
|
||||
: detail::eck2::base_eck2_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::eck2::setup_eck2(this->m_par);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_eck2, eck2_spheroid, eck2_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(eck2_entry, eck2_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(eck2_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(eck2, eck2_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_ECK2_HPP
|
||||
|
||||
@@ -0,0 +1,290 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_ECK3_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_ECK3_HPP
|
||||
|
||||
#include <boost/core/ignore_unused.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
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace eck3
|
||||
{
|
||||
|
||||
template <typename T>
|
||||
struct par_eck3
|
||||
{
|
||||
T C_x, C_y, A, B;
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_eck3_spheroid
|
||||
: public base_t_fi<base_eck3_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_eck3<T> m_proj_parm;
|
||||
|
||||
inline base_eck3_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_eck3_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
xy_y = this->m_proj_parm.C_y * lp_lat;
|
||||
xy_x = this->m_proj_parm.C_x * lp_lon * (this->m_proj_parm.A + asqrt(1. - this->m_proj_parm.B * lp_lat * lp_lat));
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
T denominator;
|
||||
lp_lat = xy_y / this->m_proj_parm.C_y;
|
||||
denominator = (this->m_proj_parm.C_x * (this->m_proj_parm.A + asqrt(1. - this->m_proj_parm.B * lp_lat * lp_lat)));
|
||||
if ( denominator == 0.0) {
|
||||
lp_lon = HUGE_VAL;
|
||||
lp_lat = HUGE_VAL;
|
||||
} else
|
||||
lp_lon = xy_x / denominator;
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "eck3_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
template <typename Parameters>
|
||||
inline void setup(Parameters& par)
|
||||
{
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
|
||||
// Eckert III
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup_eck3(Parameters& par, par_eck3<T>& proj_parm)
|
||||
{
|
||||
proj_parm.C_x = 0.42223820031577120149;
|
||||
proj_parm.C_y = 0.84447640063154240298;
|
||||
proj_parm.A = 1.0;
|
||||
proj_parm.B = 0.4052847345693510857755;
|
||||
|
||||
setup(par);
|
||||
}
|
||||
|
||||
// Putnins P1
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup_putp1(Parameters& par, par_eck3<T>& proj_parm)
|
||||
{
|
||||
proj_parm.C_x = 1.89490;
|
||||
proj_parm.C_y = 0.94745;
|
||||
proj_parm.A = -0.5;
|
||||
proj_parm.B = 0.30396355092701331433;
|
||||
|
||||
setup(par);
|
||||
}
|
||||
|
||||
// Wagner VI
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup_wag6(Parameters& par, par_eck3<T>& proj_parm)
|
||||
{
|
||||
proj_parm.C_x = proj_parm.C_y = 0.94745;
|
||||
proj_parm.A = 0.0;
|
||||
proj_parm.B = 0.30396355092701331433;
|
||||
|
||||
setup(par);
|
||||
}
|
||||
|
||||
// Kavraisky VII
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup_kav7(Parameters& par, par_eck3<T>& proj_parm)
|
||||
{
|
||||
/* Defined twice in original code - Using 0.866...,
|
||||
* but leaving the other one here as a safety measure.
|
||||
* proj_parm.C_x = 0.2632401569273184856851; */
|
||||
proj_parm.C_x = 0.8660254037844;
|
||||
proj_parm.C_y = 1.0;
|
||||
proj_parm.A = 0.0;
|
||||
proj_parm.B = 0.30396355092701331433;
|
||||
|
||||
setup(par);
|
||||
}
|
||||
|
||||
}} // namespace detail::eck3
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Eckert III 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_eck3.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct eck3_spheroid : public detail::eck3::base_eck3_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline eck3_spheroid(Params const& , Parameters const& par)
|
||||
: detail::eck3::base_eck3_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::eck3::setup_eck3(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Putnins P1 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_putp1.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct putp1_spheroid : public detail::eck3::base_eck3_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline putp1_spheroid(Params const& , Parameters const& par)
|
||||
: detail::eck3::base_eck3_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::eck3::setup_putp1(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Wagner VI 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_wag6.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct wag6_spheroid : public detail::eck3::base_eck3_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline wag6_spheroid(Params const& , Parameters const& par)
|
||||
: detail::eck3::base_eck3_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::eck3::setup_wag6(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Kavraisky VII 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_kav7.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct kav7_spheroid : public detail::eck3::base_eck3_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline kav7_spheroid(Params const& , Parameters const& par)
|
||||
: detail::eck3::base_eck3_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::eck3::setup_kav7(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_eck3, eck3_spheroid, eck3_spheroid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_putp1, putp1_spheroid, putp1_spheroid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_wag6, wag6_spheroid, wag6_spheroid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_kav7, kav7_spheroid, kav7_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(eck3_entry, eck3_spheroid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(putp1_entry, putp1_spheroid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(wag6_entry, wag6_spheroid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(kav7_entry, kav7_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(eck3_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(eck3, eck3_entry);
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(putp1, putp1_entry);
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(wag6, wag6_entry);
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(kav7, kav7_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_ECK3_HPP
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_ECK4_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_ECK4_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
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace eck4
|
||||
{
|
||||
|
||||
static const double C_x = .42223820031577120149;
|
||||
static const double C_y = 1.32650042817700232218;
|
||||
static const double RC_y = .75386330736002178205;
|
||||
static const double C_p = 3.57079632679489661922;
|
||||
static const double RC_p = .28004957675577868795;
|
||||
static const double epsilon = 1e-7;
|
||||
static const int n_iter = 6;
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_eck4_spheroid
|
||||
: public base_t_fi<base_eck4_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
inline base_eck4_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_eck4_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
T p, V, s, c;
|
||||
int i;
|
||||
|
||||
p = C_p * sin(lp_lat);
|
||||
V = lp_lat * lp_lat;
|
||||
lp_lat *= 0.895168 + V * ( 0.0218849 + V * 0.00826809 );
|
||||
for (i = n_iter; i ; --i) {
|
||||
c = cos(lp_lat);
|
||||
s = sin(lp_lat);
|
||||
lp_lat -= V = (lp_lat + s * (c + 2.) - p) /
|
||||
(1. + c * (c + 2.) - s * s);
|
||||
if (fabs(V) < epsilon)
|
||||
break;
|
||||
}
|
||||
if (!i) {
|
||||
xy_x = C_x * lp_lon;
|
||||
xy_y = lp_lat < 0. ? -C_y : C_y;
|
||||
} else {
|
||||
xy_x = C_x * lp_lon * (1. + cos(lp_lat));
|
||||
xy_y = C_y * sin(lp_lat);
|
||||
}
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
T c;
|
||||
|
||||
lp_lat = aasin(xy_y * RC_y);
|
||||
lp_lon = xy_x / (C_x * (1. + (c = cos(lp_lat))));
|
||||
lp_lat = aasin((lp_lat + sin(lp_lat) * (c + 2.)) * RC_p);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "eck4_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Eckert IV
|
||||
template <typename Parameters>
|
||||
inline void setup_eck4(Parameters& par)
|
||||
{
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::eck4
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Eckert IV 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_eck4.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct eck4_spheroid : public detail::eck4::base_eck4_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline eck4_spheroid(Params const& , Parameters const& par)
|
||||
: detail::eck4::base_eck4_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::eck4::setup_eck4(this->m_par);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_eck4, eck4_spheroid, eck4_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(eck4_entry, eck4_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(eck4_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(eck4, eck4_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_ECK4_HPP
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_ECK5_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_ECK5_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
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace eck5
|
||||
{
|
||||
|
||||
static const double XF = 0.44101277172455148219;
|
||||
static const double RXF = 2.26750802723822639137;
|
||||
static const double YF = 0.88202554344910296438;
|
||||
static const double RYF = 1.13375401361911319568;
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_eck5_spheroid
|
||||
: public base_t_fi<base_eck5_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
inline base_eck5_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_eck5_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
xy_x = XF * (1. + cos(lp_lat)) * lp_lon;
|
||||
xy_y = YF * lp_lat;
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
lp_lon = RXF * xy_x / (1. + cos( lp_lat = RYF * xy_y));
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "eck5_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Eckert V
|
||||
template <typename Parameters>
|
||||
inline void setup_eck5(Parameters& par)
|
||||
{
|
||||
par.es = 0.0;
|
||||
}
|
||||
|
||||
}} // namespace detail::eck5
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Eckert V 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_eck5.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct eck5_spheroid : public detail::eck5::base_eck5_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline eck5_spheroid(Params const& , Parameters const& par)
|
||||
: detail::eck5::base_eck5_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::eck5::setup_eck5(this->m_par);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_eck5, eck5_spheroid, eck5_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(eck5_entry, eck5_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(eck5_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(eck5, eck5_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_ECK5_HPP
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_EQC_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_EQC_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/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace eqc
|
||||
{
|
||||
template <typename T>
|
||||
struct par_eqc
|
||||
{
|
||||
T rc;
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_eqc_spheroid
|
||||
: public base_t_fi<base_eqc_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_eqc<T> m_proj_parm;
|
||||
|
||||
inline base_eqc_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_eqc_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
xy_x = this->m_proj_parm.rc * lp_lon;
|
||||
xy_y = lp_lat - this->m_par.phi0;
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
lp_lon = xy_x / this->m_proj_parm.rc;
|
||||
lp_lat = xy_y + this->m_par.phi0;
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "eqc_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Equidistant Cylindrical (Plate Caree)
|
||||
template <typename Params, typename Parameters, typename T>
|
||||
inline void setup_eqc(Params const& params, Parameters& par, par_eqc<T>& proj_parm)
|
||||
{
|
||||
proj_parm.rc = cos(pj_get_param_r<T, srs::spar::lat_ts>(params, "lat_ts", srs::dpar::lat_ts));
|
||||
if (proj_parm.rc <= 0.)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_lat_ts_larger_than_90) );
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::eqc
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Equidistant Cylindrical (Plate Caree) projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Cylindrical
|
||||
- Spheroid
|
||||
\par Projection parameters
|
||||
- lat_ts: Latitude of true scale (degrees)
|
||||
- lat_0: Latitude of origin
|
||||
\par Example
|
||||
\image html ex_eqc.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct eqc_spheroid : public detail::eqc::base_eqc_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline eqc_spheroid(Params const& params, Parameters const& par)
|
||||
: detail::eqc::base_eqc_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::eqc::setup_eqc(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_eqc, eqc_spheroid, eqc_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(eqc_entry, eqc_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(eqc_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(eqc, eqc_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_EQC_HPP
|
||||
|
||||
@@ -0,0 +1,225 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_EQDC_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_EQDC_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/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_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
#include <boost/math/special_functions/hypot.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace eqdc
|
||||
{
|
||||
|
||||
static const double epsilon10 = 1.e-10;
|
||||
|
||||
template <typename T>
|
||||
struct par_eqdc
|
||||
{
|
||||
T phi1;
|
||||
T phi2;
|
||||
T n;
|
||||
T rho0;
|
||||
T c;
|
||||
detail::en<T> en;
|
||||
bool ellips;
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_eqdc_ellipsoid
|
||||
: public base_t_fi<base_eqdc_ellipsoid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_eqdc<T> m_proj_parm;
|
||||
|
||||
inline base_eqdc_ellipsoid(const Parameters& par)
|
||||
: base_t_fi<base_eqdc_ellipsoid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(e_forward) sphere & ellipsoid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
T rho = 0.0;
|
||||
|
||||
rho = this->m_proj_parm.c - (this->m_proj_parm.ellips ? pj_mlfn(lp_lat, sin(lp_lat),
|
||||
cos(lp_lat), this->m_proj_parm.en) : lp_lat);
|
||||
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) sphere & ellipsoid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T xy_x, T xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
static T const half_pi = detail::half_pi<T>();
|
||||
|
||||
T 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 = this->m_proj_parm.c - rho;
|
||||
if (this->m_proj_parm.ellips)
|
||||
lp_lat = pj_inv_mlfn(lp_lat, this->m_par.es, this->m_proj_parm.en);
|
||||
lp_lon = atan2(xy_x, xy_y) / this->m_proj_parm.n;
|
||||
} else {
|
||||
lp_lon = 0.;
|
||||
lp_lat = this->m_proj_parm.n > 0. ? half_pi : -half_pi;
|
||||
}
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "eqdc_ellipsoid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Equidistant Conic
|
||||
template <typename Params, typename Parameters, typename T>
|
||||
inline void setup_eqdc(Params const& params, Parameters& par, par_eqdc<T>& proj_parm)
|
||||
{
|
||||
T cosphi, sinphi;
|
||||
int secant;
|
||||
|
||||
proj_parm.phi1 = pj_get_param_r<T, srs::spar::lat_1>(params, "lat_1", srs::dpar::lat_1);
|
||||
proj_parm.phi2 = pj_get_param_r<T, srs::spar::lat_2>(params, "lat_2", srs::dpar::lat_2);
|
||||
|
||||
if (fabs(proj_parm.phi1 + proj_parm.phi2) < epsilon10)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_conic_lat_equal) );
|
||||
|
||||
proj_parm.en = pj_enfn<T>(par.es);
|
||||
|
||||
proj_parm.n = sinphi = sin(proj_parm.phi1);
|
||||
cosphi = cos(proj_parm.phi1);
|
||||
secant = fabs(proj_parm.phi1 - proj_parm.phi2) >= epsilon10;
|
||||
if( (proj_parm.ellips = (par.es > 0.)) ) {
|
||||
double ml1, m1;
|
||||
|
||||
m1 = pj_msfn(sinphi, cosphi, par.es);
|
||||
ml1 = pj_mlfn(proj_parm.phi1, sinphi, cosphi, proj_parm.en);
|
||||
if (secant) { /* secant cone */
|
||||
sinphi = sin(proj_parm.phi2);
|
||||
cosphi = cos(proj_parm.phi2);
|
||||
proj_parm.n = (m1 - pj_msfn(sinphi, cosphi, par.es)) /
|
||||
(pj_mlfn(proj_parm.phi2, sinphi, cosphi, proj_parm.en) - ml1);
|
||||
}
|
||||
proj_parm.c = ml1 + m1 / proj_parm.n;
|
||||
proj_parm.rho0 = proj_parm.c - pj_mlfn(par.phi0, sin(par.phi0),
|
||||
cos(par.phi0), proj_parm.en);
|
||||
} else {
|
||||
if (secant)
|
||||
proj_parm.n = (cosphi - cos(proj_parm.phi2)) / (proj_parm.phi2 - proj_parm.phi1);
|
||||
proj_parm.c = proj_parm.phi1 + cos(proj_parm.phi1) / proj_parm.n;
|
||||
proj_parm.rho0 = proj_parm.c - par.phi0;
|
||||
}
|
||||
}
|
||||
|
||||
}} // namespace detail::eqdc
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Equidistant 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)
|
||||
- lat_2: Latitude of second standard parallel (degrees)
|
||||
\par Example
|
||||
\image html ex_eqdc.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct eqdc_ellipsoid : public detail::eqdc::base_eqdc_ellipsoid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline eqdc_ellipsoid(Params const& params, Parameters const& par)
|
||||
: detail::eqdc::base_eqdc_ellipsoid<T, Parameters>(par)
|
||||
{
|
||||
detail::eqdc::setup_eqdc(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_eqdc, eqdc_ellipsoid, eqdc_ellipsoid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(eqdc_entry, eqdc_ellipsoid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(eqdc_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(eqdc, eqdc_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_EQDC_HPP
|
||||
|
||||
@@ -0,0 +1,453 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
// Copyright (c) 2008 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.
|
||||
|
||||
/* The code in this file is largly based upon procedures:
|
||||
*
|
||||
* Written by: Knud Poder and Karsten Engsager
|
||||
*
|
||||
* Based on math from: R.Koenig and K.H. Weise, "Mathematische
|
||||
* Grundlagen der hoeheren Geodaesie und Kartographie,
|
||||
* Springer-Verlag, Berlin/Goettingen" Heidelberg, 1951.
|
||||
*
|
||||
* Modified and used here by permission of Reference Networks
|
||||
* Division, Kort og Matrikelstyrelsen (KMS), Copenhagen, Denmark
|
||||
*/
|
||||
|
||||
#ifndef BOOST_GEOMETRY_PROJECTIONS_ETMERC_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_ETMERC_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/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/function_overloads.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
#include <boost/math/special_functions/hypot.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace etmerc
|
||||
{
|
||||
|
||||
static const int PROJ_ETMERC_ORDER = 6;
|
||||
|
||||
template <typename T>
|
||||
struct par_etmerc
|
||||
{
|
||||
T Qn; /* Merid. quad., scaled to the projection */
|
||||
T Zb; /* Radius vector in polar coord. systems */
|
||||
T cgb[6]; /* Constants for Gauss -> Geo lat */
|
||||
T cbg[6]; /* Constants for Geo lat -> Gauss */
|
||||
T utg[6]; /* Constants for transv. merc. -> geo */
|
||||
T gtu[6]; /* Constants for geo -> transv. merc. */
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
inline T log1py(T const& x) { /* Compute log(1+x) accurately */
|
||||
volatile T
|
||||
y = 1 + x,
|
||||
z = y - 1;
|
||||
/* Here's the explanation for this magic: y = 1 + z, exactly, and z
|
||||
* approx x, thus log(y)/z (which is nearly constant near z = 0) returns
|
||||
* a good approximation to the true log(1 + x)/x. The multiplication x *
|
||||
* (log(y)/z) introduces little additional error. */
|
||||
return z == 0 ? x : x * log(y) / z;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T asinhy(T const& x) { /* Compute asinh(x) accurately */
|
||||
T y = fabs(x); /* Enforce odd parity */
|
||||
y = log1py(y * (1 + y/(boost::math::hypot(1.0, y) + 1)));
|
||||
return x < 0 ? -y : y;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T gatg(const T *p1, int len_p1, T const& B) {
|
||||
const T *p;
|
||||
T h = 0, h1, h2 = 0, cos_2B;
|
||||
|
||||
cos_2B = 2*cos(2*B);
|
||||
for (p = p1 + len_p1, h1 = *--p; p - p1; h2 = h1, h1 = h)
|
||||
h = -h2 + cos_2B*h1 + *--p;
|
||||
return (B + h*sin(2*B));
|
||||
}
|
||||
|
||||
/* Complex Clenshaw summation */
|
||||
template <typename T>
|
||||
inline T clenS(const T *a, int size, T const& arg_r, T const& arg_i, T *R, T *I) {
|
||||
T r, i, hr, hr1, hr2, hi, hi1, hi2;
|
||||
T sin_arg_r, cos_arg_r, sinh_arg_i, cosh_arg_i;
|
||||
|
||||
/* arguments */
|
||||
const T* p = a + size;
|
||||
sin_arg_r = sin(arg_r);
|
||||
cos_arg_r = cos(arg_r);
|
||||
sinh_arg_i = sinh(arg_i);
|
||||
cosh_arg_i = cosh(arg_i);
|
||||
r = 2*cos_arg_r*cosh_arg_i;
|
||||
i = -2*sin_arg_r*sinh_arg_i;
|
||||
/* summation loop */
|
||||
for (hi1 = hr1 = hi = 0, hr = *--p; a - p;) {
|
||||
hr2 = hr1;
|
||||
hi2 = hi1;
|
||||
hr1 = hr;
|
||||
hi1 = hi;
|
||||
hr = -hr2 + r*hr1 - i*hi1 + *--p;
|
||||
hi = -hi2 + i*hr1 + r*hi1;
|
||||
}
|
||||
r = sin_arg_r*cosh_arg_i;
|
||||
i = cos_arg_r*sinh_arg_i;
|
||||
*R = r*hr - i*hi;
|
||||
*I = r*hi + i*hr;
|
||||
return(*R);
|
||||
}
|
||||
|
||||
/* Real Clenshaw summation */
|
||||
template <typename T>
|
||||
inline T clens(const T *a, int size, T const& arg_r) {
|
||||
T r, hr, hr1, hr2, cos_arg_r;
|
||||
|
||||
const T* p = a + size;
|
||||
cos_arg_r = cos(arg_r);
|
||||
r = 2*cos_arg_r;
|
||||
|
||||
/* summation loop */
|
||||
for (hr1 = 0, hr = *--p; a - p;) {
|
||||
hr2 = hr1;
|
||||
hr1 = hr;
|
||||
hr = -hr2 + r*hr1 + *--p;
|
||||
}
|
||||
return(sin(arg_r)*hr);
|
||||
}
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_etmerc_ellipsoid
|
||||
: public base_t_fi<base_etmerc_ellipsoid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_etmerc<T> m_proj_parm;
|
||||
|
||||
inline base_etmerc_ellipsoid(const Parameters& par)
|
||||
: base_t_fi<base_etmerc_ellipsoid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(e_forward) ellipsoid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
T sin_Cn, cos_Cn, cos_Ce, sin_Ce, dCn, dCe;
|
||||
T Cn = lp_lat, Ce = lp_lon;
|
||||
|
||||
/* ell. LAT, LNG -> Gaussian LAT, LNG */
|
||||
Cn = gatg(this->m_proj_parm.cbg, PROJ_ETMERC_ORDER, Cn);
|
||||
/* Gaussian LAT, LNG -> compl. sph. LAT */
|
||||
sin_Cn = sin(Cn);
|
||||
cos_Cn = cos(Cn);
|
||||
sin_Ce = sin(Ce);
|
||||
cos_Ce = cos(Ce);
|
||||
|
||||
Cn = atan2(sin_Cn, cos_Ce*cos_Cn);
|
||||
Ce = atan2(sin_Ce*cos_Cn, boost::math::hypot(sin_Cn, cos_Cn*cos_Ce));
|
||||
|
||||
/* compl. sph. N, E -> ell. norm. N, E */
|
||||
Ce = asinhy(tan(Ce)); /* Replaces: Ce = log(tan(fourth_pi + Ce*0.5)); */
|
||||
Cn += clenS(this->m_proj_parm.gtu, PROJ_ETMERC_ORDER, 2*Cn, 2*Ce, &dCn, &dCe);
|
||||
Ce += dCe;
|
||||
if (fabs(Ce) <= 2.623395162778) {
|
||||
xy_y = this->m_proj_parm.Qn * Cn + this->m_proj_parm.Zb; /* Northing */
|
||||
xy_x = this->m_proj_parm.Qn * Ce; /* Easting */
|
||||
} else
|
||||
xy_x = xy_y = HUGE_VAL;
|
||||
}
|
||||
|
||||
// INVERSE(e_inverse) ellipsoid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
T sin_Cn, cos_Cn, cos_Ce, sin_Ce, dCn, dCe;
|
||||
T Cn = xy_y, Ce = xy_x;
|
||||
|
||||
/* normalize N, E */
|
||||
Cn = (Cn - this->m_proj_parm.Zb)/this->m_proj_parm.Qn;
|
||||
Ce = Ce/this->m_proj_parm.Qn;
|
||||
|
||||
if (fabs(Ce) <= 2.623395162778) { /* 150 degrees */
|
||||
/* norm. N, E -> compl. sph. LAT, LNG */
|
||||
Cn += clenS(this->m_proj_parm.utg, PROJ_ETMERC_ORDER, 2*Cn, 2*Ce, &dCn, &dCe);
|
||||
Ce += dCe;
|
||||
Ce = atan(sinh(Ce)); /* Replaces: Ce = 2*(atan(exp(Ce)) - fourth_pi); */
|
||||
/* compl. sph. LAT -> Gaussian LAT, LNG */
|
||||
sin_Cn = sin(Cn);
|
||||
cos_Cn = cos(Cn);
|
||||
sin_Ce = sin(Ce);
|
||||
cos_Ce = cos(Ce);
|
||||
Ce = atan2(sin_Ce, cos_Ce*cos_Cn);
|
||||
Cn = atan2(sin_Cn*cos_Ce, boost::math::hypot(sin_Ce, cos_Ce*cos_Cn));
|
||||
/* Gaussian LAT, LNG -> ell. LAT, LNG */
|
||||
lp_lat = gatg(this->m_proj_parm.cgb, PROJ_ETMERC_ORDER, Cn);
|
||||
lp_lon = Ce;
|
||||
}
|
||||
else
|
||||
lp_lat = lp_lon = HUGE_VAL;
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "etmerc_ellipsoid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup(Parameters& par, par_etmerc<T>& proj_parm)
|
||||
{
|
||||
T f, n, np, Z;
|
||||
|
||||
if (par.es <= 0) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_ellipsoid_use_required) );
|
||||
}
|
||||
|
||||
f = par.es / (1 + sqrt(1 - par.es)); /* Replaces: f = 1 - sqrt(1-par.es); */
|
||||
|
||||
/* third flattening */
|
||||
np = n = f/(2 - f);
|
||||
|
||||
/* COEF. OF TRIG SERIES GEO <-> GAUSS */
|
||||
/* cgb := Gaussian -> Geodetic, KW p190 - 191 (61) - (62) */
|
||||
/* cbg := Geodetic -> Gaussian, KW p186 - 187 (51) - (52) */
|
||||
/* PROJ_ETMERC_ORDER = 6th degree : Engsager and Poder: ICC2007 */
|
||||
|
||||
proj_parm.cgb[0] = n*( 2 + n*(-2/3.0 + n*(-2 + n*(116/45.0 + n*(26/45.0 +
|
||||
n*(-2854/675.0 ))))));
|
||||
proj_parm.cbg[0] = n*(-2 + n*( 2/3.0 + n*( 4/3.0 + n*(-82/45.0 + n*(32/45.0 +
|
||||
n*( 4642/4725.0))))));
|
||||
np *= n;
|
||||
proj_parm.cgb[1] = np*(7/3.0 + n*( -8/5.0 + n*(-227/45.0 + n*(2704/315.0 +
|
||||
n*( 2323/945.0)))));
|
||||
proj_parm.cbg[1] = np*(5/3.0 + n*(-16/15.0 + n*( -13/9.0 + n*( 904/315.0 +
|
||||
n*(-1522/945.0)))));
|
||||
np *= n;
|
||||
/* n^5 coeff corrected from 1262/105 -> -1262/105 */
|
||||
proj_parm.cgb[2] = np*( 56/15.0 + n*(-136/35.0 + n*(-1262/105.0 +
|
||||
n*( 73814/2835.0))));
|
||||
proj_parm.cbg[2] = np*(-26/15.0 + n*( 34/21.0 + n*( 8/5.0 +
|
||||
n*(-12686/2835.0))));
|
||||
np *= n;
|
||||
/* n^5 coeff corrected from 322/35 -> 332/35 */
|
||||
proj_parm.cgb[3] = np*(4279/630.0 + n*(-332/35.0 + n*(-399572/14175.0)));
|
||||
proj_parm.cbg[3] = np*(1237/630.0 + n*( -12/5.0 + n*( -24832/14175.0)));
|
||||
np *= n;
|
||||
proj_parm.cgb[4] = np*(4174/315.0 + n*(-144838/6237.0 ));
|
||||
proj_parm.cbg[4] = np*(-734/315.0 + n*( 109598/31185.0));
|
||||
np *= n;
|
||||
proj_parm.cgb[5] = np*(601676/22275.0 );
|
||||
proj_parm.cbg[5] = np*(444337/155925.0);
|
||||
|
||||
/* Constants of the projections */
|
||||
/* Transverse Mercator (UTM, ITM, etc) */
|
||||
np = n*n;
|
||||
/* Norm. mer. quad, K&W p.50 (96), p.19 (38b), p.5 (2) */
|
||||
proj_parm.Qn = par.k0/(1 + n) * (1 + np*(1/4.0 + np*(1/64.0 + np/256.0)));
|
||||
/* coef of trig series */
|
||||
/* utg := ell. N, E -> sph. N, E, KW p194 (65) */
|
||||
/* gtu := sph. N, E -> ell. N, E, KW p196 (69) */
|
||||
proj_parm.utg[0] = n*(-0.5 + n*( 2/3.0 + n*(-37/96.0 + n*( 1/360.0 +
|
||||
n*( 81/512.0 + n*(-96199/604800.0))))));
|
||||
proj_parm.gtu[0] = n*( 0.5 + n*(-2/3.0 + n*( 5/16.0 + n*(41/180.0 +
|
||||
n*(-127/288.0 + n*( 7891/37800.0 ))))));
|
||||
proj_parm.utg[1] = np*(-1/48.0 + n*(-1/15.0 + n*(437/1440.0 + n*(-46/105.0 +
|
||||
n*( 1118711/3870720.0)))));
|
||||
proj_parm.gtu[1] = np*(13/48.0 + n*(-3/5.0 + n*(557/1440.0 + n*(281/630.0 +
|
||||
n*(-1983433/1935360.0)))));
|
||||
np *= n;
|
||||
proj_parm.utg[2] = np*(-17/480.0 + n*( 37/840.0 + n*( 209/4480.0 +
|
||||
n*( -5569/90720.0 ))));
|
||||
proj_parm.gtu[2] = np*( 61/240.0 + n*(-103/140.0 + n*(15061/26880.0 +
|
||||
n*(167603/181440.0))));
|
||||
np *= n;
|
||||
proj_parm.utg[3] = np*(-4397/161280.0 + n*( 11/504.0 + n*( 830251/7257600.0)));
|
||||
proj_parm.gtu[3] = np*(49561/161280.0 + n*(-179/168.0 + n*(6601661/7257600.0)));
|
||||
np *= n;
|
||||
proj_parm.utg[4] = np*(-4583/161280.0 + n*( 108847/3991680.0));
|
||||
proj_parm.gtu[4] = np*(34729/80640.0 + n*(-3418889/1995840.0));
|
||||
np *= n;
|
||||
proj_parm.utg[5] = np*(-20648693/638668800.0);
|
||||
proj_parm.gtu[5] = np*(212378941/319334400.0);
|
||||
|
||||
/* Gaussian latitude value of the origin latitude */
|
||||
Z = gatg(proj_parm.cbg, PROJ_ETMERC_ORDER, par.phi0);
|
||||
|
||||
/* Origin northing minus true northing at the origin latitude */
|
||||
/* i.e. true northing = N - proj_parm.Zb */
|
||||
proj_parm.Zb = - proj_parm.Qn*(Z + clens(proj_parm.gtu, PROJ_ETMERC_ORDER, 2*Z));
|
||||
}
|
||||
|
||||
// Extended Transverse Mercator
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup_etmerc(Parameters& par, par_etmerc<T>& proj_parm)
|
||||
{
|
||||
setup(par, proj_parm);
|
||||
}
|
||||
|
||||
// Universal Transverse Mercator (UTM)
|
||||
template <typename Params, typename Parameters, typename T>
|
||||
inline void setup_utm(Params const& params, Parameters& par, par_etmerc<T>& proj_parm)
|
||||
{
|
||||
static const T pi = detail::pi<T>();
|
||||
|
||||
int zone;
|
||||
|
||||
if (par.es == 0.0) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_ellipsoid_use_required) );
|
||||
}
|
||||
|
||||
par.y0 = pj_get_param_b<srs::spar::south>(params, "south", srs::dpar::south) ? 10000000. : 0.;
|
||||
par.x0 = 500000.;
|
||||
if (pj_param_i<srs::spar::zone>(params, "zone", srs::dpar::zone, zone)) /* zone input ? */
|
||||
{
|
||||
if (zone > 0 && zone <= 60)
|
||||
--zone;
|
||||
else {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_invalid_utm_zone) );
|
||||
}
|
||||
}
|
||||
else /* nearest central meridian input */
|
||||
{
|
||||
zone = int_floor((adjlon(par.lam0) + pi) * 30. / pi);
|
||||
if (zone < 0)
|
||||
zone = 0;
|
||||
else if (zone >= 60)
|
||||
zone = 59;
|
||||
}
|
||||
par.lam0 = (zone + .5) * pi / 30. - pi;
|
||||
par.k0 = 0.9996;
|
||||
par.phi0 = 0.;
|
||||
|
||||
setup(par, proj_parm);
|
||||
}
|
||||
|
||||
}} // namespace detail::etmerc
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Extended Transverse Mercator projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Cylindrical
|
||||
- Spheroid
|
||||
\par Projection parameters
|
||||
- lat_ts: Latitude of true scale
|
||||
- lat_0: Latitude of origin
|
||||
\par Example
|
||||
\image html ex_etmerc.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct etmerc_ellipsoid : public detail::etmerc::base_etmerc_ellipsoid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline etmerc_ellipsoid(Params const& , Parameters const& par)
|
||||
: detail::etmerc::base_etmerc_ellipsoid<T, Parameters>(par)
|
||||
{
|
||||
detail::etmerc::setup_etmerc(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Universal Transverse Mercator (UTM) projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Cylindrical
|
||||
- Spheroid
|
||||
\par Projection parameters
|
||||
- zone: UTM Zone (integer)
|
||||
- south: Denotes southern hemisphere UTM zone (boolean)
|
||||
\par Example
|
||||
\image html ex_utm.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct utm_ellipsoid : public detail::etmerc::base_etmerc_ellipsoid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline utm_ellipsoid(Params const& params, Parameters const& par)
|
||||
: detail::etmerc::base_etmerc_ellipsoid<T, Parameters>(par)
|
||||
{
|
||||
detail::etmerc::setup_utm(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_etmerc, etmerc_ellipsoid, etmerc_ellipsoid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_utm, utm_ellipsoid, utm_ellipsoid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(etmerc_entry, etmerc_ellipsoid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(utm_entry, utm_ellipsoid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(etmerc_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(etmerc, etmerc_entry);
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(utm, utm_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_ETMERC_HPP
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_FAHEY_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_FAHEY_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
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace fahey
|
||||
{
|
||||
|
||||
static const double tolerance = 1e-6;
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_fahey_spheroid
|
||||
: public base_t_fi<base_fahey_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
inline base_fahey_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_fahey_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
xy_x = tan(0.5 * lp_lat);
|
||||
xy_y = 1.819152 * xy_x;
|
||||
xy_x = 0.819152 * lp_lon * asqrt(1 - xy_x * xy_x);
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
xy_y /= 1.819152;
|
||||
lp_lat = 2. * atan(xy_y);
|
||||
xy_y = 1. - xy_y * xy_y;
|
||||
lp_lon = fabs(xy_y) < tolerance ? 0. : xy_x / (0.819152 * sqrt(xy_y));
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "fahey_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Fahey
|
||||
template <typename Parameters>
|
||||
inline void setup_fahey(Parameters& par)
|
||||
{
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::fahey
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Fahey 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_fahey.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct fahey_spheroid : public detail::fahey::base_fahey_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline fahey_spheroid(Params const& , Parameters const& par)
|
||||
: detail::fahey::base_fahey_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::fahey::setup_fahey(this->m_par);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_fahey, fahey_spheroid, fahey_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(fahey_entry, fahey_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(fahey_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(fahey, fahey_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_FAHEY_HPP
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_FOUC_S_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_FOUC_S_HPP
|
||||
|
||||
#include <boost/geometry/srs/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/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace fouc_s
|
||||
{
|
||||
|
||||
static const int max_iter = 10;
|
||||
static const double loop_tol = 1e-7;
|
||||
|
||||
template <typename T>
|
||||
struct par_fouc_s
|
||||
{
|
||||
T n, n1;
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_fouc_s_spheroid
|
||||
: public base_t_fi<base_fouc_s_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_fouc_s<T> m_proj_parm;
|
||||
|
||||
inline base_fouc_s_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_fouc_s_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
T t;
|
||||
|
||||
t = cos(lp_lat);
|
||||
xy_x = lp_lon * t / (this->m_proj_parm.n + this->m_proj_parm.n1 * t);
|
||||
xy_y = this->m_proj_parm.n * lp_lat + this->m_proj_parm.n1 * sin(lp_lat);
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
static T const half_pi = detail::half_pi<T>();
|
||||
|
||||
T V;
|
||||
int i;
|
||||
|
||||
if (this->m_proj_parm.n != 0.0) {
|
||||
lp_lat = xy_y;
|
||||
for (i = max_iter; i ; --i) {
|
||||
lp_lat -= V = (this->m_proj_parm.n * lp_lat + this->m_proj_parm.n1 * sin(lp_lat) - xy_y ) /
|
||||
(this->m_proj_parm.n + this->m_proj_parm.n1 * cos(lp_lat));
|
||||
if (fabs(V) < loop_tol)
|
||||
break;
|
||||
}
|
||||
if (!i)
|
||||
lp_lat = xy_y < 0. ? -half_pi : half_pi;
|
||||
} else
|
||||
lp_lat = aasin(xy_y);
|
||||
V = cos(lp_lat);
|
||||
lp_lon = xy_x * (this->m_proj_parm.n + this->m_proj_parm.n1 * V) / V;
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "fouc_s_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Foucaut Sinusoidal
|
||||
template <typename Params, typename Parameters, typename T>
|
||||
inline void setup_fouc_s(Params const& params, Parameters& par, par_fouc_s<T>& proj_parm)
|
||||
{
|
||||
proj_parm.n = pj_get_param_f<T, srs::spar::n>(params, "n", srs::dpar::n);
|
||||
if ((proj_parm.n < 0.) || (proj_parm.n > 1.))
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_n_out_of_range) );
|
||||
|
||||
proj_parm.n1 = 1. - proj_parm.n;
|
||||
par.es = 0;
|
||||
}
|
||||
|
||||
}} // namespace detail::fouc_s
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Foucaut Sinusoidal projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Pseudocylindrical
|
||||
- Spheroid
|
||||
\par Projection parameters
|
||||
- n (real)
|
||||
\par Example
|
||||
\image html ex_fouc_s.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct fouc_s_spheroid : public detail::fouc_s::base_fouc_s_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline fouc_s_spheroid(Params const& params, Parameters const& par)
|
||||
: detail::fouc_s::base_fouc_s_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::fouc_s::setup_fouc_s(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_fouc_s, fouc_s_spheroid, fouc_s_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(fouc_s_entry, fouc_s_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(fouc_s_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(fouc_s, fouc_s_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_FOUC_S_HPP
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_GALL_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_GALL_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
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace gall
|
||||
{
|
||||
|
||||
static const double YF = 1.70710678118654752440;
|
||||
static const double XF = 0.70710678118654752440;
|
||||
static const double RYF = 0.58578643762690495119;
|
||||
static const double RXF = 1.41421356237309504880;
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_gall_spheroid
|
||||
: public base_t_fi<base_gall_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
inline base_gall_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_gall_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
xy_x = XF * lp_lon;
|
||||
xy_y = YF * tan(.5 * lp_lat);
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
lp_lon = RXF * xy_x;
|
||||
lp_lat = 2. * atan(xy_y * RYF);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "gall_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Gall (Gall Stereographic)
|
||||
template <typename Parameters>
|
||||
inline void setup_gall(Parameters& par)
|
||||
{
|
||||
par.es = 0.0;
|
||||
}
|
||||
|
||||
}} // namespace detail::gall
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Gall (Gall Stereographic) projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Cylindrical
|
||||
- Spheroid
|
||||
\par Example
|
||||
\image html ex_gall.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct gall_spheroid : public detail::gall::base_gall_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline gall_spheroid(Params const& , Parameters const& par)
|
||||
: detail::gall::base_gall_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::gall::setup_gall(this->m_par);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_gall, gall_spheroid, gall_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(gall_entry, gall_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(gall_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(gall, gall_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_GALL_HPP
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
// Purpose: Stub projection for geocentric. The transformation isn't
|
||||
// really done here since this code is 2D. The real transformation
|
||||
// is handled by pj_transform.c.
|
||||
// Author: Frank Warmerdam, warmerdam@pobox.com
|
||||
// Copyright (c) 2002, Frank Warmerdam
|
||||
|
||||
// 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_GEOCENT_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_GEOCENT_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
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace geocent
|
||||
{
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_geocent_other
|
||||
: public base_t_fi<base_geocent_other<T, Parameters>, T, Parameters>
|
||||
{
|
||||
inline base_geocent_other(const Parameters& par)
|
||||
: base_t_fi<base_geocent_other<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(forward)
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
xy_x = lp_lon;
|
||||
xy_y = lp_lat;
|
||||
}
|
||||
|
||||
// INVERSE(inverse)
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
lp_lat = xy_y;
|
||||
lp_lon = xy_x;
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "geocent_other";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Geocentric
|
||||
template <typename Parameters>
|
||||
inline void setup_geocent(Parameters& par)
|
||||
{
|
||||
par.is_geocent = 1;
|
||||
par.x0 = 0.0;
|
||||
par.y0 = 0.0;
|
||||
}
|
||||
|
||||
}} // namespace detail::geocent
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Geocentric projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Example
|
||||
\image html ex_geocent.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct geocent_other : public detail::geocent::base_geocent_other<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline geocent_other(Params const& , Parameters const& par)
|
||||
: detail::geocent::base_geocent_other<T, Parameters>(par)
|
||||
{
|
||||
detail::geocent::setup_geocent(this->m_par);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_geocent, geocent_other, geocent_other)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(geocent_entry, geocent_other)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(geocent_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(geocent, geocent_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_GEOCENT_HPP
|
||||
|
||||
@@ -0,0 +1,384 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
// Copyright (c) 2004 Gerald I. Evenden
|
||||
// Copyright (c) 2012 Martin Raspaud
|
||||
|
||||
// See also (section 4.4.3.2):
|
||||
// http://www.eumetsat.int/en/area4/msg/news/us_doc/cgms_03_26.pdf
|
||||
|
||||
// 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_GEOS_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_GEOS_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_param.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace geos
|
||||
{
|
||||
template <typename T>
|
||||
struct par_geos
|
||||
{
|
||||
T h;
|
||||
T radius_p;
|
||||
T radius_p2;
|
||||
T radius_p_inv2;
|
||||
T radius_g;
|
||||
T radius_g_1;
|
||||
T C;
|
||||
bool flip_axis;
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_geos_ellipsoid
|
||||
: public base_t_fi<base_geos_ellipsoid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_geos<T> m_proj_parm;
|
||||
|
||||
inline base_geos_ellipsoid(const Parameters& par)
|
||||
: base_t_fi<base_geos_ellipsoid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(e_forward) ellipsoid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
T r, Vx, Vy, Vz, tmp;
|
||||
|
||||
/* Calculation of geocentric latitude. */
|
||||
lp_lat = atan (this->m_proj_parm.radius_p2 * tan (lp_lat));
|
||||
|
||||
/* Calculation of the three components of the vector from satellite to
|
||||
** position on earth surface (lon,lat).*/
|
||||
r = (this->m_proj_parm.radius_p) / boost::math::hypot(this->m_proj_parm.radius_p * cos (lp_lat), sin (lp_lat));
|
||||
Vx = r * cos (lp_lon) * cos (lp_lat);
|
||||
Vy = r * sin (lp_lon) * cos (lp_lat);
|
||||
Vz = r * sin (lp_lat);
|
||||
|
||||
/* Check visibility. */
|
||||
if (((this->m_proj_parm.radius_g - Vx) * Vx - Vy * Vy - Vz * Vz * this->m_proj_parm.radius_p_inv2) < 0.) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
}
|
||||
|
||||
/* Calculation based on view angles from satellite. */
|
||||
tmp = this->m_proj_parm.radius_g - Vx;
|
||||
|
||||
if(this->m_proj_parm.flip_axis) {
|
||||
xy_x = this->m_proj_parm.radius_g_1 * atan (Vy / boost::math::hypot (Vz, tmp));
|
||||
xy_y = this->m_proj_parm.radius_g_1 * atan (Vz / tmp);
|
||||
} else {
|
||||
xy_x = this->m_proj_parm.radius_g_1 * atan (Vy / tmp);
|
||||
xy_y = this->m_proj_parm.radius_g_1 * atan (Vz / boost::math::hypot (Vy, tmp));
|
||||
}
|
||||
}
|
||||
|
||||
// INVERSE(e_inverse) ellipsoid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
T Vx, Vy, Vz, a, b, det, k;
|
||||
|
||||
/* Setting three components of vector from satellite to position.*/
|
||||
Vx = -1.0;
|
||||
|
||||
if(this->m_proj_parm.flip_axis) {
|
||||
Vz = tan (xy_y / this->m_proj_parm.radius_g_1);
|
||||
Vy = tan (xy_x / this->m_proj_parm.radius_g_1) * boost::math::hypot(1.0, Vz);
|
||||
} else {
|
||||
Vy = tan (xy_x / this->m_proj_parm.radius_g_1);
|
||||
Vz = tan (xy_y / this->m_proj_parm.radius_g_1) * boost::math::hypot(1.0, Vy);
|
||||
}
|
||||
|
||||
/* Calculation of terms in cubic equation and determinant.*/
|
||||
a = Vz / this->m_proj_parm.radius_p;
|
||||
a = Vy * Vy + a * a + Vx * Vx;
|
||||
b = 2 * this->m_proj_parm.radius_g * Vx;
|
||||
if ((det = (b * b) - 4 * a * this->m_proj_parm.C) < 0.) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
}
|
||||
|
||||
/* Calculation of three components of vector from satellite to position.*/
|
||||
k = (-b - sqrt(det)) / (2. * a);
|
||||
Vx = this->m_proj_parm.radius_g + k * Vx;
|
||||
Vy *= k;
|
||||
Vz *= k;
|
||||
|
||||
/* Calculation of longitude and latitude.*/
|
||||
lp_lon = atan2 (Vy, Vx);
|
||||
lp_lat = atan (Vz * cos (lp_lon) / Vx);
|
||||
lp_lat = atan (this->m_proj_parm.radius_p_inv2 * tan (lp_lat));
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "geos_ellipsoid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_geos_spheroid
|
||||
: public base_t_fi<base_geos_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_geos<T> m_proj_parm;
|
||||
|
||||
inline base_geos_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_geos_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
T Vx, Vy, Vz, tmp;
|
||||
|
||||
/* Calculation of the three components of the vector from satellite to
|
||||
** position on earth surface (lon,lat).*/
|
||||
tmp = cos(lp_lat);
|
||||
Vx = cos (lp_lon) * tmp;
|
||||
Vy = sin (lp_lon) * tmp;
|
||||
Vz = sin (lp_lat);
|
||||
|
||||
/* Check visibility.*/
|
||||
// TODO: in proj4 5.0.0 this check is not present
|
||||
if (((this->m_proj_parm.radius_g - Vx) * Vx - Vy * Vy - Vz * Vz) < 0.)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
|
||||
/* Calculation based on view angles from satellite.*/
|
||||
tmp = this->m_proj_parm.radius_g - Vx;
|
||||
|
||||
if(this->m_proj_parm.flip_axis) {
|
||||
xy_x = this->m_proj_parm.radius_g_1 * atan(Vy / boost::math::hypot(Vz, tmp));
|
||||
xy_y = this->m_proj_parm.radius_g_1 * atan(Vz / tmp);
|
||||
} else {
|
||||
xy_x = this->m_proj_parm.radius_g_1 * atan(Vy / tmp);
|
||||
xy_y = this->m_proj_parm.radius_g_1 * atan(Vz / boost::math::hypot(Vy, tmp));
|
||||
}
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
T Vx, Vy, Vz, a, b, det, k;
|
||||
|
||||
/* Setting three components of vector from satellite to position.*/
|
||||
Vx = -1.0;
|
||||
if(this->m_proj_parm.flip_axis) {
|
||||
Vz = tan (xy_y / (this->m_proj_parm.radius_g - 1.0));
|
||||
Vy = tan (xy_x / (this->m_proj_parm.radius_g - 1.0)) * sqrt (1.0 + Vz * Vz);
|
||||
} else {
|
||||
Vy = tan (xy_x / (this->m_proj_parm.radius_g - 1.0));
|
||||
Vz = tan (xy_y / (this->m_proj_parm.radius_g - 1.0)) * sqrt (1.0 + Vy * Vy);
|
||||
}
|
||||
|
||||
/* Calculation of terms in cubic equation and determinant.*/
|
||||
a = Vy * Vy + Vz * Vz + Vx * Vx;
|
||||
b = 2 * this->m_proj_parm.radius_g * Vx;
|
||||
if ((det = (b * b) - 4 * a * this->m_proj_parm.C) < 0.) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
}
|
||||
|
||||
/* Calculation of three components of vector from satellite to position.*/
|
||||
k = (-b - sqrt(det)) / (2 * a);
|
||||
Vx = this->m_proj_parm.radius_g + k * Vx;
|
||||
Vy *= k;
|
||||
Vz *= k;
|
||||
|
||||
/* Calculation of longitude and latitude.*/
|
||||
lp_lon = atan2 (Vy, Vx);
|
||||
lp_lat = atan (Vz * cos (lp_lon) / Vx);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "geos_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
inline bool geos_flip_axis(srs::detail::proj4_parameters const& params)
|
||||
{
|
||||
std::string sweep_axis = pj_get_param_s(params, "sweep");
|
||||
if (sweep_axis.empty())
|
||||
return false;
|
||||
else {
|
||||
if (sweep_axis[1] != '\0' || (sweep_axis[0] != 'x' && sweep_axis[0] != 'y'))
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_invalid_sweep_axis) );
|
||||
|
||||
if (sweep_axis[0] == 'x')
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline bool geos_flip_axis(srs::dpar::parameters<T> const& params)
|
||||
{
|
||||
typename srs::dpar::parameters<T>::const_iterator
|
||||
it = pj_param_find(params, srs::dpar::sweep);
|
||||
if (it == params.end()) {
|
||||
return false;
|
||||
} else {
|
||||
srs::dpar::value_sweep s = static_cast<srs::dpar::value_sweep>(it->template get_value<int>());
|
||||
return s == srs::dpar::sweep_x;
|
||||
}
|
||||
}
|
||||
|
||||
// Geostationary Satellite View
|
||||
template <typename Params, typename Parameters, typename T>
|
||||
inline void setup_geos(Params const& params, Parameters& par, par_geos<T>& proj_parm)
|
||||
{
|
||||
std::string sweep_axis;
|
||||
|
||||
if ((proj_parm.h = pj_get_param_f<T, srs::spar::h>(params, "h", srs::dpar::h)) <= 0.)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_h_less_than_zero) );
|
||||
|
||||
if (par.phi0 != 0.0)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_unknown_prime_meridian) );
|
||||
|
||||
|
||||
proj_parm.flip_axis = geos_flip_axis(params);
|
||||
|
||||
proj_parm.radius_g_1 = proj_parm.h / par.a;
|
||||
proj_parm.radius_g = 1. + proj_parm.radius_g_1;
|
||||
proj_parm.C = proj_parm.radius_g * proj_parm.radius_g - 1.0;
|
||||
if (par.es != 0.0) {
|
||||
proj_parm.radius_p = sqrt (par.one_es);
|
||||
proj_parm.radius_p2 = par.one_es;
|
||||
proj_parm.radius_p_inv2 = par.rone_es;
|
||||
} else {
|
||||
proj_parm.radius_p = proj_parm.radius_p2 = proj_parm.radius_p_inv2 = 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
}} // namespace detail::geos
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Geostationary Satellite View 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
|
||||
- h: Height (real)
|
||||
- sweep: Sweep axis ('x' or 'y') (string)
|
||||
\par Example
|
||||
\image html ex_geos.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct geos_ellipsoid : public detail::geos::base_geos_ellipsoid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline geos_ellipsoid(Params const& params, Parameters const& par)
|
||||
: detail::geos::base_geos_ellipsoid<T, Parameters>(par)
|
||||
{
|
||||
detail::geos::setup_geos(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Geostationary Satellite View 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
|
||||
- h: Height (real)
|
||||
- sweep: Sweep axis ('x' or 'y') (string)
|
||||
\par Example
|
||||
\image html ex_geos.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct geos_spheroid : public detail::geos::base_geos_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline geos_spheroid(Params const& params, Parameters const& par)
|
||||
: detail::geos::base_geos_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::geos::setup_geos(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_geos, geos_spheroid, geos_ellipsoid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI2(geos_entry, geos_spheroid, geos_ellipsoid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(geos_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(geos, geos_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_GEOS_HPP
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_GINS8_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_GINS8_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
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace gins8
|
||||
{
|
||||
|
||||
static const double Cl = 0.000952426;
|
||||
static const double Cp = 0.162388;
|
||||
//static const double C12 = 0.08333333333333333;
|
||||
|
||||
template <typename T>
|
||||
inline T C12() { return 0.083333333333333333333333333333333333; }
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_gins8_spheroid
|
||||
: public base_t_f<base_gins8_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
inline base_gins8_spheroid(const Parameters& par)
|
||||
: base_t_f<base_gins8_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
static const T C12 = gins8::C12<T>();
|
||||
|
||||
T t = lp_lat * lp_lat;
|
||||
|
||||
xy_y = lp_lat * (1. + t * C12);
|
||||
xy_x = lp_lon * (1. - Cp * t);
|
||||
t = lp_lon * lp_lon;
|
||||
xy_x *= (0.87 - Cl * t * t);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "gins8_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Ginsburg VIII (TsNIIGAiK)
|
||||
template <typename Parameters>
|
||||
inline void setup_gins8(Parameters& par)
|
||||
{
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::gins8
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Ginsburg VIII (TsNIIGAiK) projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Pseudocylindrical
|
||||
- Spheroid
|
||||
- no inverse
|
||||
\par Example
|
||||
\image html ex_gins8.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct gins8_spheroid : public detail::gins8::base_gins8_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline gins8_spheroid(Params const& , Parameters const& par)
|
||||
: detail::gins8::base_gins8_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::gins8::setup_gins8(this->m_par);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_gins8, gins8_spheroid, gins8_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(gins8_entry, gins8_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(gins8_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(gins8, gins8_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_GINS8_HPP
|
||||
|
||||
@@ -0,0 +1,385 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_GN_SINU_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_GN_SINU_HPP
|
||||
|
||||
#include <boost/geometry/srs/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/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_mlfn.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace gn_sinu
|
||||
{
|
||||
|
||||
static const double epsilon10 = 1e-10;
|
||||
static const int max_iter = 8;
|
||||
static const double loop_tol = 1e-7;
|
||||
|
||||
template <typename T>
|
||||
struct par_gn_sinu
|
||||
{
|
||||
detail::en<T> en;
|
||||
T m, n, C_x, C_y;
|
||||
};
|
||||
|
||||
/* Ellipsoidal Sinusoidal only */
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_gn_sinu_ellipsoid
|
||||
: public base_t_fi<base_gn_sinu_ellipsoid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_gn_sinu<T> m_proj_parm;
|
||||
|
||||
inline base_gn_sinu_ellipsoid(const Parameters& par)
|
||||
: base_t_fi<base_gn_sinu_ellipsoid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(e_forward) ellipsoid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
T s, c;
|
||||
|
||||
xy_y = pj_mlfn(lp_lat, s = sin(lp_lat), c = cos(lp_lat), this->m_proj_parm.en);
|
||||
xy_x = lp_lon * c / sqrt(1. - this->m_par.es * s * s);
|
||||
}
|
||||
|
||||
// INVERSE(e_inverse) ellipsoid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
|
||||
T s;
|
||||
|
||||
if ((s = fabs(lp_lat = pj_inv_mlfn(xy_y, this->m_par.es, this->m_proj_parm.en))) < half_pi) {
|
||||
s = sin(lp_lat);
|
||||
lp_lon = xy_x * sqrt(1. - this->m_par.es * s * s) / cos(lp_lat);
|
||||
} else if ((s - epsilon10) < half_pi)
|
||||
lp_lon = 0.;
|
||||
else
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
}
|
||||
/* General spherical sinusoidals */
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "gn_sinu_ellipsoid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_gn_sinu_spheroid
|
||||
: public base_t_fi<base_gn_sinu_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_gn_sinu<T> m_proj_parm;
|
||||
|
||||
inline base_gn_sinu_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_gn_sinu_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) sphere
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
if (this->m_proj_parm.m == 0.0)
|
||||
lp_lat = this->m_proj_parm.n != 1. ? aasin(this->m_proj_parm.n * sin(lp_lat)): lp_lat;
|
||||
else {
|
||||
T k, V;
|
||||
int i;
|
||||
|
||||
k = this->m_proj_parm.n * sin(lp_lat);
|
||||
for (i = max_iter; i ; --i) {
|
||||
lp_lat -= V = (this->m_proj_parm.m * lp_lat + sin(lp_lat) - k) /
|
||||
(this->m_proj_parm.m + cos(lp_lat));
|
||||
if (fabs(V) < loop_tol)
|
||||
break;
|
||||
}
|
||||
if (!i) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
}
|
||||
}
|
||||
xy_x = this->m_proj_parm.C_x * lp_lon * (this->m_proj_parm.m + cos(lp_lat));
|
||||
xy_y = this->m_proj_parm.C_y * lp_lat;
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) sphere
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
xy_y /= this->m_proj_parm.C_y;
|
||||
lp_lat = (this->m_proj_parm.m != 0.0) ? aasin((this->m_proj_parm.m * xy_y + sin(xy_y)) / this->m_proj_parm.n) :
|
||||
( this->m_proj_parm.n != 1. ? aasin(sin(xy_y) / this->m_proj_parm.n) : xy_y );
|
||||
lp_lon = xy_x / (this->m_proj_parm.C_x * (this->m_proj_parm.m + cos(xy_y)));
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "gn_sinu_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup(Parameters& par, par_gn_sinu<T>& proj_parm)
|
||||
{
|
||||
par.es = 0;
|
||||
|
||||
proj_parm.C_x = (proj_parm.C_y = sqrt((proj_parm.m + 1.) / proj_parm.n))/(proj_parm.m + 1.);
|
||||
}
|
||||
|
||||
|
||||
// General Sinusoidal Series
|
||||
template <typename Params, typename Parameters, typename T>
|
||||
inline void setup_gn_sinu(Params const& params, Parameters& par, par_gn_sinu<T>& proj_parm)
|
||||
{
|
||||
if (pj_param_f<srs::spar::n>(params, "n", srs::dpar::n, proj_parm.n)
|
||||
&& pj_param_f<srs::spar::m>(params, "m", srs::dpar::m, proj_parm.m)) {
|
||||
if (proj_parm.n <= 0 || proj_parm.m < 0)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_invalid_m_or_n) );
|
||||
} else
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_invalid_m_or_n) );
|
||||
|
||||
setup(par, proj_parm);
|
||||
}
|
||||
|
||||
// Sinusoidal (Sanson-Flamsteed)
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup_sinu(Parameters& par, par_gn_sinu<T>& proj_parm)
|
||||
{
|
||||
proj_parm.en = pj_enfn<T>(par.es);
|
||||
|
||||
if (par.es != 0.0) {
|
||||
/* empty */
|
||||
} else {
|
||||
proj_parm.n = 1.;
|
||||
proj_parm.m = 0.;
|
||||
setup(par, proj_parm);
|
||||
}
|
||||
}
|
||||
|
||||
// Eckert VI
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup_eck6(Parameters& par, par_gn_sinu<T>& proj_parm)
|
||||
{
|
||||
proj_parm.m = 1.;
|
||||
proj_parm.n = 2.570796326794896619231321691;
|
||||
setup(par, proj_parm);
|
||||
}
|
||||
|
||||
// McBryde-Thomas Flat-Polar Sinusoidal
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup_mbtfps(Parameters& par, par_gn_sinu<T>& proj_parm)
|
||||
{
|
||||
proj_parm.m = 0.5;
|
||||
proj_parm.n = 1.785398163397448309615660845;
|
||||
setup(par, proj_parm);
|
||||
}
|
||||
|
||||
}} // namespace detail::gn_sinu
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief General Sinusoidal Series projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Pseudocylindrical
|
||||
- Spheroid
|
||||
\par Projection parameters
|
||||
- m (real)
|
||||
- n (real)
|
||||
\par Example
|
||||
\image html ex_gn_sinu.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct gn_sinu_spheroid : public detail::gn_sinu::base_gn_sinu_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline gn_sinu_spheroid(Params const& params, Parameters const& par)
|
||||
: detail::gn_sinu::base_gn_sinu_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::gn_sinu::setup_gn_sinu(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Sinusoidal (Sanson-Flamsteed) projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Pseudocylindrical
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Example
|
||||
\image html ex_sinu.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct sinu_ellipsoid : public detail::gn_sinu::base_gn_sinu_ellipsoid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline sinu_ellipsoid(Params const& , Parameters const& par)
|
||||
: detail::gn_sinu::base_gn_sinu_ellipsoid<T, Parameters>(par)
|
||||
{
|
||||
detail::gn_sinu::setup_sinu(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Sinusoidal (Sanson-Flamsteed) projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Pseudocylindrical
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Example
|
||||
\image html ex_sinu.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct sinu_spheroid : public detail::gn_sinu::base_gn_sinu_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline sinu_spheroid(Params const& , Parameters const& par)
|
||||
: detail::gn_sinu::base_gn_sinu_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::gn_sinu::setup_sinu(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Eckert VI 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_eck6.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct eck6_spheroid : public detail::gn_sinu::base_gn_sinu_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline eck6_spheroid(Params const& , Parameters const& par)
|
||||
: detail::gn_sinu::base_gn_sinu_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::gn_sinu::setup_eck6(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief McBryde-Thomas Flat-Polar Sinusoidal 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_mbtfps.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct mbtfps_spheroid : public detail::gn_sinu::base_gn_sinu_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline mbtfps_spheroid(Params const& , Parameters const& par)
|
||||
: detail::gn_sinu::base_gn_sinu_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::gn_sinu::setup_mbtfps(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_gn_sinu, gn_sinu_spheroid, gn_sinu_spheroid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_sinu, sinu_spheroid, sinu_ellipsoid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_eck6, eck6_spheroid, eck6_spheroid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_mbtfps, mbtfps_spheroid, mbtfps_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(gn_sinu_entry, gn_sinu_spheroid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI2(sinu_entry, sinu_spheroid, sinu_ellipsoid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(eck6_entry, eck6_spheroid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(mbtfps_entry, mbtfps_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(gn_sinu_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(gn_sinu, gn_sinu_entry);
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(sinu, sinu_entry);
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(eck6, eck6_entry);
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(mbtfps, mbtfps_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_GN_SINU_HPP
|
||||
|
||||
@@ -0,0 +1,256 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_GNOM_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_GNOM_HPP
|
||||
|
||||
#include <boost/config.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>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace gnom
|
||||
{
|
||||
|
||||
static const double epsilon10 = 1.e-10;
|
||||
enum mode_type {
|
||||
n_pole = 0,
|
||||
s_pole = 1,
|
||||
equit = 2,
|
||||
obliq = 3
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct par_gnom
|
||||
{
|
||||
T sinph0;
|
||||
T cosph0;
|
||||
mode_type mode;
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_gnom_spheroid
|
||||
: public base_t_fi<base_gnom_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_gnom<T> m_proj_parm;
|
||||
|
||||
inline base_gnom_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_gnom_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
T 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;
|
||||
break;
|
||||
case obliq:
|
||||
xy_y = this->m_proj_parm.sinph0 * sinphi + this->m_proj_parm.cosph0 * cosphi * coslam;
|
||||
break;
|
||||
case s_pole:
|
||||
xy_y = - sinphi;
|
||||
break;
|
||||
case n_pole:
|
||||
xy_y = sinphi;
|
||||
break;
|
||||
}
|
||||
|
||||
if (xy_y <= epsilon10) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
}
|
||||
|
||||
xy_x = (xy_y = 1. / xy_y) * cosphi * sin(lp_lon);
|
||||
switch (this->m_proj_parm.mode) {
|
||||
case equit:
|
||||
xy_y *= sinphi;
|
||||
break;
|
||||
case obliq:
|
||||
xy_y *= this->m_proj_parm.cosph0 * sinphi - this->m_proj_parm.sinph0 * cosphi * coslam;
|
||||
break;
|
||||
case n_pole:
|
||||
coslam = - coslam;
|
||||
BOOST_FALLTHROUGH;
|
||||
case s_pole:
|
||||
xy_y *= cosphi * coslam;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T xy_x, T xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
|
||||
T rh, cosz, sinz;
|
||||
|
||||
rh = boost::math::hypot(xy_x, xy_y);
|
||||
sinz = sin(lp_lat = atan(rh));
|
||||
cosz = sqrt(1. - sinz * sinz);
|
||||
|
||||
if (fabs(rh) <= epsilon10) {
|
||||
lp_lat = this->m_par.phi0;
|
||||
lp_lon = 0.;
|
||||
} else {
|
||||
switch (this->m_proj_parm.mode) {
|
||||
case obliq:
|
||||
lp_lat = cosz * this->m_proj_parm.sinph0 + xy_y * sinz * this->m_proj_parm.cosph0 / rh;
|
||||
if (fabs(lp_lat) >= 1.)
|
||||
lp_lat = lp_lat > 0. ? half_pi : -half_pi;
|
||||
else
|
||||
lp_lat = asin(lp_lat);
|
||||
xy_y = (cosz - this->m_proj_parm.sinph0 * sin(lp_lat)) * rh;
|
||||
xy_x *= sinz * this->m_proj_parm.cosph0;
|
||||
break;
|
||||
case equit:
|
||||
lp_lat = xy_y * sinz / rh;
|
||||
if (fabs(lp_lat) >= 1.)
|
||||
lp_lat = lp_lat > 0. ? half_pi : -half_pi;
|
||||
else
|
||||
lp_lat = asin(lp_lat);
|
||||
xy_y = cosz * rh;
|
||||
xy_x *= sinz;
|
||||
break;
|
||||
case s_pole:
|
||||
lp_lat -= half_pi;
|
||||
break;
|
||||
case n_pole:
|
||||
lp_lat = half_pi - lp_lat;
|
||||
xy_y = -xy_y;
|
||||
break;
|
||||
}
|
||||
lp_lon = atan2(xy_x, xy_y);
|
||||
}
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "gnom_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Gnomonic
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup_gnom(Parameters& par, par_gnom<T>& proj_parm)
|
||||
{
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
|
||||
if (fabs(fabs(par.phi0) - half_pi) < epsilon10) {
|
||||
proj_parm.mode = par.phi0 < 0. ? s_pole : n_pole;
|
||||
} else if (fabs(par.phi0) < epsilon10) {
|
||||
proj_parm.mode = equit;
|
||||
} else {
|
||||
proj_parm.mode = obliq;
|
||||
proj_parm.sinph0 = sin(par.phi0);
|
||||
proj_parm.cosph0 = cos(par.phi0);
|
||||
}
|
||||
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::gnom
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Gnomonic projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Azimuthal
|
||||
- Spheroid
|
||||
\par Example
|
||||
\image html ex_gnom.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct gnom_spheroid : public detail::gnom::base_gnom_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline gnom_spheroid(Params const& , Parameters const& par)
|
||||
: detail::gnom::base_gnom_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::gnom::setup_gnom(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_gnom, gnom_spheroid, gnom_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(gnom_entry, gnom_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(gnom_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(gnom, gnom_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_GNOM_HPP
|
||||
|
||||
@@ -0,0 +1,190 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_GOODE_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_GOODE_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/proj/gn_sinu.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/moll.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace goode
|
||||
{
|
||||
|
||||
static const double Y_COR = 0.05280;
|
||||
static const double PHI_LIM = .71093078197902358062;
|
||||
|
||||
// TODO: consider storing references to Parameters instead of copies
|
||||
template <typename T, typename Par>
|
||||
struct par_goode
|
||||
{
|
||||
sinu_spheroid<T, Par> sinu;
|
||||
moll_spheroid<T, Par> moll;
|
||||
|
||||
template <typename Params>
|
||||
par_goode(Params const& params, Par const& par)
|
||||
: sinu(params, par), moll(params, par)
|
||||
{}
|
||||
};
|
||||
|
||||
template <typename T, typename Par>
|
||||
inline void s_forward(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y,
|
||||
par_goode<T, Par> const& proj_par)
|
||||
{
|
||||
if (fabs(lp_lat) <= PHI_LIM)
|
||||
proj_par.sinu.fwd(lp_lon, lp_lat, xy_x, xy_y);
|
||||
else {
|
||||
proj_par.moll.fwd(lp_lon, lp_lat, xy_x, xy_y);
|
||||
xy_y -= lp_lat >= 0.0 ? Y_COR : -Y_COR;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T, typename Par>
|
||||
inline void s_inverse(T const& xy_x, T xy_y, T& lp_lon, T& lp_lat,
|
||||
par_goode<T, Par> const& proj_par)
|
||||
{
|
||||
if (fabs(xy_y) <= PHI_LIM)
|
||||
proj_par.sinu.inv(xy_x, xy_y, lp_lon, lp_lat);
|
||||
else {
|
||||
xy_y += xy_y >= 0.0 ? Y_COR : -Y_COR;
|
||||
proj_par.moll.inv(xy_x, xy_y, lp_lon, lp_lat);
|
||||
}
|
||||
}
|
||||
|
||||
// Goode Homolosine
|
||||
template <typename Par>
|
||||
inline void setup_goode(Par& par)
|
||||
{
|
||||
par.es = 0.;
|
||||
|
||||
// NOTE: The following explicit initialization of sinu projection
|
||||
// is not needed because setup_goode() is called before proj_par.sinu
|
||||
// is constructed and m_par of parent projection is used.
|
||||
|
||||
//proj_par.sinu.m_par.es = 0.;
|
||||
//detail::gn_sinu::setup_sinu(proj_par.sinu.m_par, proj_par.sinu.m_proj_parm);
|
||||
}
|
||||
|
||||
}} // namespace detail::goode
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Goode Homolosine 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_goode.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct goode_spheroid : public detail::base_t_fi<goode_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
detail::goode::par_goode<T, Parameters> m_proj_parm;
|
||||
|
||||
template <typename Params>
|
||||
inline goode_spheroid(Params const& params, Parameters const& par)
|
||||
: detail::base_t_fi<goode_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
, m_proj_parm(params, setup(this->m_par))
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
detail::goode::s_forward(lp_lon, lp_lat, xy_x, xy_y, this->m_proj_parm);
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
detail::goode::s_inverse(xy_x, xy_y, lp_lon, lp_lat, this->m_proj_parm);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "goode_spheroid";
|
||||
}
|
||||
|
||||
private:
|
||||
static Parameters& setup(Parameters& par)
|
||||
{
|
||||
detail::goode::setup_goode(par);
|
||||
return par;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_goode, goode_spheroid, goode_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(goode_entry, goode_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(goode_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(goode, goode_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_GOODE_HPP
|
||||
|
||||
@@ -0,0 +1,183 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_GSTMERC_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_GSTMERC_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_phi2.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_tsfn.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace gstmerc
|
||||
{
|
||||
template <typename T>
|
||||
struct par_gstmerc
|
||||
{
|
||||
T lamc;
|
||||
T phic;
|
||||
T c;
|
||||
T n1;
|
||||
T n2;
|
||||
T XS;
|
||||
T YS;
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_gstmerc_spheroid
|
||||
: public base_t_fi<base_gstmerc_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_gstmerc<T> m_proj_parm;
|
||||
|
||||
inline base_gstmerc_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_gstmerc_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
T L, Ls, sinLs1, Ls1;
|
||||
|
||||
L= this->m_proj_parm.n1*lp_lon;
|
||||
Ls= this->m_proj_parm.c+this->m_proj_parm.n1*log(pj_tsfn(-1.0*lp_lat,-1.0*sin(lp_lat),this->m_par.e));
|
||||
sinLs1= sin(L)/cosh(Ls);
|
||||
Ls1= log(pj_tsfn(-1.0*asin(sinLs1),0.0,0.0));
|
||||
xy_x= (this->m_proj_parm.XS + this->m_proj_parm.n2*Ls1)*this->m_par.ra;
|
||||
xy_y= (this->m_proj_parm.YS + this->m_proj_parm.n2*atan(sinh(Ls)/cos(L)))*this->m_par.ra;
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
T L, LC, sinC;
|
||||
|
||||
L= atan(sinh((xy_x*this->m_par.a - this->m_proj_parm.XS)/this->m_proj_parm.n2)/cos((xy_y*this->m_par.a - this->m_proj_parm.YS)/this->m_proj_parm.n2));
|
||||
sinC= sin((xy_y*this->m_par.a - this->m_proj_parm.YS)/this->m_proj_parm.n2)/cosh((xy_x*this->m_par.a - this->m_proj_parm.XS)/this->m_proj_parm.n2);
|
||||
LC= log(pj_tsfn(-1.0*asin(sinC),0.0,0.0));
|
||||
lp_lon= L/this->m_proj_parm.n1;
|
||||
lp_lat= -1.0*pj_phi2(exp((LC-this->m_proj_parm.c)/this->m_proj_parm.n1),this->m_par.e);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "gstmerc_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Gauss-Schreiber Transverse Mercator (aka Gauss-Laborde Reunion)
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup_gstmerc(Parameters& par, par_gstmerc<T>& proj_parm)
|
||||
{
|
||||
proj_parm.lamc= par.lam0;
|
||||
proj_parm.n1= sqrt(T(1)+par.es*math::pow(cos(par.phi0),4)/(T(1)-par.es));
|
||||
proj_parm.phic= asin(sin(par.phi0)/proj_parm.n1);
|
||||
proj_parm.c= log(pj_tsfn(-1.0*proj_parm.phic,0.0,0.0))
|
||||
- proj_parm.n1*log(pj_tsfn(-1.0*par.phi0,-1.0*sin(par.phi0),par.e));
|
||||
proj_parm.n2= par.k0*par.a*sqrt(1.0-par.es)/(1.0-par.es*sin(par.phi0)*sin(par.phi0));
|
||||
proj_parm.XS= 0;/* -par.x0 */
|
||||
proj_parm.YS= -1.0*proj_parm.n2*proj_parm.phic;/* -par.y0 */
|
||||
}
|
||||
|
||||
}} // namespace detail::gstmerc
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Gauss-Schreiber Transverse Mercator (aka Gauss-Laborde Reunion) projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Cylindrical
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Projection parameters
|
||||
- lat_0: Latitude of origin
|
||||
- lon_0: Central meridian
|
||||
- k_0: Scale factor
|
||||
\par Example
|
||||
\image html ex_gstmerc.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct gstmerc_spheroid : public detail::gstmerc::base_gstmerc_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline gstmerc_spheroid(Params const& , Parameters const& par)
|
||||
: detail::gstmerc::base_gstmerc_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::gstmerc::setup_gstmerc(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_gstmerc, gstmerc_spheroid, gstmerc_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(gstmerc_entry, gstmerc_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(gstmerc_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(gstmerc, gstmerc_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_GSTMERC_HPP
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_HAMMER_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_HAMMER_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/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace hammer
|
||||
{
|
||||
static const double epsilon = 1.0e-10;
|
||||
|
||||
template <typename T>
|
||||
struct par_hammer
|
||||
{
|
||||
T w;
|
||||
T m, rm;
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_hammer_spheroid
|
||||
: public base_t_fi<base_hammer_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_hammer<T> m_proj_parm;
|
||||
|
||||
inline base_hammer_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_hammer_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
T cosphi, d;
|
||||
|
||||
d = sqrt(2./(1. + (cosphi = cos(lp_lat)) * cos(lp_lon *= this->m_proj_parm.w)));
|
||||
xy_x = this->m_proj_parm.m * d * cosphi * sin(lp_lon);
|
||||
xy_y = this->m_proj_parm.rm * d * sin(lp_lat);
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
T z;
|
||||
|
||||
z = sqrt(1. - 0.25*this->m_proj_parm.w*this->m_proj_parm.w*xy_x*xy_x - 0.25*xy_y*xy_y);
|
||||
if (geometry::math::abs(2.*z*z-1.) < epsilon) {
|
||||
lp_lon = HUGE_VAL;
|
||||
lp_lat = HUGE_VAL;
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_lat_or_lon_exceed_limit) );
|
||||
} else {
|
||||
lp_lon = aatan2(this->m_proj_parm.w * xy_x * z,2. * z * z - 1)/this->m_proj_parm.w;
|
||||
lp_lat = aasin(z * xy_y);
|
||||
}
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "hammer_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Hammer & Eckert-Greifendorff
|
||||
template <typename Params, typename Parameters, typename T>
|
||||
inline void setup_hammer(Params const& params, Parameters& par, par_hammer<T>& proj_parm)
|
||||
{
|
||||
T tmp;
|
||||
|
||||
if (pj_param_f<srs::spar::w>(params, "W", srs::dpar::w, tmp)) {
|
||||
if ((proj_parm.w = fabs(tmp)) <= 0.)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_w_or_m_zero_or_less) );
|
||||
} else
|
||||
proj_parm.w = .5;
|
||||
if (pj_param_f<srs::spar::m>(params, "M", srs::dpar::m, tmp)) {
|
||||
if ((proj_parm.m = fabs(tmp)) <= 0.)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_w_or_m_zero_or_less) );
|
||||
} else
|
||||
proj_parm.m = 1.;
|
||||
|
||||
proj_parm.rm = 1. / proj_parm.m;
|
||||
proj_parm.m /= proj_parm.w;
|
||||
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::hammer
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Hammer & Eckert-Greifendorff projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Miscellaneous
|
||||
- Spheroid
|
||||
- no inverse
|
||||
\par Projection parameters
|
||||
- W (real)
|
||||
- M (real)
|
||||
\par Example
|
||||
\image html ex_hammer.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct hammer_spheroid : public detail::hammer::base_hammer_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline hammer_spheroid(Params const& params, Parameters const& par)
|
||||
: detail::hammer::base_hammer_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::hammer::setup_hammer(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_hammer, hammer_spheroid, hammer_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(hammer_entry, hammer_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(hammer_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(hammer, hammer_entry)
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_HAMMER_HPP
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_HATANO_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_HATANO_HPP
|
||||
|
||||
#include <boost/geometry/util/math.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
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace hatano
|
||||
{
|
||||
|
||||
static const int n_iter = 20;
|
||||
static const double epsilon = 1e-7;
|
||||
static const double one_plus_tol = 1.000001;
|
||||
static const double CN_ = 2.67595;
|
||||
static const double CS_ = 2.43763;
|
||||
static const double RCN = 0.37369906014686373063;
|
||||
static const double RCS = 0.41023453108141924738;
|
||||
static const double FYCN = 1.75859;
|
||||
static const double FYCS = 1.93052;
|
||||
static const double RYCN = 0.56863737426006061674;
|
||||
static const double RYCS = 0.51799515156538134803;
|
||||
static const double FXC = 0.85;
|
||||
static const double RXC = 1.17647058823529411764;
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_hatano_spheroid
|
||||
: public base_t_fi<base_hatano_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
inline base_hatano_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_hatano_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
T th1, c;
|
||||
int i;
|
||||
|
||||
c = sin(lp_lat) * (lp_lat < 0. ? CS_ : CN_);
|
||||
for (i = n_iter; i; --i) {
|
||||
lp_lat -= th1 = (lp_lat + sin(lp_lat) - c) / (1. + cos(lp_lat));
|
||||
if (fabs(th1) < epsilon) break;
|
||||
}
|
||||
xy_x = FXC * lp_lon * cos(lp_lat *= .5);
|
||||
xy_y = sin(lp_lat) * (lp_lat < 0. ? FYCS : FYCN);
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
static T const half_pi = detail::half_pi<T>();
|
||||
|
||||
T th;
|
||||
|
||||
th = xy_y * ( xy_y < 0. ? RYCS : RYCN);
|
||||
if (fabs(th) > 1.) {
|
||||
if (fabs(th) > one_plus_tol) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
} else {
|
||||
th = th > 0. ? half_pi : - half_pi;
|
||||
}
|
||||
} else {
|
||||
th = asin(th);
|
||||
}
|
||||
|
||||
lp_lon = RXC * xy_x / cos(th);
|
||||
th += th;
|
||||
lp_lat = (th + sin(th)) * (xy_y < 0. ? RCS : RCN);
|
||||
if (fabs(lp_lat) > 1.) {
|
||||
if (fabs(lp_lat) > one_plus_tol) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
} else {
|
||||
lp_lat = lp_lat > 0. ? half_pi : - half_pi;
|
||||
}
|
||||
} else {
|
||||
lp_lat = asin(lp_lat);
|
||||
}
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "hatano_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Hatano Asymmetrical Equal Area
|
||||
template <typename Parameters>
|
||||
inline void setup_hatano(Parameters& par)
|
||||
{
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::hatano
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Hatano Asymmetrical Equal Area 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_hatano.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct hatano_spheroid : public detail::hatano::base_hatano_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline hatano_spheroid(Params const& , Parameters const& par)
|
||||
: detail::hatano::base_hatano_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::hatano::setup_hatano(this->m_par);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_hatano, hatano_spheroid, hatano_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(hatano_entry, hatano_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(hatano_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(hatano, hatano_entry)
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_HATANO_HPP
|
||||
|
||||
@@ -0,0 +1,873 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
// Purpose: Implementation of the HEALPix and rHEALPix projections.
|
||||
// For background see <http://code.scenzgrid.org/index.php/p/scenzgrid-py/source/tree/master/docs/rhealpix_dggs.pdf>.
|
||||
// Authors: Alex Raichev (raichev@cs.auckland.ac.nz)
|
||||
// Michael Speth (spethm@landcareresearch.co.nz)
|
||||
// Notes: Raichev implemented these projections in Python and
|
||||
// Speth translated them into C here.
|
||||
|
||||
// Copyright (c) 2001, Thomas Flemming, tf@ttqv.com
|
||||
|
||||
// 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_HEALPIX_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_HEALPIX_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/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_auth.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_qsfn.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace healpix
|
||||
{
|
||||
|
||||
/* Fuzz to handle rounding errors: */
|
||||
static const double epsilon = 1e-15;
|
||||
|
||||
template <typename T>
|
||||
struct par_healpix
|
||||
{
|
||||
int north_square;
|
||||
int south_square;
|
||||
T qp;
|
||||
detail::apa<T> apa;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct cap_map
|
||||
{
|
||||
int cn; /* An integer 0--3 indicating the position of the polar cap. */
|
||||
T x, y; /* Coordinates of the pole point (point of most extreme latitude on the polar caps). */
|
||||
enum region_type {north, south, equatorial} region;
|
||||
};
|
||||
template <typename T>
|
||||
struct point_xy
|
||||
{
|
||||
T x, y;
|
||||
};
|
||||
|
||||
/* IDENT, R1, R2, R3, R1 inverse, R2 inverse, R3 inverse:*/
|
||||
static double rot[7][2][2] = {
|
||||
/* Identity matrix */
|
||||
{{1, 0},{0, 1}},
|
||||
/* Matrix for counterclockwise rotation by pi/2: */
|
||||
{{ 0,-1},{ 1, 0}},
|
||||
/* Matrix for counterclockwise rotation by pi: */
|
||||
{{-1, 0},{ 0,-1}},
|
||||
/* Matrix for counterclockwise rotation by 3*pi/2: */
|
||||
{{ 0, 1},{-1, 0}},
|
||||
{{ 0, 1},{-1, 0}}, // 3*pi/2
|
||||
{{-1, 0},{ 0,-1}}, // pi
|
||||
{{ 0,-1},{ 1, 0}} // pi/2
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the sign of the double.
|
||||
* @param v the parameter whose sign is returned.
|
||||
* @return 1 for positive number, -1 for negative, and 0 for zero.
|
||||
**/
|
||||
template <typename T>
|
||||
inline T pj_sign (T const& v)
|
||||
{
|
||||
return v > 0 ? 1 : (v < 0 ? -1 : 0);
|
||||
}
|
||||
/**
|
||||
* Return the index of the matrix in {{{1, 0},{0, 1}}, {{ 0,-1},{ 1, 0}}, {{-1, 0},{ 0,-1}}, {{ 0, 1},{-1, 0}}, {{ 0, 1},{-1, 0}}, {{-1, 0},{ 0,-1}}, {{ 0,-1},{ 1, 0}}}.
|
||||
* @param index ranges from -3 to 3.
|
||||
*/
|
||||
inline int get_rotate_index(int index)
|
||||
{
|
||||
switch(index) {
|
||||
case 0:
|
||||
return 0;
|
||||
case 1:
|
||||
return 1;
|
||||
case 2:
|
||||
return 2;
|
||||
case 3:
|
||||
return 3;
|
||||
case -1:
|
||||
return 4;
|
||||
case -2:
|
||||
return 5;
|
||||
case -3:
|
||||
return 6;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/**
|
||||
* Return 1 if point (testx, testy) lies in the interior of the polygon
|
||||
* determined by the vertices in vert, and return 0 otherwise.
|
||||
* See http://paulbourke.net/geometry/polygonmesh/ for more details.
|
||||
* @param nvert the number of vertices in the polygon.
|
||||
* @param vert the (x, y)-coordinates of the polygon's vertices
|
||||
**/
|
||||
template <typename T>
|
||||
inline int pnpoly(int nvert, T vert[][2], T const& testx, T const& testy)
|
||||
{
|
||||
int i;
|
||||
int counter = 0;
|
||||
T xinters;
|
||||
point_xy<T> p1, p2;
|
||||
|
||||
/* Check for boundrary cases */
|
||||
for (i = 0; i < nvert; i++) {
|
||||
if (testx == vert[i][0] && testy == vert[i][1]) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
p1.x = vert[0][0];
|
||||
p1.y = vert[0][1];
|
||||
|
||||
for (i = 1; i < nvert; i++) {
|
||||
p2.x = vert[i % nvert][0];
|
||||
p2.y = vert[i % nvert][1];
|
||||
if (testy > (std::min)(p1.y, p2.y) &&
|
||||
testy <= (std::max)(p1.y, p2.y) &&
|
||||
testx <= (std::max)(p1.x, p2.x) &&
|
||||
p1.y != p2.y)
|
||||
{
|
||||
xinters = (testy-p1.y)*(p2.x-p1.x)/(p2.y-p1.y)+p1.x;
|
||||
if (p1.x == p2.x || testx <= xinters)
|
||||
counter++;
|
||||
}
|
||||
p1 = p2;
|
||||
}
|
||||
|
||||
if (counter % 2 == 0) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Return 1 if (x, y) lies in (the interior or boundary of) the image of the
|
||||
* HEALPix projection (in case proj=0) or in the image the rHEALPix projection
|
||||
* (in case proj=1), and return 0 otherwise.
|
||||
* @param north_square the position of the north polar square (rHEALPix only)
|
||||
* @param south_square the position of the south polar square (rHEALPix only)
|
||||
**/
|
||||
template <typename T>
|
||||
inline int in_image(T const& x, T const& y, int proj, int north_square, int south_square)
|
||||
{
|
||||
static const T pi = detail::pi<T>();
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
static const T fourth_pi = detail::fourth_pi<T>();
|
||||
|
||||
if (proj == 0) {
|
||||
T healpixVertsJit[][2] = {
|
||||
{-pi - epsilon, fourth_pi},
|
||||
{-3.0*fourth_pi, half_pi + epsilon},
|
||||
{-half_pi, fourth_pi + epsilon},
|
||||
{-fourth_pi, half_pi + epsilon},
|
||||
{0.0, fourth_pi + epsilon},
|
||||
{fourth_pi, half_pi + epsilon},
|
||||
{half_pi, fourth_pi + epsilon},
|
||||
{3.0*fourth_pi, half_pi + epsilon},
|
||||
{pi + epsilon, fourth_pi},
|
||||
{pi + epsilon, -fourth_pi},
|
||||
{3.0*fourth_pi, -half_pi - epsilon},
|
||||
{half_pi, -fourth_pi - epsilon},
|
||||
{fourth_pi, -half_pi - epsilon},
|
||||
{0.0, -fourth_pi - epsilon},
|
||||
{-fourth_pi, -half_pi - epsilon},
|
||||
{-half_pi, -fourth_pi - epsilon},
|
||||
{-3.0*fourth_pi, -half_pi - epsilon},
|
||||
{-pi - epsilon, -fourth_pi}
|
||||
};
|
||||
return pnpoly((int)sizeof(healpixVertsJit)/
|
||||
sizeof(healpixVertsJit[0]), healpixVertsJit, x, y);
|
||||
} else {
|
||||
T rhealpixVertsJit[][2] = {
|
||||
{-pi - epsilon, fourth_pi + epsilon},
|
||||
{-pi + north_square*half_pi - epsilon, fourth_pi + epsilon},
|
||||
{-pi + north_square*half_pi - epsilon, 3.0*fourth_pi + epsilon},
|
||||
{-pi + (north_square + 1.0)*half_pi + epsilon, 3.0*fourth_pi + epsilon},
|
||||
{-pi + (north_square + 1.0)*half_pi + epsilon, fourth_pi + epsilon},
|
||||
{pi + epsilon, fourth_pi + epsilon},
|
||||
{pi + epsilon, -fourth_pi - epsilon},
|
||||
{-pi + (south_square + 1.0)*half_pi + epsilon, -fourth_pi - epsilon},
|
||||
{-pi + (south_square + 1.0)*half_pi + epsilon, -3.0*fourth_pi - epsilon},
|
||||
{-pi + south_square*half_pi - epsilon, -3.0*fourth_pi - epsilon},
|
||||
{-pi + south_square*half_pi - epsilon, -fourth_pi - epsilon},
|
||||
{-pi - epsilon, -fourth_pi - epsilon}
|
||||
};
|
||||
|
||||
return pnpoly((int)sizeof(rhealpixVertsJit)/
|
||||
sizeof(rhealpixVertsJit[0]), rhealpixVertsJit, x, y);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Return the authalic latitude of latitude alpha (if inverse=0) or
|
||||
* return the approximate latitude of authalic latitude alpha (if inverse=1).
|
||||
* P contains the relavent ellipsoid parameters.
|
||||
**/
|
||||
template <typename Parameters, typename T>
|
||||
inline T auth_lat(const Parameters& par, const par_healpix<T>& proj_parm, T const& alpha, int inverse)
|
||||
{
|
||||
if (inverse == 0) {
|
||||
/* Authalic latitude. */
|
||||
T q = pj_qsfn(sin(alpha), par.e, 1.0 - par.es);
|
||||
T qp = proj_parm.qp;
|
||||
T ratio = q/qp;
|
||||
|
||||
if (math::abs(ratio) > 1) {
|
||||
/* Rounding error. */
|
||||
ratio = pj_sign(ratio);
|
||||
}
|
||||
|
||||
return asin(ratio);
|
||||
} else {
|
||||
/* Approximation to inverse authalic latitude. */
|
||||
return pj_authlat(alpha, proj_parm.apa);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Return the HEALPix projection of the longitude-latitude point lp on
|
||||
* the unit sphere.
|
||||
**/
|
||||
template <typename T>
|
||||
inline void healpix_sphere(T const& lp_lam, T const& lp_phi, T& xy_x, T& xy_y)
|
||||
{
|
||||
static const T pi = detail::pi<T>();
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
static const T fourth_pi = detail::fourth_pi<T>();
|
||||
|
||||
T lam = lp_lam;
|
||||
T phi = lp_phi;
|
||||
T phi0 = asin(T(2.0)/T(3.0));
|
||||
|
||||
/* equatorial region */
|
||||
if ( fabsl(phi) <= phi0) {
|
||||
xy_x = lam;
|
||||
xy_y = 3.0*pi/8.0*sin(phi);
|
||||
} else {
|
||||
T lamc;
|
||||
T sigma = sqrt(3.0*(1 - math::abs(sin(phi))));
|
||||
T cn = floor(2*lam / pi + 2);
|
||||
if (cn >= 4) {
|
||||
cn = 3;
|
||||
}
|
||||
lamc = -3*fourth_pi + half_pi*cn;
|
||||
xy_x = lamc + (lam - lamc)*sigma;
|
||||
xy_y = pj_sign(phi)*fourth_pi*(2 - sigma);
|
||||
}
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Return the inverse of healpix_sphere().
|
||||
**/
|
||||
template <typename T>
|
||||
inline void healpix_sphere_inverse(T const& xy_x, T const& xy_y, T& lp_lam, T& lp_phi)
|
||||
{
|
||||
static const T pi = detail::pi<T>();
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
static const T fourth_pi = detail::fourth_pi<T>();
|
||||
|
||||
T x = xy_x;
|
||||
T y = xy_y;
|
||||
T y0 = fourth_pi;
|
||||
|
||||
/* Equatorial region. */
|
||||
if (math::abs(y) <= y0) {
|
||||
lp_lam = x;
|
||||
lp_phi = asin(8.0*y/(3.0*pi));
|
||||
} else if (fabsl(y) < half_pi) {
|
||||
T cn = floor(2.0*x/pi + 2.0);
|
||||
T xc, tau;
|
||||
if (cn >= 4) {
|
||||
cn = 3;
|
||||
}
|
||||
xc = -3.0*fourth_pi + (half_pi)*cn;
|
||||
tau = 2.0 - 4.0*fabsl(y)/pi;
|
||||
lp_lam = xc + (x - xc)/tau;
|
||||
lp_phi = pj_sign(y)*asin(1.0 - math::pow(tau, 2)/3.0);
|
||||
} else {
|
||||
lp_lam = -1.0*pi;
|
||||
lp_phi = pj_sign(y)*half_pi;
|
||||
}
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Return the vector sum a + b, where a and b are 2-dimensional vectors.
|
||||
* @param ret holds a + b.
|
||||
**/
|
||||
template <typename T>
|
||||
inline void vector_add(const T a[2], const T b[2], T ret[2])
|
||||
{
|
||||
int i;
|
||||
for(i = 0; i < 2; i++) {
|
||||
ret[i] = a[i] + b[i];
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Return the vector difference a - b, where a and b are 2-dimensional vectors.
|
||||
* @param ret holds a - b.
|
||||
**/
|
||||
template <typename T>
|
||||
inline void vector_sub(const T a[2], const T b[2], T ret[2])
|
||||
{
|
||||
int i;
|
||||
for(i = 0; i < 2; i++) {
|
||||
ret[i] = a[i] - b[i];
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Return the 2 x 1 matrix product a*b, where a is a 2 x 2 matrix and
|
||||
* b is a 2 x 1 matrix.
|
||||
* @param ret holds a*b.
|
||||
**/
|
||||
template <typename T1, typename T2>
|
||||
inline void dot_product(const T1 a[2][2], const T2 b[2], T2 ret[2])
|
||||
{
|
||||
int i, j;
|
||||
int length = 2;
|
||||
for(i = 0; i < length; i++) {
|
||||
ret[i] = 0;
|
||||
for(j = 0; j < length; j++) {
|
||||
ret[i] += a[i][j]*b[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Return the number of the polar cap, the pole point coordinates, and
|
||||
* the region that (x, y) lies in.
|
||||
* If inverse=0, then assume (x,y) lies in the image of the HEALPix
|
||||
* projection of the unit sphere.
|
||||
* If inverse=1, then assume (x,y) lies in the image of the
|
||||
* (north_square, south_square)-rHEALPix projection of the unit sphere.
|
||||
**/
|
||||
template <typename T>
|
||||
inline cap_map<T> get_cap(T x, T const& y, int north_square, int south_square,
|
||||
int inverse)
|
||||
{
|
||||
static const T pi = detail::pi<T>();
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
static const T fourth_pi = detail::fourth_pi<T>();
|
||||
|
||||
cap_map<T> capmap;
|
||||
T c;
|
||||
capmap.x = x;
|
||||
capmap.y = y;
|
||||
if (inverse == 0) {
|
||||
if (y > fourth_pi) {
|
||||
capmap.region = cap_map<T>::north;
|
||||
c = half_pi;
|
||||
} else if (y < -fourth_pi) {
|
||||
capmap.region = cap_map<T>::south;
|
||||
c = -half_pi;
|
||||
} else {
|
||||
capmap.region = cap_map<T>::equatorial;
|
||||
capmap.cn = 0;
|
||||
return capmap;
|
||||
}
|
||||
/* polar region */
|
||||
if (x < -half_pi) {
|
||||
capmap.cn = 0;
|
||||
capmap.x = (-3.0*fourth_pi);
|
||||
capmap.y = c;
|
||||
} else if (x >= -half_pi && x < 0) {
|
||||
capmap.cn = 1;
|
||||
capmap.x = -fourth_pi;
|
||||
capmap.y = c;
|
||||
} else if (x >= 0 && x < half_pi) {
|
||||
capmap.cn = 2;
|
||||
capmap.x = fourth_pi;
|
||||
capmap.y = c;
|
||||
} else {
|
||||
capmap.cn = 3;
|
||||
capmap.x = 3.0*fourth_pi;
|
||||
capmap.y = c;
|
||||
}
|
||||
} else {
|
||||
if (y > fourth_pi) {
|
||||
capmap.region = cap_map<T>::north;
|
||||
capmap.x = (-3.0*fourth_pi + north_square*half_pi);
|
||||
capmap.y = half_pi;
|
||||
x = x - north_square*half_pi;
|
||||
} else if (y < -fourth_pi) {
|
||||
capmap.region = cap_map<T>::south;
|
||||
capmap.x = (-3.0*fourth_pi + south_square*pi/2);
|
||||
capmap.y = -half_pi;
|
||||
x = x - south_square*half_pi;
|
||||
} else {
|
||||
capmap.region = cap_map<T>::equatorial;
|
||||
capmap.cn = 0;
|
||||
return capmap;
|
||||
}
|
||||
/* Polar Region, find the HEALPix polar cap number that
|
||||
x, y moves to when rHEALPix polar square is disassembled. */
|
||||
if (capmap.region == cap_map<T>::north) {
|
||||
if (y >= -x - fourth_pi - epsilon && y < x + 5.0*fourth_pi - epsilon) {
|
||||
capmap.cn = (north_square + 1) % 4;
|
||||
} else if (y > -x -fourth_pi + epsilon && y >= x + 5.0*fourth_pi - epsilon) {
|
||||
capmap.cn = (north_square + 2) % 4;
|
||||
} else if (y <= -x -fourth_pi + epsilon && y > x + 5.0*fourth_pi + epsilon) {
|
||||
capmap.cn = (north_square + 3) % 4;
|
||||
} else {
|
||||
capmap.cn = north_square;
|
||||
}
|
||||
} else if (capmap.region == cap_map<T>::south) {
|
||||
if (y <= x + fourth_pi + epsilon && y > -x - 5.0*fourth_pi + epsilon) {
|
||||
capmap.cn = (south_square + 1) % 4;
|
||||
} else if (y < x + fourth_pi - epsilon && y <= -x - 5.0*fourth_pi + epsilon) {
|
||||
capmap.cn = (south_square + 2) % 4;
|
||||
} else if (y >= x + fourth_pi - epsilon && y < -x - 5.0*fourth_pi - epsilon) {
|
||||
capmap.cn = (south_square + 3) % 4;
|
||||
} else {
|
||||
capmap.cn = south_square;
|
||||
}
|
||||
}
|
||||
}
|
||||
return capmap;
|
||||
}
|
||||
/**
|
||||
* Rearrange point (x, y) in the HEALPix projection by
|
||||
* combining the polar caps into two polar squares.
|
||||
* Put the north polar square in position north_square and
|
||||
* the south polar square in position south_square.
|
||||
* If inverse=1, then uncombine the polar caps.
|
||||
* @param north_square integer between 0 and 3.
|
||||
* @param south_square integer between 0 and 3.
|
||||
**/
|
||||
template <typename T>
|
||||
inline void combine_caps(T& xy_x, T& xy_y, int north_square, int south_square,
|
||||
int inverse)
|
||||
{
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
static const T fourth_pi = detail::fourth_pi<T>();
|
||||
|
||||
T v[2];
|
||||
T c[2];
|
||||
T vector[2];
|
||||
T v_min_c[2];
|
||||
T ret_dot[2];
|
||||
const double (*tmpRot)[2];
|
||||
int pole = 0;
|
||||
|
||||
cap_map<T> capmap = get_cap(xy_x, xy_y, north_square, south_square, inverse);
|
||||
if (capmap.region == cap_map<T>::equatorial) {
|
||||
xy_x = capmap.x;
|
||||
xy_y = capmap.y;
|
||||
return;
|
||||
}
|
||||
|
||||
v[0] = xy_x; v[1] = xy_y;
|
||||
c[0] = capmap.x; c[1] = capmap.y;
|
||||
|
||||
if (inverse == 0) {
|
||||
/* Rotate (xy_x, xy_y) about its polar cap tip and then translate it to
|
||||
north_square or south_square. */
|
||||
|
||||
if (capmap.region == cap_map<T>::north) {
|
||||
pole = north_square;
|
||||
tmpRot = rot[get_rotate_index(capmap.cn - pole)];
|
||||
} else {
|
||||
pole = south_square;
|
||||
tmpRot = rot[get_rotate_index(-1*(capmap.cn - pole))];
|
||||
}
|
||||
} else {
|
||||
/* Inverse function.
|
||||
Unrotate (xy_x, xy_y) and then translate it back. */
|
||||
|
||||
/* disassemble */
|
||||
if (capmap.region == cap_map<T>::north) {
|
||||
pole = north_square;
|
||||
tmpRot = rot[get_rotate_index(-1*(capmap.cn - pole))];
|
||||
} else {
|
||||
pole = south_square;
|
||||
tmpRot = rot[get_rotate_index(capmap.cn - pole)];
|
||||
}
|
||||
}
|
||||
|
||||
vector_sub(v, c, v_min_c);
|
||||
dot_product(tmpRot, v_min_c, ret_dot);
|
||||
|
||||
{
|
||||
T a[2];
|
||||
/* Workaround cppcheck git issue */
|
||||
T* pa = a;
|
||||
// TODO: in proj4 5.0.0 this line is used instead
|
||||
//pa[0] = -3.0*fourth_pi + ((inverse == 0) ? 0 : capmap.cn) *half_pi;
|
||||
pa[0] = -3.0*fourth_pi + ((inverse == 0) ? pole : capmap.cn) *half_pi;
|
||||
pa[1] = half_pi;
|
||||
vector_add(ret_dot, a, vector);
|
||||
}
|
||||
|
||||
xy_x = vector[0];
|
||||
xy_y = vector[1];
|
||||
}
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_healpix_ellipsoid
|
||||
: public base_t_fi<base_healpix_ellipsoid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_healpix<T> m_proj_parm;
|
||||
|
||||
inline base_healpix_ellipsoid(const Parameters& par)
|
||||
: base_t_fi<base_healpix_ellipsoid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(e_healpix_forward) ellipsoid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
lp_lat = auth_lat(this->params(), m_proj_parm, lp_lat, 0);
|
||||
return healpix_sphere(lp_lon, lp_lat, xy_x, xy_y);
|
||||
}
|
||||
|
||||
// INVERSE(e_healpix_inverse) ellipsoid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
/* Check whether (x, y) lies in the HEALPix image. */
|
||||
if (in_image(xy_x, xy_y, 0, 0, 0) == 0) {
|
||||
lp_lon = HUGE_VAL;
|
||||
lp_lat = HUGE_VAL;
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_invalid_x_or_y) );
|
||||
}
|
||||
healpix_sphere_inverse(xy_x, xy_y, lp_lon, lp_lat);
|
||||
lp_lat = auth_lat(this->params(), m_proj_parm, lp_lat, 1);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "healpix_ellipsoid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_healpix_spheroid
|
||||
: public base_t_fi<base_healpix_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_healpix<T> m_proj_parm;
|
||||
|
||||
inline base_healpix_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_healpix_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_healpix_forward) sphere
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
return healpix_sphere(lp_lon, lp_lat, xy_x, xy_y);
|
||||
}
|
||||
|
||||
// INVERSE(s_healpix_inverse) sphere
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
/* Check whether (x, y) lies in the HEALPix image */
|
||||
if (in_image(xy_x, xy_y, 0, 0, 0) == 0) {
|
||||
lp_lon = HUGE_VAL;
|
||||
lp_lat = HUGE_VAL;
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_invalid_x_or_y) );
|
||||
}
|
||||
return healpix_sphere_inverse(xy_x, xy_y, lp_lon, lp_lat);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "healpix_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_rhealpix_ellipsoid
|
||||
: public base_t_fi<base_rhealpix_ellipsoid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_healpix<T> m_proj_parm;
|
||||
|
||||
inline base_rhealpix_ellipsoid(const Parameters& par)
|
||||
: base_t_fi<base_rhealpix_ellipsoid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(e_rhealpix_forward) ellipsoid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
lp_lat = auth_lat(this->params(), m_proj_parm, lp_lat, 0);
|
||||
healpix_sphere(lp_lon, lp_lat, xy_x, xy_y);
|
||||
combine_caps(xy_x, xy_y, this->m_proj_parm.north_square, this->m_proj_parm.south_square, 0);
|
||||
}
|
||||
|
||||
// INVERSE(e_rhealpix_inverse) ellipsoid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T xy_x, T xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
/* Check whether (x, y) lies in the rHEALPix image. */
|
||||
if (in_image(xy_x, xy_y, 1, this->m_proj_parm.north_square, this->m_proj_parm.south_square) == 0) {
|
||||
lp_lon = HUGE_VAL;
|
||||
lp_lat = HUGE_VAL;
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_invalid_x_or_y) );
|
||||
}
|
||||
combine_caps(xy_x, xy_y, this->m_proj_parm.north_square, this->m_proj_parm.south_square, 1);
|
||||
healpix_sphere_inverse(xy_x, xy_y, lp_lon, lp_lat);
|
||||
lp_lat = auth_lat(this->params(), m_proj_parm, lp_lat, 1);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "rhealpix_ellipsoid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_rhealpix_spheroid
|
||||
: public base_t_fi<base_rhealpix_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_healpix<T> m_proj_parm;
|
||||
|
||||
inline base_rhealpix_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_rhealpix_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_rhealpix_forward) sphere
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
healpix_sphere(lp_lon, lp_lat, xy_x, xy_y);
|
||||
combine_caps(xy_x, xy_y, this->m_proj_parm.north_square, this->m_proj_parm.south_square, 0);
|
||||
}
|
||||
|
||||
// INVERSE(s_rhealpix_inverse) sphere
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T xy_x, T xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
/* Check whether (x, y) lies in the rHEALPix image. */
|
||||
if (in_image(xy_x, xy_y, 1, this->m_proj_parm.north_square, this->m_proj_parm.south_square) == 0) {
|
||||
lp_lon = HUGE_VAL;
|
||||
lp_lat = HUGE_VAL;
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_invalid_x_or_y) );
|
||||
}
|
||||
combine_caps(xy_x, xy_y, this->m_proj_parm.north_square, this->m_proj_parm.south_square, 1);
|
||||
return healpix_sphere_inverse(xy_x, xy_y, lp_lon, lp_lat);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "rhealpix_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// HEALPix
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup_healpix(Parameters& par, par_healpix<T>& proj_parm)
|
||||
{
|
||||
if (par.es != 0.0) {
|
||||
proj_parm.apa = pj_authset<T>(par.es); /* For auth_lat(). */
|
||||
proj_parm.qp = pj_qsfn(1.0, par.e, par.one_es); /* For auth_lat(). */
|
||||
par.a = par.a*sqrt(0.5*proj_parm.qp); /* Set par.a to authalic radius. */
|
||||
pj_calc_ellipsoid_params(par, par.a, par.es); /* Ensure we have a consistent parameter set */
|
||||
} else {
|
||||
}
|
||||
}
|
||||
|
||||
// rHEALPix
|
||||
template <typename Params, typename Parameters, typename T>
|
||||
inline void setup_rhealpix(Params const& params, Parameters& par, par_healpix<T>& proj_parm)
|
||||
{
|
||||
proj_parm.north_square = pj_get_param_i<srs::spar::north_square>(params, "north_square", srs::dpar::north_square);
|
||||
proj_parm.south_square = pj_get_param_i<srs::spar::south_square>(params, "south_square", srs::dpar::south_square);
|
||||
/* Check for valid north_square and south_square inputs. */
|
||||
if ((proj_parm.north_square < 0) || (proj_parm.north_square > 3)) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_axis) );
|
||||
}
|
||||
if ((proj_parm.south_square < 0) || (proj_parm.south_square > 3)) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_axis) );
|
||||
}
|
||||
if (par.es != 0.0) {
|
||||
proj_parm.apa = pj_authset<T>(par.es); /* For auth_lat(). */
|
||||
proj_parm.qp = pj_qsfn(1.0, par.e, par.one_es); /* For auth_lat(). */
|
||||
par.a = par.a*sqrt(0.5*proj_parm.qp); /* Set par.a to authalic radius. */
|
||||
// TODO: why not the same as in healpix?
|
||||
//pj_calc_ellipsoid_params(par, par.a, par.es);
|
||||
par.ra = 1.0/par.a;
|
||||
} else {
|
||||
}
|
||||
}
|
||||
|
||||
}} // namespace detail::healpix
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief HEALPix projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Example
|
||||
\image html ex_healpix.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct healpix_ellipsoid : public detail::healpix::base_healpix_ellipsoid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline healpix_ellipsoid(Params const& , Parameters const& par)
|
||||
: detail::healpix::base_healpix_ellipsoid<T, Parameters>(par)
|
||||
{
|
||||
detail::healpix::setup_healpix(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief HEALPix projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Example
|
||||
\image html ex_healpix.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct healpix_spheroid : public detail::healpix::base_healpix_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline healpix_spheroid(Params const& , Parameters const& par)
|
||||
: detail::healpix::base_healpix_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::healpix::setup_healpix(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief rHEALPix projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Projection parameters
|
||||
- north_square (integer)
|
||||
- south_square (integer)
|
||||
\par Example
|
||||
\image html ex_rhealpix.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct rhealpix_ellipsoid : public detail::healpix::base_rhealpix_ellipsoid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline rhealpix_ellipsoid(Params const& params, Parameters const& par)
|
||||
: detail::healpix::base_rhealpix_ellipsoid<T, Parameters>(par)
|
||||
{
|
||||
detail::healpix::setup_rhealpix(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief rHEALPix projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Spheroid
|
||||
- Ellipsoid
|
||||
\par Projection parameters
|
||||
- north_square (integer)
|
||||
- south_square (integer)
|
||||
\par Example
|
||||
\image html ex_rhealpix.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct rhealpix_spheroid : public detail::healpix::base_rhealpix_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline rhealpix_spheroid(Params const& params, Parameters const& par)
|
||||
: detail::healpix::base_rhealpix_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::healpix::setup_rhealpix(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_healpix, healpix_spheroid, healpix_ellipsoid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_rhealpix, rhealpix_spheroid, rhealpix_ellipsoid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI2(healpix_entry, healpix_spheroid, healpix_ellipsoid)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI2(rhealpix_entry, rhealpix_spheroid, rhealpix_ellipsoid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(healpix_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(healpix, healpix_entry)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(rhealpix, rhealpix_entry)
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_HEALPIX_HPP
|
||||
|
||||
@@ -0,0 +1,371 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_IGH_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IGH_HPP
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
#include <boost/shared_ptr.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/proj/gn_sinu.hpp>
|
||||
#include <boost/geometry/srs/projections/proj/moll.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace igh
|
||||
{
|
||||
// TODO: consider replacing dynamically created projections
|
||||
// with member objects
|
||||
template <typename T, typename Parameters>
|
||||
struct par_igh
|
||||
{
|
||||
boost::shared_ptr<base_v<T, Parameters> > pj[12];
|
||||
T dy0;
|
||||
};
|
||||
|
||||
/* 40d 44' 11.8" [degrees] */
|
||||
template <typename T>
|
||||
inline T d4044118() { return (T(40) + T(44)/T(60.) + T(11.8)/T(3600.)) * geometry::math::d2r<T>(); }
|
||||
|
||||
template <typename T>
|
||||
inline T d10() { return T(10) * geometry::math::d2r<T>(); }
|
||||
template <typename T>
|
||||
inline T d20() { return T(20) * geometry::math::d2r<T>(); }
|
||||
template <typename T>
|
||||
inline T d30() { return T(30) * geometry::math::d2r<T>(); }
|
||||
template <typename T>
|
||||
inline T d40() { return T(40) * geometry::math::d2r<T>(); }
|
||||
template <typename T>
|
||||
inline T d50() { return T(50) * geometry::math::d2r<T>(); }
|
||||
template <typename T>
|
||||
inline T d60() { return T(60) * geometry::math::d2r<T>(); }
|
||||
template <typename T>
|
||||
inline T d80() { return T(80) * geometry::math::d2r<T>(); }
|
||||
template <typename T>
|
||||
inline T d90() { return T(90) * geometry::math::d2r<T>(); }
|
||||
template <typename T>
|
||||
inline T d100() { return T(100) * geometry::math::d2r<T>(); }
|
||||
template <typename T>
|
||||
inline T d140() { return T(140) * geometry::math::d2r<T>(); }
|
||||
template <typename T>
|
||||
inline T d160() { return T(160) * geometry::math::d2r<T>(); }
|
||||
template <typename T>
|
||||
inline T d180() { return T(180) * geometry::math::d2r<T>(); }
|
||||
|
||||
static const double epsilon = 1.e-10; // allow a little 'slack' on zone edge positions
|
||||
|
||||
// Converted from #define SETUP(n, proj, x_0, y_0, lon_0)
|
||||
template <template <typename, typename, typename> class Entry, typename Params, typename Parameters, typename T>
|
||||
inline void do_setup(int n, Params const& params, Parameters const& par, par_igh<T, Parameters>& proj_parm,
|
||||
T const& x_0, T const& y_0,
|
||||
T const& lon_0)
|
||||
{
|
||||
// NOTE: in the original proj4 these projections are initialized
|
||||
// with zeroed parameters which could be done here as well instead
|
||||
// of initializing with parent projection's parameters.
|
||||
Entry<Params, T, Parameters> entry;
|
||||
proj_parm.pj[n-1].reset(entry.create_new(params, par));
|
||||
proj_parm.pj[n-1]->mutable_params().x0 = x_0;
|
||||
proj_parm.pj[n-1]->mutable_params().y0 = y_0;
|
||||
proj_parm.pj[n-1]->mutable_params().lam0 = lon_0;
|
||||
}
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_igh_spheroid
|
||||
: public base_t_fi<base_igh_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_igh<T, Parameters> m_proj_parm;
|
||||
|
||||
inline base_igh_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_igh_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
static const T d4044118 = igh::d4044118<T>();
|
||||
static const T d20 = igh::d20<T>();
|
||||
static const T d40 = igh::d40<T>();
|
||||
static const T d80 = igh::d80<T>();
|
||||
static const T d100 = igh::d100<T>();
|
||||
|
||||
int z;
|
||||
if (lp_lat >= d4044118) { // 1|2
|
||||
z = (lp_lon <= -d40 ? 1: 2);
|
||||
}
|
||||
else if (lp_lat >= 0) { // 3|4
|
||||
z = (lp_lon <= -d40 ? 3: 4);
|
||||
}
|
||||
else if (lp_lat >= -d4044118) { // 5|6|7|8
|
||||
if (lp_lon <= -d100) z = 5; // 5
|
||||
else if (lp_lon <= -d20) z = 6; // 6
|
||||
else if (lp_lon <= d80) z = 7; // 7
|
||||
else z = 8; // 8
|
||||
}
|
||||
else { // 9|10|11|12
|
||||
if (lp_lon <= -d100) z = 9; // 9
|
||||
else if (lp_lon <= -d20) z = 10; // 10
|
||||
else if (lp_lon <= d80) z = 11; // 11
|
||||
else z = 12; // 12
|
||||
}
|
||||
|
||||
lp_lon -= this->m_proj_parm.pj[z-1]->params().lam0;
|
||||
this->m_proj_parm.pj[z-1]->fwd(lp_lon, lp_lat, xy_x, xy_y);
|
||||
xy_x += this->m_proj_parm.pj[z-1]->params().x0;
|
||||
xy_y += this->m_proj_parm.pj[z-1]->params().y0;
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T xy_x, T xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
static const T d4044118 = igh::d4044118<T>();
|
||||
static const T d10 = igh::d10<T>();
|
||||
static const T d20 = igh::d20<T>();
|
||||
static const T d40 = igh::d40<T>();
|
||||
static const T d50 = igh::d50<T>();
|
||||
static const T d60 = igh::d60<T>();
|
||||
static const T d80 = igh::d80<T>();
|
||||
static const T d90 = igh::d90<T>();
|
||||
static const T d100 = igh::d100<T>();
|
||||
static const T d160 = igh::d160<T>();
|
||||
static const T d180 = igh::d180<T>();
|
||||
|
||||
static const T c2 = 2.0;
|
||||
|
||||
const T y90 = this->m_proj_parm.dy0 + sqrt(c2); // lt=90 corresponds to y=y0+sqrt(2.0)
|
||||
|
||||
int z = 0;
|
||||
if (xy_y > y90+epsilon || xy_y < -y90+epsilon) // 0
|
||||
z = 0;
|
||||
else if (xy_y >= d4044118) // 1|2
|
||||
z = (xy_x <= -d40? 1: 2);
|
||||
else if (xy_y >= 0) // 3|4
|
||||
z = (xy_x <= -d40? 3: 4);
|
||||
else if (xy_y >= -d4044118) { // 5|6|7|8
|
||||
if (xy_x <= -d100) z = 5; // 5
|
||||
else if (xy_x <= -d20) z = 6; // 6
|
||||
else if (xy_x <= d80) z = 7; // 7
|
||||
else z = 8; // 8
|
||||
}
|
||||
else { // 9|10|11|12
|
||||
if (xy_x <= -d100) z = 9; // 9
|
||||
else if (xy_x <= -d20) z = 10; // 10
|
||||
else if (xy_x <= d80) z = 11; // 11
|
||||
else z = 12; // 12
|
||||
}
|
||||
|
||||
if (z)
|
||||
{
|
||||
int ok = 0;
|
||||
|
||||
xy_x -= this->m_proj_parm.pj[z-1]->params().x0;
|
||||
xy_y -= this->m_proj_parm.pj[z-1]->params().y0;
|
||||
this->m_proj_parm.pj[z-1]->inv(xy_x, xy_y, lp_lon, lp_lat);
|
||||
lp_lon += this->m_proj_parm.pj[z-1]->params().lam0;
|
||||
|
||||
switch (z) {
|
||||
case 1: ok = (lp_lon >= -d180-epsilon && lp_lon <= -d40+epsilon) ||
|
||||
((lp_lon >= -d40-epsilon && lp_lon <= -d10+epsilon) &&
|
||||
(lp_lat >= d60-epsilon && lp_lat <= d90+epsilon)); break;
|
||||
case 2: ok = (lp_lon >= -d40-epsilon && lp_lon <= d180+epsilon) ||
|
||||
((lp_lon >= -d180-epsilon && lp_lon <= -d160+epsilon) &&
|
||||
(lp_lat >= d50-epsilon && lp_lat <= d90+epsilon)) ||
|
||||
((lp_lon >= -d50-epsilon && lp_lon <= -d40+epsilon) &&
|
||||
(lp_lat >= d60-epsilon && lp_lat <= d90+epsilon)); break;
|
||||
case 3: ok = (lp_lon >= -d180-epsilon && lp_lon <= -d40+epsilon); break;
|
||||
case 4: ok = (lp_lon >= -d40-epsilon && lp_lon <= d180+epsilon); break;
|
||||
case 5: ok = (lp_lon >= -d180-epsilon && lp_lon <= -d100+epsilon); break;
|
||||
case 6: ok = (lp_lon >= -d100-epsilon && lp_lon <= -d20+epsilon); break;
|
||||
case 7: ok = (lp_lon >= -d20-epsilon && lp_lon <= d80+epsilon); break;
|
||||
case 8: ok = (lp_lon >= d80-epsilon && lp_lon <= d180+epsilon); break;
|
||||
case 9: ok = (lp_lon >= -d180-epsilon && lp_lon <= -d100+epsilon); break;
|
||||
case 10: ok = (lp_lon >= -d100-epsilon && lp_lon <= -d20+epsilon); break;
|
||||
case 11: ok = (lp_lon >= -d20-epsilon && lp_lon <= d80+epsilon); break;
|
||||
case 12: ok = (lp_lon >= d80-epsilon && lp_lon <= d180+epsilon); break;
|
||||
}
|
||||
|
||||
z = (!ok? 0: z); // projectable?
|
||||
}
|
||||
// if (!z) pj_errno = -15; // invalid x or y
|
||||
if (!z) lp_lon = HUGE_VAL;
|
||||
if (!z) lp_lat = HUGE_VAL;
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "igh_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Interrupted Goode Homolosine
|
||||
template <typename Params, typename Parameters, typename T>
|
||||
inline void setup_igh(Params const& params, Parameters& par, par_igh<T, Parameters>& proj_parm)
|
||||
{
|
||||
static const T d0 = 0;
|
||||
static const T d4044118 = igh::d4044118<T>();
|
||||
static const T d20 = igh::d20<T>();
|
||||
static const T d30 = igh::d30<T>();
|
||||
static const T d60 = igh::d60<T>();
|
||||
static const T d100 = igh::d100<T>();
|
||||
static const T d140 = igh::d140<T>();
|
||||
static const T d160 = igh::d160<T>();
|
||||
|
||||
/*
|
||||
Zones:
|
||||
|
||||
-180 -40 180
|
||||
+--------------+-------------------------+ Zones 1,2,9,10,11 & 12:
|
||||
|1 |2 | Mollweide projection
|
||||
| | |
|
||||
+--------------+-------------------------+ Zones 3,4,5,6,7 & 8:
|
||||
|3 |4 | Sinusoidal projection
|
||||
| | |
|
||||
0 +-------+------+-+-----------+-----------+
|
||||
|5 |6 |7 |8 |
|
||||
| | | | |
|
||||
+-------+--------+-----------+-----------+
|
||||
|9 |10 |11 |12 |
|
||||
| | | | |
|
||||
+-------+--------+-----------+-----------+
|
||||
-180 -100 -20 80 180
|
||||
*/
|
||||
|
||||
T lp_lam = 0, lp_phi = d4044118;
|
||||
T xy1_x, xy1_y;
|
||||
T xy3_x, xy3_y;
|
||||
|
||||
// IMPORTANT: Force spherical sinu projection
|
||||
// This is required because unlike in the original proj4 here
|
||||
// parameters are used to initialize underlying projections.
|
||||
// In the original code zeroed parameters are passed which
|
||||
// could be done here as well though.
|
||||
par.es = 0.;
|
||||
|
||||
// sinusoidal zones
|
||||
do_setup<sinu_entry>(3, params, par, proj_parm, -d100, d0, -d100);
|
||||
do_setup<sinu_entry>(4, params, par, proj_parm, d30, d0, d30);
|
||||
do_setup<sinu_entry>(5, params, par, proj_parm, -d160, d0, -d160);
|
||||
do_setup<sinu_entry>(6, params, par, proj_parm, -d60, d0, -d60);
|
||||
do_setup<sinu_entry>(7, params, par, proj_parm, d20, d0, d20);
|
||||
do_setup<sinu_entry>(8, params, par, proj_parm, d140, d0, d140);
|
||||
|
||||
// mollweide zones
|
||||
do_setup<moll_entry>(1, params, par, proj_parm, -d100, d0, -d100);
|
||||
|
||||
// y0 ?
|
||||
proj_parm.pj[0]->fwd(lp_lam, lp_phi, xy1_x, xy1_y); // zone 1
|
||||
proj_parm.pj[2]->fwd(lp_lam, lp_phi, xy3_x, xy3_y); // zone 3
|
||||
// y0 + xy1_y = xy3_y for lt = 40d44'11.8"
|
||||
proj_parm.dy0 = xy3_y - xy1_y;
|
||||
|
||||
proj_parm.pj[0]->mutable_params().y0 = proj_parm.dy0;
|
||||
|
||||
// mollweide zones (cont'd)
|
||||
do_setup<moll_entry>( 2, params, par, proj_parm, d30, proj_parm.dy0, d30);
|
||||
do_setup<moll_entry>( 9, params, par, proj_parm, -d160, -proj_parm.dy0, -d160);
|
||||
do_setup<moll_entry>(10, params, par, proj_parm, -d60, -proj_parm.dy0, -d60);
|
||||
do_setup<moll_entry>(11, params, par, proj_parm, d20, -proj_parm.dy0, d20);
|
||||
do_setup<moll_entry>(12, params, par, proj_parm, d140, -proj_parm.dy0, d140);
|
||||
|
||||
// Already done before
|
||||
//par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::igh
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Interrupted Goode Homolosine 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_igh.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct igh_spheroid : public detail::igh::base_igh_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline igh_spheroid(Params const& params, Parameters const& par)
|
||||
: detail::igh::base_igh_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::igh::setup_igh(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_igh, igh_spheroid, igh_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(igh_entry, igh_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(igh_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(igh, igh_entry)
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IGH_HPP
|
||||
|
||||
@@ -0,0 +1,322 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_IMW_P_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_IMW_P_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/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_mlfn.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace imw_p
|
||||
{
|
||||
|
||||
static const double tolerance = 1e-10;
|
||||
static const double epsilon = 1e-10;
|
||||
|
||||
template <typename T>
|
||||
struct point_xy { T x, y; }; // specific for IMW_P
|
||||
|
||||
enum mode_type {
|
||||
none_is_zero = 0, /* phi_1 and phi_2 != 0 */
|
||||
phi_1_is_zero = 1, /* phi_1 = 0 */
|
||||
phi_2_is_zero = -1 /* phi_2 = 0 */
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct par_imw_p
|
||||
{
|
||||
T P, Pp, Q, Qp, R_1, R_2, sphi_1, sphi_2, C2;
|
||||
T phi_1, phi_2, lam_1;
|
||||
detail::en<T> en;
|
||||
mode_type mode;
|
||||
};
|
||||
|
||||
template <typename Params, typename T>
|
||||
inline int phi12(Params const& params,
|
||||
par_imw_p<T> & proj_parm, T *del, T *sig)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
if (!pj_param_r<srs::spar::lat_1>(params, "lat_1", srs::dpar::lat_1, proj_parm.phi_1) ||
|
||||
!pj_param_r<srs::spar::lat_2>(params, "lat_2", srs::dpar::lat_2, proj_parm.phi_2)) {
|
||||
err = -41;
|
||||
} else {
|
||||
//proj_parm.phi_1 = pj_get_param_r(par.params, "lat_1"); // set above
|
||||
//proj_parm.phi_2 = pj_get_param_r(par.params, "lat_2"); // set above
|
||||
*del = 0.5 * (proj_parm.phi_2 - proj_parm.phi_1);
|
||||
*sig = 0.5 * (proj_parm.phi_2 + proj_parm.phi_1);
|
||||
err = (fabs(*del) < epsilon || fabs(*sig) < epsilon) ? -42 : 0;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
template <typename Parameters, typename T>
|
||||
inline point_xy<T> loc_for(T const& lp_lam, T const& lp_phi,
|
||||
Parameters const& par,
|
||||
par_imw_p<T> const& proj_parm,
|
||||
T *yc)
|
||||
{
|
||||
point_xy<T> xy;
|
||||
|
||||
if (lp_phi == 0.0) {
|
||||
xy.x = lp_lam;
|
||||
xy.y = 0.;
|
||||
} else {
|
||||
T xa, ya, xb, yb, xc, D, B, m, sp, t, R, C;
|
||||
|
||||
sp = sin(lp_phi);
|
||||
m = pj_mlfn(lp_phi, sp, cos(lp_phi), proj_parm.en);
|
||||
xa = proj_parm.Pp + proj_parm.Qp * m;
|
||||
ya = proj_parm.P + proj_parm.Q * m;
|
||||
R = 1. / (tan(lp_phi) * sqrt(1. - par.es * sp * sp));
|
||||
C = sqrt(R * R - xa * xa);
|
||||
if (lp_phi < 0.) C = - C;
|
||||
C += ya - R;
|
||||
if (proj_parm.mode == phi_2_is_zero) {
|
||||
xb = lp_lam;
|
||||
yb = proj_parm.C2;
|
||||
} else {
|
||||
t = lp_lam * proj_parm.sphi_2;
|
||||
xb = proj_parm.R_2 * sin(t);
|
||||
yb = proj_parm.C2 + proj_parm.R_2 * (1. - cos(t));
|
||||
}
|
||||
if (proj_parm.mode == phi_1_is_zero) {
|
||||
xc = lp_lam;
|
||||
*yc = 0.;
|
||||
} else {
|
||||
t = lp_lam * proj_parm.sphi_1;
|
||||
xc = proj_parm.R_1 * sin(t);
|
||||
*yc = proj_parm.R_1 * (1. - cos(t));
|
||||
}
|
||||
D = (xb - xc)/(yb - *yc);
|
||||
B = xc + D * (C + R - *yc);
|
||||
xy.x = D * sqrt(R * R * (1 + D * D) - B * B);
|
||||
if (lp_phi > 0)
|
||||
xy.x = - xy.x;
|
||||
xy.x = (B + xy.x) / (1. + D * D);
|
||||
xy.y = sqrt(R * R - xy.x * xy.x);
|
||||
if (lp_phi > 0)
|
||||
xy.y = - xy.y;
|
||||
xy.y += C + R;
|
||||
}
|
||||
return (xy);
|
||||
}
|
||||
template <typename Parameters, typename T>
|
||||
inline void xy(Parameters const& par, par_imw_p<T> const& proj_parm,
|
||||
T const& phi,
|
||||
T *x, T *y, T *sp, T *R)
|
||||
{
|
||||
T F;
|
||||
|
||||
*sp = sin(phi);
|
||||
*R = 1./(tan(phi) * sqrt(1. - par.es * *sp * *sp ));
|
||||
F = proj_parm.lam_1 * *sp;
|
||||
*y = *R * (1 - cos(F));
|
||||
*x = *R * sin(F);
|
||||
}
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_imw_p_ellipsoid
|
||||
: public base_t_fi<base_imw_p_ellipsoid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_imw_p<T> m_proj_parm;
|
||||
|
||||
inline base_imw_p_ellipsoid(const Parameters& par)
|
||||
: base_t_fi<base_imw_p_ellipsoid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(e_forward) ellipsoid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
T yc = 0;
|
||||
point_xy<T> xy = loc_for(lp_lon, lp_lat, this->m_par, m_proj_parm, &yc);
|
||||
xy_x = xy.x; xy_y = xy.y;
|
||||
}
|
||||
|
||||
// INVERSE(e_inverse) ellipsoid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
point_xy<T> t;
|
||||
T yc = 0.0;
|
||||
int i = 0;
|
||||
const int n_max_iter = 1000; /* Arbitrarily choosen number... */
|
||||
|
||||
lp_lat = this->m_proj_parm.phi_2;
|
||||
lp_lon = xy_x / cos(lp_lat);
|
||||
do {
|
||||
t = loc_for(lp_lon, lp_lat, this->m_par, m_proj_parm, &yc);
|
||||
lp_lat = ((lp_lat - this->m_proj_parm.phi_1) * (xy_y - yc) / (t.y - yc)) + this->m_proj_parm.phi_1;
|
||||
lp_lon = lp_lon * xy_x / t.x;
|
||||
i++;
|
||||
} while (i < n_max_iter &&
|
||||
(fabs(t.x - xy_x) > tolerance || fabs(t.y - xy_y) > tolerance));
|
||||
|
||||
if( i == n_max_iter )
|
||||
{
|
||||
lp_lon = lp_lat = HUGE_VAL;
|
||||
}
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "imw_p_ellipsoid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// International Map of the World Polyconic
|
||||
template <typename Params, typename Parameters, typename T>
|
||||
inline void setup_imw_p(Params const& params, Parameters const& par, par_imw_p<T>& proj_parm)
|
||||
{
|
||||
T del, sig, s, t, x1, x2, T2, y1, m1, m2, y2;
|
||||
int err;
|
||||
|
||||
proj_parm.en = pj_enfn<T>(par.es);
|
||||
if( (err = phi12(params, proj_parm, &del, &sig)) != 0)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(err) );
|
||||
if (proj_parm.phi_2 < proj_parm.phi_1) { /* make sure proj_parm.phi_1 most southerly */
|
||||
del = proj_parm.phi_1;
|
||||
proj_parm.phi_1 = proj_parm.phi_2;
|
||||
proj_parm.phi_2 = del;
|
||||
}
|
||||
if (pj_param_r<srs::spar::lon_1>(params, "lon_1", srs::dpar::lon_1, proj_parm.lam_1)) {
|
||||
/* empty */
|
||||
} else { /* use predefined based upon latitude */
|
||||
sig = fabs(sig * geometry::math::r2d<T>());
|
||||
if (sig <= 60) sig = 2.;
|
||||
else if (sig <= 76) sig = 4.;
|
||||
else sig = 8.;
|
||||
proj_parm.lam_1 = sig * geometry::math::d2r<T>();
|
||||
}
|
||||
proj_parm.mode = none_is_zero;
|
||||
if (proj_parm.phi_1 != 0.0)
|
||||
xy(par, proj_parm, proj_parm.phi_1, &x1, &y1, &proj_parm.sphi_1, &proj_parm.R_1);
|
||||
else {
|
||||
proj_parm.mode = phi_1_is_zero;
|
||||
y1 = 0.;
|
||||
x1 = proj_parm.lam_1;
|
||||
}
|
||||
if (proj_parm.phi_2 != 0.0)
|
||||
xy(par, proj_parm, proj_parm.phi_2, &x2, &T2, &proj_parm.sphi_2, &proj_parm.R_2);
|
||||
else {
|
||||
proj_parm.mode = phi_2_is_zero;
|
||||
T2 = 0.;
|
||||
x2 = proj_parm.lam_1;
|
||||
}
|
||||
m1 = pj_mlfn(proj_parm.phi_1, proj_parm.sphi_1, cos(proj_parm.phi_1), proj_parm.en);
|
||||
m2 = pj_mlfn(proj_parm.phi_2, proj_parm.sphi_2, cos(proj_parm.phi_2), proj_parm.en);
|
||||
t = m2 - m1;
|
||||
s = x2 - x1;
|
||||
y2 = sqrt(t * t - s * s) + y1;
|
||||
proj_parm.C2 = y2 - T2;
|
||||
t = 1. / t;
|
||||
proj_parm.P = (m2 * y1 - m1 * y2) * t;
|
||||
proj_parm.Q = (y2 - y1) * t;
|
||||
proj_parm.Pp = (m2 * x1 - m1 * x2) * t;
|
||||
proj_parm.Qp = (x2 - x1) * t;
|
||||
}
|
||||
|
||||
}} // namespace detail::imw_p
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief International Map of the World Polyconic projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Mod. Polyconic
|
||||
- Ellipsoid
|
||||
\par Projection parameters
|
||||
- lat_1: Latitude of first standard parallel
|
||||
- lat_2: Latitude of second standard parallel
|
||||
- lon_1 (degrees)
|
||||
\par Example
|
||||
\image html ex_imw_p.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct imw_p_ellipsoid : public detail::imw_p::base_imw_p_ellipsoid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline imw_p_ellipsoid(Params const& params, Parameters const& par)
|
||||
: detail::imw_p::base_imw_p_ellipsoid<T, Parameters>(par)
|
||||
{
|
||||
detail::imw_p::setup_imw_p(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_imw_p, imw_p_ellipsoid, imw_p_ellipsoid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(imw_p_entry, imw_p_ellipsoid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(imw_p_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(imw_p, imw_p_entry)
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_IMW_P_HPP
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,285 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// Original copyright notice:
|
||||
|
||||
// Purpose: Implementation of the krovak (Krovak) projection.
|
||||
// Definition: http://www.ihsenergy.com/epsg/guid7.html#1.4.3
|
||||
// Author: Thomas Flemming, tf@ttqv.com
|
||||
// Copyright (c) 2001, Thomas Flemming, tf@ttqv.com
|
||||
|
||||
// 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_KROVAK_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_KROVAK_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/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace krovak
|
||||
{
|
||||
static double epsilon = 1e-15;
|
||||
static double S45 = 0.785398163397448; /* 45 deg */
|
||||
static double S90 = 1.570796326794896; /* 90 deg */
|
||||
static double UQ = 1.04216856380474; /* DU(2, 59, 42, 42.69689) */
|
||||
static double S0 = 1.37008346281555; /* Latitude of pseudo standard parallel 78deg 30'00" N */
|
||||
/* Not sure at all of the appropriate number for max_iter... */
|
||||
static int max_iter = 100;
|
||||
|
||||
template <typename T>
|
||||
struct par_krovak
|
||||
{
|
||||
T alpha;
|
||||
T k;
|
||||
T n;
|
||||
T rho0;
|
||||
T ad;
|
||||
int czech;
|
||||
};
|
||||
|
||||
/**
|
||||
NOTES: According to EPSG the full Krovak projection method should have
|
||||
the following parameters. Within PROJ.4 the azimuth, and pseudo
|
||||
standard parallel are hardcoded in the algorithm and can't be
|
||||
altered from outside. The others all have defaults to match the
|
||||
common usage with Krovak projection.
|
||||
|
||||
lat_0 = latitude of centre of the projection
|
||||
|
||||
lon_0 = longitude of centre of the projection
|
||||
|
||||
** = azimuth (true) of the centre line passing through the centre of the projection
|
||||
|
||||
** = latitude of pseudo standard parallel
|
||||
|
||||
k = scale factor on the pseudo standard parallel
|
||||
|
||||
x_0 = False Easting of the centre of the projection at the apex of the cone
|
||||
|
||||
y_0 = False Northing of the centre of the projection at the apex of the cone
|
||||
|
||||
**/
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_krovak_ellipsoid
|
||||
: public base_t_fi<base_krovak_ellipsoid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_krovak<T> m_proj_parm;
|
||||
|
||||
inline base_krovak_ellipsoid(const Parameters& par)
|
||||
: base_t_fi<base_krovak_ellipsoid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(e_forward) ellipsoid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
T gfi, u, deltav, s, d, eps, rho;
|
||||
|
||||
gfi = math::pow( (T(1) + this->m_par.e * sin(lp_lat)) / (T(1) - this->m_par.e * sin(lp_lat)), this->m_proj_parm.alpha * this->m_par.e / T(2));
|
||||
|
||||
u = 2. * (atan(this->m_proj_parm.k * math::pow( tan(lp_lat / T(2) + S45), this->m_proj_parm.alpha) / gfi)-S45);
|
||||
deltav = -lp_lon * this->m_proj_parm.alpha;
|
||||
|
||||
s = asin(cos(this->m_proj_parm.ad) * sin(u) + sin(this->m_proj_parm.ad) * cos(u) * cos(deltav));
|
||||
d = asin(cos(u) * sin(deltav) / cos(s));
|
||||
|
||||
eps = this->m_proj_parm.n * d;
|
||||
rho = this->m_proj_parm.rho0 * math::pow(tan(S0 / T(2) + S45) , this->m_proj_parm.n) / math::pow(tan(s / T(2) + S45) , this->m_proj_parm.n);
|
||||
|
||||
xy_y = rho * cos(eps);
|
||||
xy_x = rho * sin(eps);
|
||||
|
||||
xy_y *= this->m_proj_parm.czech;
|
||||
xy_x *= this->m_proj_parm.czech;
|
||||
}
|
||||
|
||||
// INVERSE(e_inverse) ellipsoid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T xy_x, T xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
T u, deltav, s, d, eps, rho, fi1, xy0;
|
||||
int i;
|
||||
|
||||
// TODO: replace with std::swap()
|
||||
xy0 = xy_x;
|
||||
xy_x = xy_y;
|
||||
xy_y = xy0;
|
||||
|
||||
xy_x *= this->m_proj_parm.czech;
|
||||
xy_y *= this->m_proj_parm.czech;
|
||||
|
||||
rho = sqrt(xy_x * xy_x + xy_y * xy_y);
|
||||
eps = atan2(xy_y, xy_x);
|
||||
|
||||
d = eps / sin(S0);
|
||||
s = T(2) * (atan(math::pow(this->m_proj_parm.rho0 / rho, T(1) / this->m_proj_parm.n) * tan(S0 / T(2) + S45)) - S45);
|
||||
|
||||
u = asin(cos(this->m_proj_parm.ad) * sin(s) - sin(this->m_proj_parm.ad) * cos(s) * cos(d));
|
||||
deltav = asin(cos(s) * sin(d) / cos(u));
|
||||
|
||||
lp_lon = this->m_par.lam0 - deltav / this->m_proj_parm.alpha;
|
||||
|
||||
/* ITERATION FOR lp_lat */
|
||||
fi1 = u;
|
||||
|
||||
for (i = max_iter; i ; --i) {
|
||||
lp_lat = T(2) * ( atan( math::pow( this->m_proj_parm.k, T(-1) / this->m_proj_parm.alpha) *
|
||||
math::pow( tan(u / T(2) + S45) , T(1) / this->m_proj_parm.alpha) *
|
||||
math::pow( (T(1) + this->m_par.e * sin(fi1)) / (T(1) - this->m_par.e * sin(fi1)) , this->m_par.e / T(2))
|
||||
) - S45);
|
||||
|
||||
if (fabs(fi1 - lp_lat) < epsilon)
|
||||
break;
|
||||
fi1 = lp_lat;
|
||||
}
|
||||
if( i == 0 )
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_non_convergent) );
|
||||
|
||||
lp_lon -= this->m_par.lam0;
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "krovak_ellipsoid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Krovak
|
||||
template <typename Params, typename Parameters, typename T>
|
||||
inline void setup_krovak(Params const& params, Parameters& par, par_krovak<T>& proj_parm)
|
||||
{
|
||||
T u0, n0, g;
|
||||
|
||||
/* we want Bessel as fixed ellipsoid */
|
||||
par.a = 6377397.155;
|
||||
par.es = 0.006674372230614;
|
||||
par.e = sqrt(par.es);
|
||||
|
||||
/* if latitude of projection center is not set, use 49d30'N */
|
||||
if (!pj_param_exists<srs::spar::lat_0>(params, "lat_0", srs::dpar::lat_0))
|
||||
par.phi0 = 0.863937979737193;
|
||||
|
||||
/* if center long is not set use 42d30'E of Ferro - 17d40' for Ferro */
|
||||
/* that will correspond to using longitudes relative to greenwich */
|
||||
/* as input and output, instead of lat/long relative to Ferro */
|
||||
if (!pj_param_exists<srs::spar::lon_0>(params, "lon_0", srs::dpar::lon_0))
|
||||
par.lam0 = 0.7417649320975901 - 0.308341501185665;
|
||||
|
||||
/* if scale not set default to 0.9999 */
|
||||
if (!pj_param_exists<srs::spar::k>(params, "k", srs::dpar::k))
|
||||
par.k0 = 0.9999;
|
||||
|
||||
proj_parm.czech = 1;
|
||||
if( !pj_param_exists<srs::spar::czech>(params, "czech", srs::dpar::czech) )
|
||||
proj_parm.czech = -1;
|
||||
|
||||
/* Set up shared parameters between forward and inverse */
|
||||
proj_parm.alpha = sqrt(T(1) + (par.es * math::pow(cos(par.phi0), 4)) / (T(1) - par.es));
|
||||
u0 = asin(sin(par.phi0) / proj_parm.alpha);
|
||||
g = math::pow( (T(1) + par.e * sin(par.phi0)) / (T(1) - par.e * sin(par.phi0)) , proj_parm.alpha * par.e / T(2) );
|
||||
proj_parm.k = tan( u0 / 2. + S45) / math::pow(tan(par.phi0 / T(2) + S45) , proj_parm.alpha) * g;
|
||||
n0 = sqrt(T(1) - par.es) / (T(1) - par.es * math::pow(sin(par.phi0), 2));
|
||||
proj_parm.n = sin(S0);
|
||||
proj_parm.rho0 = par.k0 * n0 / tan(S0);
|
||||
proj_parm.ad = S90 - UQ;
|
||||
}
|
||||
|
||||
}} // namespace detail::krovak
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Krovak projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Pseudocylindrical
|
||||
- Ellipsoid
|
||||
\par Projection parameters
|
||||
- lat_ts: Latitude of true scale (degrees)
|
||||
- lat_0: Latitude of origin
|
||||
- lon_0: Central meridian
|
||||
- k: Scale factor on the pseudo standard parallel
|
||||
\par Example
|
||||
\image html ex_krovak.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct krovak_ellipsoid : public detail::krovak::base_krovak_ellipsoid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline krovak_ellipsoid(Params const& params, Parameters const& par)
|
||||
: detail::krovak::base_krovak_ellipsoid<T, Parameters>(par)
|
||||
{
|
||||
detail::krovak::setup_krovak(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_krovak, krovak_ellipsoid, krovak_ellipsoid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(krovak_entry, krovak_ellipsoid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(krovak_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(krovak, krovak_entry)
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_KROVAK_HPP
|
||||
|
||||
@@ -0,0 +1,252 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_LABRD_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_LABRD_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/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace labrd
|
||||
{
|
||||
static const double epsilon = 1.e-10;
|
||||
|
||||
template <typename T>
|
||||
struct par_labrd
|
||||
{
|
||||
T Az, kRg, p0s, A, C, Ca, Cb, Cc, Cd;
|
||||
int rot;
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_labrd_ellipsoid
|
||||
: public base_t_fi<base_labrd_ellipsoid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_labrd<T> m_proj_parm;
|
||||
|
||||
inline base_labrd_ellipsoid(const Parameters& par)
|
||||
: base_t_fi<base_labrd_ellipsoid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(e_forward)
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
static const T fourth_pi = detail::fourth_pi<T>();
|
||||
|
||||
T V1, V2, ps, sinps, cosps, sinps2, cosps2;
|
||||
T I1, I2, I3, I4, I5, I6, x2, y2, t;
|
||||
|
||||
V1 = this->m_proj_parm.A * log( tan(fourth_pi + .5 * lp_lat) );
|
||||
t = this->m_par.e * sin(lp_lat);
|
||||
V2 = .5 * this->m_par.e * this->m_proj_parm.A * log ((1. + t)/(1. - t));
|
||||
ps = 2. * (atan(exp(V1 - V2 + this->m_proj_parm.C)) - fourth_pi);
|
||||
I1 = ps - this->m_proj_parm.p0s;
|
||||
cosps = cos(ps); cosps2 = cosps * cosps;
|
||||
sinps = sin(ps); sinps2 = sinps * sinps;
|
||||
I4 = this->m_proj_parm.A * cosps;
|
||||
I2 = .5 * this->m_proj_parm.A * I4 * sinps;
|
||||
I3 = I2 * this->m_proj_parm.A * this->m_proj_parm.A * (5. * cosps2 - sinps2) / 12.;
|
||||
I6 = I4 * this->m_proj_parm.A * this->m_proj_parm.A;
|
||||
I5 = I6 * (cosps2 - sinps2) / 6.;
|
||||
I6 *= this->m_proj_parm.A * this->m_proj_parm.A *
|
||||
(5. * cosps2 * cosps2 + sinps2 * (sinps2 - 18. * cosps2)) / 120.;
|
||||
t = lp_lon * lp_lon;
|
||||
xy_x = this->m_proj_parm.kRg * lp_lon * (I4 + t * (I5 + t * I6));
|
||||
xy_y = this->m_proj_parm.kRg * (I1 + t * (I2 + t * I3));
|
||||
x2 = xy_x * xy_x;
|
||||
y2 = xy_y * xy_y;
|
||||
V1 = 3. * xy_x * y2 - xy_x * x2;
|
||||
V2 = xy_y * y2 - 3. * x2 * xy_y;
|
||||
xy_x += this->m_proj_parm.Ca * V1 + this->m_proj_parm.Cb * V2;
|
||||
xy_y += this->m_proj_parm.Ca * V2 - this->m_proj_parm.Cb * V1;
|
||||
}
|
||||
|
||||
// INVERSE(e_inverse) ellipsoid & spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T xy_x, T xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
static const T fourth_pi = detail::fourth_pi<T>();
|
||||
|
||||
/* t = 0.0 optimization is to avoid a false positive cppcheck warning */
|
||||
/* (cppcheck git beaf29c15867984aa3c2a15cf15bd7576ccde2b3). Might no */
|
||||
/* longer be necessary with later versions. */
|
||||
T x2, y2, V1, V2, V3, V4, t = 0.0, t2, ps, pe, tpe, s;
|
||||
T I7, I8, I9, I10, I11, d, Re;
|
||||
int i;
|
||||
|
||||
x2 = xy_x * xy_x;
|
||||
y2 = xy_y * xy_y;
|
||||
V1 = 3. * xy_x * y2 - xy_x * x2;
|
||||
V2 = xy_y * y2 - 3. * x2 * xy_y;
|
||||
V3 = xy_x * (5. * y2 * y2 + x2 * (-10. * y2 + x2 ));
|
||||
V4 = xy_y * (5. * x2 * x2 + y2 * (-10. * x2 + y2 ));
|
||||
xy_x += - this->m_proj_parm.Ca * V1 - this->m_proj_parm.Cb * V2 + this->m_proj_parm.Cc * V3 + this->m_proj_parm.Cd * V4;
|
||||
xy_y += this->m_proj_parm.Cb * V1 - this->m_proj_parm.Ca * V2 - this->m_proj_parm.Cd * V3 + this->m_proj_parm.Cc * V4;
|
||||
ps = this->m_proj_parm.p0s + xy_y / this->m_proj_parm.kRg;
|
||||
pe = ps + this->m_par.phi0 - this->m_proj_parm.p0s;
|
||||
|
||||
for ( i = 20; i; --i) {
|
||||
V1 = this->m_proj_parm.A * log(tan(fourth_pi + .5 * pe));
|
||||
tpe = this->m_par.e * sin(pe);
|
||||
V2 = .5 * this->m_par.e * this->m_proj_parm.A * log((1. + tpe)/(1. - tpe));
|
||||
t = ps - 2. * (atan(exp(V1 - V2 + this->m_proj_parm.C)) - fourth_pi);
|
||||
pe += t;
|
||||
if (fabs(t) < epsilon)
|
||||
break;
|
||||
}
|
||||
|
||||
t = this->m_par.e * sin(pe);
|
||||
t = 1. - t * t;
|
||||
Re = this->m_par.one_es / ( t * sqrt(t) );
|
||||
t = tan(ps);
|
||||
t2 = t * t;
|
||||
s = this->m_proj_parm.kRg * this->m_proj_parm.kRg;
|
||||
d = Re * this->m_par.k0 * this->m_proj_parm.kRg;
|
||||
I7 = t / (2. * d);
|
||||
I8 = t * (5. + 3. * t2) / (24. * d * s);
|
||||
d = cos(ps) * this->m_proj_parm.kRg * this->m_proj_parm.A;
|
||||
I9 = 1. / d;
|
||||
d *= s;
|
||||
I10 = (1. + 2. * t2) / (6. * d);
|
||||
I11 = (5. + t2 * (28. + 24. * t2)) / (120. * d * s);
|
||||
x2 = xy_x * xy_x;
|
||||
lp_lat = pe + x2 * (-I7 + I8 * x2);
|
||||
lp_lon = xy_x * (I9 + x2 * (-I10 + x2 * I11));
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "labrd_ellipsoid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Laborde
|
||||
template <typename Params, typename Parameters, typename T>
|
||||
inline void setup_labrd(Params const& params, Parameters& par, par_labrd<T>& proj_parm)
|
||||
{
|
||||
static const T fourth_pi = detail::fourth_pi<T>();
|
||||
|
||||
T Az, sinp, R, N, t;
|
||||
|
||||
proj_parm.rot = pj_get_param_b<srs::spar::no_rot>(params, "no_rot", srs::dpar::no_rot);
|
||||
Az = pj_get_param_r<T, srs::spar::azi>(params, "azi", srs::dpar::azi);
|
||||
sinp = sin(par.phi0);
|
||||
t = 1. - par.es * sinp * sinp;
|
||||
N = 1. / sqrt(t);
|
||||
R = par.one_es * N / t;
|
||||
proj_parm.kRg = par.k0 * sqrt( N * R );
|
||||
proj_parm.p0s = atan( sqrt(R / N) * tan(par.phi0) );
|
||||
proj_parm.A = sinp / sin(proj_parm.p0s);
|
||||
t = par.e * sinp;
|
||||
proj_parm.C = .5 * par.e * proj_parm.A * log((1. + t)/(1. - t)) +
|
||||
- proj_parm.A * log( tan(fourth_pi + .5 * par.phi0))
|
||||
+ log( tan(fourth_pi + .5 * proj_parm.p0s));
|
||||
t = Az + Az;
|
||||
proj_parm.Ca = (1. - cos(t)) * ( proj_parm.Cb = 1. / (12. * proj_parm.kRg * proj_parm.kRg) );
|
||||
proj_parm.Cb *= sin(t);
|
||||
proj_parm.Cc = 3. * (proj_parm.Ca * proj_parm.Ca - proj_parm.Cb * proj_parm.Cb);
|
||||
proj_parm.Cd = 6. * proj_parm.Ca * proj_parm.Cb;
|
||||
}
|
||||
|
||||
}} // namespace detail::labrd
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Laborde projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Cylindrical
|
||||
- Spheroid
|
||||
- Special for Madagascar
|
||||
\par Projection parameters
|
||||
- no_rot: No rotation (boolean)
|
||||
- azi: Azimuth (or Gamma) (degrees)
|
||||
\par Example
|
||||
\image html ex_labrd.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct labrd_ellipsoid : public detail::labrd::base_labrd_ellipsoid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline labrd_ellipsoid(Params const& params, Parameters const& par)
|
||||
: detail::labrd::base_labrd_ellipsoid<T, Parameters>(par)
|
||||
{
|
||||
detail::labrd::setup_labrd(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_labrd, labrd_ellipsoid, labrd_ellipsoid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(labrd_entry, labrd_ellipsoid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(labrd_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(labrd, labrd_entry)
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_LABRD_HPP
|
||||
|
||||
@@ -0,0 +1,439 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_LAEA_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_LAEA_HPP
|
||||
|
||||
#include <boost/config.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_auth.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_qsfn.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace laea
|
||||
{
|
||||
static const double epsilon10 = 1.e-10;
|
||||
|
||||
enum mode_type {
|
||||
n_pole = 0,
|
||||
s_pole = 1,
|
||||
equit = 2,
|
||||
obliq = 3
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct par_laea
|
||||
{
|
||||
T sinb1;
|
||||
T cosb1;
|
||||
T xmf;
|
||||
T ymf;
|
||||
T mmf;
|
||||
T qp;
|
||||
T dd;
|
||||
T rq;
|
||||
detail::apa<T> apa;
|
||||
mode_type mode;
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_laea_ellipsoid
|
||||
: public base_t_fi<base_laea_ellipsoid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_laea<T> m_proj_parm;
|
||||
|
||||
inline base_laea_ellipsoid(const Parameters& par)
|
||||
: base_t_fi<base_laea_ellipsoid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(e_forward) ellipsoid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
|
||||
T coslam, sinlam, sinphi, q, sinb=0.0, cosb=0.0, b=0.0;
|
||||
|
||||
coslam = cos(lp_lon);
|
||||
sinlam = sin(lp_lon);
|
||||
sinphi = sin(lp_lat);
|
||||
q = pj_qsfn(sinphi, this->m_par.e, this->m_par.one_es);
|
||||
|
||||
if (this->m_proj_parm.mode == obliq || this->m_proj_parm.mode == equit) {
|
||||
sinb = q / this->m_proj_parm.qp;
|
||||
cosb = sqrt(1. - sinb * sinb);
|
||||
}
|
||||
|
||||
switch (this->m_proj_parm.mode) {
|
||||
case obliq:
|
||||
b = 1. + this->m_proj_parm.sinb1 * sinb + this->m_proj_parm.cosb1 * cosb * coslam;
|
||||
break;
|
||||
case equit:
|
||||
b = 1. + cosb * coslam;
|
||||
break;
|
||||
case n_pole:
|
||||
b = half_pi + lp_lat;
|
||||
q = this->m_proj_parm.qp - q;
|
||||
break;
|
||||
case s_pole:
|
||||
b = lp_lat - half_pi;
|
||||
q = this->m_proj_parm.qp + q;
|
||||
break;
|
||||
}
|
||||
if (fabs(b) < epsilon10) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
}
|
||||
|
||||
switch (this->m_proj_parm.mode) {
|
||||
case obliq:
|
||||
b = sqrt(2. / b);
|
||||
xy_y = this->m_proj_parm.ymf * b * (this->m_proj_parm.cosb1 * sinb - this->m_proj_parm.sinb1 * cosb * coslam);
|
||||
goto eqcon;
|
||||
break;
|
||||
case equit:
|
||||
b = sqrt(2. / (1. + cosb * coslam));
|
||||
xy_y = b * sinb * this->m_proj_parm.ymf;
|
||||
eqcon:
|
||||
xy_x = this->m_proj_parm.xmf * b * cosb * sinlam;
|
||||
break;
|
||||
case n_pole:
|
||||
case s_pole:
|
||||
if (q >= 0.) {
|
||||
b = sqrt(q);
|
||||
xy_x = b * sinlam;
|
||||
xy_y = coslam * (this->m_proj_parm.mode == s_pole ? b : -b);
|
||||
} else
|
||||
xy_x = xy_y = 0.;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// INVERSE(e_inverse) ellipsoid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T xy_x, T xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
T cCe, sCe, q, rho, ab=0.0;
|
||||
|
||||
switch (this->m_proj_parm.mode) {
|
||||
case equit:
|
||||
case obliq:
|
||||
xy_x /= this->m_proj_parm.dd;
|
||||
xy_y *= this->m_proj_parm.dd;
|
||||
rho = boost::math::hypot(xy_x, xy_y);
|
||||
if (rho < epsilon10) {
|
||||
lp_lon = 0.;
|
||||
lp_lat = this->m_par.phi0;
|
||||
return;
|
||||
}
|
||||
sCe = 2. * asin(.5 * rho / this->m_proj_parm.rq);
|
||||
cCe = cos(sCe);
|
||||
sCe = sin(sCe);
|
||||
xy_x *= sCe;
|
||||
if (this->m_proj_parm.mode == obliq) {
|
||||
ab = cCe * this->m_proj_parm.sinb1 + xy_y * sCe * this->m_proj_parm.cosb1 / rho;
|
||||
xy_y = rho * this->m_proj_parm.cosb1 * cCe - xy_y * this->m_proj_parm.sinb1 * sCe;
|
||||
} else {
|
||||
ab = xy_y * sCe / rho;
|
||||
xy_y = rho * cCe;
|
||||
}
|
||||
break;
|
||||
case n_pole:
|
||||
xy_y = -xy_y;
|
||||
BOOST_FALLTHROUGH;
|
||||
case s_pole:
|
||||
q = (xy_x * xy_x + xy_y * xy_y);
|
||||
if (q == 0.0) {
|
||||
lp_lon = 0.;
|
||||
lp_lat = this->m_par.phi0;
|
||||
return;
|
||||
}
|
||||
ab = 1. - q / this->m_proj_parm.qp;
|
||||
if (this->m_proj_parm.mode == s_pole)
|
||||
ab = - ab;
|
||||
break;
|
||||
}
|
||||
lp_lon = atan2(xy_x, xy_y);
|
||||
lp_lat = pj_authlat(asin(ab), this->m_proj_parm.apa);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "laea_ellipsoid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_laea_spheroid
|
||||
: public base_t_fi<base_laea_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_laea<T> m_proj_parm;
|
||||
|
||||
inline base_laea_spheroid(const Parameters& par)
|
||||
: base_t_fi<base_laea_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
static const T fourth_pi = detail::fourth_pi<T>();
|
||||
|
||||
T 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 = 1. + cosphi * coslam;
|
||||
goto oblcon;
|
||||
case obliq:
|
||||
xy_y = 1. + this->m_proj_parm.sinb1 * sinphi + this->m_proj_parm.cosb1 * cosphi * coslam;
|
||||
oblcon:
|
||||
if (xy_y <= epsilon10) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
}
|
||||
xy_y = sqrt(2. / xy_y);
|
||||
xy_x = xy_y * cosphi * sin(lp_lon);
|
||||
xy_y *= this->m_proj_parm.mode == equit ? sinphi :
|
||||
this->m_proj_parm.cosb1 * sinphi - this->m_proj_parm.sinb1 * cosphi * coslam;
|
||||
break;
|
||||
case n_pole:
|
||||
coslam = -coslam;
|
||||
BOOST_FALLTHROUGH;
|
||||
case s_pole:
|
||||
if (fabs(lp_lat + this->m_par.phi0) < epsilon10) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
}
|
||||
xy_y = fourth_pi - lp_lat * .5;
|
||||
xy_y = 2. * (this->m_proj_parm.mode == s_pole ? cos(xy_y) : sin(xy_y));
|
||||
xy_x = xy_y * sin(lp_lon);
|
||||
xy_y *= coslam;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// INVERSE(s_inverse) spheroid
|
||||
// Project coordinates from cartesian (x, y) to geographic (lon, lat)
|
||||
inline void inv(T xy_x, T xy_y, T& lp_lon, T& lp_lat) const
|
||||
{
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
|
||||
T cosz=0.0, rh, sinz=0.0;
|
||||
|
||||
rh = boost::math::hypot(xy_x, xy_y);
|
||||
if ((lp_lat = rh * .5 ) > 1.) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
}
|
||||
lp_lat = 2. * asin(lp_lat);
|
||||
if (this->m_proj_parm.mode == obliq || this->m_proj_parm.mode == equit) {
|
||||
sinz = sin(lp_lat);
|
||||
cosz = cos(lp_lat);
|
||||
}
|
||||
switch (this->m_proj_parm.mode) {
|
||||
case equit:
|
||||
lp_lat = fabs(rh) <= epsilon10 ? 0. : asin(xy_y * sinz / rh);
|
||||
xy_x *= sinz;
|
||||
xy_y = cosz * rh;
|
||||
break;
|
||||
case obliq:
|
||||
lp_lat = fabs(rh) <= epsilon10 ? this->m_par.phi0 :
|
||||
asin(cosz * this->m_proj_parm.sinb1 + xy_y * sinz * this->m_proj_parm.cosb1 / rh);
|
||||
xy_x *= sinz * this->m_proj_parm.cosb1;
|
||||
xy_y = (cosz - sin(lp_lat) * this->m_proj_parm.sinb1) * rh;
|
||||
break;
|
||||
case n_pole:
|
||||
xy_y = -xy_y;
|
||||
lp_lat = half_pi - lp_lat;
|
||||
break;
|
||||
case s_pole:
|
||||
lp_lat -= half_pi;
|
||||
break;
|
||||
}
|
||||
lp_lon = (xy_y == 0. && (this->m_proj_parm.mode == equit || this->m_proj_parm.mode == obliq)) ?
|
||||
0. : atan2(xy_x, xy_y);
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "laea_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Lambert Azimuthal Equal Area
|
||||
template <typename Parameters, typename T>
|
||||
inline void setup_laea(Parameters& par, par_laea<T>& proj_parm)
|
||||
{
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
|
||||
T t;
|
||||
|
||||
t = fabs(par.phi0);
|
||||
if (fabs(t - half_pi) < epsilon10)
|
||||
proj_parm.mode = par.phi0 < 0. ? s_pole : n_pole;
|
||||
else if (fabs(t) < epsilon10)
|
||||
proj_parm.mode = equit;
|
||||
else
|
||||
proj_parm.mode = obliq;
|
||||
if (par.es != 0.0) {
|
||||
double sinphi;
|
||||
|
||||
par.e = sqrt(par.es);
|
||||
proj_parm.qp = pj_qsfn(1., par.e, par.one_es);
|
||||
proj_parm.mmf = .5 / (1. - par.es);
|
||||
proj_parm.apa = pj_authset<T>(par.es);
|
||||
switch (proj_parm.mode) {
|
||||
case n_pole:
|
||||
case s_pole:
|
||||
proj_parm.dd = 1.;
|
||||
break;
|
||||
case equit:
|
||||
proj_parm.dd = 1. / (proj_parm.rq = sqrt(.5 * proj_parm.qp));
|
||||
proj_parm.xmf = 1.;
|
||||
proj_parm.ymf = .5 * proj_parm.qp;
|
||||
break;
|
||||
case obliq:
|
||||
proj_parm.rq = sqrt(.5 * proj_parm.qp);
|
||||
sinphi = sin(par.phi0);
|
||||
proj_parm.sinb1 = pj_qsfn(sinphi, par.e, par.one_es) / proj_parm.qp;
|
||||
proj_parm.cosb1 = sqrt(1. - proj_parm.sinb1 * proj_parm.sinb1);
|
||||
proj_parm.dd = cos(par.phi0) / (sqrt(1. - par.es * sinphi * sinphi) *
|
||||
proj_parm.rq * proj_parm.cosb1);
|
||||
proj_parm.ymf = (proj_parm.xmf = proj_parm.rq) / proj_parm.dd;
|
||||
proj_parm.xmf *= proj_parm.dd;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (proj_parm.mode == obliq) {
|
||||
proj_parm.sinb1 = sin(par.phi0);
|
||||
proj_parm.cosb1 = cos(par.phi0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}} // namespace laea
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Lambert Azimuthal Equal Area 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_laea.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct laea_ellipsoid : public detail::laea::base_laea_ellipsoid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline laea_ellipsoid(Params const& , Parameters const& par)
|
||||
: detail::laea::base_laea_ellipsoid<T, Parameters>(par)
|
||||
{
|
||||
detail::laea::setup_laea(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
/*!
|
||||
\brief Lambert Azimuthal Equal Area 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_laea.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct laea_spheroid : public detail::laea::base_laea_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline laea_spheroid(Params const& , Parameters const& par)
|
||||
: detail::laea::base_laea_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::laea::setup_laea(this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_laea, laea_spheroid, laea_ellipsoid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI2(laea_entry, laea_spheroid, laea_ellipsoid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(laea_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(laea, laea_entry)
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_LAEA_HPP
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
// Boost.Geometry - gis-projections (based on PROJ4)
|
||||
|
||||
// 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)
|
||||
|
||||
// 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: 5.0.0
|
||||
|
||||
// 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_LAGRNG_HPP
|
||||
#define BOOST_GEOMETRY_PROJECTIONS_LAGRNG_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/factory_entry.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
|
||||
#include <boost/geometry/srs/projections/impl/projects.hpp>
|
||||
|
||||
#include <boost/geometry/util/math.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace projections
|
||||
{
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail { namespace lagrng
|
||||
{
|
||||
|
||||
static const double tolerance = 1e-10;
|
||||
|
||||
template <typename T>
|
||||
struct par_lagrng
|
||||
{
|
||||
T a1;
|
||||
T rw;
|
||||
T hrw;
|
||||
};
|
||||
|
||||
// template class, using CRTP to implement forward/inverse
|
||||
template <typename T, typename Parameters>
|
||||
struct base_lagrng_spheroid
|
||||
: public base_t_f<base_lagrng_spheroid<T, Parameters>, T, Parameters>
|
||||
{
|
||||
par_lagrng<T> m_proj_parm;
|
||||
|
||||
inline base_lagrng_spheroid(const Parameters& par)
|
||||
: base_t_f<base_lagrng_spheroid<T, Parameters>, T, Parameters>(*this, par)
|
||||
{}
|
||||
|
||||
// FORWARD(s_forward) spheroid
|
||||
// Project coordinates from geographic (lon, lat) to cartesian (x, y)
|
||||
inline void fwd(T lp_lon, T lp_lat, T& xy_x, T& xy_y) const
|
||||
{
|
||||
static const T half_pi = detail::half_pi<T>();
|
||||
|
||||
T v, c;
|
||||
|
||||
if (fabs(fabs(lp_lat) - half_pi) < tolerance) {
|
||||
xy_x = 0;
|
||||
xy_y = lp_lat < 0 ? -2. : 2.;
|
||||
} else {
|
||||
lp_lat = sin(lp_lat);
|
||||
v = this->m_proj_parm.a1 * math::pow((T(1) + lp_lat)/(T(1) - lp_lat), this->m_proj_parm.hrw);
|
||||
if ((c = 0.5 * (v + 1./v) + cos(lp_lon *= this->m_proj_parm.rw)) < tolerance) {
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
|
||||
}
|
||||
xy_x = 2. * sin(lp_lon) / c;
|
||||
xy_y = (v - 1./v) / c;
|
||||
}
|
||||
}
|
||||
|
||||
static inline std::string get_name()
|
||||
{
|
||||
return "lagrng_spheroid";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Lagrange
|
||||
template <typename Params, typename Parameters, typename T>
|
||||
inline void setup_lagrng(Params const& params, Parameters& par, par_lagrng<T>& proj_parm)
|
||||
{
|
||||
T phi1;
|
||||
|
||||
proj_parm.rw = 0.0;
|
||||
bool is_w_set = pj_param_f<srs::spar::w>(params, "W", srs::dpar::w, proj_parm.rw);
|
||||
|
||||
// Boost.Geometry specific, set default parameters manually
|
||||
if (! is_w_set) {
|
||||
bool const use_defaults = ! pj_get_param_b<srs::spar::no_defs>(params, "no_defs", srs::dpar::no_defs);
|
||||
if (use_defaults) {
|
||||
proj_parm.rw = 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (proj_parm.rw <= 0)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_w_or_m_zero_or_less) );
|
||||
|
||||
proj_parm.rw = 1. / proj_parm.rw;
|
||||
proj_parm.hrw = 0.5 * proj_parm.rw;
|
||||
phi1 = pj_get_param_r<T, srs::spar::lat_1>(params, "lat_1", srs::dpar::lat_1);
|
||||
if (fabs(fabs(phi1 = sin(phi1)) - 1.) < tolerance)
|
||||
BOOST_THROW_EXCEPTION( projection_exception(error_lat_larger_than_90) );
|
||||
|
||||
proj_parm.a1 = math::pow((T(1) - phi1)/(T(1) + phi1), proj_parm.hrw);
|
||||
|
||||
par.es = 0.;
|
||||
}
|
||||
|
||||
}} // namespace detail::lagrng
|
||||
#endif // doxygen
|
||||
|
||||
/*!
|
||||
\brief Lagrange projection
|
||||
\ingroup projections
|
||||
\tparam Geographic latlong point type
|
||||
\tparam Cartesian xy point type
|
||||
\tparam Parameters parameter type
|
||||
\par Projection characteristics
|
||||
- Miscellaneous
|
||||
- Spheroid
|
||||
- no inverse
|
||||
\par Projection parameters
|
||||
- W (real)
|
||||
- lat_1: Latitude of first standard parallel (degrees)
|
||||
\par Example
|
||||
\image html ex_lagrng.gif
|
||||
*/
|
||||
template <typename T, typename Parameters>
|
||||
struct lagrng_spheroid : public detail::lagrng::base_lagrng_spheroid<T, Parameters>
|
||||
{
|
||||
template <typename Params>
|
||||
inline lagrng_spheroid(Params const& params, Parameters const& par)
|
||||
: detail::lagrng::base_lagrng_spheroid<T, Parameters>(par)
|
||||
{
|
||||
detail::lagrng::setup_lagrng(params, this->m_par, this->m_proj_parm);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef DOXYGEN_NO_DETAIL
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Static projection
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION(srs::spar::proj_lagrng, lagrng_spheroid, lagrng_spheroid)
|
||||
|
||||
// Factory entry(s)
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_F(lagrng_entry, lagrng_spheroid)
|
||||
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(lagrng_init)
|
||||
{
|
||||
BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(lagrng, lagrng_entry);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
#endif // doxygen
|
||||
|
||||
} // namespace projections
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_PROJECTIONS_LAGRNG_HPP
|
||||
|
||||
Loaded 100 of 15675 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user