r-sp Questions

2

Solved

This is an update of my previous similar question, the same task only I need to do it within sf framework. I need to identify the inner boundaries between polygons, red lines in this map. W...
Broadcaster asked 11/12, 2017 at 19:30

1

Solved

Short version: when executing the following command qtm(World, "amount") I get the following error message: Error in $<-.data.frame(*tmp*, "SHAPE_AREAS", value = c(653989.801201595, : replac...
Surprint asked 26/9, 2017 at 15:33

1

Solved

Probably a very basic question but I found nothing in the documentation of Simple Features R package. I'm looking for the native sf function to extract on the fly all the columns of an sf object ...
Caston asked 6/9, 2017 at 21:23

4

Solved

As part of a larger problem (adding a ,makeUniqueIDs argument to rbind.SpatialPolygonsDataFrame for situations when the polygon IDs are identical), I'm running into this weird message from rbind: ...
Etymon asked 18/8, 2012 at 14:41

1

Solved

The sf package provides a great approach to working with geographic features, but I can't figure out a simple equivalent to the poly.counts function from GISTools package which desires sp objects. ...
Jacobite asked 25/7, 2017 at 21:50

2

Solved

I am trying to get the size of a polygon from OSM, using osmar to download the data. However, sanity check tells me the are is not right. Below is an example of what I mean. (1) Geographical are...
Avrilavrit asked 14/6, 2017 at 16:17

2

Solved

I want to find the most efficient (fastest) method to calculate the distances between pairs of lat long coordinates. A not so efficient solution has been presented (here) using sapply and spDistsN...
Olmos asked 23/4, 2016 at 23:1

1

Solved

I would like to crop a raster based on SpatialPolygons object. I know that we can use crop function in raster package, raster::crop(rasterFile, SpatialPolygonsObject) but this function is based...
Clod asked 8/1, 2017 at 5:16

1

I am writing a package that uses classes and functions from the spatial sp library. sp exports methods for rbind (am I correct in calling rbind a generic?). For instance, the following code creat...
Pris asked 18/12, 2016 at 21:47

3

Solved

Pictures are better than words, so please have a look at What I have is a RasterLayer object (filled with random values here for illustration purposes only, the actual values don't matter) a S...
Janeanjaneczka asked 17/11, 2016 at 15:0

1

Solved

I am trying to change or assign the projection of a Germany-Shapefile from NA to +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0, but somehow it doesn't work well. Reproducible Exa...
Eleemosynary asked 11/10, 2016 at 14:32

1

I am trying to spatially interpolate a dataset of seawater pH by lat & long: sample<-read.csv(file="Station locations 2016.csv", header=TRUE, sep=",", strip.white=T) hea...
Zelig asked 20/9, 2016 at 10:5

1

Solved

I draw a map of regions of Russia using GADM data: setwd("~/Desktop/Master thesis/") library(sp) library(RColorBrewer) library(raster) data <- getData('GADM', country='RUS', level=1) #exclude...
Fluvial asked 1/6, 2016 at 10:53

2

Solved

Trying to find, for each point in a SpatialPointsDataFrame, the distance to the closest point in a second SpatialPointsDataFrame (equivalent to the "nearest" tool in ArcGIS for two Spatia...
Glauce asked 19/5, 2016 at 20:48

1

Solved

I was working on heat map of Germany using spplot, I had the shape file from GADM German shape file Level 1 http://biogeo.ucdavis.edu/data/gadm2.8/rds/DEU_adm1.rds I am able to make the heatmap b...
Digitalin asked 9/1, 2016 at 9:27

0

I converted a raster with 4 classes to a SpatialPolygonsDataFrame, where the features representing a class are not always connected. I used disaggregate (package sp) to get single features. I now ...
Hine asked 25/11, 2015 at 13:54

1

Solved

I want to plot some spatial data using the leaflet package in R, however the generated raster image seems to be shifted compared to a reference grid. I suspect map projection issue, but I am not ex...
Uncomfortable asked 16/11, 2015 at 18:26

2

Solved

I have made a reference grid, cells 50x50m, based on GPS locations of a collared animal. I want to do the equivalent to a spatial join in ArcGIS, and count the number of points in each cell. I ha...
Stridulous asked 1/10, 2015 at 13:59

1

Solved

I'm trying to create a map in R that conveys both the shape of underlying geometry (i.e., the physical boundaries) and the relative importance of the object in terms of an associated value. For con...
Castile asked 4/9, 2015 at 20:36

1

Solved

Working with the sp package in R. I wonder when I would use SpatialPoints and when SpatialPointsDataframe. It seems so me that there is not much difference?! Is the only difference that in a Spat...
Preposterous asked 26/8, 2015 at 14:32

2

Solved

I want to merge a SpatialPolygonsDataFrame : # From https://www.census.gov/geo/maps-data/data/cbf/cbf_state.html states <- readOGR(dsn = "./cb_2014_us_state_20m.shp", layer = "cb_2014_us_state...
Trickery asked 25/8, 2015 at 22:19

1

Solved

I have a bunch of locations for each of about 1000 individuals. The total dataset used to be around 2.5 million and my processing script took about 20 hours to run. Now however, I have 24 million o...
Timtima asked 19/12, 2014 at 0:33

2

Is it possible to place the spplot (spplot polygons) legend within the map, in lower left corner, like this? The closest I've been able to get is this (I am not posting my data, I just use the e...
Illusionary asked 30/3, 2015 at 11:11

1

Solved

I would like to be able to create a SpatialPolygons object (which is a Hexagonal grid) that covers another SpatialPolygon. I would like all the Hexagons to have a diameter of 1km (ideally i can va...
Kannry asked 31/3, 2015 at 16:45

2

Solved

How can I add Hawaii and Alaska to the following code (taken from Josh O'Brien's answer here: Latitude Longitude Coordinates to State Code in R)? library(sp) library(maps) library(maptools) # The...
Rouen asked 9/2, 2015 at 23:18

© 2022 - 2024 — McMap. All rights reserved.