GetFarmFromLonLat {wflo}R Documentation

Accesses full FarmData set and returns a compatible list object for the requested location.

Description

This function accepts a pair longitude (decimal system, east) and latitude (decimal system, north) coordinates as well a a desired edge length in m and if valid, returns a list object similar to FarmData, but at the specified location and with the specified size.

Usage

GetFarmFromLonLat(Top, Left, EdgeLen, DoPlot = FALSE)

Arguments

Top

longitude value (decimal system, east).

Left

latitude value (decimal system, north).

EdgeLen

edge length in meters. Note that the returned farm data object is always a square area and thus, contains square matrices.

DoPlot

optionally plots the annual energy production (AEP) 'landscape' in the returned object using a terrain.colors coloring scheme, together with a color key.

Details

Requires that the full FarmData dataset is loaded. See AcquireData on how to obtain it.

Value

Returns a list object following the structure of FarmData, but only containing the farm area starting from the top-left point specified and as many 'tiles' required to meet the desired edge length at 200 m tiles resolution.

Author(s)

Carsten Croonenbroeck

See Also

See Index2GK to convert index coordinates to Gauss-Kruger coordinates, and GK2LonLat to convert Gauss-Kruger coordinates to longitude/latitude coordinates.

Examples

# This will return a farm at the specified location, edge length 5,000 m (5 km).
# Requires full data set to be loaded.
## Not run: 
MyFarm <- GetFarmFromLonLat(51.49594, 11.58818, 5000, DoPlot = FALSE)

## End(Not run)

[Package wflo version 1.9 Index]