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...
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...
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 ...
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:
...
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.
...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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.