Statistical computing language and software environment.

learn more… | top users | synonyms

1
vote
2answers
36 views

Is there an R equivalent of NEAR in ESRI ArcGIS?

I have 54 points in one data set A I have 300+ data points in a dataset B. I wish to find the distance for each point in dataset-set B, to points in dataset A. Nearest Neighbor packages appear to ...
17
votes
2answers
5k views

How can I convert data in the form of lat, lon, value into a raster file using R?

I have a data set of values over a km grid in the continental U.S. The columns are "latitude", "longitude", and "observation", e.g.: "lat" "lon" "yield" 25.567 -120.347 3.6 25.832 ...
1
vote
1answer
700 views

Produce raster map using universal kriging as interpolation method

I want to do kriging with external drift(universal kriging) in R. The covariate I use is in WGS84 refrence system. Because of nature of kriging which calculates distance in planar surface I have to do ...
1
vote
1answer
37 views

projection differences in R

I am trying to reproject some climate data that I downloaded from http://gdo-dcp.ucllnl.org/downscaled_cmip_projections/dcpInterface.html#Welcomein The BCSD-CMIP5 data is found under the tab ...
1
vote
2answers
365 views

Calculate a polygon around a point - and conver to WKT

The use case I have is this: I want to take points (in my case a data.frame of lat/long coordinates) and calculate a polygon around each point of a given radius (in km, miles, whatever). To be clear, ...
1
vote
0answers
42 views

How to define the output raster resolution when rasterizing a vector?

I have a vector file which I want to rasterize and adjust its resolution to the reference map, in QGIS. I tried spatial_sync_raster function in R to set all the rasters into the same resolution as ...
2
votes
1answer
27 views

comparing and finding inaccuracies in two raster layers

I have two raster layers with urban cells and rural cells. I used an overlay function to compare these two raster layers and see the differences. Before overlaying I gave urban cell the value 1 and ...
3
votes
1answer
207 views

Given a Lat and Lon, identify if the point is over land or ocean?

In R, what is the quickest way to identify if a point is over land or ocean? e.g. for: set.seed(0) lat <- runif(10, -80, 80) lon <- runif(10, -180, 180) points <- expand.grid(lat, lon) ...
7
votes
3answers
165 views

Best way to make a fake hillslope?

Anyone ever have to make a fake hill slope? or a fake digital elevation model (DEM)? What are the best methods for doing so? For more specifics, suppose I wanted to make a fake hill slope, that was ...
1
vote
1answer
26 views

gTouches error without geometry error?

I have a map showing administrative boundaries (available here). I've loaded it into R and have attempted to run gTouches (from rgeos) to determine which areas are adjacent to which, but receive an ...
2
votes
2answers
26 views

combine rasters into single raster with multiple field values in R

I have several raster brick objects that I would like to combine into one raster with multiple field values for each cell, but I am not sure how to do this in R. For example, let's say I have two ...
2
votes
0answers
55 views

Raster to polygon using R [closed]

I am trying to convert a raster object to a polygon object using R but I am running into some problems using my Windows 7 machine. I originally tried to use rasterToPolygons (package: raster) but it ...
1
vote
0answers
76 views

Is there any issue using R scripts with sextante processing framework?

I want to use R scripts from the module Sextante treatment QGIS , but I have many difficulties to configure the module in Sextante . Following the procedure described in the official documentation of ...
3
votes
1answer
3k views

Convert a shapefile with northing/easting to ASCII raster with latitude/longitude

Linked below is a polygon shapefile whose projection is NAD83 and whose values are LU/LC codes. Coordinates are meters of northing and easting. I would like to convert it to an ASCII raster with ...
13
votes
2answers
3k views

Using R with ArcGIS Desktop

In response to comments below, a re-phrasing of the question. I've used the integration of R with QGIS, and found it a very uesful tool. Having taken a look at the R toolbox extension for 9 and the ...
10
votes
3answers
248 views

From polygon to continuous measure of diversity?

First of all; I have tried to find a similar question, without success. Maybe it's because I'm quite new to GIS and I don't really know what exactly I'm looking for. If someone points me to a similar ...
7
votes
1answer
470 views

How do I call external files in Python Geoprocessing Service?

I have created a Python script which calls an R script and then reads the output back into Python. I can run this tool in ArcGIS Desktop (10.2.1) and it works fine. When I publish as a geoprocessing ...
3
votes
2answers
137 views

How to determine in which grid cell each coordinate of an x,y series is located?

I have a circular arena which I have divided into a number of equal-sized 'cells' using a grid-like arrangement of concentric circles and line segments (in grey below) and also a series of x,y ...
2
votes
0answers
20 views

kriging of compositional data (grain size)

I have posted this already in the GEONet Forum but without any suggestions, now I am hoping for some feedback here: I have a problem concerning interpolation of compositional data of grain sizes. I ...
0
votes
0answers
73 views

Creating the Regions based on spatial clusters

I need to create areas for my shapefiles for spatial analysis for each. So I have a number of stations and I created 5 clusters based on the distance. code: Al <- ...
2
votes
1answer
59 views

clustering map (North, Centre, South) in R

I am looking for a method to partition map in 3 groups (North, Centre, South) like this: how to do this in R please stations.txt Code : Al <- shapefile("DZA_adm/DZA_adm0.shp") # read in ascii ...
1
vote
1answer
110 views

(R)SAGA: saga_cmd 2.1.0 error? inconsistency?

