Tag Info

Hot answers tagged

6

If you know R, you can use the package "gdalUtils" and run gdal_translate to do that. If you are on Linux make sure to install GDAL. If you are on Windows, you're good to go. These are the basic commands to handle the conversion to .tiff and the reprojection to WGS84. out.files <- list.files(getwd(), pattern="hdf$", full.names=FALSE) #create a list with ...


3

Documentation of r.watershed module for GRASS 6 says that there is a half.basin option (parameter): half.basin Output map: each half-basin is given a unique value So, this means that in command line (Bash etc.) one can write: r.watershed elevation=elev_lid792_1m drainage=elev_lid_drainage half.basin=elev_lid_half_basin threshold=10 GRASS provides a ...


2

This problem is related to the deactivation of short names under windows. The short names compatibility is required for a large number of program. To reset the management of short names for access to the QGIS directory, open a box of MS/DOS dialog by running cmd.exe in administrator mode, on the root directory, execute the following two lines of commands: C: ...


2

You are apparently not running GRASS in its own session (fine) but you are working with GRASS without starting it explicitly. There is a Python example for this. Concerning your example: check the command line output for the error message (unfortunately not seen in the Python shell). I tried and got these errors listed: Sorry, <drainge> is not a ...


1

Going back to basics: I don't see a region setting in your script. You should first do a g.run_comand('g.region',rast='dra'). Next, are you sure that the points in the csv file fall exactly on the streams? If an outlet point is even slightly off the stream channel, you will get very tiny basins.


1

If you have to do this once, I would also recommend using gdal_translate like in the above answer given by Filipe Dias. However, if you are working a lot with MODIS data, you should probably also have a look at Matteo Mattiuzzi's MODIS package (see modis: R Development Page). It is easy to use and offers a lot of opportunities to download and process ...


1

Are your grass binaries really in "C:/Program Files/R/R-3.1.0/bin/i386"? The "gisBase" argument is the path to your GRASS install. Something like this: loc <- initGRASS("C:/Program Files (x86)/GRASS 6.4.2", home=getwd(), gisDbase="GRASS_TEMP", override=TRUE ) Here is an example R/GRASS session that calculates the 3x3 surface relief ...


1

Here is an attempt to do this in R. I use gIntersect and compare the layer with itself. Every polygon intersects with itself, so I then use the row sums to determine if there is only one intersect and select those. library (rgeos) library(sp) # make some polys data (meuse) coordinates(meuse) <- ~x+y polys <- gBuffer(meuse, width=70, byid=T) ...


1

You may use v.select in GRASS GIS with "operator=disjoint" - features do not spatially intersect. Note that it requires GRASS GIS been compiled with GEOS support. Just check if "disjoint" is a supported parameter in v.select. Edit: in case of one map only, check v.to.db and its parameter "sides". It extracts categories of areas on the left and right side of ...


1

For GRASS you can use the r.colors to modify the color table for a raster map. r.colors also ships with pre-defined color maps for temperature scales. It's simple to use even r.colors map=spring color=celsius You can also copy the color table from one map to another r.colors map=spring2 raster=spring For more details see the GRASS GIS manual ...


1

a possible workaround is to select the polygons in the original data that do not overlap with the cleaned data (with v.soverlay operator=not ), then merge the two data together (using v.overlay operator=or ) EDIT : the algorithm for a proper eliminate consists in : 1) selecting "small" polygons 2) converting original polygons in lines 3) converting ...


1

Here's what I suggest: g.mlist --q type=rast pattern-"*NDVI" mapset=shenkottah >> NDVIFILES and a similar expression for the QAFILES This will leave you with two files on your disk, each containing a list of the raster map names. To verify, test with the sed expression: sed -n "4p" NDVIFILES Then you should be able to run a loop to read the ...


1

In the list of output rasters from g.list, I don't see any that begin with "b_", so it seems that g.mremove worked fine. What's the problem? If you want to remove all the rasters that begin with "b" then drop the underscore: g.mremove -f rast="b*"


1

You may want to enjoy the new temporal GIS framework in GRASS GIS 7: GRASS as Temporal GIS presentation PDF A temporal GIS for field based environmental modeling (article) Manual pages: http://grass.osgeo.org/grass70/manuals/temporalintro.html An initial release of GRASS GIS 7 has been done two days ago at the Vienna OSGeo Code sprint: ...


1

Answering to myself. Using R and package "rts" it is possible to create a time series: library(raster) library(ncdf) library(stringr) library(rts) stack<-stack("pp_0.25deg_reg_v9.0.nc") #Create raster stack datas<-c() for (i in 1:length(stack@layers)) { word<-str_sub(as.character(stack@layers[[i]]@data@names), start=2, end=11L) ...


1

This should probably get you pretty close to your goal: SELECT AID, BID, theOrder, rank() over (PARTITION BY AID order by theOrder asc) as rank FROM ( SELECT A."ID" AS AID, B."ID" AS BID, ST_line_locate_point(A."Shape", ST_ClosestPoint(A."Shape", B."Shape")) AS theOrder ...



Only top voted, non community-wiki answers of a minimum length are eligible