Package org.locationtech.spatial4j.io
Class LegacyShapeWriter
java.lang.Object
org.locationtech.spatial4j.io.LegacyShapeWriter
- All Implemented Interfaces:
ShapeIO
,ShapeWriter
Deprecated.
Writes a shape in the old format.
- Point: X Y
1.23 4.56 - Rect: XMin YMin XMax YMax
1.23 4.56 7.87 4.56 - {CIRCLE} '(' {POINT} {DISTANCE} ')'
CIRCLE is "CIRCLE" or "Circle" (no other case), and POINT is "X Y" order pair of doubles, or "Y,X" (lat,lon) pair of doubles, and DISTANCE is "d=RADIUS" or "distance=RADIUS" where RADIUS is a double that is the distance radius in degrees.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLegacyShapeWriter
(SpatialContext ctx, SpatialContextFactory factory) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.static NumberFormat
makeNumberFormat
(int fractionDigits) Deprecated.A convenience method to create a suitable NumberFormat for writing numbers.Deprecated.Write a shape to Stringvoid
Deprecated.Write a shape to the output writerstatic String
writeShape
(Shape shape) Deprecated.Writes a shape to a String, in a format that can be read byLegacyShapeReader.readShapeOrNull(String, SpatialContext)
static String
writeShape
(Shape shape, NumberFormat nf) Deprecated.Overloaded to provide a number format.
-
Field Details
-
ctx
Deprecated.
-
-
Constructor Details
-
LegacyShapeWriter
Deprecated.
-
-
Method Details
-
writeShape
Deprecated.Writes a shape to a String, in a format that can be read byLegacyShapeReader.readShapeOrNull(String, SpatialContext)
- Parameters:
shape
- Not null.- Returns:
- Not null.
-
writeShape
Deprecated.Overloaded to provide a number format. -
makeNumberFormat
Deprecated.A convenience method to create a suitable NumberFormat for writing numbers. -
getFormatName
Deprecated.- Specified by:
getFormatName
in interfaceShapeIO
- Returns:
- the format name
-
write
Deprecated.Description copied from interface:ShapeWriter
Write a shape to the output writer- Specified by:
write
in interfaceShapeWriter
- Throws:
IOException
-
toString
Deprecated.Description copied from interface:ShapeWriter
Write a shape to String- Specified by:
toString
in interfaceShapeWriter
-