Questions tagged [rgdal]

The rgdal package for R provides bindings to the Geospatial Data Abstraction Library (GDAL) and access to projection/transformation operations from the PROJ.4 library.

rgdal is an package providing bindings to the Geospatial Data Abstraction Library () and access to projection/transformation operations from the library.

Repositories

Vignettes

Other resources

Related tags

572 questions
4
votes
0 answers

Calling Large Shapefiles into R, 2 GB polygon layer, rgdal

I'm attempting to open a shapefile in R using rgdal. my code is simply: shp <- readOGR("D:/Documents/EPA/Groundwater_Wells/R Work", "us_blocks_2010") The error message I receive is: Error: C stack usage 81982167 is too close to the limit The…
4
votes
4 answers

R Error in get: object '.xts_chob' not found

I am trying to execute the following code - library(dplyr) ; library(rgdal) ; library(leaflet); crimes <- read.csv("crime_data.csv", header = T) %>% filter(borough == "Manchester", date == "2015-11-01") %>% group_by(category, lsoa,…
NISHA DAGA
  • 575
  • 7
  • 14
4
votes
1 answer

Create hexagonal grid over city and associate with lon / lat points (in R)

I've been researching this for a while now but haven't come across any solution that fit my needs or that I can transform sufficiently to work in my case: I have a large car sharing data set for multiple cities in which I have the charging demand…
Jonathan
  • 148
  • 1
  • 10
4
votes
1 answer

readOGR {rgdal} taking too long to execute

I am trying to execute the readOGR function for a shapefile but it is taking way too long to process and I end up killing the process after 20mins or so. Following is the code: country <- readOGR('shapeFiles','gadm28', encoding = 'UTF-8') The…
user2330778
  • 235
  • 1
  • 4
  • 11
4
votes
1 answer

readOGR(), "cannot open file" error

Let me begin by saying that I have exhaustively looked at the other threads that have dealt with readOGR errors, and have made several attempts to implement them for my own benefit. The issue I have is similar to questions previously addressed:…
MLU0907
  • 43
  • 1
  • 4
4
votes
2 answers

List aviable WFS layers and read into data frame with rgdal

I have the following problem according to different sources it should be able to read WFS layer in R using…
Deset
  • 877
  • 13
  • 19
4
votes
1 answer

R: Crop GeoTiff Raster using packages "rgdal" and "raster"

I'd like to crop GeoTiff Raster Files using the two mentioned packages, "rgdal" and "raster". Everything works fine, except that the quality of the resulting output tif is very poor and in greyscale rather than colour. The original data are high…
Ratnanil
  • 1,641
  • 17
  • 43
4
votes
1 answer

Mac postgres/postgis driver for rgdal

I'm trying to get rgdal to read polygon data directly from a postgis-enabled database, but things aren't working too smoothly. I'm using OSX 10.9.2 with R 3.0.2 and I have the complete GDAL 1.10.1 framework installed from Kyngchaos. Specificlly…
Joe
  • 645
  • 3
  • 17
4
votes
1 answer

Are DWG files supported by readOGR in the rgdal package?

I want to read a .DWG file into R. DWG is on the list of supported OGR formats in GDAL: Link So in theory, I should be able to read in the .DWG file using readOGR() in rgdal. But I don't know how to define the dsn. The ogrDrivers() command gives me…
4
votes
1 answer

ggplot2 two data.frames, doesn't know how to deal with data of class uneval

I'm new to R and do not know how to plot two data.frames with ggplot2. I get the following error message: Error: ggplot2 doesn't know how to deal with data of class uneval How can I put together my data with the underlying world map? Here is my…
Til Hund
  • 1,543
  • 5
  • 21
  • 37
3
votes
1 answer

Error when re-projecting spatial points using spTransform in rgdal R

G'day, I have a large number of lon/lat coordinates that are in the CRS Australian Geodetic Datum 66/84 (AGD66 for brevity). I want to change these coordinates from AGD66 to WGS84 because there is about a 200m difference between them and I have…
Adam
  • 1,147
  • 3
  • 15
  • 23
3
votes
1 answer

R: Georeference single drone image from metadata file

In my example, I have a single dji image in *JPG: library(terra) single.image <-stack("https://github.com/Leprechault/trash/raw/main/DJI_0274.JPG") plotRGB(single.image, r = 3, g = 2, b = 1, stretch = "lin") # class : RasterStack # dimensions…
Leprechault
  • 1,531
  • 12
  • 28
3
votes
2 answers

sf and rgdal are not working on Mac OS Big Sur, how to fix? --Closed

library(sf) Error: package or namespace load failed for ‘sf’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object…
Lee Jim
  • 365
  • 3
  • 16
3
votes
1 answer

Supress rgdal warnings in R

i have some working code that, all of a sudden, shows a lot of warning messages (which it didn't do before). they do not hinder the execution of the code but are very annoying. i have around 2000 tif's i want to convert to rasters. to do so i load…
D.J
  • 1,180
  • 1
  • 8
  • 17
3
votes
2 answers

How to read a .MAP file extension in R?

Is there a simple way to read a file of .MAP extension in R? I have tried a few options below but had no success. Here is a .MAP file for a reproducible example. context: For some odd reason, the spatial regionalization used in health planning…
rafa.pereira
  • 13,251
  • 6
  • 71
  • 109