Statistical computing language and software environment.

learn more… | top users | synonyms

1
vote
0answers
18 views

Spatial representation of Data

I'm a new users of spatial analyses packages in R. I have created a SpatialPolygonsDataFrame which contains a number of rectangular polygons that i named "Square1" to "Square64". Until now there is no ...
4
votes
2answers
43 views

how to create geo-referenced random data?

I'm writing a dissertation on different parameter settings in GWR . In order to perform tests I'd need the availability of geo-referenced data that show some sort of spiatial correlation (i.e. values ...
1
vote
0answers
22 views

Performing Theil-Sen regression on raster data by R software

I have seven NDVI raster layers (in ERDAS img format) of an area. Each NDVI layer is the peak growing time of that year. I want to do trend analysis of NDVI values change over the years pixel by ...
0
votes
0answers
15 views

Overlaying grids with a polygon to determine the average value of the overlapping grids for that polygon

I would like to add the average, minimum and maximum value of, let’s say soil moisture (variable "value" in my case), to each NUTS3 region (= a NUTS3 region is a polygon of a certain small area in ...
0
votes
0answers
21 views

Spatial segregation from a raster of racial distribution in the USA

I am trying to measure the degree of racial segregation at some geographic level (let's say the county level, for simplicity) in the USA. I have a shapefile with these geographic units. To do so, ...
3
votes
2answers
35 views

Add information from a cvs/text file to a raster shapefile based on latitude and longitude information

I have an empty raster shapefile that only contains the latitude and the longitude of the centroids of each grid. I now want to add an extra variable to each grid cell coming from a cvs or txt file. ...
1
vote
0answers
34 views

How can I conduct dimension reduction using Geographically Weighted Principal Component Analysis?

I want to know how to compute the importance of components for geographically-weighted-principal-component-analysis(gwpca)? That is, I want to reduce dimension according to cumulative proportion of ...
1
vote
0answers
18 views

Unable to load Postgresql spatial data in R (with rgdal)

I'm trying to load spatial data from a postgresql database in R, using functions from the package rgdal, but I'm having trouble getting the functions to work. For example, when trying to read a ...
1
vote
0answers
4 views

Error executing GRASS function i.topo.corr from R [on hold]

I am attempting to topographically rectify Landsat data using the i.topo.corr GRASS function from within R using the rgrass7 package. My code is as follows: execGRASS("i.topo.corr", flags = "i", ...
1
vote
1answer
32 views

ggmap: clip a map

I'm using ggmap to grab Washington DC and I have a shapefile that I downloaded from here: library(ggplot2) library(ggmap) library(maptools) dc = get_map(location = 'DC', zoom = 12) nhbds = ...
2
votes
2answers
34 views

Merge multiple SpatialPolygonDataFrame into 1 SPDF in R (analogue to “Merge” Tool in ArcGIS)

I have created 2 polygons in QGIS. Using them in R, polygons become automatically SpatialPolygonsDataFrame (SPDF). I would like to merge them into single SPDF (as is super easy in ArcGis using Tool ...
0
votes
0answers
18 views

Error during rasterization?

Cities are SpatialPointsDataFrame cities<-readOGR(dsn=".",layer="cities") r.raster <- raster() extent(r.raster) <- extent(cities) res(r.raster) <- 100 cit.rast<- ...
0
votes
1answer
30 views

How to do union that results to a SpatialPolygonDataFrame in R?

I have the following code coastline<-readOGR(dsn=".",layer="shp") wetlands<-readOGR(dsn=".",layer="shp") wetb<-gBuffer(wetlands,width=500,byid=T) ...
1
vote
1answer
31 views

Transforming coordinate in the Swiss reference system LV95 into LatLong/WGS84

I would like to transform coordinates expressed in the Swiss reference system LV95 into LatLong/WGS84. On the website of the Swiss topography centre, there is an application to do so, however ...
1
vote
1answer
33 views

Find intersections between spatial lines and points using R

This question assumes that I'm using R with the sp and rgdal packages installed. Now that I have a set of spatial segments of class SpatialLinesDataFrame (called 'segmentData') and a set of spatial ...
0
votes
1answer
28 views

Extracting Data from Raster based on Aspect Raster file

I have 2 rasters, ones shows aspect and another shows date of snow thaw. I want to extract the date of snow melt based on values from the aspect raster. For example I want all the snow thaw dates from ...
3
votes
1answer
81 views

Difference between gdalwarp and projectRaster

I am trying to project a Raster. In R there is the projectRaster() function to to this (below a fully reproducibly example) : # example Raster require(raster) r <- raster(xmn=-110, xmx=-90, ...
1
vote
1answer
69 views

Big performance difference reading shapefiles between QGIS and R

I'm trying to read the belgian landuse ESRI shapefile from geofabrik.de: http://download.geofabrik.de/europe/belgium.html In QGIS it's just a matter of seconds, but in R using the readOGR function ...
1
vote
1answer
27 views

Merge a table with a shapefile (not the same dimension)

I am trying to merge a table with a shape file using R. The shapefile's database is bigger than the table and I need to have null or zero values where the two data sets don't match. Table data no. ...
2
votes
1answer
54 views

How is R used with ArcGIS for Desktop?

How is R used with ArcGIS for Desktop? I have seen posts talking about combining rasters while using R. I have not had much experience with R so not 100% certain of its capabilities. I had ...
0
votes
0answers
44 views

How should i combine these rasters?

I have two buffers that i want to combine. I tried overlay with fun=function(x,y){return(x*y)} but 0*5 = 0 so it produces NA's.I don't know how to combine them the one buffer should be 500 and the ...
0
votes
1answer
25 views

iterate over spatial polygon data frame in R

I am trying to iterate over the rows of a spatial polygon data frame in R, but cannot figure out the right indexing. I don't want to select by attributes, but rather just iterate over the spatial ...
2
votes
1answer
16 views

How to find the coordinates of the intersection points between two SpatialLines objects (or SpatialLines and SpatialPolygon edges)

I am try to find the co-ordinates of points where SpatialLines cross the edge of a SpatialPolygon. I have searched and searched, but can only find results such as over which tell me which lines cross ...
4
votes
1answer
53 views

Grid vs. Polygon Overlay in R gives different results than in QGIS

I have a shapefile of range polygons. Each colored set of polygons represents a different group of species/genera/whatever. I next overlay a 5x5 grid onto this map. And then use join attributes by ...
4
votes
1answer
49 views

Generate grid shapefile in R

I have the following shapefile of a 10x10 degree latitude/longitude grid that I created in QGIS. I can read it into R using the rgdal package. Grid<-readOGR(".","GridShapeFile") It has the ...
-1
votes
1answer
59 views

How to reclassify a raster in R?

wet<-readOGR(dsn=".",layer="shp") #wetlands r.raster <- raster() extent(r.raster) <- extent(wet) res(r.raster) <- 100 wet.r <- rasterize(wet,r.raster) #rasterize plot(wet.r) ...
2
votes
1answer
44 views

Changing the extent of a Shape file in ArcMap for distrubution modelling in R

I am currently trying to create a species distribution model in R using maxent. The shape file I have is a map of an island. When viewed in ArcMap it has a set extent--in Lat and Long. I can ...
4
votes
1answer
49 views

How to find the distance from a point to a polygon, via another point, in R

I am trying to calculate the distances between a central point, and the edge of a polygon, along straight lines drawn between the central point and another set of points (where necessary extended ...
0
votes
2answers
55 views

Extracting a number of rows from a column in R

It's a shapefile that has a column with population. a$POP2001 It has 200 rows.I want to extract the settlements that contain less than 1000 residents, so i did this: s<-a[a$POP2001<1000,] ...
1
vote
1answer
76 views

How to reproject a raster from lat/lon to UTM in R?

i have to turn it into a UTM in order to make the buffer functional. wets<-readOGR(dsn=".",layer="shapefile") r.raster <- raster() extent(r.raster) <- extent(wets) res(r.raster) <- 100 ...
0
votes
1answer
36 views

How to rasterize a shapefile in R? [duplicate]

I have several shapefiels that i have to turn into raster. Here's the coastline coastline<-readShapeSpatial("shp") r <- raster(ncols=90, nrows=45) jd<-rasterize(coastline,r) plot(jd) ...
2
votes
0answers
30 views

Merge Spatial polygons from shapefiles

I have downloaded the shapefiles from the following website: http://download.geofabrik.de/europe/france.html Each zip contains a "landuse" shapefile and I want to merge all of them in one single ...
1
vote
0answers
12 views

Get the intersection of two dataframes of coordinates R

I have two dataframes with geocodes. The first looks something like this: spoints<- data.frame(x=c(1,2,3,4,5,6),y=c(6,5,4,3,2,1)) spoints maps a country. My second data frame looks like this: ...
1
vote
1answer
30 views

How to display the map within two longitude lines

I am new to GIS and I try to use the following code to display a pacific-centered world map. +proj=robin +lon_0=-198 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs However the map ...
0
votes
1answer
30 views

How to plot a shapefile with colors according to a column numbers in R?

reclass = function(x){ ifelse(x == 0, 10, ifelse(x > 0 & x <= 20, 0, NA)) } arch$ranks<-as.factor(unlist(lapply(arch$ranks,reclass)) arch.col = topo.colors(nlevels(arch$ranks)) ...
0
votes
1answer
53 views

How to rasterize a vector dataset in R?

I would like to compare vector vs raster data. So i try to fix a problem using both ways. I made it in vector first : coastline<-readShapeSpatial("shp") wets<-readShapeSpatial("shp") ...
0
votes
0answers
20 views

Problem with passing ranks to different buffers

This issue is really troublesome.i have a SpatialPointsDataFrame which refers to a city.I needed to perform a join with a dbf in order to attach the population column which i did thanks to a couple of ...
1
vote
1answer
22 views

Is it possible to zoom out a plot of a map in R?

Sometimes a plot looks zoomed in how to arrange that? i use the rgeos package mainly. When i do a buffer for example somewhere the plot tends to zoom in some part of the map which is not good since it ...
1
vote
1answer
21 views

Getting range value from exponential variogram model

I am using vgm() from the gstat library in R: variogr <-vgm(sill,"Exp",range=range,nugget=0) output <-krige(...,model=variogr) As you can see I'm using fixed psill and range values. Before ...
2
votes
1answer
55 views

How to join a dataframe with a dbf via a common column in R?

I have a SpatialPointsDataFrame with the data of a city and i want to join it with a dbf that contains the population via a common column that they have. How do i do that so the first one has the ...
5
votes
1answer
179 views

Create raster with grid cells values based on area covered by polygons

I have a polygon data with area covered by the forests (data is here - https://www.dropbox.com/s/zgckliydalljw6a/sp_data.zip?dl=0). I want to convert polygons to raster. The value of each grid cell ...
4
votes
2answers
84 views

Dissolving/Unifying Ill Behaved/Irregular Polygons in R

I'm working on a project involving bringing together multiple subjects circling difficult to find parts of an image. The output from users is pretty awesome. Cool, right? However, what I want is ...
2
votes
1answer
78 views

How to plot certain values of a column in R?

Lets say we have a shapefile of cities with a column called category cities@data category A B A C A A B C How can i plot the A category only etc? Tried c<-cities$category[A] ...
3
votes
1answer
33 views

Association shape files to custom data 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 ...
0
votes
0answers
18 views

NetCDF4 Files: Missing Projection & Varying Dimensions (Multiple Files)

All, I hope you can shed some light on issues I've been having regarding NCEP Reanalysis-I netCDF-4 file format: First issue, Projection information is not stored on the downloads I obtained from ...
0
votes
1answer
38 views

R-Leaflet: Plotted points on wrong country

I am learning the leaflet package and am running into a snag. To learn the package I am using the Snow deaths dataset from the package HistData which contains historic Cholera deaths from an epidemic. ...
0
votes
1answer
44 views

How to rank according to a distance in a shapefile using R?

I would like some help on the theory behind this. I have done this in GRASS easily but doing it in R is not the same. Here's the table with the info, there are more tables similar to that but refer ...
1
vote
0answers
32 views

way in R or Python to add image/video in map plot marker click popup/infowindow

I have many different (lat,long data) points of world associated with unique place names and corresponding each point specific image or video data. Now I want to create an html file where if user ...
2
votes
0answers
25 views

From track+waypoints to elevation profile with waypoints

I have a track and waypoints (1) imported in QGIS. I want to calculate the closest point from every waypoint to the track (2). Then, I want a table with data that allows me to draw an elevation ...
0
votes
0answers
18 views

Calculating maximum mean temperature of the coldest month with a lists of rasters

I need calculate the maximum mean temperature of the coldest month. I need first select the coldest month in a list and then in this month determine the maximum temperature. I do this: Create the ...