Statistical computing language and software environment.

learn more… | top users | synonyms

1
vote
0answers
107 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
69 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
49 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
31 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
53 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
423 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
129 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
42 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
169 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
67 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
19 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
56 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
42 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
25 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. ...
5
votes
1answer
81 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
63 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
44 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
188 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
41 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
55 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
86 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
27 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
36 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
23 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
42 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
50 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
43 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
29 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
46 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 ...
1
vote
1answer
62 views

Wanting extract to produce sensible answers for NAs in R

So, I'm working on extracting values from multiple different rasters in R. However, some of our data is marine, some terrestrial. Some rasters cover both, but a few are ocean only or land only. At ...
1
vote
2answers
48 views

Automatically convert from latlon to planar

I work with library(sp) and points in latitude longitude, with this projection: proj4string(pts) <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84") But some functions (such as sp::spample) ...
1
vote
0answers
65 views

R code to find the smallest bounding box with arbitrary orientation

How can I devise an R-code that can derive a rectangular bounding box (with 90-degree angle on each corner) for a set of points with arbitrary orientation? e.g. if the 2 longer edges have a 45-degree ...
1
vote
0answers
30 views

Problem in Variogram Plot [closed]

I tried to plot Variogram by this code from gstat packages: v <- variogram(log(zinc) ~ 1, meuse) plot(v) and here is the output: But I want to add line to point (draw variogram line). How I ...
0
votes
1answer
100 views

Convert xy spatial points into spatial lines

I have produced a SpatialPoints object (named v3) in R from the function gIntersection (package rgeos). The SpatialPoints object v3 has the following structure and is represented by red points on the ...
2
votes
1answer
93 views

R: Convert Extent Object to Shapefile

I want to convert R 'library:raster' 'extent' object to a shapefile. I have the CRS available too. e= c(4304916, 4305325, 365216, 365439)#xmin, xmax, ymin, ymax proj4string(e) = CRS("+proj=utm ...
0
votes
0answers
17 views

Extracting coordinates and climatic conditions of grids where species polygon overlaps with the climatic layer in R?

I have species’ shapefiles and climatic raster files. The climatic file is in 50 * 50 km equal area grid. Now, I want to calculate the climatic conditions in each grid cell where species polygon ...
0
votes
0answers
49 views

Downloading NOAA AVHRR NDVI using R

I am using the gimms package to automatically download NDVI data from 1981-2013. The code is provided here. The data is available here. However, after running it shows that data has been downloaded ...
1
vote
2answers
96 views

Pan sharpening with surface reflectance data

The surface reflectance data for landsat 8 is only available for bands 1-7 (via EPSA bulk download). I want to pan sharpen surface reflectance data. But I don't have a surface reflectance band 8 (pan ...
1
vote
0answers
88 views

Effects of heterogeneous vegetation in mapping canopy cover using randomForest in R

I have a 5.8 m resolution satellite image (LISS IV aboard IRS-P6, in the wavelength (micrometers): 0.52 - 0.59 (band 2),0.62 - 0.68 (band 3) and 0.77 - 0.86 (band4). The swath covers a densely ...
1
vote
0answers
303 views

How to avoid “Unable to compute a transformation between pixel/line”?

I am trying to re-project from Equi-rectangular to the NASA global EASE grid (Equal Area Scalable Earth) grid 1383 586 with a ~25 km cylindrical projection (ESPG=3410). The file is provided as HDF5. ...
5
votes
3answers
86 views

Merge a list of spatial polygon objects in R

I have a list of spatial buffers (30000 buffers) that I built with the function lapply: buff.pts <- lapply(1:nrow(pts.prj), FUN=function(l){ buff <- gBuffer(pts.prj[l,], width=1000) ## 1km ...
0
votes
1answer
33 views

How to create SpatialPixelsDataFrame from Latitude and Longitude data?

I have a data frame that contains latitude and longitude data with density point. I want to do kriging but my main problem is that I can not create SpatialPixelsDataFrame from my data. My data is ...
1
vote
0answers
39 views

Correcting for offset

I have a shape file with RTK measurements as a line feature, which more or less corresponds with visible features in a raster layer (shaped as lines). These measurements however are not accurate ...
0
votes
1answer
87 views

Counting raster values using another raster as mask in R?

I would like to count the frequency of values in one raster, using another raster (different resolution) as the zonal condition. The premise is that the coarser resolution raster represents the area ...
0
votes
0answers
37 views

Export image from PL/R on postgres

I'm trying to export an TIFF image from a PL/R Function in my PostgreSQL database. The output of the image appear be corrupted, because when I'll open the image, is showing the message: "Loading ...
0
votes
1answer
192 views

For loops + boxplot for raster

I have several Rasterstacks (b1_mask, b2_mask,...) of several layers representing only a determined pixel-intensity range. (So point "A" in some layers is "NA" - in others a "value" of that certain ...