1

I have a problem with export/import functionalities between Grass and QGis.

  1. I create a raster file in Grass (with r.wind.sun, but that most likely does not matter)
  2. It has the following properties:

    1: Value range in Grass from 0 to 100.

Important: Range of data min = 0.0[...] max= 100

  1. I export that raster with:

    r.out.gdal input=sample_input output=sample_output

The process decides to take float64 as datatype. And exits without an error. Beside the fact, that the color table cannot be written as described here.

  1. When I import that file to QGIS, the absolute values have changed:

enter image description here

So the value range changed from approx. 0-100 to 0.00-2.9.

As the mean and stdev state already: It is not an option to use integers only.

I tried to multiply the data with 10,000 in Grass, but after exporting I also get a value range between 0-3 in QGis.

What can I change in the process to keep the original value range?

0

Sounds like a user issue with your computational region: if you want to export the full map, be sure to set the computational region to the full map prior to export (g.region rast=your_rastermap -p). Then export.

Note that r.info reports the full map min/max while those of the actual computational region can differ from that. E.g., you have a DEM of Europe but set the computational region to Rome, hence in this case r.info will report the min/max of the full DEM while r.out.gdal only exports the Rome area which is way different. Just to illustrate the idea.

So the answer to "What can I change in the process to keep the original value range?" is that you want to set the computational region to the full map prior to exporting it.

BTW: I note that you have an "unfortunate" resolution of 0.9784..., perhaps you wanted 1.0 really?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.