Statistical computing language and software environment.

learn more… | top users | synonyms

0
votes
1answer
21 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
20 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
17 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
17 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 ...
0
votes
1answer
24 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?
2
votes
0answers
23 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 ...
1
vote
2answers
46 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 ...
0
votes
0answers
11 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
35 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 ...
1
vote
1answer
30 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 ...
4
votes
1answer
36 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 ...
0
votes
1answer
30 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 ...
0
votes
2answers
43 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
15 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..
1
vote
0answers
84 views

Place an image svg into an R plot

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 ...
3
votes
1answer
70 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 <- ...
3
votes
1answer
64 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 ...
3
votes
1answer
40 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
1answer
20 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
59 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 ...
1
vote
1answer
46 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 ...
1
vote
1answer
40 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 ...
0
votes
1answer
36 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 ...
3
votes
2answers
73 views

Extract values from raster based on points and pixels adjacent to the point

I have an issue. I have a set of points (n=~2000) and I would like to extract the pixel values from multiple rasters (a single-raster solution is also ok) for location of that point as well as that of ...
1
vote
0answers
17 views

R package spatstat: How to use point process model covariate as factor when pixel image values are numeric

I am trying to model a point process with an image covariate using the ppm() function in the spatstat package in R. I convert my raster to an im object for use with spatstat, and I run into a problem ...
3
votes
2answers
136 views

Converting osm file to shapefile (or data frame) in R

I was looking for a road shapefile for Australia today. I ended up going to Geofabrik. Open Street Map has data in .osm format. But they do not have one in .shp for Australia. If possible, I want to ...
3
votes
1answer
48 views

How to plot a full hemispheric orthographic projection in R

I want to make a plot like that using R: All I want is the country borders as seen from outer space, no fancy colors needed. It seems I need to use the spTransform function, but it gives me a "non ...
3
votes
2answers
115 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 ...
2
votes
2answers
62 views

Convert shapefile with lists to data frame in R

I would like to ask some help for converting a shapefile to data frame. I downloaded data related to roads from Natural Earth. I imported the shapefile using shapefiles package like the following. ...
1
vote
0answers
66 views

Using r, readShapeSpatial fails with simplified mapshaper.org shape

So I'm mapping out the postal regions of my country and it's an enormous, 5.4million row dataframe. I don't need every single little twist and turn of the boundries, so I was super excited to ...
1
vote
1answer
38 views

How to convert raster to im object for point process model covariate in R

I am trying to convert a raster object to an .im object for use with a point process model in the spatstat package in R. I begin by creating the raster from a tiff file using the raster() package. No ...
1
vote
1answer
86 views

How to find highest kernel density point

I've been using spatstat to analyse point patterns in R. Here's an example to put this in context: library(spatstat) library(maptools) # to convert sp class to ppp Some point data: set.seed(1985) ...
0
votes
1answer
47 views

Subset netCDF based on last valid variable by level

I have a netCDF file (in this LINK) which contains monthly average values for 4 parameters at 11 different depth levels (0-200m). I would like to extract the monthly value for temperature "votemper" ...
1
vote
0answers
28 views

How to convert shapefiles to rasters? [duplicate]

I have my environmental variables such as elevation, soil, vegetation and others as shape-files. I want to use a raster command to upload them as tiff files for running a boosted regression tree in ...
0
votes
0answers
39 views

R PostGIS convert SpatialPolygon to PostGIS table

I've been having some success in scraping some webdata and converting it from HTML to spatial data as originally asked here: Parse PHP/HTML to shapefile or similar I've been using R to both fetch the ...
1
vote
2answers
98 views

Transforming and Projecting Shapefiles in R & ArcGIS for Desktop?

Perhaps this is an issue with one of my original data sources, but I've searched extensively to address this problem both through ArcGIS and R. I've got 2 separate sources of a county layer SourceA ...
1
vote
1answer
42 views

Clump and eliminate classes in a raster in ArcMap or R

after interpolation of sediment classes, I obtained a raster which looks like the image below (sample of the river). I would like to clump and eliminate areas within the raster that are below a ...
3
votes
0answers
39 views

Resampling air temperature gridded data to sub-grid resolution

I'd like to obtain a 30-m resolution gridded dataset of air temperature from the ~1km gridded data of WorldClim, of Hijmans et al., 2005) for a mountainous region. The easiest procedure (I thought ...
1
vote
1answer
67 views

Problem in creating neighbors, area and perimeter in spatial econometrics using R

I’m working on a spatial cross section model with R-programming-language. I’m running these codes which refers to anselin data (spatial_columbus) in spdep package. I found them from these links: ...
0
votes
0answers
23 views

Doing joint hypothesis test in spatial regression using R?

I'm doing estimation of spatial lag/error model using R package "spreg"/"spdep" but I cannot find any method to do anhypothesis test after regression. For example, I want to test whether two ...
1
vote
1answer
104 views

How to open and plot Globcolour chlorophyll image in R?

Level 3 globcolour chlorophyll images (download from hermes) are in netCDF format. Those files can be imported via ncdf package to R 3.1. ch.nc = ...
3
votes
1answer
71 views

Fixing orphaned holes in R

I'm trying to perform a union on a common field after merging two adjacent shapefiles. The shapefiles end up with at least one thin sliver of space between them. When I attempt a union I get the ...
4
votes
4answers
120 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 ...
1
vote
2answers
77 views

Avoiding R for windows gui front-end has stopped working error?

I am trying to load huge number of points (shape file) in R. But when I load it, the program displays following error message and just stops. "R for Windows GUI front-end has stopped working" My OS ...
2
votes
1answer
43 views

How to create header files for multiple rasters in R

I have nearly 1000 generic binary images, i.e., headerless, band sequential and binary (16-bit signed integer). I have been succesfully able to load these with package 'raster' only when I create an ...
1
vote
1answer
39 views

Adding a grid and selecting random cells from spatial polygon in r

I have a fairly similar question to this: Similar Question I am working with a map of Denmark or more a subset of a Denmark Map. This file comes from the Global administrative areas site GADM site ...
2
votes
0answers
54 views

R-Studio - Bare Soil Line using landsat data in R

I am using R-studio 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 ...
4
votes
1answer
108 views

Why covariance values are different in R and ArcGIS?

I've calculated covariance between 7 rasters using R and ArcGIS. It gives me different results. Each times covariance values from R are approximately 1.874 times higher than ArcGIS values. R - ...
0
votes
1answer
51 views

Extract single datapoint from netCDF file in R using ndcf

I'm trying to extract a single variable from a 3-dimensional netCDF file. [1] "file blah.nc has 3 dimensions:" [1] "longitude Size: 200" [1] "latitude Size: 100" [1] "time Size: 2000" [1] ...
3
votes
2answers
108 views

How to iterate through features in a shapefile using R?

I am interested in iterating through a point shapefile to perform tasks on a point by point basis using R. In Python, this can be accomplished using the following workflow: import arcpy shp = ...