Skip to contents

Implementation of the OVCCoordenadas service Consulta_CPMRC. Return the coordinates for a specific cadastral reference.

Usage

catr_ovc_get_cpmrc(
  rc,
  srs = 4326,
  province = NULL,
  municipality = NULL,
  verbose = FALSE
)

Arguments

rc

The cadastral reference to be geocoded.

srs

SRS/CRS to use on the query. To check the admitted values check catr_srs_values, specifically the ovc_service column.

province, municipality

Optional, used for narrowing the search.

verbose

Logical, displays information. Useful for debugging, default is FALSE.

Value

A tibble. See Details

Details

When the API does not provide any result, the function returns a tibble with the input parameters only.

On a successful query, the function returns a tibble with one row by cadastral reference, including the following columns:

  • xcoord, ycoord: X and Y coordinates in the specified SRS.

  • refcat: Cadastral Reference.

  • address: Address as it is recorded on the Cadastre.

  • Rest of fields: Check the API Docs on Consulta_CPMRC

References

Consulta_CPMRC

Examples

# \donttest{

# using all the arguments
catr_ovc_get_cpmrc("13077A01800039",
  4230,
  province = "CIUDAD REAL",
  municipality = "SANTA CRUZ DE MUDELA"
)
#> # A tibble: 1 × 10
#>   xcoord ycoord refcat       address pc.pc1 pc.pc2 geo.x…¹ geo.y…² geo.srs ldt  
#>    <dbl>  <dbl> <chr>        <chr>   <chr>  <chr>  <chr>   <chr>   <chr>   <chr>
#> 1  -3.46   38.6 13077A01800… DS DIS… 13077… 18000… -3.456… 38.619… EPSG:4… DS D…
#> # … with abbreviated variable names ¹​geo.xcen, ²​geo.ycen

# only the cadastral reference
catr_ovc_get_cpmrc("9872023VH5797S")
#> # A tibble: 1 × 10
#>   xcoord ycoord refcat       address pc.pc1 pc.pc2 geo.x…¹ geo.y…² geo.srs ldt  
#>    <dbl>  <dbl> <chr>        <chr>   <chr>  <chr>  <chr>   <chr>   <chr>   <chr>
#> 1  -3.46   38.6 9872023VH57… CL GLO… 98720… VH579… -3.463… 38.640… EPSG:4… CL G…
#> # … with abbreviated variable names ¹​geo.xcen, ²​geo.ycen
# }