Open tjaraoz opened 1 month ago
Hi @tjaraoz,
It looks like GDAL can't find the projection file of your shape file.
Shape files are comprised of at least 3-4 other files that need to be in the same folder and named the same as the .shp file.
Questions for you: 1) Do you have other files accompanying your .shp file in the same folder? Please share a screenshot of that folder.
2) Have you tried plotting these layers to see if they appear?
3) Are you on a windows PC or on a Mac?
Hi @leombastos ,
Your shape file files are correct. I was taking a look online, and it seems like this could be related to your GDAL installation (outside and independent of R).
Try to locate the file proj.db
in your computer, and set is path as the GDAL path in R.
Some resources here:
Hi Leonardo!
I ran the code on a Windows computer and it worked, so as you mentioned, it must be a configuration issue with my Mac.
Thank you very much for your help,
best regards.
I am working with yield monitor data from an agricultural plot and I am having an issue when loading the yield data, the shp file of the plot boundary and also when creating a grid to later perform operations on its cells.
The code and its corresponding output are as follows:
Code:
Output: Reading layer
LIAG - Las Balas - FL3 - 0809 - Maiz' from data source
/Users/tomasaraoz/Desktop/tesis_scripts/data/Capas FL3/Mapas de rendimiento/Corregido/SHP/LIAG - Las Balas - FL3 - 0809 - Maiz.shp' using driver `ESRI Shapefile' Warning: GDAL Error 1: PROJ: proj_identify: Cannot find proj.dbSimple feature collection with 377923 features and 2 fields Geometry type: POINT Dimension: XY Bounding box: xmin: -6856507 ymin: -4086073 xmax: -6852886 ymax: -4079936 Projected CRS: WGS_1984_Web_Mercator_Auxiliary_Sphere Simple feature collection with 377923 features and 2 fields Geometry type: POINT Dimension: XY Bounding box: xmin: -6856507 ymin: -4086073 xmax: -6852886 ymax: -4079936 Projected CRS: WGS_1984_Web_Mercator_Auxiliary_Sphere First 10 features: fid Rinde geometry 1 1 6270.6 POINT (-6852959 -4085384) 2 2 6753.0 POINT (-6852961 -4085382) 3 3 7226.9 POINT (-6852963 -4085380) 4 4 9163.4 POINT (-6852966 -4085378) 5 5 9768.1 POINT (-6852968 -4085376) 6 6 9403.8 POINT (-6852969 -4085374) 7 7 10426.0 POINT (-6852971 -4085372) 8 8 10532.0 POINT (-6852973 -4085370) 9 9 12017.0 POINT (-6852975 -4085368) 10 10 10373.0 POINT (-6852977 -4085366) [1] "sf" "data.frame"BOUNDARY issue
Code:
Output:
GRID issue
Code:
Output: Geometry set for 150368 features Geometry type: POLYGON Dimension: XY Bounding box: xmin: 629321.2 ymin: 6189728 xmax: 632281.2 ymax: 6194808 Projected CRS: WGS_1984_UTM_Zone_20S First 5 geometries: POLYGON ((629321.2 6189728, 629331.2 6189728, 6... POLYGON ((629331.2 6189728, 629341.2 6189728, 6... POLYGON ((629341.2 6189728, 629351.2 6189728, 6... POLYGON ((629351.2 6189728, 629361.2 6189728, 6... POLYGON ((629361.2 6189728, 629371.2 6189728, 6... [1] "sfc_POLYGON" "sfc"
Code:
Output: Warning: GDAL Error 1: PROJ: proj_create_from_database: Cannot find proj.dbWarning: GDAL Error 1: PROJ: proj_create_from_database: Cannot find proj.dbError: node stack overflow Error during wrapup: node stack overflow Error: no more error handlers available (recursive errors?); invoking 'abort' restart