Create a BlockModel¶
A BlockModel consists in a explicit grid of cells with the same size. Unlike a Voxel all cells not have to be defined, enabling to have object with less cells, thus reducing the memory footprint of the object.
In [1]:
Copied!
import geolime as geo
from pyproj import CRS
import geolime as geo
from pyproj import CRS
In [4]:
Copied!
bm = geo.BlockModel(name="BlockModel", xyz=grid.coords())
bm = geo.BlockModel(name="BlockModel", xyz=grid.coords())
Creation of a meaningless property for plotting purpose.
In [5]:
Copied!
bm.set_property_expr(name="XY", expr="sin(X / 2) * sin (Y / 2)")
bm.set_property_expr(name="XY", expr="sin(X / 2) * sin (Y / 2)")
In [6]:
Copied!
geo.plot(bm, property="XY", agg_method="mean", width=400, height=650)
geo.plot(bm, property="XY", agg_method="mean", width=400, height=650)
In [7]:
Copied!
geo.plot_2d(
bm,
property="XY",
agg_method="mean",
crs=CRS('EPSG:20350'),
width=650,
height=650,
mapbox_zoom=12
)
geo.plot_2d(
bm,
property="XY",
agg_method="mean",
crs=CRS('EPSG:20350'),
width=650,
height=650,
mapbox_zoom=12
)