public static Polygon readPolygon ( ByteReader reader , boolean hasZ , boolean hasM ) { Polygon polygon = new Polygon ( hasZ , hasM ) ; int numRings = reader . readInt ( ) ; for ( int i = 0 ; i < numRings ; i ++ ) { LineString ring = readLineString ( reader , hasZ , hasM ) ; polygon . addRing ( ring ) ; } return polygon ; }
Read a Polygon