Class JsiAndJts



  • public class JsiAndJts
    extends Object
    Conversion methods from JSI to JTS and vice versa.
    • Constructor Detail

      • JsiAndJts

        public JsiAndJts()
    • Method Detail

      • toRectangle

        public static Rectangle toRectangle(Envelope envelope)
        Convert a Rectangle to an Envelope
        Parameters:
        envelope - the envelope to convert to a rectangle.
        Returns:
        the bounding box as a Rectangle.
      • toEnvelope

        public static Envelope toEnvelope(Rectangle rectangle)
        Convert an Envelope to a Rectangle
        Parameters:
        rectangle - the rectangle to convert to an envelope.
        Returns:
        the bounding box as an Envelope.
      • toRectangle

        public static Rectangle toRectangle(Geometry geometry)
        Retrieve a geometry's bounding box as a Rectangle.
        Parameters:
        geometry - the geometry to get the bounding box of.
        Returns:
        the bounding box as a Rectangle.
      • toRectangle

        public static Rectangle toRectangle(LineSegment segment)
        Retrieve a line segment's bounding box as a Rectangle.
        Parameters:
        segment - the segment to get the bounding box of.
        Returns:
        the bounding box as a Rectangle.
      • toGeometry

        public static Polygon toGeometry(Rectangle rectangle)
        Convert a rectangle to a polygon.
        Parameters:
        rectangle - the rectangle to convert.
        Returns:
        the resulting polygon.