I have a polygon described with coordinates which have z value.
Is there any JTS utility that would allow me to get Z value for a coordinate which is inside the polygon?
I have a function for doing it.
Does it look reasonable?
private def getMinMaxEvelation(geometryWithZ:Geometry, someTwoDimGeometry: Geometry) = {
val builder = new ConformingDelaunayTriangulationBuilder()
builder.setSites(geometryWithZ)
val zValues = someTwoDimGeometry.getCoordinates.toList.map{ coord =>
builder.getSubdivision.locate(coord).dest().getZ
}
Elevation(minZ = zValues.min.toInt, maxZ = zValues.max.toInt)
}