Package org.locationtech.spatial4j.io
Class LegacyShapeWriter
- java.lang.Object
-
- org.locationtech.spatial4j.io.LegacyShapeWriter
-
- All Implemented Interfaces:
ShapeIO
,ShapeWriter
@Deprecated public class LegacyShapeWriter extends java.lang.Object implements 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.
-
-
Constructor Summary
Constructors Constructor Description LegacyShapeWriter(SpatialContext ctx, SpatialContextFactory factory)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
getFormatName()
Deprecated.static java.text.NumberFormat
makeNumberFormat(int fractionDigits)
Deprecated.A convenience method to create a suitable NumberFormat for writing numbers.java.lang.String
toString(Shape shape)
Deprecated.Write a shape to Stringvoid
write(java.io.Writer output, Shape shape)
Deprecated.Write a shape to the output writerstatic java.lang.String
writeShape(Shape shape)
Deprecated.Writes a shape to a String, in a format that can be read byLegacyShapeReader.readShapeOrNull(String, SpatialContext)
static java.lang.String
writeShape(Shape shape, java.text.NumberFormat nf)
Deprecated.Overloaded to provide a number format.
-
-
-
Field Detail
-
ctx
final SpatialContext ctx
Deprecated.
-
-
Constructor Detail
-
LegacyShapeWriter
public LegacyShapeWriter(SpatialContext ctx, SpatialContextFactory factory)
Deprecated.
-
-
Method Detail
-
writeShape
public static java.lang.String writeShape(Shape shape)
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
public static java.lang.String writeShape(Shape shape, java.text.NumberFormat nf)
Deprecated.Overloaded to provide a number format.
-
makeNumberFormat
public static java.text.NumberFormat makeNumberFormat(int fractionDigits)
Deprecated.A convenience method to create a suitable NumberFormat for writing numbers.
-
getFormatName
public java.lang.String getFormatName()
Deprecated.- Specified by:
getFormatName
in interfaceShapeIO
- Returns:
- the format name
-
write
public void write(java.io.Writer output, Shape shape) throws java.io.IOException
Deprecated.Description copied from interface:ShapeWriter
Write a shape to the output writer- Specified by:
write
in interfaceShapeWriter
- Throws:
java.io.IOException
-
toString
public java.lang.String toString(Shape shape)
Deprecated.Description copied from interface:ShapeWriter
Write a shape to String- Specified by:
toString
in interfaceShapeWriter
-
-