Package org.locationtech.spatial4j.io
Class PolyshapeReader
java.lang.Object
org.locationtech.spatial4j.io.PolyshapeReader
- All Implemented Interfaces:
ShapeIO
,ShapeReader
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
from Apache 2.0 licensed: https://github.com/googlemaps/android-maps-utils/blob/master/library/src/com/google/maps/android/PolyUtil.java -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final SpatialContext
(package private) final ShapeFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Shape
Read aShape
from the reader.readIfSupported
(Object value) protected Shape
readPolygon
(PolyshapeReader.XReader reader)
-
Field Details
-
ctx
-
shpFactory
-
-
Constructor Details
-
PolyshapeReader
-
-
Method Details
-
getFormatName
- Specified by:
getFormatName
in interfaceShapeIO
- Returns:
- the format name
-
read
- Specified by:
read
in interfaceShapeReader
- Parameters:
value
- -- the input value, could be a String or other object- Returns:
- a shape valid shape (not null)
- Throws:
IOException
ParseException
InvalidShapeException
-
readIfSupported
- Specified by:
readIfSupported
in interfaceShapeReader
- Parameters:
value
- -- the input value, could be a String or other object- Returns:
- a shape or null, if the input was un readable.
This will throw
InvalidShapeException
when we could read a shape, but it was invalid - Throws:
InvalidShapeException
-
read
Description copied from interface:ShapeReader
Read aShape
from the reader.- Specified by:
read
in interfaceShapeReader
- Parameters:
r
- -- the input. Note, it will not be closed by this function- Returns:
- a valid Shape (never null)
- Throws:
ParseException
IOException
-
readPolygon
- Throws:
IOException
-