class GeoFunctions {

    @Description("Returns a Geometry type object from Spatial Framework for Hadoop representation")
    @ScalarFunction("geometry_from_hadoop_shape")
    @SqlType(GEOMETRY_TYPE_NAME)
    public static Slice geometryFromHadoopShape(@SqlType(VARBINARY) Slice input)
    {
        requireNonNull(input, "input is null");

        try {
            OGCGeometry geometry = OGCGeometry.fromEsriShape(getShapeByteBuffer(input));
            String wkt = geometryToWkt(geometry.getEsriGeometry(), getWktExportFlags(input));
            return serialize(OGCGeometry.fromText(wkt));
        }
        catch (IndexOutOfBoundsException | UnsupportedOperationException | IllegalArgumentException e) {
            throw new PrestoException(INVALID_FUNCTION_ARGUMENT, "Invalid Hadoop shape", e);
        }
    }

    private  GeoFunctions();

}