The load function takes a url to a geotiff or geotiff file as an input and returns a promise. The promise resolves as a georaster, which can be used as input in other geoblaze methods, such as identify, sum, or histogram.
const sums = geoblaze.load(url_or_file).then(georaster => sum(georaster, geometry));
The get function takes a raster and a bounding box as input. It returns the subset of pixels in the raster found within the bounding box. It also takes an optional parameter "flat" which will flatten the returning pixel matrix across bands instead of retaining a nested array structure.
(Object)
a raster from the georaster library
(Object)
can be an
[
xmin, ymin, xmax, ymax
]
array, a [[
[
x00,y00
]
,...,
[
x0n,y0n
]
,
[
x00,y00
]
]...] GeoJSON polygon object, or a string representation of a GeoJSON polygon object.
(Boolean)
whether or not the resulting output should be flattened into a single array
Object:
array of pixel values
const pixels = geoblaze.get(georaster, geometry);
The histogram function takes a raster as an input and an optional geometry. If a geometry is included, the function returns the histogram of all the pixels in that area. If no geometry is included, the pixels returns the histogram of all the pixels for each band in the raster.
(Object)
georaster from georaster library
(Object
= undefined)
a geometry, which we'll use for clipping result
Object:
array of histograms for each band
var histograms = geoblaze.histogram(georaster, geometry);
Given a raster and a point geometry, the identify function returns the pixel value of the raster at the given point.
The max function takes a raster as an input and an optional geometry. If a geometry is included, the function returns the max of all the pixels in that area. If no geometry is included, the pixels returns the max of all the pixels for each band in the raster.
(Object)
a raster from the georaster library
(Object)
geometry can be an
[
xmin, ymin, xmax, ymax
]
array for a bounding box, [[
[
x00,y00
]
,...,
[
x0n,y0n
]
,
[
x00,y00
]
]...] for a polygon, a GeoJSON polygon object, or a string representation of a GeoJSON polygon object.
Object:
array of maxs for each band
const maxs = geoblaze.max(georaster, geometry);
The median function takes a raster as an input and an optional geometry. If a geometry is included, the function returns the median of all the pixels in that area. If no geometry is included, the pixels returns the median of all the pixels for each band in the raster.
(Object)
a raster from the georaster library
(Object)
geometry can be an
[
xmin, ymin, xmax, ymax
]
array for a bounding box, [[
[
x00,y00
]
,...,
[
x0n,y0n
]
,
[
x00,y00
]
]...] for a polygon, a GeoJSON polygon object, or a string representation of a GeoJSON polygon object.
Object:
array of medians for each band
const medians = geoblaze.median(georaster, geometry);
The mean function takes a raster as an input and an optional geometry. If a geometry is included, the function returns the mean of all the pixels in that area. If no geometry is included, the pixels returns the mean of all the pixels for each band in the raster.
(Object)
a raster from the georaster library
(Object)
geometry can be an
[
xmin, ymin, xmax, ymax
]
array for a bounding box, [[
[
x00,y00
]
,...,
[
x0n,y0n
]
,
[
x00,y00
]
]...] for a polygon, a GeoJSON polygon object, or a string representation of a GeoJSON polygon object.
Object:
array of means for each band
const means = geoblaze.mean(georaster, geometry);
The mode function takes a raster as an input and an optional geometry. If a geometry is included, the function returns the mode of all the pixels in that area. If no geometry is included, the pixels returns the mode of all the pixels for each band in the raster.
(Object)
a georaster from the georaster library
(Object)
geometry can be an
[
xmin, ymin, xmax, ymax
]
array for a bounding box, [[
[
x00,y00
]
,...,
[
x0n,y0n
]
,
[
x00,y00
]
]...] for a polygon, a GeoJSON polygon object, or a string representation of a GeoJSON polygon object.
Object:
array of modes for each band
const modes = geoblaze.mode(georaster, geometry);
The min function takes a raster as an input and an optional geometry. If a geometry is included, the function returns the min of all the pixels in that area for each band. If no geometry is included, the pixels returns the min of all the pixels for each band in the raster.
(Object)
a georaster from the georaster library
(Object)
geometry can be an
[
xmin, ymin, xmax, ymax
]
array for a bounding box, [[
[
x00,y00
]
,...,
[
x0n,y0n
]
,
[
x00,y00
]
]...] for a polygon, a GeoJSON polygon object, or a string representation of a GeoJSON polygon object.
Object:
array of mins for each band
const mins = geoblaze.min(georaster, geometry);
The sum function takes a raster as an input and an optional geometry. If a geometry is included, the function returns the sum of all the pixels in that area. If no geometry is included, the pixels returns the sum of all the pixels for each band in the raster.
(Object)
a georaster from the georaster library
(Object)
geometry can be an
[
xmin, ymin, xmax, ymax
]
array for a bounding box, [[
[
x00,y00
]
,...,
[
x0n,y0n
]
,
[
x00,y00
]
]...] for a polygon, a GeoJSON polygon object, or a string representation of a GeoJSON polygon object.
Object:
array of sums for each band
const sums = geoblaze.sum(georaster, geometry);