Create a 3D Gridded Surface¶
In [1]:
Copied!
import geolime as geo
from pyproj import CRS
import geolime as geo
from pyproj import CRS
In [3]:
Copied!
grid = geo.Voxel(
name="NewGrid",
shape=[75, 150],
origin=[545400, 7472700, 430],
axis=[[50, 0, 0], [0, 50, 0]]
)
grid = geo.Voxel(
name="NewGrid",
shape=[75, 150],
origin=[545400, 7472700, 430],
axis=[[50, 0, 0], [0, 50, 0]]
)
In [4]:
Copied!
gs = geo.GriddedSurface(name="GridSurf", xyz=grid.coords())
gs = geo.GriddedSurface(name="GridSurf", xyz=grid.coords())
Creation of a meaningless property for plotting purpose.
In [5]:
Copied!
gs.set_property_expr(name="XY", expr="sin(X / 2) * sin (Y / 2)")
gs.set_property_expr(name="XY", expr="sin(X / 2) * sin (Y / 2)")
In [6]:
Copied!
geo.plot(gs, property="XY", agg_method="mean", width=400, height=650)
geo.plot(gs, property="XY", agg_method="mean", width=400, height=650)
In [7]:
Copied!
geo.plot_2d(
gs,
property="XY",
agg_method="mean",
crs=CRS('EPSG:20350'),
width=650,
height=650,
mapbox_zoom=12
)
geo.plot_2d(
gs,
property="XY",
agg_method="mean",
crs=CRS('EPSG:20350'),
width=650,
height=650,
mapbox_zoom=12
)
Last update:
2023-10-23