Convert addresses to coordinates
address_to_coords can be used to find coordinates to supplied Norwegian addresses. Internet access is required as the function utilizes the Norwegian Mapping Authority’s address API.
Character vector with zip codes.
Character vector with addresses (street name and house number).
Format of the returned object. Default value is set to “sf” (which returns an
sfobject). It is also possible set the format to “tibble” or “data.frame”.
Numeric vector with the chosen coordinate reference system (CRS). Default value is set to
If there are no coordinates found for the supplied address it means that it does not exist in Matrikkelen - Norway's official property register. See www.rettikartet.no to search for existing addresses.
address_to_coords(zip_code = "0185", address = "Schweigaards gate 10") #> Simple feature collection with 1 feature and 5 fields #> Geometry type: POINT #> Dimension: XY #> Bounding box: xmin: 262876.8 ymin: 6649176 xmax: 262876.8 ymax: 6649176 #> Projected CRS: ETRS89 / UTM zone 33N #> address zip_code kommunenummer kommunenavn ID #> 0185 Schweigaards gate 10 0185 0301 OSLO 1 #> geometry #> 0185 POINT (262876.8 6649176)