Tag Info

New answers tagged

1

Using the GRASS r.out.gdal module, you specify createopt="TFW=YES" to get a *.tfw world file. When exporting with type=UInt16 you should also get the proper colors saved into the geotiff. (I don't know specifically if Adobe iluustrator will read those tif color ramp headers)


1

All GRASS color tables formats (v.6.4) are in this link: https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4/lib/gis/colors/ If you have GRASS 6.4 in Linux, they are in /usr/lib/grass64/etc/colors. For example, if you used the elevation table, this is the format: 0% 0 191 191 20% 0 255 0 40% 255 255 0 60% 255 127 0 80% 191 127 ...


0

Did you compile your own copy of GDAL? If so you should remove any GDAL packages originating from Ubuntu or UbuntuGIS repos, and recompile GRASS GIS from source code to match your new libraries (be sure to run "make distclean" prior to compilation).


1

A check of the input line topology using v.build -e map=lines@agraser revealed WARNING: Number of lines of length zero: 140 After removing those with v.clean "remove lines/boundaries of zero length", network creation succeeded.


0

If you use free SAGA GIS (http://www.saga-gis.org/), you have some interesting options to calculate vertical distance to river. I recommend the algorithms, both on the toolbox cold "Terrain Analysis - channels": "overland flow distance to channel network" and "vertical distance to channel network". Each one has a different approach. The "overland flow ...


0

QGIS has GDAL support to open this kind of images. I downloaded this one, OMI-Aura_L3-OMTO3e_2015m0413_v003-2015m0415t025309.he5, and its last subset was opened with QGIS. It looks like: but CRS was undefined. At the metadata of the image you can observe the spatial attributes of the bounding rectangle. To assing it one projection and a new format: Raster ...


1

For the r.relief command in GRASS, the scale factor only needs to be set to a value other than 1 if your DEM does not use metres for storing the elevation. It does not matter whether the horizontal units are metres, feet or degrees. The reason for this is that r.relief uses the function G_distance internally for calculating the horizontal distance between ...


3

In GRASS: r.mapcalc "uniform_raster = 1" (or any other value you choose) As always with GRASS, be sure to set the region first.


0

I've just installed the latest development version of QGIS (6 April) and the bug that prevented the creation of new Grass mapsets has been fixed - all now works just as expected. Hats off the to QGIS development team!


1

Here are three suggestions. First, you should upgrade to a new version of QGIS. For your shaded relief, QGIS has a built-in shaded relief module. You can use that to get your shaded relief raster without the need for GRASS at all. It's under the menu Raster->Analysis->DEM. To calculate watersheds, I would suggest running GRASS alone, not thru the QGIS ...


1

Your main problem now is that "your raster map is in diferent zone (-49) that current region (0)". At the begining of the post, you pointed out that the projection was in wgs 84/UTM zone 49S (EPSG : 37249). This projection is wrong. The correct one is EPSG: 32749. Afterward, assuming that your country is Indonesia, you have to click in Set before a new ...


1

WHen you mention 200 pixels, do you mean a neighborhood of 200 pixels width? or a neighborhood that contains 200 pixels? The GRASS r.neighborhood command takes a "size" parameters which is the width of the window. So for the second case, a circular window containing 200 pixels then the width will be about: 2 x sqrt(area/pi) or ~17. I tried some tests as ...


1

I would point out, in addition, that the GRASS model, v.what.rast takes a point layer and raster layer as input and uploads the raster values to a given attrib column for all points. To run this in the python console (within a GRASS session) you would do something like: import os import grass.script as grass input_points = "<your point list>" ...


0

I tried to use rasterio and it didn't work with sgillies'example. I don't know why. For this reason, I used next code (gdal/struct), with a very simple raster (test.tif: 20x20, values between 1 and 50), to verify correct operation for value 15. from osgeo import gdal import struct nameraster = "test.tif" dataset = gdal.Open(nameraster) geotransform = ...


1

in qgis raster calculator, the comparison return 0 (if false) or 1 (if true). So you can write a conditional using a sum of products. ((raster1@1 >0.3) * raster1@1 * raster2@1 ) + ((raster1@1 <=0.3) * raster1@1 * raster3@1 )


0

Thank you both for your answers! I found the problem and solved it... it was related to the region resolution (I thought that the measurement unit for the field Grid resolution 2D was meter and I inserted the value 1 in that field because I wanted the region to have a 1m res, but printing the output I saw that the region had only 1 cell in that way... so I ...


0

Can you post the exact command you are using? It should be: v.to rast input=<your contour input vector> output=ctour_raster use=attr column=QUOTE_INT Then use the contour raster in r.surf.contour: r.surf.contour input=ctour_raster output=dem For more options you can read this wiki page


0

Did you follow the example from the GRASS wiki? Since you get a monochromatical raster I assume you have to apply r.colors. You can use e.g. srtm or terrain as color code. See also: http://grasswiki.osgeo.org/wiki/Color_tables


3

If you want to do that with PyQGIS, the def Val_raster(x,y,layer,bands,gt) of Python Script for getting elevation difference between two points becomes: def Val_raster(point,raster): return raster.dataProvider().identify(point,QgsRaster.IdentifyFormatValue).results().values() for point in points.getFeatures(): geompt = point.geometry().asPoint() ...


4

These are GRASS GIS standard commands: r3.out.vtk: r.out.vtk: v.out.vtk:


0

I am assuming that these small rings are "donut holes", or gaps within the polygon (and am mostly writing this for better search result hits, as the title is a bit ambiguous to me). My solution to this using GRASS GIS is as follows: # (optional before starting: clean features v.clean in=original_import out=original_map tool=bpol,rmdup v.build ...



Top 50 recent answers are included