Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

What is the unit of measurement used by Geometry class for it's buffer calculation ? Api doc currently defines it as " distance - the width of the buffer (may be positive, negative or 0)"

I need to draw polygons around a given Geometry with X miles away. Wondering if there is an easy way to do it with current set of GeoTools API.

Api : http://www.vividsolutions.com/jts/javadoc/com/vividsolutions/jts/geom/Geometry.html#buffer(double)

share|improve this question

1 Answer

The units of measurement is based on the underlying spatial reference. So, for example, if it is EPSG:4326 it is decimal degrees or if it EPSG:2037 it is meters.

share|improve this answer
I tried the following code with GeoTools api CRSAuthorityFactory factory = CRS.getAuthorityFactory(true); CoordinateReferenceSystem crs = factory.createCoordinateReferenceSystem("EPSG:2037"); I get an exception as follows : org.opengis.referencing.FactoryException: Unit conversion from "DMS" to "°" is non-linear. – Madana Tamisetty Jul 13 '12 at 23:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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