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?

closed as too localized by Ian Turton, whuber Dec 22 '12 at 17:57

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.


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.

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