Statistical computing language and software environment.

learn more… | top users | synonyms

2
votes
1answer
44 views

ArcMAP / R: Convert raster pixels to Long and Lat

I have downloaded a raster, which has the following information. Item Data Date 2015-01-03 00:00:00 Product cold partial sst Satellite NOAA-18 Direction Unknown Dimension 1596 x 1617 BPP ...
6
votes
3answers
192 views

Read a table from an ESRI file geodatabase (.gdb) using R

I am trying to read a table directly from an ESRI file geodatabase into R. An example data file can be downloaded here. The database contains a point feature class (Zone9_2014_01_Broadcast) and two ...
0
votes
0answers
76 views

Changing the cell size and projection of a raster to correspond with the ones of another raster

I have two rasters with different resolution and projection. > r1 class : RasterLayer dimensions : 2510, 5233, 13134830 (nrow, ncol, ncell) resolution : 56, 56 (x, y) extent : ...
2
votes
2answers
35 views

Assigning column names dynamically

I have an interesting problem: I need to batchprocess a few files. I do that in a for-loop, where some operations are performed. Later on I want to write the outcome into an existing shapefile which ...
0
votes
1answer
889 views

R solution for 'TopologyException: Input geom 1 is invalid' self-intersection error?

The 'TopologyException: Input geom 1 is invalid' self-intersection error which arises from invalid polygon geometries has been widely discussed. However, I haven't found a convenient solution on the ...
1
vote
0answers
22 views

Computing intersection of distance circles around fixed points [duplicate]

(to simplify calculations, I assume a spherical earth. All distances are assumed measured "as the crow flies") Suppose we have the lon/lat coordinates for two points (p_1,p_2) less than Nkm apart. ...
3
votes
1answer
82 views

How to do operation after using over() for a shapefile in R?

I am copying the answer of Counts the number of points in a polygon in R library("raster") x <- getData('GADM', country='ITA', level=1) class(x) # [1] "SpatialPolygonsDataFrame" # attr(,"package") ...
3
votes
0answers
53 views

Determine if mapped points are related geographically [closed]

Hoping you can help. I'm a clinician trying to determine if some mapped points are related. I basically have a data set of certain long/latitudes. Each lat/long is associated with a positive Sputum ...
3
votes
2answers
824 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 ...
19
votes
3answers
5k views

How to perform Random Forest land classification?

This is a follow-up to a previous post: Machine Learning Algorithms for Land Classification. It seems that the Random Forest (RF) classification method is gaining much momentum in the remote ...
4
votes
1answer
139 views

Interpolate temperature data (shapefile) using R

The answer below solved my fist question, so I edit my question as follows: I have a shapefile given with the attributes lat, lon, elevation and temperature. So far I have a script that interpolates ...
1
vote
1answer
39 views

How to update selected rows of spatial data frame in R

I have a SpatialPointsDataFrame read via rgdal::readOGR require(rgdal) my_sp_layer <- readOGR(dsn="my_dsn", layer="my_layer_file") # select rows using col_attrib column ...
2
votes
1answer
4k views

Converting decimal degrees units to km in R?

I am trying to figure out how I can transform my unit of length from decimal degree to km when I import the following simple ArcGIS polygon shape. Ultimately, I would like to have this information ...
2
votes
1answer
58 views

How to use latitude/longitude with projection in R [duplicate]

I am using the SABS dataset: http://nces.ed.gov/surveys/sdds/sabs/ In particular, let's say I am using the "SABS_1314_High" layer. (This provides the school attendance boundaries for many US school ...
2
votes
2answers
58 views

R use data in SpatialGrid to create SpatialPoints

I am trying to make a grid of points to overlay on a raster of vegetation of Kansas, U.S.A. My idea is to use the points as a sort of centroid for the raster pixels, which are 30m resolution. When I ...
13
votes
2answers
11k views

R : convert a spatial polygon objet to spatial polygon data frame

My goal is to modify an existing shapefile by merging certain polygons. After importing the shapefile and using the UnionSpatialPolygons command, I get the polygon outline that I want. However, this ...
3
votes
1answer
76 views

