As all of the questions you have linked to say JTS does not care about the units of your data and treats them all alike - so the answer to your question is square degrees. Now that is rarely (if ever) a good unit to measure areas in as it changes with latitude.
So to answer your real question how do I determine the area of my lat/lon polygons in square metres (or other unit)? - first you need to reproject your polygon to a local projection this is so you have a unit of metres going into the calculation and also because JTS assumes that all of your calculations are on a flat cartesian plane.
private Measure<Double, Area> calcArea(SimpleFeature feature) {
Polygon p = (Polygon) feature.getDefaultGeometry();
Point centroid = p.getCentroid();
try {
String code = "AUTO:42001," + centroid.getX() + "," + centroid.getY();
CoordinateReferenceSystem auto = CRS.decode(code);
MathTransform transform = CRS.findMathTransform(DefaultGeographicCRS.WGS84, auto);
Polygon projed = (Polygon) JTS.transform(p, transform);
return Measure.valueOf(projed.getArea(), SI.SQUARE_METRE);
} catch (MismatchedDimensionException | TransformException | FactoryException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return Measure.valueOf(0.0, SI.SQUARE_METRE);
}
Will give an approximate answer (and it be closer for smaller polygons), a little bit of playing with the javax units library will give the units you want.
Measure<Double, Area> a = me.calcArea(feature);
System.out.println(feature.getDefaultGeometry());
System.out.println(a);
@SuppressWarnings("unchecked")
Unit<Area> sq_km = (Unit<Area>) SI.KILOMETER.pow(2);
System.out.println(a.to(sq_km));
@SuppressWarnings("unchecked")
Unit<Area> sq_mile = (Unit<Area>) NonSI.MILE.times(NonSI.MILE);
System.out.println(a.to(sq_mile));
System.out.println(a.to(NonSI.HECTARE));
@SuppressWarnings("unchecked")
Unit<Area> acre = (Unit<Area>) NonSI.MILE.divide(8.0).times(NonSI.FOOT).times(66.0);
UnitFormat.getInstance().label(acre, "acre");
System.out.println(a.to(acre));
System.out.println(a.doubleValue(NonSI.HECTARE)+NonSI.HECTARE.toString());
[ [ [ 13.632045970877657, 52.51028471023475 ], [ 13.631736612007554, 52.509817421791602 ], [ 13.632054749915945, 52.509817407463906 ], [ 13.632045970877657, 52.51028471023475 ] ] ]
this site tells me that it has an area of about 560 square meters.