[mapguide-users] What buffering method does MapGuide use Euclidean or Geodesic?

RenoSun renolionheart at gmail.com
Wed Mar 29 16:29:13 PDT 2017


I was using Turf.js to buffer the geojson generated from MapGuide-Rest with
LL84 coordinate system. Then, I use OpenLayers 3 to transform the buffer
feature geometry to WGS 84.Pseudo-Mercator coordinate system. However, the
buffer distance was incorrect. I tested on MapGuide Fusion to use buffer
tool on both LL84, and WGS 84.Pseudo-Mercator. Both generated the accurate
results as I expected. 

I ended up to request the geojson from mapguide-rest in
WGS84.Pseudo-Mercator coordinate system, and buffer the geojson. The buffer
distance was really off, but it generated the right shape. Therefore, I
manually change the distance value, and it works great with various units
such as meter, km, and feet. 

geojson = turf.buffer(geojson, $('#bufferDist').val() / 0.000005845,
$('#bufferUnit').val());

The questions that I posted on OpenLayers 3 github. 


Understanding Geodesic Buffering

You may try our new Buffer function on our web GIS. Select any features on
the map, and click Buffer The Feature button. Converted the buffer result to
map layer, and you may use the measurement tools to check the accuracy of
the buffer layer. 

I think what the MapGuide fusion buffer the feature geometry with the same
coordinate system that the map is using, and didn't do any geometry
coordinate transformations. When the map is in LL84, it use Geodesic
Buffering, and if it's using any projected coordinate system, it will use
Euclidean Buffering. 

I think Turf.js did the Geodesic Buffering with my LL84 geojson, and I
transform the result geojson it into WGS 84.Pseudo-Mercator. Therefore, it
will not give me the result that I expected to see that only Euclidean
Buffering will provide me. Should always transform the original feature into
the final coordinate system of the buffering result first, than buffer it
with the appropriate buffering method in order to get the correct result. 

Any thoughts? <http://WGS 84.Pseudo-Mercator> 



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/What-buffering-method-does-MapGuide-use-Euclidean-or-Geodesic-tp5314871.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list