Skip to content

API ​

TerraScope.ImportOptions Type

Import settings. XY is always easting/northing (or longitude/latitude); Z is metres.

source
TerraScope._fill_grid_gaps! Method

Grow the filled cells into the empty ones, one shell of six neighbours per pass.

source
TerraScope._nearest_axis_index Method

Nearest grid index for v on an ascending axis.

source
TerraScope.axes_from_points Method
julia
axes_from_points(points; max_cells = 128) -> (x, y, z)

Rectilinear axes covering a point cloud, for gridding a file that has no mesh of its own. Gridded survey and model files repeat their coordinates exactly, so an axis with few distinct values keeps precisely those values — which is how layered depth columns survive intact; any other axis is divided into uniform cells instead, as many as the number of points supports.

source
TerraScope.crs_area_of_use Method

Longitude/latitude bounds PROJ declares for a CRS, as (west,south,east,north).

source
TerraScope.detect_xy_crs Method

Resolve the CRS of coordinate columns that carry no georeferencing metadata.

Degrees and projected metres do not overlap in practice: lon/lat is bounded by ±180/±90, while a metric CRS places survey data tens to hundreds of kilometres from its false origin. When the columns are degrees but their order is ambiguous - both within ±90, as anywhere outside the high-longitude bands - the target CRS's declared area of use decides which column is longitude.

Returns (source_crs, swap_xy); swap_xy is true for latitude-first files.

source
TerraScope.import_layer! Method

Serial, transactional import: a failed load never changes existing layers.

source
TerraScope.print_banner Method

Startup banner shared by the launcher and the TerraScope3D viewer.

source
TerraScope.read_ubc_model Method

UBC tensor mesh: southwest top origin; values ordered Z fastest, then X, then Y.

source
TerraScope.read_xyz_points Method

Read arbitrary XYZ pointsets without allocating a potentially enormous Cartesian grid.

source
TerraScope.resample_points_to_axes Method
julia
resample_points_to_axes(points, x, y, z) -> Array{Float64,3}

Resample a scattered point cloud onto the rectilinear grid x × y × z, which must be in the same coordinate system as the points. Each point goes to its nearest cell, cells that collect several points average them, and cells that collect none are grown in from their filled neighbours. Returns values[ix, iy, iz] in the order the axes were given, plus the fraction of cells that were filled directly from points.

source