Rotating ~90° using Two-Point Equidistant projection with Proj4

I'm trying to rotate a tif raster in R using Proj4's Two-Point Equidistant projection - I think the only way to rotate spatial geometries to custom angles. But I'm finding the operation gets very ...
1
vote
0answers
129 views

Convert PLSS (Section, Township, Range, Meridian) to Latitude and Longitude using R package or Python

I have data in the form of Section, Township, Range and meridian. I have 300,000 data points from all over the USA. Is there any way i can write R or python scripts to batch convert all the points to ...
3
votes
0answers
96 views

MODIS R Package: GDAL Not Available

I am trying to analyze the MODIS EVI 250m, 16day dataset. I found the R MODIS package and am following the instructions here: ...
2
votes
2answers
54 views

Create a new GRASS database in R with CRS projection

How to create a new GRASS database in R with CRS projection? I am able to create a new one using the following code but it is not projected require(raster) require(spgrass6) ...
0
votes
0answers
12 views

TimeDimension in R, leaflet [duplicate]

it's possible to do this this with R,leaflet ? any suggestion please?
5
votes
5answers
1k 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 ...
4
votes
1answer
35 views

Remove certain polygon from SpatialPolygonDataFrame

I am using R maptools library to parse the shapefile into a list of polygons. The function readShapeSpatial shp <- readShapeSpatial("<path to my shapefile>") gives me a ...
0
votes
0answers
59 views

Reprojecting a raster file in R

Help! I have a number of rasters from different sources with different projections. I want to reproject the rasters into a common projection (Eckert IV), somehow line the grids up, and then overlay ...
4
votes
1answer
494 views

How can I parse modis MOD13Q1 quality layers in R?

I'd like to parse MOD13Q1 VI quality layers in R. My original code must have been incorrect, because it gave lots of "deep ocean" flags in the middle of Brazil. After the changes suggested by ...
7
votes
3answers
6k views

Extract Raster from Raster using Polygon shapefile in R

I am new to R and using the raster package. I have a problem extracting polygons from an existing raster file. If I use extract(raster, poly_shape) function on the raster it always creates a list ...
3
votes
3answers
141 views

Get rivers from a DEM raster

I am new to spatial analysis and even newer to hydrology. I have a 30arc DEM elevation raster and I was wondering if I can use it as an input to get the approximate presence of rivers in a ...
2
votes
0answers
57 views

Extract values from Rasters in R based on spatial points and spatial polygons

I am trying to extract values from a raster file using the extract command in R mentioned here: http://www.inside-r.org/packages/cran/raster/docs/extract My raster file is unprojected (WGS84 ...
1
vote
1answer
279 views

Is it possible to use Leaflet.draw on a map in R?

I want to develop an application where a user can draw a line, polygon etc... I currently develop with R and leaflet package and I found that it is possible to work with Leaflet.draw under ...
4
votes
1answer
68 views

Predict/estimate point values for unsurveyed areas based on vegetation type

I have point data from deer surveys and would like to predict values for areas not surveyed based on vegetation type (Grass, Disturbed, Oak, Pine, Mixed etc.) So far I have dissolved my vegetation ...
1
vote
0answers
20 views

Subdistrics border change over time

I have 4 shapefiles of India state from 4 decades, and I trying to identify changes within the sub-district level such as splits or merge of sub-dist, border changes etc. I am using R but I can use ...
3
votes
2answers
62 views

What is the epsg code of eurostat maps?

Shape files of Europe maps are available on the Eurostat website. I downloaded NUTS_2013_60M_SH. The tool (readOGR from the R package Rgdal) I use to load the map shows the following proj4string: ...
0
votes
0answers
55 views

Elevation profile of river in R

I would like to plot the elevation profile of a river (shapefile, single line) in R. How do I extract the elevation values (from a DEM .tif, for example) for the river line. I tried clipping but that ...
0
votes
1answer
33 views

Grass r.gwr addon difficulties Ubuntu

