Exemplo n.º 1
0
    def create_jvm_geometry_from_base_geometry(cls, jvm, geom: BaseGeometry):
        """
        :param jvm:
        :param geom:
        :return:
        """
        if isinstance(geom, Envelope):
            jvm_geom = geom.create_jvm_instance(jvm)
        else:
            decoded_geom = GeometryFactory.to_bytes(geom)
            jvm_geom = JvmGeometryAdapter(jvm).translate_to_java(decoded_geom)

        return jvm_geom
Exemplo n.º 2
0
    def create_jvm_geometry_from_base_geometry(cls, jvm, geom: BaseGeometry):
        """
        :param jvm:
        :param geom:
        :return:
        """
        if isinstance(geom, Envelope):
            jvm_geom = geom.create_jvm_instance(jvm)
        else:
            decoded_geom = GeometryFactory.to_bytes(geom)
            jvm_geom = jvm.GeometryAdapter.deserializeToGeometry(decoded_geom)

        return jvm_geom