[GIS] Given a GeoJSON file how to calculate the area of the embedded features

geojsoniosjavajavascript

We have a GeoJSON file that contains an array of features each with their associated geometry. How can I calculate the area of each feature? Are there any Java or Swift libraries to help me? Any advice on how to get started here?

Please excuse the naive nature of this question. I'm new to this GeoJSON stuff.

Best Answer

GeoTools is a Java library which can read and write GeoJSON and provides access to features like area via the JTS library. It will also help you to reproject the geometries from the lat/lon of GeoJSON to a suitable projection for calculating areas in m^2.