latlon2SA: Decode coordinates to Statistical Areas

View source: R/latlon2SA.R

latlon2SAR Documentation

Decode coordinates to Statistical Areas

Description

Decode coordinates to Statistical Areas

Usage

latlon2SA(
  lat,
  lon,
  to = c("SA2", "SA1", "SA3", "SA4", "POA"),
  yr = "2021",
  return. = c("sf", "v"),
  NAME = TRUE,
  crs = NULL
)

Arguments

lat, lon

The latitude and longitude of the points.

to

Which statistical areas (by default SA2) to map to.

yr

The year of the statistical area series.

return.

Return the spatial data frame (sp) or a vector (v) of the ?

NAME

If TRUE and return is v, the default, the NAME is returned; otherwise, the MAIN or CODE is returned. If to = SA1 then, as NAME is not available, the MAIN is returned without a warning.

crs

An integer, the coordinate reference system argument passed to sf::st_as_sf. If NULL, the default, the CRS is assumed to be the same as the spatial features object requested (e.g. 'SA2_2021()' under the default arguments).

Value

A vector or spatial feature object of the SAs mapped.


HughParsonage/ASGS documentation built on Jan. 17, 2024, 12:16 p.m.