Take the 2-minute tour ×
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
    
I dont have enough reputation to post it as comment but it seems to me like your are looking for this: gis.stackexchange.com/questions/83199/… In this case I have a polygon and want to buffer it with a meter distance so you can adapt it easily for miles I guess. –  MeiSign Jan 17 at 15:47
add comment

1 Answer 1

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
add comment

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.