[GIS] How to make a buffer with xxx meter by NetTopologySuite

buffernettopologysuite

I am very new in NetTopologySuite, I work with the coordinatesystem in WGS84 by lon/lat, with the NetTopologySuite. I found the Buffer function to create a buffer with a distance, but how can I make a buffer with distance by the unit of meter? e.g make a 200 meter buffer of one point.

Best Answer

NetTopologySuite is a port of the JTSTopologySuite. From the JTS FAQ:

B5. What coordinate system and/or units does JTS use?

JTS uses the implicit coordinate system of the input data. The only assumption it makes is that the coordinate system is infinite, planar and Euclidean (i.e. rectilinear and obeying the standard Euclidean distance metric). In the same way JTS does not specify any particular units for coordinates and geometries. Instead, the units are implicitly defined by the input data provided. This implies that in most cases input geometries to operations should be defined with the same coordinate system.

So, if you are using input data with lat/lon your buffer has to be calculated in the same unit (e.g decimal degrees).

You can either calculate an local approximation of how many decimal degrees 200 meters are or you can reproject your data to a grid that uses metric units. You can find a post going more into the details of these options here.

Related Question