Class ShapeAsGeoJSONSerializer
- java.lang.Object
-
- com.fasterxml.jackson.databind.JsonSerializer<Shape>
-
- org.locationtech.spatial4j.io.jackson.ShapeAsGeoJSONSerializer
-
- All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable
public class ShapeAsGeoJSONSerializer extends com.fasterxml.jackson.databind.JsonSerializer<Shape>
-
-
Constructor Summary
Constructors Constructor Description ShapeAsGeoJSONSerializer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static doubleround(double v)voidserialize(Shape shape, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider serializers)protected voidwrite(com.fasterxml.jackson.core.JsonGenerator gen, double... coords)voidwrite(com.fasterxml.jackson.core.JsonGenerator gen, Shape shape)
-
-
-
Method Detail
-
write
protected void write(com.fasterxml.jackson.core.JsonGenerator gen, double... coords) throws IOException- Throws:
IOException
-
round
public static double round(double v)
-
write
public void write(com.fasterxml.jackson.core.JsonGenerator gen, Shape shape) throws IOException- Throws:
IOException
-
serialize
public void serialize(Shape shape, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider serializers) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
- Specified by:
serializein classcom.fasterxml.jackson.databind.JsonSerializer<Shape>- Throws:
IOExceptioncom.fasterxml.jackson.core.JsonProcessingException
-
-