Tagged Questions

Statistical computing language and software environment.

learn more… | top users | synonyms

1
vote
1answer
22 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) ...
0
votes
0answers
19 views

How to plot additional raster with spplot? [on hold]

I want to plot SpatialPolygonsDataFrame as a semi-transparent main object (with legend on the right), but I want to plot yet additional raster (hillshade) as a background - just to make nicer map. I ...
1
vote
2answers
36 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 ...
0
votes
1answer
14 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 ...
0
votes
0answers
51 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
0answers
20 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 ...
2
votes
1answer
35 views

Export band names with NetCDF file in R

I am using R to work with multiband raster files and am running into a problem. I have named the bands, but when I export in netcdf format, the band names are being stripped. Anyone know how to ...
2
votes
1answer
29 views

average certain raster cells in R

If I have two rasters, let's say x1 and x2, that are the same dimensions, how can I take the average of the two but only where both have data to have a third raster x3 that is a composite of the first ...
2
votes
2answers
43 views

Is there a county-level maps dataset that includes independent cities in virginia?

and thank you in advance for your help. The following code shows the dataset I am working with: library(maps) CountyMapData <- map_data("county") head(CountyMapData) long lat group ...
3
votes
2answers
26 views

How can I snap one set of points to another in R

I would like to snap one set of points (SpatialPoints* objects) to another in R using Euclidean distance. I'm hoping for a function like maptools::snapPointsToLines. The attributes of the points ...
0
votes
1answer
49 views

R custom color theme in levelplot

R range(diffRain) [1] -2.59 7.59 How can I code a color ramp following ways? red color ramp less than 0.0 blue color ramp greater than 0.0 This is a part of my code. myTheme <- ...
6
votes
3answers
214 views

1km circles around lat-long-points in many places in world

I have hundreds of lat-long-points spread around the world, and must create circle-polygons around each of them, with radius exactly 1000 meters. I understand the points must first be projected from ...
1
vote
1answer
52 views

Creating new shapefile after merge operation using unionSpatialPolygons

I only recently started playing with shapefiles and R packages for manipulating them. I am looking at creating a new shapefile based on merged polyons by following this example, however, I cannot seem ...
1
vote
1answer
11 views

How to reproduce contour-style labeling with rasterVis::contourplot?

I am currently working with a digital elevation model (DEM) of Mt. Kilimanjaro, Tanzania. The referring raster grid can be downloaded from DIVA-GIS (Country: Tanzania; Subject: Elevation). After ...
2
votes
1answer
81 views

How can i use Kriging inside a Postgis database?

i use a postgis database with temperature data. I want to use a spatial interpolation method but not the supported IDW Method. I need to use the kriging Method. Problem is that its no a part of the ...
3
votes
0answers
14 views

How to set m parameter of clusterR function in R?

I want to manage a clustered computation on raster and thus use the "clusterR" function in R (package 'raster'). However, there's a tuning m parameter to set, but the only explanation about this ...
1
vote
2answers
40 views

Count values greater than 0 in SpatialPolygonsDataframe R

I have a SpatialPolygonsDataframe with > 100 layers and I would like to get a single layer showing the total count of where the values of all the layers are greater than 0. I have tried converting to ...
-1
votes
1answer
37 views

conversion of .img to binary file using R

I have a series of raster images which have to be converted to binary files. I request you to suggest a R code for conversion of all files at a time
3
votes
0answers
47 views

Algorithm to find the boundary grid points [duplicate]

Let us consider a set S consisting of a collection of grid locations (i,j),i,j=1,\ldots,n, in 2-dimensional gridded plane. Here the point (i,j) corresponds to a rectangular grid in the X-Y plane. ...
2
votes
1answer
28 views

Randomly distributed cases according to census data

I'd like to randomly place a point within a geographic boundary with the caveat that I would like to use census data so that points are randomly placed according to population density (i.e. more ...
1
vote
1answer
52 views

Plotting NetCDF file using lat and lon contained in variables

I am trying to plot this NetCDF file (and similar) as a 2d contour map. The file contains a single layer of one variable, "pr". The file has 413x229 X-Y pixel coordinates, and, stored inside the ...
2
votes
1answer
40 views

What can I use for Territory Management in Canada?

For our Canadian organization, I would like to map out the Postal Codes for each sales rep on a map. I've so far used R to pretty good success, but it completely lacks the interactivity I need to ...
1
vote
2answers
86 views

Inserting a zoomed-in plot with a full scale plot in the sp package in R

I am using the sp package in R to plot sampled points along a river. However, I would like to zoom in to a sampled area of the entire river, and plot this zoomed area on the full length of the river. ...
0
votes
2answers
60 views

How to plot the US maps with selected locations (longitude and latitude of the locations are known)?

I've been struggling with the following R plotting of the US map and wonder if any of you have suggestions on how the plot should be done. Here is what I have tried: US <- map("state",fill=TRUE, ...
-1
votes
0answers
52 views

rbind of list of selected point txt files [migrated]

I have lot of Point files in a folder. I would like to rbind (Vertically One after another in a single txt file) as per the list of selected point file from all the point files present in the folder. ...
-1
votes
2answers
71 views

Non Matching Rows between 2 txt files [closed]

I need to compare 2 CSV files so that I can get the missing rows from each CSV. All column attributes in each row should match while comparison. So I have 2 txt files and I would like to compare one ...
0
votes
1answer
133 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 ...
0
votes
1answer
63 views

Multiple Subsetting

Input File, XY min,max file I have a XYZ .csv file for a large portion of an area. I have another txt file which contains Box numbers, Xmin, Ymin, Xmax, Ymax. I would like to export a CSV file for ...
0
votes
1answer
27 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
27 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.
4
votes
0answers
58 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 ...
9
votes
2answers
115 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 ...
2
votes
2answers
59 views

Convert line shapefile to raster, value=total length of lines within cell

I have a line shapefile representing a road network. I wish to rasterize this data, with the resulting values in the raster showing the total length of the lines that fall within the raster cell. The ...
6
votes
2answers
149 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
80 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 ...
1
vote
0answers
18 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 ...
2
votes
1answer
36 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
1answer
45 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 ...
1
vote
1answer
24 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 ...
0
votes
1answer
45 views

clipping two SpatialPolygons : Error in RGEOSBinTopoFunc

I want to clip two SpatialPolygons on R without success, I followed the article in the disscution How to perform a true GIS clip of polygons layer using a polygon layer in R? Polygone 01 : > ...
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 ...
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
44 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 ...
0
votes
1answer
35 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
35 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
66 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 ...