LinearRing exteriorRing = polygon.getExteriorRing();
path.moveTo((int) exteriorRing.getCoordinate().getX(), (int) exteriorRing.getCoordinate().getY());
for (int i = 1; i < exteriorRing.getNumPoints() - 1; i++) {
Coordinate coordinate = exteriorRing.getCoordinateN(i);
path.lineTo((int) coordinate.getX(), (int) coordinate.getY());
}
path.close();
for (int i = 0; i < polygon.getNumInteriorRing(); i++) {
LinearRing interiorRing = polygon.getInteriorRingN(i);