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
0
votes
1 answer

Define attribute classes during readOGR

Is there any possibility to declare the data type of the attribute columns when importing, for example, a ESRI Shapefile with the readOGR command? For example, I would like to keep the leading zeros in my key column (id_code): example<-…
Bushroot
  • 259
  • 1
  • 13
0
votes
0 answers

Rgdal package installation trouble

I need your help solving this particular problem. I am trying to install the Rgdal package, but I can't seem to be able to get past the installation. The output seems fairly normal at first (as far as I can tell). * installing *source* package…
0
votes
0 answers

Raster processing 8GB more in R

I am currently using a code in R for calculating heat stroke , but it has been impossible for me to run more than 100 MB . The code operates a small raster elevation model but it has been impossible for me to use larger raster (raster DEM Colombia…
0
votes
2 answers

How can I convert one raster format to another format?

I have a raster file for the whole world whose details are: class : RasterLayer dimensions : 18000, 43200, 777600000 (nrow, ncol, ncell) resolution : 0.008333333, 0.008333333 (x, y) extent : -180, 180, -60, 90 (xmin, xmax, ymin,…
maximusdooku
  • 5,242
  • 10
  • 54
  • 94
0
votes
1 answer

R: Find/match NUTS code in shapefile

where do I find the EU NUTS code in the shapefile in R? NUTS = Nomenclature of Territorial Units for Statistics Each NUTS region has a NUTS code: . You can also find the detailed NUTS codes in this Excel file. When I download the NUTS shapefile, I…
Thomas V.
  • 41
  • 5
0
votes
0 answers

R spTransform Error

I am using a shapefile and I am getting the following error when I use the spTransform function. "Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘spTransform’ for signature ‘"list", "CRS"’". Does…
bryven
  • 23
  • 1
  • 4
0
votes
1 answer

Unexpected convertion output from Latlong to UTM in R

I'm trying to convert Latlong to UTM but, for some reason, the results coming from R are very different from what I looking for. The dataset is just one observation (the city of São Paulo): LatLong Longitude of São Paulo: -46.633309 Latitude of São…
umLu
  • 458
  • 1
  • 5
  • 10
0
votes
1 answer

R: Creating a new raster/shape file from calculations done using variables from a shape file and a raster

I am currently trying to create a new raster or shape file based on a conditional calculation that needs to be done over every value in a shape value based on a value in a raster file. I don't usually work with raster and shape files, so I am pretty…
SEHOCKETT
  • 179
  • 1
  • 9
0
votes
1 answer

rgdal installation failed on ubuntu 14.04

I am trying to install rgdal in my computer that runs ubuntu linux 14.04. The R version that I am using is: 3.3.1. I installed gdal and related packages from the regular ubuntu repository and also using the ubuntu-gis ppa…
magablan
  • 9
  • 2
0
votes
2 answers

How to Reorder Formal Class Spatial Polygons

I'm looking for a way to re-order a set of Formal Class Spatial Polygons using I'm using US Census data (Limited to Texas) and want to create 33 polygons out of different county combinations.…
0
votes
2 answers

Assign name to a substring in a loop importing raster files

I'm importing some raster files from a PostgreSQL connection into R in a loop. I want to assign my newly gained rasters automatically to a variable whose name is derived from the input variable like this: substring(crop, 12) crop <-…
andschar
  • 3,504
  • 2
  • 27
  • 35
0
votes
1 answer

Creating a SQL polygon query for SDA_Query() function to extract geometry from SSURGO database

I am trying to query the USDA SSURGO soils database using a polygon bounding box. However, I am getting an error message when using the mapunit_geom_by_ll_bbox() function for the bounding box co-ordinates listed below and I am at a loss as to what…
0
votes
0 answers

Trouble merging shapefiles in R

I am having trouble merging shapefiles in R. Here is my code thus far: library(rgdal) library(maptools) library(gridExtra) setwd("/Users/Cornelius/Dropbox/Cornelius_Sharedfolder") #Load a geodatabase fgdb =…
Cornelius
  • 69
  • 1
  • 4
0
votes
1 answer

Trouble installing rgdal package in R 3.3.0

Trying to install rgdal package in R 3.3.0 on Ubuntu 16.04 using install.packages("rgdal") and getting the following error: In file included from /usr/local/lib/R/site-library/sp/include/sp.h:13:0, from rgdal.h:15, …
Dave Kincaid
  • 3,970
  • 3
  • 24
  • 32
0
votes
1 answer

How to calculate multiple bands at the same time R raster?

I am trying to calculate a 72 bands raster. If the first 36 bands value (near infrared band) is greater than the latter 36 bands value (shortwave infrared band), assign it 0; if not then proceed on the following function. I tried other ways of…
Yuyun He
  • 5
  • 1
  • 3