public Coordinate [ ] getCoordinates ( ) { if ( isEmpty ( ) ) { return null ; } int len = getNumPoints ( ) ; Coordinate [ ] coordinates = new Coordinate [ len ] ; int count ; for ( count = 0 ; count < exteriorRing . getNumPoints ( ) ; count ++ ) { coordinates [ count ] = exteriorRing . getCoordinateN ( count ) ; } if ( interiorRings != null ) { for ( LinearRing interiorRing : interiorRings ) { for ( int n = 0 ; n < interiorRing . getNumPoints ( ) ; n ++ ) { coordinates [ count ++ ] = interiorRing . getCoordinateN ( n ) ; } } } return coordinates ; }
Return the concatenated coordinates of both the exterior ring and all the interior rings . If the polygon is empty null will be returned .