isin.convert: Calculate grid and polygon coordinates for 4 km ISIN grid

View source: R/isin.convert.R

isin.convertR Documentation

Calculate grid and polygon coordinates for 4 km ISIN grid

Description

This function is used to convert information regarding the ISIN grid information used by Globcolour as well as to construct associated polygons for use in mapping. The raw Globcolour .nc files come with column and row pointers as to the the grid's location. For 4.63 km resolution data ("L3b"), this translates to 4320 latitudinal rows with varying number of associated longitudinal columns depending on the latitudinal circumference. Input must be either a vector of grid numbers, grd, or a dataframe with column and row identifiers, coord. See Globcolour's "Product User Guide" for fulther details of the ISIN grid (http://www.globcolour.info/products_description.html).

Usage

isin.convert(grd = NULL, coord = NULL, polygons = FALSE)

Arguments

grd

numeric vector containing ISIN grid numbers needed for calculating lon/lat coordinates or polygons.

coord

data.frame containing ISIN grid coordinates (row and column locations). Names of columns should be coord$row and coord$col.

polygons

Logical. Should grid polygon corner coordinates be returned.

Value

If "polygons = TRUE", then returns grid information as a dataframe, including lon / lat values of grid centers. If "polygons = TRUE", then returns a list with polygon corners in a dataframe(longitudinal coordinates of corners (e.g. [[i]]$x) and latitudinal coordinates of corners ( [[i]]$y))


marchtaylor/sinkr documentation built on July 4, 2022, 5:48 p.m.