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 classfrom 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 ShapeRead aShapefrom the reader.readIfSupported(Object value) protected ShapereadPolygon(PolyshapeReader.XReader reader)
-
Field Details
-
ctx
-
shpFactory
-
-
Constructor Details
-
PolyshapeReader
-
-
Method Details
-
getFormatName
- Specified by:
getFormatNamein interfaceShapeIO- Returns:
- the format name
-
read
- Specified by:
readin interfaceShapeReader- Parameters:
value- -- the input value, could be a String or other object- Returns:
- a shape valid shape (not null)
- Throws:
IOExceptionParseExceptionInvalidShapeException
-
readIfSupported
- Specified by:
readIfSupportedin 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
InvalidShapeExceptionwhen we could read a shape, but it was invalid - Throws:
InvalidShapeException
-
read
Description copied from interface:ShapeReaderRead aShapefrom the reader.- Specified by:
readin interfaceShapeReader- Parameters:
r- -- the input. Note, it will not be closed by this function- Returns:
- a valid Shape (never null)
- Throws:
ParseExceptionIOException
-
readPolygon
- Throws:
IOException
-