Statistical computing language and software environment.

learn more… | top users | synonyms

0
votes
1answer
192 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 ...
0
votes
0answers
230 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, ...
0
votes
1answer
96 views

How long should it take to load a point layer with readOGR? [closed]

I am afraid I am quite new to spatial analysis at anything beyond a superficial level, and I have only recently transitioned to utilizing R. I have been quite pleased with the versatility of areal ...
0
votes
1answer
59 views

Error in performing transect in ambur R?

I'm trying to filter a transect, window size is 5 and filter individual baselines is set to 0. I select the transect shapefile, then the inner baseline shapefile and it gives me this error. Error in ...
0
votes
1answer
728 views

How to count number of polygons inside another polygon layer?

I am looking for a tool in arcgis 10.1 Qgis or R that allows me to count the number of polygons that are inside specific areas (defined also as polygons). My data consists in: 1 shape file with ...
2
votes
1answer
225 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
181 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
44 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 ...
1
vote
1answer
113 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 ...
2
votes
1answer
582 views

Population density map

I have California population density data from from the U.S. Census in an Excel file. The spatial information is provided in ZIP Code Tabulation Areas (ZCTAs). How do I plot a population density map ...
0
votes
1answer
158 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 ...
1
vote
1answer
126 views

Retrieving the proportion of specific pixel class from CHM rasters

CHM = canopy height model I am very new to R (specially for GIS purposes) and I am struggling a bit in getting the following pixel statistics: Proportion of zero value pixels = [nº of zero value ...
4
votes
1answer
540 views

How to split a polygon using R

I have an irregular polygon which is a spatial object. I want to divide it into multiple polygons (say, n=25) with equal height. To show how I want to divide it, I've plotted grids on the ...
4
votes
1answer
300 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 ...
2
votes
2answers
543 views

Using Regression Trees in ArcGIS

Hi I have a follow up question to this post: Statistical analyses for survey against raster? I have a very similar problem as the initial poster David. I am creating a multivariate model from ...
4
votes
0answers
438 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 ...
1
vote
0answers
156 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 ...
3
votes
1answer
438 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 ...
0
votes
0answers
268 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 ...
2
votes
1answer
612 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 ...
4
votes
1answer
489 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?
7
votes
3answers
237 views

How to compare spatial patterns (crime cases vs population)?

I am looking for a way to statistically compare two spatial patterns in shape polygon data (not point pattern analysis). Let's say I have a city map divided in neighborhoods (barrios), in shape ...
3
votes
0answers
116 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 ...
0
votes
4answers
235 views

Buffer in QGIS/R is 650-670 m wide instead of 500 m

I am trying to make a 500 m buffer for my polyline layer. Unexpectedly, I receive buffer varying from 650 to 670 m, depending on location. As many resources recommend to use UTM before making a ...
1
vote
1answer
113 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 ?
3
votes
0answers
187 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
297 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) ...
1
vote
0answers
259 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 ...
-1
votes
1answer
386 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
86 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') > ...
4
votes
0answers
174 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 ...
2
votes
1answer
141 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 ...
2
votes
0answers
264 views

R, GeoJSON and Leaflet

I recently learned about leafletjs.com from an R-Bloggers.com post. One such tutorial that I would like to achieve is to create interactive choropleth maps with leaflet. I have been using the rjson ...
10
votes
3answers
4k 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
496 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.
3
votes
1answer
196 views

Fix Labels United States Map Help R, R-Studio?

Does anyone know how to deal with the labels that do not fit within a states boarders? I need the labels on the east coast to be moved outside of the state and a line drawn pointing to the ...
3
votes
2answers
824 views

Add Numbers to United States Map Help R, R-Studio?

Can someone help me with creating a map in R? I need to make a map of the number of retail stores a company has in each state. All I need is the store count displayed in each state. For example: ...
3
votes
1answer
1k views

Setting extent and geographic projection in R

I have a raster and a shapefile that I am attempting to view and process in R. The shape file "ER_11.1" has the following specs: > ER_11.1 class : SpatialPolygonsDataFrame nfeatures : 22 ...
2
votes
1answer
462 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', ...
3
votes
2answers
3k 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 ...
4
votes
1answer
251 views

Clip polygon and retain data

I have these two polygons: library(sp); library(rgeos); library(maptools) coords1 <- matrix(c(-1.841960, -1.823464, -1.838623, -1.841960, 55.663696, 55.659178, 55.650841, ...
2
votes
2answers
990 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
303 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
vote
1answer
341 views

Overlay points over gadm map

This is a crosspost with stackowerflow and I hope for understanding and that it will no be closed as it concerns both cartography and R. I have already asked about plotting points dependent on ...
3
votes
0answers
331 views

Novel ways of filling in missing values in a raster

I am looking for robust ways to fill in missing values in some rasters. They all have a single layer. Missing values consist of single pixels to medium sized patches. Rasters are around 1000 x 1000 ...
3
votes
1answer
500 views

Find clusters of points based distance rule [duplicate]

I have some points that I need to divide into groups based on clusters of points: x <- c(-1.482156, -1.482318, -1.482129, -1.482880, -1.485735, -1.485770, -1.485913, -1.484275, -1.485866) y <- ...
1
vote
1answer
120 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); ...
2
votes
1answer
193 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
0answers
123 views

Plot points map of population [closed]

I want to plot kind of isarhytmoc points map like in this tutorial, but with population data. However, unfortunately, I have no enough skill and only came with such code: require(sp) require(rgdal) ...
1
vote
2answers
181 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; ...