/** * Reads a LineString from GeoJSON. * * @param input The input. See {@link GeoJSONUtil#toReader(Object)} for details. * @return The line string. * @throws IOException In the event of a parsing error or if the input json is invalid. */ public LineString readLine(Object input) throws IOException { return parse(new LineHandler(factory), input); }
/** * Reads a GeometryCollection from GeoJSON. * * @param input The input. See {@link GeoJSONUtil#toReader(Object)} for details. * @return The geometry collection. * @throws IOException In the event of a parsing error or if the input json is invalid. */ public GeometryCollection readGeometryCollection(Object input) throws IOException { return parse(new GeometryCollectionHandler(factory), input); }
/** * Reads a Point from GeoJSON. * * @param input The input. See {@link GeoJSONUtil#toReader(Object)} for details. * @return The point. * @throws IOException In the event of a parsing error or if the input json is invalid. */ public Point readPoint(Object input) throws IOException { return parse(new PointHandler(factory), input); }
/** * Reads a Geometry instance from GeoJSON. * * <p>This method calls through to {@link #read(Object)} * * @param input The input stream. * @return The geometry instance. */ public Geometry read(InputStream input) throws IOException { return read((Object) input); }
/** * Reads a MultiPoint from GeoJSON. * * @param input The input. See {@link GeoJSONUtil#toReader(Object)} for details. * @return The multi point. * @throws IOException In the event of a parsing error or if the input json is invalid. */ public MultiPoint readMultiPoint(Object input) throws IOException { return parse(new MultiPointHandler(factory), input); }
/** * Reads a MultiLineString from GeoJSON. * * @param input The input. See {@link GeoJSONUtil#toReader(Object)} for details. * @return The multi line string. * @throws IOException In the event of a parsing error or if the input json is invalid. */ public MultiLineString readMultiLine(Object input) throws IOException { return parse(new MultiLineHandler(factory), input); }
/** * Reads a Geometry instance from GeoJSON. * * @param input The input. See {@link GeoJSONUtil#toReader(Object)} for details. * @return The geometry instance. */ public Geometry read(Object input) throws IOException { return parse(new GeometryHandler(factory), input); }
/** * Reads a Polygon from GeoJSON. * * @param input The input. See {@link GeoJSONUtil#toReader(Object)} for details. * @return The polygon. * @throws IOException In the event of a parsing error or if the input json is invalid. */ public Polygon readPolygon(Object input) throws IOException { return parse(new PolygonHandler(factory), input); }
/** * Reads a MultiPolygon from GeoJSON. * * @param input The input. See {@link GeoJSONUtil#toReader(Object)} for details. * @return The multi polygon. * @throws IOException In the event of a parsing error or if the input json is invalid. */ public MultiPolygon readMultiPolygon(Object input) throws IOException { return parse(new MultiPolygonHandler(factory), input); }
/** * Reads a MultiPolygon from GeoJSON. * * <p>This method calls through to {@link #readMultiPolygon(Object)} * * @param input The input stream. * @return The multi polygon. * @throws IOException In the event of a parsing error or if the input json is invalid. */ public MultiPolygon readMultiPolygon(InputStream input) throws IOException { return readMultiPolygon((Object) input); }
/** * Writes a MultiLineString as GeoJSON. * * @param mline The multi line string. * @param output The output. See {@link GeoJSONUtil#toWriter(Object)} for details. */ public void writeMultiLine(MultiLineString mline, Object output) throws IOException { encode(createMultiLine(mline), output); }
/** * Reads a GeometryCollection from GeoJSON. * * <p>This method calls through to {@link #readGeometryCollection(Object)} * * @param input The input stream. * @return The geometry collection. * @throws IOException In the event of a parsing error or if the input json is invalid. */ public GeometryCollection readGeometryCollection(InputStream input) throws IOException { return readGeometryCollection((Object) input); }
/** * Writes a MultiPolygon as GeoJSON. * * @param mpoly The multi polygon. * @param output The output. See {@link GeoJSONUtil#toWriter(Object)} for details. */ public void writeMultiPolygon(MultiPolygon mpoly, Object output) throws IOException { encode(createMultiPolygon(mpoly), output); }
@Override public boolean endObjectEntry() throws ParseException, IOException { if (delegateClass != null) { delegate = createDelegate(delegateClass, new Object[] {factory}); delegateClass = null; } return true; }
/** * Reads a MultiPoint from GeoJSON. * * <p>This method calls through to {@link #readMultiPoint(Object)} * * @param input The input stream. * @return The multi point. * @throws IOException In the event of a parsing error or if the input json is invalid. */ public MultiPoint readMultiPoint(InputStream input) throws IOException { return readMultiPoint((Object) input); }
/** * Writes a Polygon as GeoJSON. * * <p>This method calls through to {@link #writePolygon(Polygon, Object)} * * @param poly The polygon. * @param output The output stream. */ public void writePolygon(Polygon poly, OutputStream output) throws IOException { writePolygon(poly, (Object) output); }
/** * Writes a MultiLineString as GeoJSON. * * <p>This method calls through to {@link #writeMultiLine(MultiLineString, Object)} * * @param mline The multi line string. * @param output The output stream. */ public void writeMultiLine(MultiLineString mline, OutputStream output) throws IOException { writeMultiLine(mline, (Object) output); }
/** * Writes a GeometryCollection as GeoJSON. * * <p>This method calls through to {@link #writeGeometryCollection(GeometryCollection, Object)} * * @param gcol The geometry collection. * @param output The output stream. */ public void writeGeometryCollection(GeometryCollection gcol, OutputStream output) throws IOException { writeGeometryCollection(gcol, (Object) output); }
/** * Writes a LineString as GeoJSON. * * <p>This method calls through to {@link #writeLine(LineString, Object)} * * @param line The line string. * @param output The output stream. */ public void writeLine(LineString line, OutputStream output) throws IOException { writeLine(line, (Object) output); }
/** * Reads a LineString from GeoJSON. * * <p>This method calls through to {@link #readLine(Object)} * * @param input The input stream. * @return The line string. * @throws IOException In the event of a parsing error or if the input json is invalid. */ public LineString readLine(InputStream input) throws IOException { return readLine((Object) input); }