
Vehicle registration plates
bkg_kfz.Rd
Retrieve motor vehicle registration plate regions in Germany. Registration plate regions are discerned by their area code (Unterscheidungszeichen) which indicate the place where a vehicle was registered. These regions partially overlap with districts but are not entirely identical.
This function interfaces the wfs_kfz250
product of the BKG.
Usage
bkg_kfz(
...,
bbox = NULL,
poly = NULL,
predicate = "intersects",
filter = NULL,
epsg = 3035,
properties = NULL,
max = NULL
)
Arguments
- ...
Used to construct CQL filters. Dot arguments accept an R-like syntax that is converted to CQL queries internally. These queries basically consist of a property name on the left, an aribtrary vector on the right, and an operator that links both sides. If multiple queries are provided, they will be chained with
AND
. The following operators and their respective equivalents in CQL and XML are supported:R CQL XML ==
=
PropertyIsEqualTo
!=
<>
PropertyIsNotEqualTo
<
<
PropertyIsLessThan
>
>
PropertyIsGreaterThan
>=
>=
PropertyIsGreaterThanOrEqualTo
<=
<=
PropertyIsLessThanOrEqualTo
%LIKE%
LIKE
PropertyIsLike
%ILIKE%
ILIKE
%in%
IN
To construct more complex queries, you can use the
filter
argument to pass CQL queries directly. Also note that you can switch between CQL and XML queries usingoptions(ffm_query_language = "xml")
. See alsowfs_filter
.- bbox
An sf geometry or a boundary box vector of the format
c(xmin, ymin, xmax, ymax)
. Used as a geometric filter to include only those geometries that relate tobbox
according to the predicate specified inpredicate
. If an sf geometry is provided, coordinates are automatically transformed to ESPG:25832 (the default CRS), otherwise they are expected to be in EPSG:25832.- poly
An sf geometry. Used as a geometric filter to include only those geometries that relate to
poly
according to the predicate specified inpredicate
. Coordinates are automatically transformed to ESPG:25832 (the default CRS).- predicate
A spatial predicate that is used to relate the output geometries with the object specified in
bbox
orpoly
. For example, ifpredicate = "within"
, andbbox
is specified, returns only those geometries that lie withinbbox
. Can be one of"equals"
,"disjoint"
,"intersects"
,"touches"
,"crosses"
,"within"
,"contains"
,"overlaps"
,"relate"
,"dwithin"
, or"beyond"
. Defaults to"intersects"
.- filter
A character string containing a valid CQL or XML filter. This string is appended to the query constructed through
...
. Use this argument to construct more complex filters. Defaults toNULL
.- epsg
An EPSG code specifying a coordinate reference system of the output. If you're unsure what this means, try running
sf::st_crs(...)$epsg
on a spatial object that you are working with. Defaults to 3035.- properties
Vector of columns to include in the output.
- max
Maximum number of results to return.
Value
An sf dataframe with multipolygon geometries and the following columns:
debkgid
: Identifier in the digital landscape model DLM250nnid
: National name identifiername
: Name of the geographical objectars
: Territorial code (Amtlicher Regionalschlu00fcssel). The ARS is stuctured hierarchically as follows:Position 1-2: Federal state
Position 3: Government region
Position 4-5: District
Position 6-9: Administrative association
Position 10-12: Municipality
oba
: Name of the ATKIS object typekfz
: Vehicle registration area code, comma-separated in case of multiple codesgeola
: Geographical longitudegeobr
: Geographical latitudegkre
: Gauu00df-Kru00fcger eastinggkho
: Gauu00df-Kru00fcger northingutmre
: UTM eastingutmho
: UTM northing
See also
Other non-administrative regions:
bkg_authorities()
,
bkg_grid
,
bkg_ror()
Examples
if (FALSE) { # getFromNamespace("ffm_run_examples", ns = "ffm")() && requireNamespace("ggplot2")
library(ggplot2)
kfz <- bkg_kfz(ars %LIKE% "053%")
ggplot(kfz) +
geom_sf(fill = NA) +
geom_sf_text(aes(label = kfz)) +
theme_void()
}