mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-17 13:52:09 +00:00
[geometry] updates tests/examples for: "namespace projection is renamed projections to avoid clash with class projection. Suggested by Krzysztof Czainski"
[SVN r77208]
This commit is contained in:
@@ -61,12 +61,12 @@ int main()
|
||||
transform(city3, city3_rad);
|
||||
|
||||
/*
|
||||
projection::sterea_ellipsoid<model::ll::point<radian>, xy_point> proj
|
||||
(projection::init(
|
||||
projections::sterea_ellipsoid<model::ll::point<radian>, xy_point> proj
|
||||
(projections::init(
|
||||
"+lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m"));
|
||||
*/
|
||||
projection::laea_ellipsoid<model::ll::point<radian>, xy_point> proj
|
||||
(projection::init(
|
||||
projections::laea_ellipsoid<model::ll::point<radian>, xy_point> proj
|
||||
(projections::init(
|
||||
" +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m"));
|
||||
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ void test_area_polygon_ll(bool concave, bool hole, double perc)
|
||||
|
||||
|
||||
// For checking calculated area, use the Dutch projection (RD), this is EPSG code 28992
|
||||
bg::projection::sterea_ellipsoid<LL, XY> dutch_prj(bg::projection::init(28992));
|
||||
bg::projections::sterea_ellipsoid<LL, XY> dutch_prj(bg::projections::init(28992));
|
||||
|
||||
// Add them in clockwise direction
|
||||
bg::model::polygon<LL> randstad;
|
||||
|
||||
@@ -42,7 +42,7 @@ void test_one(double lon, double lat,
|
||||
typename bg::coordinate_type<P2>::type y,
|
||||
std::string const& parameters)
|
||||
{
|
||||
bg::projection::parameters par = bg::projection::detail::pj_init_plus(parameters);
|
||||
bg::projections::parameters par = bg::projections::detail::pj_init_plus(parameters);
|
||||
Prj prj(par);
|
||||
|
||||
P1 ll;
|
||||
@@ -63,7 +63,7 @@ void test_all()
|
||||
typedef bg::model::ll::point<bg::degree, coord_type> point_type;
|
||||
|
||||
// aea
|
||||
test_one<bg::projection::aea_ellipsoid<point_type, P>, point_type, P>
|
||||
test_one<bg::projections::aea_ellipsoid<point_type, P>, point_type, P>
|
||||
(4.897000, 52.371000, 334609.583974, 5218502.503686,
|
||||
"+proj=aea +ellps=WGS84 +units=m +lat_1=55 +lat_2=65");
|
||||
}
|
||||
|
||||
@@ -44,8 +44,8 @@ void test_one(double lon, double lat,
|
||||
{
|
||||
typedef typename bg::coordinate_type<P2>::type coord_type;
|
||||
|
||||
typedef bg::projection::epsg_traits<E, P1, P2> epsg_traits;
|
||||
bg::projection::parameters par = bg::projection::detail::pj_init_plus(epsg_traits::par());
|
||||
typedef bg::projections::epsg_traits<E, P1, P2> epsg_traits;
|
||||
bg::projections::parameters par = bg::projections::detail::pj_init_plus(epsg_traits::par());
|
||||
|
||||
typedef typename epsg_traits::type prj_type;
|
||||
prj_type prj(par);
|
||||
|
||||
@@ -70,10 +70,10 @@ void test_forward(std::string const& name,
|
||||
ll.lon(lon);
|
||||
ll.lat(lat);
|
||||
|
||||
bg::projection::parameters params = bg::projection::detail::pj_init_plus(parameters);
|
||||
bg::projection::factory<lonlat_type, P, bg::projection::parameters> pf;
|
||||
bg::projections::parameters params = bg::projections::detail::pj_init_plus(parameters);
|
||||
bg::projections::factory<lonlat_type, P, bg::projections::parameters> pf;
|
||||
|
||||
boost::shared_ptr<bg::projection::projection<lonlat_type, P> > prj(pf.create_new(params));
|
||||
boost::shared_ptr<bg::projections::projection<lonlat_type, P> > prj(pf.create_new(params));
|
||||
|
||||
P xy;
|
||||
prj->forward(ll, xy);
|
||||
@@ -98,10 +98,10 @@ void test_inverse(std::string const& name,
|
||||
bg::set<0>(xy, x);
|
||||
bg::set<1>(xy, y);
|
||||
|
||||
bg::projection::parameters params = bg::projection::detail::pj_init_plus(parameters);
|
||||
bg::projection::factory<lonlat_type, P, bg::projection::parameters> pf;
|
||||
bg::projections::parameters params = bg::projections::detail::pj_init_plus(parameters);
|
||||
bg::projections::factory<lonlat_type, P, bg::projections::parameters> pf;
|
||||
|
||||
boost::shared_ptr<bg::projection::projection<lonlat_type, P> > prj(pf.create_new(params));
|
||||
boost::shared_ptr<bg::projections::projection<lonlat_type, P> > prj(pf.create_new(params));
|
||||
|
||||
lonlat_type ll;
|
||||
prj->inverse(xy, ll);
|
||||
|
||||
Reference in New Issue
Block a user