Package 'atpolR'

Title: ATPOL Grid Implementation
Description: ATPOL is a rectangular grid system used for botanical studies in Poland. The ATPOL grid was developed in Institute of Botany, Jagiellonian University, Krakow, Poland in '70. Since then it is widely used to represent distribution of plants in Poland. 'atpolR' provides functions to translate geographic coordinates to the grid and vice versa. It also allows to create a choreograph map.
Authors: Grzegorz Sapijaszko [aut, cre, cph], Łukasz Komsta [ctb], Marek Verey [ctb]
Maintainer: Grzegorz Sapijaszko <[email protected]>
License: GPL-3
Version: 0.1.3
Built: 2024-11-03 04:36:52 UTC
Source: https://github.com/gsapijaszko/atpolr

Help Index


atpol_div creates ATPOL grid divided by 2, 4 or 5 (based on divider parameter) and returns it as sf object. Useful for grids like 5 x 5 km (divider = 2), 250 x 250 m (divider = 4) or 20 x 20 m (divider = 5). For details see Verey and Komsta (2018)

Description

atpol_div creates ATPOL grid divided by 2, 4 or 5 (based on divider parameter) and returns it as sf object. Useful for grids like 5 x 5 km (divider = 2), 250 x 250 m (divider = 4) or 20 x 20 m (divider = 5). For details see Verey and Komsta (2018)

Usage

atpol_div(grid, divider)

Arguments

grid

any valid ATPOL grid like "BE" or "DC5128"

divider

divide by parameter: 2, 4, 5

Value

Simple Feature (sf) grid of polygons for ATPOL grid divided by 2, 4 or 5

References

Marek Verey, Łukasz Komsta (2018). “Standaryzacja zapisu podziałów siatki ATPOL.” Fragmenta Floristica et Geobotanica Polonica, 25(1), 107–111. Number: 1, http://bomax.botany.pl/pubs-new/#article-4302.

Examples

atpol_div("BE", 2)
atpol_div(grid = c("BE23", "DC5128"), divider = 4)

atpol100k creates ATPOL grid 100km x 100km and returns it as sf object

Description

atpol100k creates ATPOL grid 100km x 100km and returns it as sf object

Usage

atpol100k()

Value

Simple Feature (sf) grid of polygons for 100km x 100km ATPOL grid


atpol10k returns ATPOL grid 10x10 km and returns it as sf object

Description

atpol10k returns ATPOL grid 10x10 km and returns it as sf object

Usage

atpol10k()

Value

Simple Feature (sf) grid of polygons for 10km x 10km ATPOL grid


atpol1k creates ATPOL grid 1km x 1km and returns it as sf object

Description

atpol1k creates ATPOL grid 1km x 1km and returns it as sf object

Usage

atpol1k(grid)

Arguments

grid

any valid ATPOL 10km grid like "BE23" or "DC58"

Value

Simple Feature (sf) grid of polygons for 1km x 1km ATPOL grid

Examples

atpol1k("BE23")

boundaryPL reads the file data/pl_boundary.Rds with simplified boundary geometry.

Description

boundaryPL reads the file data/pl_boundary.Rds with simplified boundary geometry.

Usage

boundaryPL()

Value

Simple Feature (sf) geometry of Poland in EPSG:2180 projection.


Reverse engineering of published ATPOL grids

Description

check_atpol_square() do a reverse engineering of published ATPOL grids species, especially those published in ()

Usage

check_atpol_square(centroid, raster, distance)

Arguments

centroid

Simple Feature point geometry for which the check is performed, usually it corresponds to centroid of ATPOL 10km x 10km grid

raster

geocoded raster, it has to be in EPSG:2180 projection

distance

st_buffer distance from centroid point for which the check is done, default 1200 m

Value

"YES" or "?" for given SF point

References

Adam Zając, Maria Zając (eds.) (2001). Atlas rozmieszczenia roślin naczyniowych w Polsce. Distribution Atlas of Vascular Plants in Poland. Laboratory of Computer Chorology - Institute of Botany - Jagiellonian University, Kraków. ISBN 978-83-915161-1-9.


extract_data_from_old_atpol() reads the ATPOL extracts from '.LOC' file and returns a tibble

Description

extract_data_from_old_atpol() reads the ATPOL extracts from '.LOC' file and returns a tibble

Usage

extract_data_from_old_atpol(filename = )

Arguments

filename

name of '.LOC' file

Value

tibble with records

Examples

extract_data_from_old_atpol(filename = system.file("extdata/0200.LOC", package = "atpolR"))

grid_to_latlon converts the ATPOL grid to latitude and longitude. With xoffset = 0 and yoffset = 0 parameters it returns coordinates of the upper left corner of the grid.

Description

grid_to_latlon converts the ATPOL grid to latitude and longitude. With xoffset = 0 and yoffset = 0 parameters it returns coordinates of the upper left corner of the grid.

Usage

grid_to_latlon(grid, xoffset = 0.5, yoffset = 0.5)

Arguments

grid

An ATPOL grid, ex. "GF2345".

xoffset

An offset in X, where 0 is for left, and 1 for right side of the grid. The default value is 0.5, which corresponds to middle of the grid.

yoffset

An offset in Y, where 0 is for top, and 1 for bottom side of the grid. The default value is 0.5, which corresponds to middle of the grid.

Value

latitude and longitude of ATPOL grid (default centroid) as pair of numerics

References

https://atpol.sourceforge.io/

Examples

grid_to_latlon("BE21")
grid_to_latlon("BE21", 0, 0)

latlon_to_grid(lat, lon, length) converts geographical coordinates to ATPOL grid of given length

Description

latlon_to_grid(lat, lon, length) converts geographical coordinates to ATPOL grid of given length

Usage

latlon_to_grid(lat, lon, length)

Arguments

lat

Latitude in degrees, ex. 51.123456

lon

Longitude in degrees, ex. 17.234567

length

Desired ATPOL grid length, which can be 2, 4, 6, 8, 10 or 12,

Value

grid, ex. BE, BE23, BE2357, etc.

References

https://atpol.sourceforge.io/

Examples

latlon_to_grid(51, 17, 2)
latlon_to_grid(51, 17, 6)

plotPoitsOnAtpol() plots the observations on ATPOL 10km x 10km grid

Description

plotPoitsOnAtpol() plots the observations on ATPOL 10km x 10km grid

Usage

plotPoitsOnAtpol(myData, outputType, filename, main, colors,
water, cex, col, pch, grid10k)

Arguments

myData

SimpleFeature data frame with point geometry, usually centroid of ATPOL grid square

outputType

image output type, either "svg" or "png"; if not specified a standard output device is used (screen)

filename

name of the output file

main

image title, usually a species name

colors

vector of colors to be used as a background, default internal .myCols. If FALSE, black and white plot has to be expected

water

logical, if water layer has to be included, default TRUE

cex

size of the points, default 0.9

col

color of the points, default black

pch

shape of the point, default 16 - filled dot

grid10k

logical, default FALSE. If the small grid has to be printed out

Value

choreograph map of species distribution in Poland.