Subject: [geometry] Strange values using boost geometry gis extension with tmerc projection
From: Andrew Hundt (athundt_at_[hidden])
Date: 2015-04-26 17:08:44
I'm getting what I believe to be strange behavior with lat/lon to x/y for
tmerc. If I understand correctly, I can pass a lat/lon in degrees in and
get an x/y in meters out. However, when I pass in 0,0 m and then 1,1 m into
inv() it appears to jump by 1.57 degrees latitude, which I believe is
thousands of meters rather than just 1. Am I using it incorrectly or is
this an issue?
Details are below. Thanks!
// Construct a transverse mercator projection, using specified point types
// (This delivers a projection without virtual methods. Note that in p02
// the projection is created using a factory, which delivers a projection
with virtual methods)
typedef boost::geometry::model::d2::point_xy<double> point_xy;
boost::geometry::projections::parameters par =
double x = 1;
double y = 1;
//double x = 0;
//double y = 0;
result: lat: 1.5708 lon: 4.80877e-65
If I pass x = 0, y = 0, then I get lat: 0 lon: 0 as the result.
Geometry list run by mateusz at loskot.net