Learn R Programming

dggridR (version 2.0.4)

dg_process_polydata: Load a KML file

Description

Convert data from internal dggrid functions into something useful: an sp object or a data frame

Usage

dg_process_polydata(polydata, frame, wrapcells)

Arguments

polydata

Polygons generated by dggrid. These will be converted.

frame

If TRUE, return a data frame suitable for ggplot plotting. If FALSE, return an SpatialPolygons

wrapcells

Cells which cross -180/180 degrees can present difficulties for plotting. Setting this TRUE will result in cells with components in both hemispheres to be mapped entirely to positive degrees (the Eastern hemisphere). As a result, such cells will have components in the range [180,360). Only used when frame=TRUE.

Value

Returns a data frame or OGR poly object, as specified by frame