Statistical computing language and software environment.

learn more… | top users | synonyms

2
votes
2answers
142 views

MODIS calculations with non cloud contaminated pixels

I have 11 files showing 8day daytime LST temps in .tif format from MODIS. Is there any way to calculate the average 8day daytime temperature for march 2013 for example but using in the calculations ...
23
votes
7answers
3k views

How to compare two spatial point patterns?

If I have two point pattern distributions within the same geographic region, how would I go about visually and quantitatively comparing those two distributions? Also assume I have many points within ...
4
votes
2answers
273 views

Reduce the resolution of a shapefile in R (or QGIS if necessary)

I'm using shapefiles of history U.S. state boundaries from NHGIS to make maps in R. These shapefiles are much higher resolution than I need when making maps at the scale of the country: over 2 million ...
1
vote
0answers
60 views

level of spatial aggregation of polygons

I am looking for a method that allows me to obtain the spatial aggregation of polygons for each cell of a grid with 10kmx10km resolution. In each cell (10kmx10km), I want to be able to consider that ...
6
votes
2answers
99 views

Finding lines in point patterns?

I have a point pattern (see below) in which I assume to find "significant" lines of points. However, I did not find any method that is integrated in a GIS or in R that searches for such line pattern ...
4
votes
3answers
920 views

Reproduce raster with the same extent, and the same number of columns and rows

I have two raster A and B. A and B have the same grid size but different extent. How can I make A has the same number of columns and rows, as well as the spatial extent of B?
6
votes
1answer
323 views

Anyway to remove points outlying shape in ggplot2?

I am to map a plot of an area and then plot points over it (given by Easting and Northing). However, I found out that there are certain mistakes in the data entered for Easting and Northing resulting ...
1
vote
1answer
45 views

How to return values of its order?

I have a matrix like this: 10 0.646519601 0 0.085929349 0.255477717 0.012073334 40 0.138403594 0 0.065979943 0.776693742 0.018922721 I want to keep the first column, and get rest ...
1
vote
1answer
209 views

What is the equivalent of arcpy “Con” in QGIS and/or R raster-package?

I'm looking for an equivalent of the conditional expression "Con" from arcpy in an open source spatial analysis package? I'd prefer to use QGIS or R. To provide some additional detail, I need to ...
0
votes
1answer
119 views

Plot specific area of map

Is there a way to zoom in a map on an R spatial polygons object. i.e. if I have polygons for a whole country but I want to zoom in on a specific city and just plot that area how do I do that ? At ...
1
vote
1answer
82 views

Find all census tracts N miles from a lat, lon point

Using R, I'd like to find all census tracts within a given distance of a point (lon,lat). i.e. All census tracts within 20 miles of 34.0522, 118.2428 I have used the sp library and over command to ...
0
votes
0answers
157 views

Drawing a map of a country with specific boundaries/zones using postcodes latitude and longitude

I'm quite new in geocoding - it has been fun! My project is to draw Australia with specific boundaries/zones using R program. I was able to successfully upload a shapefile of Australia in R program, ...
2
votes
1answer
143 views

Convert lat/long four corners data to raster

I have a data set in the following format.each row represents the coordinates of the four corners of a cell and the last column is the value associated to the cell. lon1 lat1 lon2 lat2 lon3 lat3 lon4 ...
2
votes
1answer
103 views

How to work with flt & hdr files

