0

I have a problem with reading my shapefile. The error:

Cannot open data source

In addition:

Warning messages:

1: In normalizePath(path.expand(path), winslash, mustWork) :
path[1]="D:/Pentru Disertatie/De pe RRRRRRR/ro_judete_poligon": The system cannot find the file specified

2: In normalizePath(path.expand(path), winslash, mustWork) :
path[1]="D:\Pentru Disertatie\De pe RRRRRRR\ro_judete_poligon": The system cannot find the file specified

2
  • Welcome to GIS.se! Please edit your post and include the actual code that produced the error - not just the error message! Also helpful if you provide more information about what you're doing and if the shapefile opens successfully in other apps such as QGIS.
    – Simbamangu
    Commented Aug 1, 2018 at 12:50
  • Try with raster::shapefile("D:/Pentru Disertatie/De pe RRRRRRR/ro_judete_poligon.shp")
    – aldo_tapia
    Commented Aug 1, 2018 at 13:16

1 Answer 1

0

With your code I think that the error may come from the space you leave here:

"D:/Pentru Disertatie/De pe RRRRRRR/ro_judete_poligon" and also not to specify the extension "ro_judete_poligon.shp".

With the package "sf" you can use the following code :

library("sf")

poly = read_sf(folder path/ro_judete_poligon.shp")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.