I am using Grass7 and Ubuntu14.4 I am attempting to carry out a geographically weighted regression between two .tif files but am having issues with the call to r.gwr Code and output is as follows. ...
6
votes
1answer
87 views

Categorising Point Clusters

I have a point dataset of solar farm locations. The points are grouped according to which substation they feed into (see below). I would like to test the hypothesis that electrical output ...
1
vote
1answer
68 views

Get distances between boundaries from an SpatialPolygon and raster pixels

I am trying to calculate the distance from several pixels of a raster to a boundary of some polygons in R as it is showed in the image. I have two problems: How to correctly define a boundary from ...
1
vote
3answers
2k views

Processing HDF4 data in R

I am trying to process MODIS files in R, which are in HDF4 format (link to data). I have experience reading in HDF5 and netCDF files in R, but HDF4 seems to be a common problem in R. I am using a MAC ...
2
votes
1answer
45 views

R gdalUtils::ogrinfo error or very slow

I am pulling WFS data into R and using gdalUtils::ogrinfo to look at the available layer names on a WFS server. Using the same url in QGIS, this is very fast and gives complete information. With ...
0
votes
1answer
199 views

calculate distance between points crossing the antimeridian

How can I calculate the distance between two points (lon/lat) if any of the points exceeds the antimeridian (+-180 longitude)? Im using the distVincentyEllipsoid {geosphere} to calculate the shortest ...
0
votes
2answers
46 views

SpatialPointsDataFrame too slow FOR LOOP

I've run into a small problem where my for loop has been running for 3.5 hrs+. I have a Geodataset in SQL Server with a field called Shape that stores co-ordinates in geometry data type. Firstly, I ...
0
votes
1answer
77 views

Read SQL Server Geometry datatype in R

I have two datasets that come from ArcGis, stored in SQL Server. I have a column called - Shape which is a geometry data type and the value looks like this: ...
1
vote
2answers
130 views

What is the proj4string of the Lambert azimuthal equal-area projection?

Shapefiles of European data are available on the Eurostat website. I have loaded the NUTS_2013_60M_SH Shapefile in R with the command; europeRG <- readOGR(dsn = patheurope, layer = ...
1
vote
1answer
29 views

transformations from a sphere using R for raster and polygon data [duplicate]

I am planning on using the MODIS burned area products which were produced by Maryland University. These come as either polygons or rasters. In the user guide it says A shapefile version of the MCD45 ...
1
vote
1answer
38 views

Matching Decedal Average NDVI and Worldclim Data

Ive never used NDVI (or EVI) datasets in R. Does anyone have any resource I could use to access a decadal average NDVI dataset for the globe. It would be preferable if this dataset was also comparable ...
0
votes
0answers
24 views

Putting shapefile into spplot graph?

I have a spplot with a kriging but I need to put a shapefile into this spplot? How can I do that? I could obtain this with a intersection but I just need the shapefile over this.
1
vote
1answer
45 views

Using Leave one out method on kriged data

I am looking for a function to do the following. Given a boundary file, and soil sample points within the boundary I am wanting to use the Leave one out validation technique. What I mean is create a ...
3
votes
1answer
53 views

Spatio-temporal kriging - useful if not interpolating to new time points?

I have data measuring a variable Z say at several locations on a fixed network (each location at a fixed longitude and latitude). values of Z are measured daily at the same time. At the moment I am ...
1
vote
1answer
50 views

Is it possible to map a leaflet provider (precipitation) on top of a polygon in an interactive map?

I've just started using the leaflet package in R to create interactive maps and I'm wondering if it's possible to plot one of the leaflet providers on top of a plotted polygon rather than under it as ...
2
votes
0answers
31 views

Converting u and v from WGS84 to NZTM2000 - Do I need to do vector conversion?

I have u and v wind component values in latitude and longitude in WGS84. I want to convert this to NZTM2000. I've converted the lat/lon in ArcView - (and will try in R) - but do I need to also do some ...
0
votes
1answer
49 views

Map editor R & leaflet?

That is possible on a web map designed by R & leaflet give the opportunity to the user to draw lines, polygons, choose the colors (like a map editor)? if yes what's the package that allows me to ...