Class OShapeBuilder<T extends org.locationtech.spatial4j.shape.Shape>

java.lang.Object
com.orientechnologies.spatial.shape.OShapeBuilder<T>
Direct Known Subclasses:
OComplexShapeBuilder, OPointShapeBuilder, ORectangleShapeBuilder

public abstract class OShapeBuilder<T extends org.locationtech.spatial4j.shape.Shape> extends Object
  • Field Details

    • COORDINATES

      public static final String COORDINATES
      See Also:
    • BASE_CLASS

      public static final String BASE_CLASS
      See Also:
    • SPATIAL_CONTEXT

      protected static final org.locationtech.spatial4j.context.jts.JtsSpatialContext SPATIAL_CONTEXT
    • GEOMETRY_FACTORY

      protected static final org.locationtech.jts.geom.GeometryFactory GEOMETRY_FACTORY
    • SHAPE_FACTORY

      protected static final org.locationtech.spatial4j.shape.jts.JtsShapeFactory SHAPE_FACTORY
    • wktReader

      protected static final org.locationtech.jts.io.WKTReader wktReader
  • Constructor Details

    • OShapeBuilder

      public OShapeBuilder()
  • Method Details

    • format

      public String format(double value)
    • getName

      public abstract String getName()
    • getType

      public abstract OShapeType getType()
    • fromDoc

      public abstract T fromDoc(ODocument doc)
    • fromObject

      public T fromObject(Object obj)
    • fromMapGeoJson

      public T fromMapGeoJson(Map<String,Object> geoJsonMap)
    • initClazz

      public abstract void initClazz(ODatabaseInternal db)
    • asText

      public String asText(T shape)
    • asBinary

      public byte[] asBinary(T shape)
    • asText

      public String asText(ODocument document)
    • asText

      public String asText(Map<String,Object> geoJson)
    • asText

      public String asText(Object object)
    • asGeoJson

      public String asGeoJson(T shape)
    • asGeoJson

      public String asGeoJson(ODocument document)
    • fromGeoJson

      public ODocument fromGeoJson(String geoJson) throws IOException, ParseException
      Throws:
      IOException
      ParseException
    • validate

      public void validate(ODocument doc)
    • toShape

      public org.locationtech.spatial4j.shape.jts.JtsGeometry toShape(org.locationtech.jts.geom.Geometry geometry)
    • superClass

      protected OClass superClass(ODatabaseInternal db)
    • fromText

      public T fromText(String wkt) throws ParseException, org.locationtech.jts.io.ParseException
      Throws:
      ParseException
      org.locationtech.jts.io.ParseException
    • toDoc

      public abstract ODocument toDoc(T shape)
    • toDoc

      protected ODocument toDoc(T parsed, org.locationtech.jts.geom.Geometry geometry)
    • toDoc

      public ODocument toDoc(String wkt) throws ParseException, org.locationtech.jts.io.ParseException
      Throws:
      ParseException
      org.locationtech.jts.io.ParseException
    • getSRID

      public int getSRID(org.locationtech.spatial4j.shape.Shape shape)
    • buffer

      public org.locationtech.spatial4j.shape.Shape buffer(org.locationtech.spatial4j.shape.Shape shape, Double distance, Map<String,Object> params)
    • context

      public org.locationtech.spatial4j.context.SpatialContext context()