1

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.

4

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.

  • thanks hepiladron, the answer is useful, i read the link you post for details, and i try to reproject my coordinate system from WGS84 to UTM50, but i do not get the right distance between two points in meter unit – billycat Aug 24 '12 at 2:04
  • 1
    Link is dead :-( – Eduardo Oct 26 '16 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.