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

readOGR misses ExtendedData

Here's an excerpt of a KML I'm trying to read in with readOGR. The content is being missed out: test.kml
geotheory
  • 22,624
  • 29
  • 119
  • 196
0
votes
1 answer

read multiple `.shp` file as one object?

how to read multiple .shp file as one object? I want to read simply like under the code. nc <- st_read(dsn = "nc", layer = c("nc1","nc2")) what is the best method to read multiple files as a object? library(sf) nc <-…
ogw
  • 353
  • 1
  • 2
  • 13
0
votes
1 answer

Merge spatialpolygons with external data and select polygons on attribute

I am trying to plot my study area in R. So far I have downloaded census OA boundary data and I have merged attribute data to the OA I wish to look at. So lets say from a total of 1,000 OAs. I want to look at only 500 of these OAs, for which I have…
wilga
  • 103
  • 2
  • 7
0
votes
1 answer

Plotting points on a map in the rgdal package with R

Borrowing code from Rob Berry (http://rob-barry.com/2015/06/14/Mapping-in-R/), I make a map of NY city. I have many lat long points I wish to plot on the map. The problem is that plotting a map like this results in plot area way outside of…
Jeff Hemsley
  • 129
  • 1
  • 1
  • 7
0
votes
0 answers

R rgdal shapefile to google-map like projection

I've been searching for a while to no avail, please help. I'm able to draw a simple world map using a shapefile (and do a lot more, draw lines, fill with colors, etc). The source of shapefile is:…
user3685724
  • 84
  • 1
  • 8
0
votes
0 answers

Fast way substracting GIS Layers in R

I'm trying to calculate a difference layer in R using the packages rgeos, rgdal and so on. It basically consists of a base country layer out of which I would like to cut out forests, populated areas, lakes, roads, etc so that I get a difference…
hannof
  • 55
  • 1
  • 7
0
votes
0 answers

Plotting shapefile points

I'm working on shortest paths and travel time matrices between points (using osrm, OpenStreetMap and rgdal) : library(osrm) library(cartography)…
0
votes
0 answers

R metadata csw harvest gdalutils

I am looking to harvest the content of a metadata catalogue like this one : http://csw.data.gov.uk/geonetwork/srv/en/csw The catalogue contains metadata on (open geographical) datasets and services. I have looked into using the rgdal/gdalUtils…
Oki
  • 13
  • 4
0
votes
0 answers

R language, problems with SpatialPixelsDataFrame

The following two scripts will generate a "SpatialPixelDataFrame" object: # FIRST library(rgdal) elev.grid <- readGDAL("whatever.asc") elev.grid <- as(elev.grid, "SpatialPixelsDataFrame") #…
perep1972
  • 147
  • 1
  • 9
0
votes
1 answer

Reverse cluster analysis; identifying empty space or a lack of density in R with longitude and latitude?

I'm working on a project where I have a very large amount of points and I am looking to identify regions (defined by a lack of clustering) where the density of these points is statistically significantly less relative to others. Normally a visual…
LoF10
  • 1,907
  • 1
  • 23
  • 64
0
votes
0 answers

R - Write result to variable (Large SpatialGridDataFrame) in loop, which is created with assign

I have a Large SpatialGridDataFrame and want to manipulate the content of band1. In a nested list is the variable name (first entry) and the formula (second entry) included: name_x <- list(list("Laterite", "RasterData@data$band6_1.60909_SWIR_1 /…
asator
  • 83
  • 1
  • 2
  • 7
0
votes
1 answer

converting from coordinate data to latitude and longitude in R?

I have been using the following code to read in census tract data and produce centroid data for each census tract. I would like to pull latitude and longitude from this for some sampling I am doing through the Foursqaure API which requires latitude…
LoF10
  • 1,907
  • 1
  • 23
  • 64
0
votes
2 answers

Import multiple shapefiles with different sets of attributes in R and combine them

I have a folder containing many shapefiles that are somehow related but contain different numbers of attributes in the corresponding database (dbf-File). I managed to load them all into R…
user2386786
  • 725
  • 9
  • 25
0
votes
1 answer

How can I stack and display rasters?

I have 12 raster files in a folder on which I want to use the levelplot of RasterVis. kpacks <- c('tiff','rgdal','raster','sp','rasterVis') new.packs <- kpacks[!(kpacks %in% installed.packages()[,"Package"])] if(length(new.packs))…
maximusdooku
  • 5,242
  • 10
  • 54
  • 94
0
votes
0 answers

Export Spatial Lines Data Frame with writeOGR in R

I can use writeOGR to write a shape file in R, but it's only working for spatial points data frames, and not spatial lines data frame. This is the code I'm using. The dataframe is called…
Bschrein
  • 1
  • 2