org.elasticsearch.common.geo
Class GeoJSONShapeSerializer

java.lang.Object
  extended by org.elasticsearch.common.geo.GeoJSONShapeSerializer

public class GeoJSONShapeSerializer
extends Object

Serializes Shape instances into GeoJSON format

Example of the format used for points:

{ "type": "Point", "coordinates": [100.0, 0.0] }


Method Summary
static void serialize(com.spatial4j.core.shape.Shape shape, XContentBuilder builder)
          Serializes the given Shape as GeoJSON format into the given XContentBuilder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

serialize

public static void serialize(com.spatial4j.core.shape.Shape shape,
                             XContentBuilder builder)
                      throws IOException
Serializes the given Shape as GeoJSON format into the given XContentBuilder

Parameters:
shape - Shape that will be serialized
builder - XContentBuilder it will be serialized to
Throws:
IOException - Thrown if an error occurs while writing to the XContentBuilder


Copyright © 2009-2012. All Rights Reserved.