Class Shapes


  • public final class Shapes
    extends java.lang.Object

    Utilities for working with the Shape class.

    Since:
    4.0
    Version:
    4.0
    Author:
    Michael Grove
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.locationtech.spatial4j.shape.Shape read​(org.locationtech.spatial4j.io.BinaryCodec theCodec, byte[] theShape)
      Read a shape
      static byte[] write​(org.locationtech.spatial4j.io.BinaryCodec theCodec, org.locationtech.spatial4j.shape.Shape theShape)
      Write the shape using the given code
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • write

        public static byte[] write​(org.locationtech.spatial4j.io.BinaryCodec theCodec,
                                   org.locationtech.spatial4j.shape.Shape theShape)
                            throws java.io.IOException
        Write the shape using the given code
        Parameters:
        theCodec - the codec
        theShape - the shape to write
        Returns:
        the binary representation of the shape
        Throws:
        java.io.IOException - if there was an error while writing the shape
      • read

        public static org.locationtech.spatial4j.shape.Shape read​(org.locationtech.spatial4j.io.BinaryCodec theCodec,
                                                                  byte[] theShape)
                                                           throws java.io.IOException
        Read a shape
        Parameters:
        theCodec - the code for reading
        theShape - the binary representation of the shape
        Returns:
        the shape
        Throws:
        java.io.IOException - if there was an error while parsing the shape