frequently I am using (R)SAGA, but after SAGA became >2.1.0 the R package is no longer working. The last update for RSAGA was 07/2013. Thus I downgraded SAGA to 2.1.0 (first try was skipping the ppa ...
2
votes
0answers
34 views

How to split a polygon into quadrants in R/Qgis?

I am solving the same problem as How to split a polygon into quadrants?, except that I am looking for a solution in R or QGis. So I have a polygon layer shapefile, which is unfortunatelly not exactly ...
1
vote
0answers
24 views

Unexpected Moran's I value in R using a chessboard example

I'm running into unexpected values for Moran's I when using the Moran.I function in the R library "ape". My understanding is that a chessboard is an example of perfect negative spatial ...
5
votes
2answers
443 views

How to stop writeOGR from abbreviating Field Names when using “ESRI Shapefile” driver

I'm currently using the following script to add some attribute data from a table to lots of individual shapefiles: library(rgdal) specieslist <- read.csv("SpeciesList1.txt", header=F) attdata ...
3
votes
1answer
47 views

Convert coordinates from readShapePoly in R to long-lat coordinates

I'm trying to find some centroids of a shapefile for Danish municipalities and afterwards find the driving time between them. I use R's readShapePoly function from maptools combined with the ...
1
vote
1answer
114 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 ...
0
votes
1answer
46 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
1answer
69 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 ...
0
votes
1answer
110 views

Cannot properly import MODIS MOD07_L2 .hdf files into R using rgdal

I've been trying to accurately import and process some .hdf files from the MODIS Atmospheric Profile product (MOD07_L2) in R for several days now. Still, there's something going wrong during data ...
2
votes
0answers
46 views

How to merge an excel file with a shapefile in r

I am new to mapping in R so my question might look trivial. I want to have a density map of US for number of phone calls for different areas. Each area includes some zip codes. I only have number of ...
5
votes
1answer
413 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 ...
1
vote
1answer
536 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. ...
0
votes
0answers
43 views

How to solve coordinate differences between packages

I have two maps generated by two different methods. The first, I used maps package and the function map() and symbols(). On the other hand, I used the ggmap package with the ggmap() and geom_point() ...
2
votes
2answers
127 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) : ...
1
vote
1answer
43 views

Legend and coloring of markers with plotGoogleMaps in R

I have a data frame (X) that looks like this: code cluster name longt latit 101 1 A -89.6171 35.24992 105 1 B -90.0154 35.10510 106 2 C ...
2
votes
1answer
34 views

Unsupervised classification with kmeans in R

I have a time series of satellite images (5 bands) and want to classify them by kmeans in R. My script is working fine (loop through my images, convert the images to data.frame, cluster them, and ...
2
votes
2answers
327 views

Conversion of Latitude/Longitude to different map projection

I have two m*n matrices coming from a WRF-ARW simulation: one exclusively with longitude values and one with only latitude values. For both matrices I know the originatin projection (lambert conic ...
1
vote
1answer
29 views

Aggregate table with dates and average geographic coordinates

When SOG is 0 Stops gets 1. When the next SOG is 0 then Stops gets 2 and like this consecutively. Now I want to group all the rows where SOG != 0. The trick is that I should have the following ...
5
votes
1answer
145 views

Cell declustering using open-source software

I want to perform cell declustering in a small point data set. I have 9 observation points and I want to find the size of the region of influence for an observation, and afterwards use that as ...
0
votes
2answers
148 views

projection conversion from mercator to google maps format

Is this spTransform(Finland3, CRS("+proj=longlat +ellps=WGS84 +no_defs+ellps=WGS84 +towgs84=0,0,0 ")) the right way to project a shapefile with this projection coord. ref. : +proj=merc +lon_0=0 ...
0
votes
0answers
45 views

Assign CRS to shapefile in R

I imported my shapefile dat to R with readOGR, coordinates are given in easting and northing, I'd like to change it to latlon and tried: dat_latlon <- spTransform(dat, CRS("+proj=longlat ...
1
vote
1answer
37 views

R geographically weighted regression GWModel

I am exploring the use of GWmodel to run some GWR regressions. I set it up and tried to run some sample regressions using the gwr.basic function, but ran into the following error, Error in t(X * W.i) ...
1
vote
1answer
357 views

How to perform a true GIS clip of polygons layer using a polygon layer in R?

I would like to do a true GIS Clip in R of soils polygons using a series of single boundary polygons, but I cannot find an R function to properly do it. It should work just like the CLIP function in ...
1
vote
2answers
62 views

Extract values from raster into points: data loss using extract function from raster package

I am trying to extract values of raster cells on points using extract from raster package in R (similar to 'Extract Values to Points' in ArcGIS-10.2). After doing so in order to check integrity, I ...
4
votes
0answers
77 views

Working with MODIS in R

I am new to using MODIS data and was hoping to get some help starting out. I have been able to download the hdf file but viewing it in R has been a problem for me. What I have found so far, and ...
0
votes
1answer
29 views

Spplot labels in R how to change

Can anyone tell me how to change the labels in a legend created by spplot in R? It is a typical vertical ribbon legend automatically generated by spplot. Based on color, it is labelled 1-7 but I ...
5
votes
1answer
881 views

Interpolating Maps - Statistical Learning Techniques vs Spatial Statistics Techniques

I have recently begun experimenting with the interpolation of variales over a whole country. I have good sized training set where I have several dependant variables (continuous and categorical) ...
0
votes
0answers
76 views

How to prevent cross-world lines in ggplot world map?

I'm having issues displaying 'great circles' paths and polygons in ggmap, an extension of ggplot2. Please enter the following code to replicate my issues: ...
0
votes
1answer
138 views

CSV Format change [closed]

Breakline Input File, Breakline Output file I get a breakline file from a CAD guy in below mentioned format. So I am calling this as a “Input” file. I am calling this as a “Output” file. I would ...