Questions tagged [rgdal]
R Bindings for the Geospatial Data Abstraction Library
217 questions
0 votes
0 answers
37 views
ArcGIS Pro 3.1 errors out on lidR sf object Hulls exported as a polygon shapefile
So I am trying to write a Hulls object created from the crown_metrics function to a shapefile using st_write. Now, with st_write to resolve the 3D error in regards to a shapefile, I first used st_zm. ...
0 votes
0 answers
206 views
read_osm from tmap package gives transformation error
I try to read Open Street Map data as shown in the RDocumentation of the tmap package. library(tmap) library(tmaptools) data(NLD_muni) osm_NLD <- read_osm(NLD_muni, ext=1.1) But I get following ...
0 votes
1 answer
1k views
Error: unexpected string constant in
I'm trying to create a SpatialPointsDataFrame, however I get the error Error: unexpected string constant in: "NET.TO.EXTRAC_1 = SpatialPointsDataFrame(coords = net[,3:2], data = net, proj4string ...
1 vote
2 answers
4k views
Using a downloaded shapefile in ggplot2 and R, readOGR error
I am having trouble taking a downloaded shapefile and using it in R and {ggplot2}. The online instructions (like this one) use code that have the function readOGR(). When I use readOGR(), I get ...
1 vote
1 answer
137 views
Plotting CALIPSO data in R
I am trying to plot one subdataset of CALIPSO which is in hdf format using R. The data is totally new to me as it's LiDAR data. I am not able to understand how to plot a graph between backscatter ...
9 votes
2 answers
15k views
Fast way to convert raster to polygon shapefile in R
I have a single-band raster showing different land cover classes. I want to convert it to a polygon shapefile. I tried to use the rasterToPolygons function with the option to dissolve neighboring ...
0 votes
0 answers
158 views
How to intersect shapefile with polygons in R properly?
I have a WI shapefile (https://data-wi-dnr.opendata.arcgis.com/datasets/wi-dnr::wisconsin-state-boundary-24k/explore?location=44.747223%2C-89.836300%2C8.20) and a grid that I want to intersect so that ...
1 vote
0 answers
38 views
What (if any) coordinate systems can be used so that distances can be calculated from coordinates?
I am trying to do some work that involves spatiotemporal latent surface modeling, but an issue that I am worried about is that calculating distance between two coordinates is quite a bit more ...
2 votes
1 answer
408 views
Plot a tidy map of English regions
I'm trying to plot a tidy map of English regions in R. I'm using code that runs successfully on other shapefiles, but when I run this the code executes without error, but then just presents a blank ...
0 votes
1 answer
267 views
Merging .tif files via gdalbuildvrt not working
I have a piece of code in R that I have used for a while now to transform .xyz files to .tif and then merge all those .tif files into one big .tif. It has worked well when I last used it 2 years ago, ...
0 votes
1 answer
916 views
Changing spatialpolygonsdataframe to default longitude/latitude (degrees) using R
I am trying (and failing) to convert the coordinates in a spatial object (Spatialpolygonsdataframe) form easting/northing to latitude/longitude. The zone is 35S. I know it can be achieved with ...
1 vote
1 answer
2k views
Read geo-spatial data in R via Leaflet
I have some site boundary data as follow: UNB_BDSB_SiBdry_v08_201028lico_25831.cpq UNB_BDSB_SiBdry_v08_201028lico_25831.dbf UNB_BDSB_SiBdry_v08_201028lico_25831.prj ...
0 votes
2 answers
377 views
rgdal setting unreliable in parallel raster processing - terra produces auxiliary files for wrapped rasters but not for locally defined ones
Background: When writing rasters using formats that do not support geolocation (for example .png), the Terra package saves auxiliary files containing this information. This can be prevented by ...
0 votes
0 answers
1k views
Cannot open TIFF due to missing codec in R w/ raster library
Title explains my predicament. I cannot open a tiff file using the raster package and receive an error that tells me it is due to a missing codec: Code: library(rgdal) library(raster) file_name &...
0 votes
0 answers
674 views
projectRaster() error messages
This code worked perfectly fine for me a few months ago, but now I am receiving error messages. I've tried it two different ways. Has the projectRaster() function been deprecated or syntax changed? ...