My question is closely related to Extract geometry from citygml data using citygml4j
I have a citygml file with buildings and I need to extract the coordinates of each roof surface. I use the open source library citygml4j. My code is almost the same as in the link, but I am stuck at the line:
AbstractRing exteriorAbstractRing = polygon.getExterior().getRing();
How do you extract the coordinates of the polygon-geometry from here?
Found the solution with help from @JulianRosse. There are some solution if is a LinearRing, e.g.:
((LinearRing)polygon.getExterior().getRing()).toList3d()