|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.blur.analysis.type.spatial.ShapeReadWriter<CTX>
public class ShapeReadWriter<CTX extends com.spatial4j.core.context.SpatialContext>
Reads and writes Shape
s to strings.
Constructor Summary | |
---|---|
ShapeReadWriter(com.spatial4j.core.context.SpatialContext ctx)
|
Method Summary | |
---|---|
static NumberFormat |
makeNumberFormat(int fractionDigits)
A convenience method to create a suitable NumberFormat for writing numbers. |
com.spatial4j.core.shape.Shape |
readShape(String value)
Reads a shape from a given string (ie, X Y, XMin XMax... |
String |
writeShape(com.spatial4j.core.shape.Shape shape)
Writes a shape to a String, in a format that can be read by readShape(String) . |
String |
writeShape(com.spatial4j.core.shape.Shape shape,
NumberFormat nf)
Overloaded to provide a number format. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShapeReadWriter(com.spatial4j.core.context.SpatialContext ctx)
Method Detail |
---|
public com.spatial4j.core.shape.Shape readShape(String value) throws com.spatial4j.core.exception.InvalidShapeException
com.spatial4j.core.context.jts.JtsSpatialContext
.
value
- A string representation of the shape; not null.
com.spatial4j.core.exception.InvalidShapeException
writeShape(com.spatial4j.core.shape.Shape)
public String writeShape(com.spatial4j.core.shape.Shape shape)
readShape(String)
.
shape
- Not null.
public String writeShape(com.spatial4j.core.shape.Shape shape, NumberFormat nf)
public static NumberFormat makeNumberFormat(int fractionDigits)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |