CanvasMap
Getting Started Tutorials 3D Reference

Class CMDatasetRaster extends CMDataset

CMDatasetRaster
Manages a raster that is represnted by a JSON object. This allows
for any type (N-Band, RGB, etc.) and any data type (INT32, FLOAT 32)
rasters to be managed in the client.d

The drawing functions maps the raster to the screen based on
the overall min max values.


Copyright (C) 2020, Humboldt State University, Jim Graham

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General
Public License as published by the Free Software Foundation, either version 3 of the License, or (at your
option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see
.

Object Functions

Inherited From: CMDataset
ReturnsFunctionThrows
SetBounds(NewBounds)
Bounds GetBounds()
GetSampleFromRef()
GetSampleFromRef_PixelsInCorners()
GetPathArray()

Object Functions

SetBounds(NewBounds)

Check if the feature is visible in the view.
This should be called by subclasses but can also be called to limit a layer's bounds after loading.

Parameters:
    NewBounds - Bounds with format {XMin,XMax,YMin,YMax}

Bounds=GetBounds()

Returns the bounds of the data within the layer. Computed after loading the data.

Returns: Bounds - with format {XMin,XMax,YMin,YMax}

GetSampleFromRef()

Returns the value of a single pixel.
Used when raster has coordinates in the middle of thepixel - jjg when not used as a DEM

GetSampleFromRef_PixelsInCorners()

Returns the value of a single pixel.

GetPathArray()

returns an array of THREE.Vector3 objects with the z values set from the
associated DEM. New points will be added to the array when the line segments
cross a vertical or horizontal boundary between pixels.