I have been working on a vector-based spatial analysis in R using shapefiles. I wish to use some environmental data that is downloadable, however it is only available in raster format (FLT & HDR ...
0
votes
0answers
139 views

R program and shape files

I have an R program that sketched a country. This is done by reading a shape file that contains the coordinate of a country (latitude and longitude). How do I export the data from shape file into ...
1
vote
0answers
32 views

How to load or query data directly to R from a PostGIS database using RPostgreSQL and rgdal [duplicate]

Is it possible to load/query a shapefile to R, which is stored in a postgres/postgis database? I've built up a connection to my postgres database via DBI, RPostgreSQL and I want to make some ...
13
votes
2answers
3k 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 ...
2
votes
5answers
735 views

Counting road intersections and blocks

I have a shp file that consists of the road system of Mexico City. I would like to count the number of road intersections (crossings) and blocks (which I would define as a segment starting from one ...
0
votes
1answer
109 views

Saving geotiff in R - why resolution on x and y is not the same?

I have some data and i want to save it as a geotiff in R. This is not a problem but even if in my command line i set the resolution on x as 1 and on y as 1 after the geotiff is generated the ...
4
votes
1answer
194 views

Moving window regression (MWR) in R

I'm looking for some package in R to estimate the value of a variable by moving window regression. I have read in Local Models for Spatial Analysis, which is a good method to predict values ​​at ...
8
votes
2answers
165 views

spatial and spatiotemporal analyses

I have a dataset that consists of 247 mosquito traps placed in fixed positions and sampled weekly for 23 weeks. I also have dengue disease incidence data (indexed to home address) during the same time ...
1
vote
1answer
85 views

Union of polygons doesn't work 100 % correctly

I'm using the function gUnaryUnion to merge polygons in R. In one particuliar case this doesn't work correctly - some of the old polygon contours are still visible: Can anybody help ?
4
votes
0answers
233 views

Using stat_density2d with coord_map in ggplot2

In my example I am plotting a shapefile for all England & Wales, however I'm interested in the greater London area. If I allow ggplot to simply default and display the entire shapefile then the ...
0
votes
0answers
97 views

US MAP using Zipcode in R [closed]

I have a set of US zip codes grouped into two groups. I'm plotting those two groups on US MAP using R code. I'm using following code to plot group A & B combining together ...
3
votes
1answer
203 views

How do I create a heatmap in ggplot?

I'm using R with ggplot2 to generate maps from shapefiles and from data in SQL Server. I'm trying to get to a stage where I can automate a large chunk of the mapping I do. So far this is working well ...
1
vote
0answers
108 views

How to import binary arcgis maps into R

I have imported arcgis rasters into R. The rasters are binary maps and the legend in arcgis shows this to be binary as the colors are only 0 and 1. Now, when I import the raster into R it is no ...
1
vote
4answers
178 views

Detection of geographical trend of a variable

What is the best method to detect and graphically display the spatial trend of a variable? I'm looking for something that tells me the probability that the trend is from "north-west to south-east" or ...
0
votes
0answers
33 views

Creating clumps in a raster from 1 pixel

I want to make clumps of cells (pixel) within a raster. My raster data is binary form as "1" or "0" representing "0" is nothing but "1" is something. I want to make clump from "1" data. If my raster ...
2
votes
1answer
259 views

combine raster and polygon values in R

My question is similar to this one Get Raster Values from a Polygon Overlay in Opensource GIS Solutions but I think I need another step. I have a polygon layer of ecoregions which I brought into R ...
3
votes
1answer
193 views

Replace NA's with 0 for raster data using R

I am new in R. How can I replace NA's with 0 for my raster data which have spatial information?
1
vote
2answers
158 views

How to modify the results of a geological dataset from vertical to horizontal?

I have a 3-D point shapefile of a geological fault dataset consisting of x,y, and z columns. I need to create a raster dataset from this point dataset. I have been trying to do this in ArcGIS; ...
1
vote
2answers
1k views

Choosing the correct value for proj4string for shape file reading in R “MapTools”

I am having a shape file of polygons and another CSV file which contains a list of points as (Lat, Lng) pairs.. I want to check for each (lat, lng) pair from the CSV file which polygon does it fall ...
3
votes
0answers
84 views

Can extracting raster values work in polygons' CRS without raster resampling?

I am trying to extract raster values using polygon layer with different CRS. Raster is in WGS84 (EPSG:4326) and the polygons in UTM (EPSG:23031). 1. If I want to work in the projection of the ...
26
votes
2answers
2k views

How can I conduct Geographically Weighted Principal Component Analysis using ArcGIS, Python and SPSS/R?

I am after a description/methodology for conducting a Geographically Weighted Principal Components Analysis (GWPCA). I am happy using Python for any portion of this and I imagine SPSS or R being used ...
3
votes
0answers
124 views

Is co kriging appropriate for interpolation of three spatial co variates?

I want to estimate an interpolation model(s) for daily minimum temperature, daily maximum temperature and daily rainfall. I have samples of approximately the same size for all three variables at ...
2
votes
1answer
174 views

Bubble Plots in R not displaying

I was attempting to follow a tutorial to create a bubble plot of school district proficiency rates. Data shapefile of school districts (Census2010.shp) ...
0
votes
0answers
16 views

overlay bubble plot and choropleth in R with maptools [duplicate]

I am working with US education data, and have been asked to create maps that overlay a measure of student poverty and academic achievement. Ideally, I would be able to do this by creating a choropleth ...
1
vote
0answers
152 views

Ordinary kriging with three dimensions in R

I want to interpolate temperature for a surface defined by three coordinates: longitude, latitude and altitude. I know one option is to use universal kriging on two dimensions and use altitude as a ...
2
votes
1answer
78 views

Several algorithms done for topographic correction => black spots - how to solve?

I have done several algorithms for topographic correction in R including simple cosine, Minnaert, SCS. The input data aspect and slope for the hillshade raster have correctly been done in radians. The ...
1
vote
2answers
302 views

Checking if Lng and Lat fall inside polygons from ESRI Shape file

I have two input files. First: CSV file with a list of points each defined with Lng, Lat, Name Second: ESRI Shape file defining a number of polygons I would like to determine for each point I have ...
2
votes
1answer
188 views

LSA-SAF data reprojection with GDAL and R

The Land Surface Analysis Satellite Applications Facility (LSA SAF) distributes several products derived from the EUMETSAT satellites data. I am working with R to read and process the data (the file ...
-1
votes
1answer
251 views

WinBUGs giving 'Illegal memory write error' running under wine [closed]

Ok some I am trying to use Winbugs to do spatial smoothing. I am running r code in R study and using R2WinBUGS to call Wine 1.4 under Mac OSx Mountain Lion. It works ok for some models but for the CAR ...
0
votes
0answers
77 views

Why does a shapfile shift after transformation?

I have a shapefile created in the raster package (ER_14.3_2000_poly). > #read in a raster file > ER_14.3_2000<-raster('E:/Ecoregions Models/Outputs/ER_14.3/ER_14.3_ConsensusMap3.asc') > ...
2
votes
1answer
276 views

extracting data from rasters using shapefile boundaries in r

I have a raster.stack of 8 environmental variables and a shapefile of Ecoregions for the southern U.S. files<-list.files(path='E:/Ecoregions Models/Border Bioclim/',pattern='asc', ...
4
votes
0answers
143 views

How to build Poisson autoregression model

I have a SpatialPolygonsDataFrame object in R with about 3000 polygons and associated data. I have columns of expected and observed cases. For the moment, I don't have any covariates. I'd like to ...
4
votes
2answers
216 views

Draw two separate lines from A to B and B to A

I have an Origin-Destination table like this Origin Destination Value A B 10 B A 100 A C 120 ... For all the locations A, B, C... I have another table indicating their location (Lat and Lon) Is ...
9
votes
3answers
3k views

Which is the best way of working with PostGIS data in R?

I work with R almost all the time, and now I am using it for doing spatial data mining, but I have this question: I have a PostGIS database with (obviously) GIS data, If I want to make statistical ...
1
vote
1answer
160 views

How to save R raster plot for ArcGIS raster file

I want to save my raster plot that produced with R to ArcGIS raster (.img, .tif and ASCII) file.
1
vote
1answer
79 views

r raster package rasterize failing:no slots

I'm having trouble rasterizing a shapefile using the raster package in R. shp<-shapefile(ZoneShape); lcRas<-raster(lcRaster); r<-raster(ncol=ncol(lcRas), nrow=nrow(lcRas), crs=CRS); ...
11
votes
6answers
883 views

How to implement value-by-alpha map in GIS?

I've been doing some background reading about cartograms recently and stumbled upon interesting alternative - value-by-alpha maps. Concept is described in more details here and full paper is ...