GeoJSON

GeoJSON

Handles GeoJSON files. Part of Geospatiale III.

Source:

Methods

(static) fillPolygon(arg0_rgba_buffer, arg1_polygon, arg2_optionsopt) → {Buffer.<ArrayBuffer>}

Fills a GeoJSON Polygon on a given RGBA buffer.

Source:
Parameters:
Name Type Attributes Description
arg0_rgba_buffer Buffer.<ArrayBuffer>
arg1_polygon Object
arg2_options Object <optional>
Name Type Attributes Default Description
height number <optional>
2160

The height of the underlying RGBA buffer.

width number <optional>
4320

The width of the underlying RGBA buffer.

Returns:
Type:
Buffer.<ArrayBuffer>

(static) getCentroid(arg0_geometry) → {Array.<number>}

Fetches the x, y coordinate pair for a given pixel given latitude and longitude coordinates for WGS84 Equirectangular.

Source:
Parameters:
Name Type Description
arg0_geometry Object
Returns:
Type:
Array.<number>

(static) toRaster(arg0_input_file_path, arg1_output_file_path, arg2_optionsopt)

Writes a GeoJSON file to raster.

Source:
Parameters:
Name Type Attributes Description
arg0_input_file_path string

.geojson input file to specify.

arg1_output_file_path string

.png output file path.

arg2_options Object <optional>
Name Type Attributes Default Description
property_key string <optional>
"ID_UC_G0"

The .feature.properties key to encode as the colour of each GeoJSON Polygon.

height number <optional>
2160
width number <optional>
4320