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
0 answers

Assigning Columnnames dynamically

I have an interesting problem: I need to batchprocess a few files. I do that in a for-loop, where some operations are performed. Later on I want to write the outcome into an existing shapefile which I do like so: myShapeFile@data <-…
four-eyes
  • 10,740
  • 29
  • 111
  • 220
0
votes
1 answer

How do I call gDistance within data.table?

I have used ddply and gDistance (package: rgeos) to link two sets of polygons. The process is, however, very slow for my large dataset, as explained in a number of blogs (e.g. Why is plyr so slow?). These blogs suggest that using data.table would be…
0
votes
1 answer

R export to kml with custom DescriptionField

How can I add a custom description field to a kml file exported from R? Where Coords_wgs is a SpatialPointsDataFrame class object. writeOGR(Coords_wgs, dsn = GEfilename, layer = "layer", driver="KML", …
Clay
  • 2,584
  • 1
  • 28
  • 63
0
votes
1 answer

trouble for read raster in R

I'm in trouble for read a raster layer in R studio software. When I run the command line for read a raster the software returns me the message: NOTE: rgdal::checkCRSArgs: no proj_defs.dat in PROJ.4 shared files I use OS Ubuntu 15 Somebody can help…
Ricardo Adelino
  • 165
  • 1
  • 1
  • 12
0
votes
1 answer

Switching between two CRS in R (with rgdal)

I'm (trying to) do operations on pairs of geographical points. I have the coordinates of my points in WGS84, and I need to have them in the Lambert 2 Extended CRS (LIIE). I'm trying to do it using rgdal. Here's what I'm doing…
François M.
  • 4,027
  • 11
  • 30
  • 81
0
votes
0 answers

R: cannot install 'rgdal' package on Ubuntu 14.04

I have R (ver. 3.1.2) installed and I tried to install rgdal package. First I downloaded the package source (tar.gz) from here. Finally I installed the sp package on which rgdal depends. Then I run R and typed…
umbe1987
  • 2,894
  • 6
  • 35
  • 63
0
votes
0 answers

How to add prefix to layer in WriteOGR when writing to multiple files

How would one add prefix in the layer option in writeOGR? I have tried layer=c("poly_", code) but it doesn't work Nicolai
0
votes
0 answers

cannot install rgdal package

I tried to install rgdal by building from sources but it returns an error: Can anyone help?
Le Yi
  • 21
  • 1
0
votes
0 answers

Reading large shape file into R

I am trying to plot the UK LSOA boundaries (http://www.ons.gov.uk/ons/guide-method/geography/products/census/spatial/2011/index.html) using ggmap. I run the script: library(rgdal) system.time( LSOA<-readOGR("LSOA_2011_EW_BFE_V2.shp",…
Chris
  • 3,836
  • 1
  • 16
  • 34
0
votes
2 answers

Read TIF file error "Geographical CRS given to non-conformant data"

I'm trying to read in a TIF file as follows: d = readGDAL('F182013.v4c.stable_lights.avg_vis.tif') Error in validityMethod(as(object, superClass)) : Geographical CRS given to non-conformant data: -180.004166667 The file is night light data from…
geotheory
  • 22,624
  • 29
  • 119
  • 196
0
votes
0 answers

Associating custom data to shapefiles in r

This is probably an obvious question. I have an Australia Shapefile (can be found here http://www.abs.gov.au/AUSSTATS/abs@.nsf/DetailsPage/1259.0.30.001July%202011?OpenDocument) and some custom data which contains latitudes and longitudes for a…
Stephen Saidani
  • 101
  • 1
  • 2
  • 8
0
votes
1 answer

gpclibPermit() not working

I cannot use functions from packages to do maps on R as I cannot find a way to enable gpclibPermit(). I have read the solutions here and here. but not luck. I have installed and run successfully the following packages: maptools ggplot2 (c("sp",…
Billaus
  • 81
  • 1
  • 12
0
votes
0 answers

rgdal::readOGR versus readOGR namespace issue?

I am trying to load a shapefile using the the rgdal package. Why is it that this command fails: plot(rgdal::readOGR(dsn=system.file("vectors/Up.tab", package = "rgdal")[1],layer="Up")) With error: Error in as.double(y) : cannot coerce type 'S4' to…
jsta
  • 3,216
  • 25
  • 35
0
votes
1 answer

Multiple spplots in a page and with a single index

I have a polygon shape file named CROPS.shp and the following key - 1 - Rice 2 - Wheat 3 - Corn 4 - Millets I read the shape file using the rgdal package into a variable named my_crops. Now my_crops@data has six different fields namely Y1, Y2,…
Indian
  • 977
  • 3
  • 12
  • 24
0
votes
1 answer

Calculus for the labpt slot of a SpatialPolygon object

The labpt slot of the SpatialPolygon object in the sp package is vaguely defined in the documentation as a point where a label is displayed for the polygon. I would like to know the calculation behind it and what are it's properties. Typically are…
cmbarbu
  • 4,354
  • 25
  • 45