/** * Reads a Polygon from GeoJSON. * * <p>This method calls through to {@link #readPolygon(Object)} * * @param input The input stream. * @return The polygon. * @throws IOException In the event of a parsing error or if the input json is invalid. */ public Polygon readPolygon(InputStream input) throws IOException { return readPolygon((Object) input); }
/** * Reads a Polygon from GeoJSON. * <p> * This method calls through to {@link #readPolygon(Object)} * </p> * @param input The input stream. * * @return The polygon. * * @throws IOException In the event of a parsing error or if the input json is invalid. */ public Polygon readPolygon(InputStream input) throws IOException { return readPolygon((Object)input); }
Polygon polygon = gtjson.readPolygon( new StringReader( "{\"type\":\"Polygon\", \"coordinates\":" + multiPolygonJson + "}" ) );