Adam,
I am going to drape the boost-geometry data over openstreetmap ultimately.
I am dealing with a web application and use open street map as base layer.
Consequently the geometric data has to comply with openstreetmap. Epsg3857
Is the projection of openstreetmap that requires.
Besides I store all my data in epsg3857.
Regards
Hi,
W dniu 23.09.2019 o 10:57, Mateusz Loskot via Geometry pisze:
> On Mon, 23 Sep 2019 at 10:38, Ahmet Temiz via Geometry
> <geometry@lists.boost.org> wrote:
>> Hi,
>> I am not sure how I can define epsg : 3857 in boost geometry
> Should be something along these lines:
>
> #include <boost/geometry/srs/epsg.hpp>
> #include <boost/geometry/srs/projection.hpp>
>
> boost::geometry::srs::projection<> prj = boost::geometry::srs::epsg(3857);
> boost::geometry::point_xy<double, epsg<2040>> my_point(0, 0);
>
> Also, search through the source code of the Boost.Geometry tests
> for more details about how `epsg` and `projection` can be used.
This is not correct. The point type can only take cs::cartesian,
cs::spherical or cs::geographic. EPSG:3857 is web/spherical mercator
projection so to represent the points you'll use bg::cs::cartesian. The
problem with this is that the algorithms will treat the coordinates as
purly cartesian so the globe won't wrap around behind the antimeridian.
What would you like to do exactly?
Do you want to convert to or from it to some other SRS or do you have
cartesian coordinates in EPSG:3857 and want to use some Boost.Geometry
algorithms?
Adam
_______________________________________________
Geometry mailing list
Geometry@lists.boost.org
https://lists.boost.org/mailman/listinfo.cgi/geometry
--
Ahmet Temiz
Jeoloji Müh.
Afet ve Acil Durum Yönetimi Başkanlığı
Bilgi İşlem Dairesi Başkanlığı-CBS Grubu
________________________
Ahmet Temiz
Geological Eng.
Information Systems - GIS Group
Disaster and Emergency Management
of Presidency