fullplot.imageJ: Convert pixels to coordinates within a quadrat.

Description Usage Arguments Details Arguments details Examples

Description

Reads quadrat maps created by imageJ, converting the digitized pixel to coordinates within a quadrat (local coordinates).

Usage

1
2
3
4
5
fullplot.imageJ(path = "", outfile = "plotLxLy.txt", delim = ",",
  include.subdir = T, corners = c("p1", "p2", "p3", "p4"),
  colrange = c(0, 49), rowrange = c(0, 24), prefix = "Map_",
  suffix = ".txt", subquadsuffix = c("_1", "_2", "_3", "_4"),
  gridsize = c(10, 10), debug = NULL)

Arguments

path

The complete path name where the map files to be converted are found.

outfile

Filename for output.

include.subdir

whether the subfolders are to be searched for map files also

corners

specify the tags used for the map corners used for calibration. They must be named in a clockwise direction starting with the lower left corner. These tags must be the same in each and every map file.

colrange

specifies the range of the columns, found as the first two digits of the quadrat name

rowrange

specifies the range of the rows, found in the last two digits of the quadrat name

prefix

the prefix used for all the map files before the quadrat name

suffix

the extension used for the map files. The imageJ default is ".txt".

gridsize

Size of each individual map.

debug

Logical. If TRUE, call browser to debug.

subquadratsuffix

Suffixes used to indicate what section of the map the subquadrat refers to. They should be named clockwise from the lower left. It can be used for map files that are smaller than 20x20m (i.e. 10x10m).

Details

The input imageJ files must be named in a very specific way: all should have the same prefix and the quadrat names should have 4 digits. If there are subquadrats, the names should end with the same consistent suffixes. Only those files with this specific naming convention are read and converted. Updated Aug 2014 to handle files with no trees (just 4 corner labels).

Arguments details

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
mapfolder = '/maps/rabi/'
coords =
  fullplot.imageJ(
    path = mapfolder,
    include.subdir = T,
    gridsize = c(10, 10),
    outfile = 'location.txt',
    corners = c('p2', 'p1', 'p4', 'p3'),
    prefix = 'Map_',
    colrange = c(0, 49),
    rowrange = c(0, 24),
    subquadsuffix = c('_1', '_2', '_3', '_4')
  )
head(coords)
dim(coords)
range(coords$lx)
range(coords$ly)

## End(Not run)

forestgeo/ctfs documentation built on May 3, 2019, 6:44 p.m.