Statistical computing language and software environment.

learn more… | top users | synonyms

0
votes
4answers
78 views

Subsetting a x,y,z into a text file from a large xyz text file

I have a large txt file with x,y,z format. The file size is almost 8 GB. So I don’t want to process in ArcMAP. What I wanted to do is, I have a end coordinates for polygon shapefile and i have ...
0
votes
1answer
30 views

how to convert list of stack images to timseries files in R

Iam using bfast package for time series analysis. But it requires the files to be read as timeseries Problem: How to convert list of stacked images from 2000 t0 2013 into a time series and given as ...
2
votes
0answers
28 views

how to display the legend when the map contains external icons in R

I haven't found anything about the legend when the map contains icons external R (in png), is't possible to use the legend function or another function in R.
5
votes
1answer
393 views

Rgeos drops associated values when intersecting polygons

I am trying to intersect two SpatialPolygonsDataFrames and get a SpatialPolygonsDataFrame as the result. Unfortunately, using the gIntersection function from rgeos (which works impressively quickly ...
9
votes
2answers
118 views

Cleaning blocks pattern from urban LIDAR (blocks uplifted from streets)

We have a 1-meter LIDAR DEM from a city. A small subset can be downloaded from this link: This screenshot shows raw DEM with gray palette (darker belts are streets, and greyish and whitish ...
1
vote
1answer
36 views

R package for geographic regions

Someone told me about a R package with the definition of objects some regions and nations boundaries. I'm trying to find the border of Veneto, an italian region. What's the name of the package? Do you ...
6
votes
2answers
156 views

How do I convert a tweet into a point in QGIS?

I've been doing some research on using R to datamine twitter, but I haven't really found an answer or a decent tutorial for my question. I'm interested in pulling tweets from twitter with a certain ...
2
votes
1answer
116 views

Count overlapping polygons in single shape file with R

I have a shapefile of species ranges for ~ 346 species. Some species have multiple polygon ranges so there are 1,078 polygons and many polygons are multi-part. It looks something like this: I ...
2
votes
1answer
89 views

ggmap: create circle symbol where radius represents distance (miles or km)

I am trying to add a circle around a given latitude and longitude point where the circle size (radius) reflects distance in miles or km. I managed to come up with this example using ggmap, where I ...
0
votes
2answers
762 views

How can I generate a fishnet grid and a matrix of percentage of overlapping in R?

I'm trying use R for create a fishnet grid like in arcGIS with many cells of same size. In the arcGIS 9.3 we have the option of create a polygon with many small square polygons (eg. 1 x 1 degree of ...
2
votes
1answer
38 views

Extract areas of multi-part polygons (SpatialPolygonsDataframe) R

I have a SpatialPolygonsDataframe with multiple polygons, some of these have multiple parts (blue shapes below). In GIS-land it would be easy to get the areas of the individual parts of a multi-part ...
1
vote
0answers
21 views

Get pixel values ascii 50 files

I´m working with photos from a cam. The cam is arranged to take ndvi values instead of RGB for each pixel. I have several folders with 50 pictures in each folder as '*.asc' files the pictures. I am ...
1
vote
1answer
49 views

Extract all unique values from a RGB raster

I have a .png file in RGB format showing the intensity of ship traffic: For my analysis I need to convert it to a one-band raster with values between 0 and 1 where 0 means lowest density and 1 ...
2
votes
0answers
72 views

Plotting Bare Soil Line on landsat data in RStudio?

I am using RStudio with landsat package for computing and plotting the Bare Soil Line (BSL) on landsat tif image running on my HP Pavilion i7 laptop. The codes for running the BSL() function is as ...
1
vote
1answer
26 views

Another Way to Join a New Column to a DBF if OpenOffice is Giving a “Longer Than the Number of Digits Allowed” Error?

When I need to add a data column to a DBF, I always download the shapefile, open the DBF with OpenOffice for Mac, us a VLOOKUP( ) to add my data to a new column, re-save the file as a DBF, then open ...
11
votes
1answer
3k views

Instantiating spatial polygon without using a shape file in R

So, the usual way we read a shapefile in R is via the maptools package, like this: sfdata <- readShapeSpatial("/path/to/my/shapefile.shp", proj4string=CRS("+proj=longlat")) However, I have a use ...
2
votes
2answers
111 views

Join CSV file to shapefile

I wanted to join a CSV file to a shapefile. When I identified a field to facilitate the join, e.g., map <- spChFIDs(map, as.character(map$ID)) it returned Error in spChFIDs(SP, x) : ...
0
votes
1answer
498 views

Calculate area covered by a particular raster layer within polygons in QGIS

I am trying to extract information on vegetation cover within a set radius of point locations (my sites). I have succeeded in creating a new vector layer of circles with a 5 km radius around my sites. ...
1
vote
1answer
53 views

How can we retrieve the values ​​of the intervals in the legend in R

I have an elevation model plotted in R Code: library(raster) data(volcano) r <- raster(volcano) plot(r, col = topo.colors(20)) Plot: how can we retrieve the values ​​of the intervals in the ...
0
votes
1answer
33 views

smoothing a set point in R

I try to smooth R with a set point as follows: myshp <- shapefile("C:/Users/zina/workspace/Proj_Meteo/interpolate/DZA_adm/DZA_adm0.shp") ...
1
vote
0answers
35 views

Assigning widths to string fields using writeOGR() from rgdal?

I am currently working with MapInfo files in the .tab format. I am using R (3.1.0 for Windows) to read and write files in this format, however, I am encountering an issue with writeOGR() from the ...
2
votes
0answers
50 views

Converting LANDSAT-8 TIFF to matrix, data frame, or SpatialGridDataFrame formates

I need to correct the reflectance values of LANDSAT-8 data for steep terrain and find it too tedious and clunky in ArcGIS. The data I have is: LANSDAT-8 DEM (ASTER) Slope and aspect (Derived using DEM ...
1
vote
2answers
30 views

How to see whether a set of postcodes have a typical distribution to the whole postcode population of UK?

For my dissertation I have a dataset of postcodes of 9984 that I am converting to coordinates atm. I looking to find whether this dataset has a 'typical or 'atypical' spatial distribution compared ...
4
votes
2answers
175 views

join grid or polygon layers in R

I have two grids. Cells in each grid have an attribute. Size of grid cells differs between the two grids and the two grids do not overlay each other perfectly. I would like to create a new layer, ...
0
votes
1answer
36 views

scatterplot of two rasters in R

I am very very new in programming and I want to ask how can I make a scatterplot of two rasters in R and also get their correlation of determination?
1
vote
2answers
69 views

Aggregating satellite night light data in R

I am working in R and having some difficulties with extracting values from a raster layer. What I am trying to do is aggregate satellite night light data from pixel to polygons. However, when I ...
3
votes
1answer
91 views

Polygon fill colour specified by column R spplot

I am trying to plot a geological map using the spplot function in R. For every unit I already assigned a specific color in the col-column of the SpatialPolygonsDataFrame. Now I would like to plot the ...
2
votes
0answers
36 views

does the census bureau provide clipped / water-bounded files as nice as certain cities?

this question says they do but when i compare what i can find in the cartographic boundary files section of the census bureau's gis page, they don't look as good as certain shapefiles provided by the ...
0
votes
0answers
18 views

PostGIS raster write support in R

I want to push/write some generated raster layers to my postgres database directly in R. In theory this could be supported by the rgdal package, but sadly it isn't. In the latest version only copy, ...
1
vote
0answers
54 views

How to clear areas outside map in R

I succeeded thanks to the eblonde in the disscution (problem with polygon smoothing in R) to smoothing polygons in R. Code: inter1= read.table("c:/inter2.csv", header=TRUE) #add a category ...
0
votes
1answer
42 views

How to load postgis raster layers into R?

It is easy to get Vectorlayers into R from a PostgreSQL+PostGIS solution. library(rgdal) dsn="PG:dbname=plots host=localhost user=test password=test" plots = readOGR(dsn,"Plots") But how to do the ...
1
vote
1answer
56 views

Is it possible to create a scatterplot with icons (svg or png) instead of points

I'm just starting with R and I wanted to know if it's possible to create a scatterplot with custom icons (svg or png) instead of points. I started to import a shapefile, and then I have a set of ...
3
votes
1answer
101 views

problem with polygon smoothing in R

With R I am looking to smooth my Polygon: inter2.csv code: inter1 <- read.table("c:/inter2.csv", header=TRUE) # add a category (required for later rasterizing/polygonizing) inter1 <- ...
4
votes
4answers
138 views

Create a rectangular buffer from point shapefile using QGIS/GRASS/SAGA GIS/R

I have a points shapefile and I want to create a rectangular buffer (22 x 16 km) around each point. My goal is to create a 16x22 km grid where each of the points is the centroid of the grid. Seed the ...
4
votes
1answer
56 views

How to create a map colored by distance to nearest point in R

I'm new to GIS and R-- hope this question makes sense. I have a dataframe(geo07) containing two variables that record the long/lat values for about 6000 points (mat_long & mat_lat). These ...
2
votes
0answers
99 views

Place an image svg into an R plot [duplicate]

I have a set SVG icons (weather icons ) and I want to create a figure with svg superimposed images representation of a Shapefile. below my shapefiles and points representing the position where I ...
0
votes
2answers
83 views

Read ESRI shape file (polygon or polyline) in R Environment

How can I read ESRI polygon/polyline shapefile in R environment using rgdal or other library ? can I get a syntax for it ?
1
vote
0answers
21 views

SQLite Driver available with R's rgdal:writeOGR?

Does anybody know how I can get OGR's SQLite Driver to work with R's rgdal package? When listing the drivers in R with the ogrDrivers() command the SQLITE driver is missing..
3
votes
1answer
75 views

make a raster from dataset (csv)

I was trying to make a raster from an dataset (https://www.dropbox.com/s/jsm1x06lnzfbqty/data.csv?dl=0) code: inter1= read.table("c:/data.csv", header=TRUE) #convert to spatial points ...
0
votes
1answer
48 views

How to create an interrupted Mollweide map in R?

I am wondering if it is possible to create an interrupted Mollweide map in R. This question is similar to Discontinuous or Interrupted map projections? which does not really have a satisfactory ...
2
votes
1answer
55 views

How to change position of legend in levelplot of rasterVis in R? [closed]

By default legend is plot right side and I want to change it to bottom of plot. levelplot(CHL1, xlim=c(30,130), ylim=c(-20,30), xlab="", ylab="", margin=FALSE, col.regions=pal, ...
3
votes
2answers
110 views

Display two-dimensional color gradient for two different quantities

I have two overlapping raster layers. One contains quantity A from 0 to 100, and the other contains quantity B from 0 to 100. I'd like to create a map displaying both sets of data at once based on a ...
3
votes
2answers
93 views

Reprojection of shapefile in R and final extraction of values

I need to extract values from some raster files (stack) using a shape file. to bring both of them in the same CRS, I first transformed the shapefile using the EPSG codes. Opening it in an GIS software ...
3
votes
2answers
2k views

Converting NZMG (or NZTM) to latitude / longitude for use with R map library

I am a statistician with no background in GIS so apologies for the newbie question. We routinely use R for a range of statistical and graphic analysis and are interested in using its map library to ...
3
votes
2answers
160 views

Ripley's K function in QGIS Chugiak 2.4

I'm a noob user and I need to apply the Ripley's K-function on a point pattern in QGIS 2.4 Chugiak, but I don't know how to do. I think I need to use some plugin or extension (maybe GRASS, R or ...
1
vote
1answer
89 views

How do I convert a .bil (and associated .clr, .blw, .hdr, and .stx) files into georeferenced rasters in R? OR to geotiffs using gdal_translate?

The title says it all. I've got a bunch of .bil files, which I can open in R using the raster command pointed to the path to the .bil file. But I don't know how to efficiently incorporate the ...
4
votes
0answers
226 views

R Raster package loop over pixels

I want to perform a trend analysis for each pixel over it's time dimension. Therefore I wrote a loop over each pixel doing the calculation but this is extremely slow. I am sure there must be a faster ...
1
vote
1answer
158 views

converting coordinates from unusual DMS format to decimal

So I've been shared a dataset with what to me is an unusual format for degree min second data. In their own words: The coordinates provided are longitude and latitude in degrees minutes and ...
1
vote
1answer
491 views

Administrative level and coordinates from Yahoo GeoPlanet WOEID

The Yahoo GeoPlanet data can be freely downloaded from: http://developer.yahoo.com/geo/geoplanet/data/. If I understand it correctly, each WOEID corresponds to a unique location on earth, with ...
2
votes
1answer
54 views

Extracting data, not colors, from geotiffs in R

I'm an experienced R user new to GIS, but finding my way. I've recently run into an issue that I haven't been able to find any satisfactory documentation on (but could just be searching poorly). I'm ...