public class PolyshapeReader extends Object implements ShapeReader
PolyshapeWriter
Modifier and Type | Class and Description |
---|---|
static class |
PolyshapeReader.XReader
from Apache 2.0 licensed:
https://github.com/googlemaps/android-maps-utils/blob/master/library/src/com/google/maps/android/PolyUtil.java
|
Constructor and Description |
---|
PolyshapeReader(SpatialContext ctx,
SpatialContextFactory factory) |
Modifier and Type | Method and Description |
---|---|
String |
getFormatName() |
Shape |
read(Object value) |
Shape |
read(Reader r)
Read a
Shape from the reader. |
Shape |
readIfSupported(Object value) |
protected Shape |
readPolygon(PolyshapeReader.XReader reader) |
public PolyshapeReader(SpatialContext ctx, SpatialContextFactory factory)
public String getFormatName()
getFormatName
in interface ShapeIO
public Shape read(Object value) throws IOException, ParseException, InvalidShapeException
read
in interface ShapeReader
value
- -- the input value, could be a String or other objectIOException
ParseException
InvalidShapeException
public Shape readIfSupported(Object value) throws InvalidShapeException
readIfSupported
in interface ShapeReader
value
- -- the input value, could be a String or other objectInvalidShapeException
when we could read a shape, but it was
invalidInvalidShapeException
public final Shape read(Reader r) throws ParseException, IOException
ShapeReader
Shape
from the reader.read
in interface ShapeReader
r
- -- the input. Note, it will not be closed by this functionParseException
IOException
protected Shape readPolygon(PolyshapeReader.XReader reader) throws IOException
IOException
Copyright © 2020 LocationTech. All rights reserved.