Select Data From An Object Inside A GISObject¶
In [1]:
Copied!
import geolime as geo
from pyproj import CRS
import geolime as geo
from pyproj import CRS
In [3]:
Copied!
dh = geo.datasets.load("rocklea_dome/dh_hyper.geo")
dh = geo.datasets.load("rocklea_dome/dh_hyper.geo")
In [4]:
Copied!
gis_obj = geo.gis_object_from_file(
name="hyperspec_outline",
file_path="../../../geolime/datasets/rocklea_dome/hyperspec_outline.shp"
)
gis_obj = geo.gis_object_from_file(
name="hyperspec_outline",
file_path="../../../geolime/datasets/rocklea_dome/hyperspec_outline.shp"
)
In [5]:
Copied!
geo.select_points_inside_polygon(
ref_object=gis_obj,
region=None,
other=dh,
new_region_name="in_hyperspec_outline"
)
geo.select_points_inside_polygon(
ref_object=gis_obj,
region=None,
other=dh,
new_region_name="in_hyperspec_outline"
)
Transform region to property
In [6]:
Copied!
dh.set_property_expr("in_outline_code", "0")
dh.set_property_expr("in_outline_code", "10", region="in_hyperspec_outline")
dh.set_property_expr("in_outline_code", "0")
dh.set_property_expr("in_outline_code", "10", region="in_hyperspec_outline")
In [7]:
Copied!
geo.plot(dh, property="in_outline_code", agg_method="max", width=400, height=650)
geo.plot(dh, property="in_outline_code", agg_method="max", width=400, height=650)
Last update:
2023-10-23