I am using GeoTools to find area and intersections of shapefiles. GeoTools uses the JTS geometry library (Vivid Solutions) and that has functions to getArea() but unfortunately I am not able to determine the units. Basically I get the multipolygon and iterate through the GeometryCollection and getArea() on each individual geometry within.

All documentation suggests the units are returned based on what the input data is. But unfortunately my original shapefiles do not have the .PRJ file (I even created one) and also programmatically tried to reproject to an equal area projection (with a standard Molleweide projection via a wkt file and set to meter units) but the returned area just does not make sense.

Any thoughts on what the units maybe? Or is this the right approach to computer areas of shapefiles?


It is impossible to answer this question without knowing a lot more about your data set. GeoTools will (as you suggest) just use the units of your data set with out any conversion. If you don't know what the projection of your data is then you are just guessing.

see Identifying Coordinate System of Shapefile when Unknown? for discussion on how to guess what your projection is.

| improve this answer | |

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