[GRASS-user] Introducing myself and my first questions

Hi list,

I’ve just subscribed to this list as suggested by Daniel Lee (see mail send approx. 30 min. ago).

I’m a new user to GRASS GIS. I have some experience with ArcMap v9.3 and am a long-term user and developer of MapWindow GIS (www.mapwindow.org).

I’m mainly working on Windows, but I’m learning Ubuntu server.

On this Ubuntu server I have GeoServer with OpenLayers.

I’m working together with someone who’s made a nice model in ArcGIS.

I’m trying to convert this model to GRASS.

I’ve downloaded the Windows version of GRASS GIS 6.4.3RC2. When I have successfully converted the model to GRASS I plan to use the Ubuntu version. My Ubuntu server runs in the cloud so it is very easy to increase RAM and HD when I want to start calculating.

The current ArcMap version of the model is very labor-intensive, very slow, not very stable and very costly (license costs).

This model starts with a high-resolution DEM file. The first step is to calculate the solar radiation for the whole year. I have already converted the 39 w001001.adf files to a single GeoTiff using GDAL.

For testing purposes I’ve clipped a part. This part I’ll be using.

I’ve already understood I need r.sun and I need to calculate the radiation for each day.

On the ‘Required’ tab I select for ‘input raster map’ my clipped tiff file. For ‘no. day’ I set 1.

The ‘Input options’ tab already raises questions for me. For aspect and slope map in ArcMap FROM_DEM is used so I select my clipped tiff again. My area is located in The Netherlands so I use 90 for aspect. I don’t see something in ArcMap that looks like linkein so I leave this blank. The same for albedo. I’m not sure what to use for longin and latin. My tiff is projected (Amersfoort/RD_New). I’m not sure either what to use for coefbh, coefdh, horizon or horizonstep.

On the ‘Output options’ tab I’m completely puzzled. I would have expected to set file names but all I can do is select my clipped tif.

The ‘Optional’ tab. I want the calculation to use nearby houses, trees and chimneys so I check ‘s’. ‘step’ I keep as 0.5, assuming this is the same as ArcMap’s ‘hour interval’. I don’t know what declin or dist should be. For time Mode 1 is mentioned. What are the different modes?

For ArcMap I need to pass the Latitude. I can’t find that for r.sun.

I’ve attached a screenshot of the settings used for ArcMap.
Inline afbeelding 1

I’ve read the manual tab but a lot of knowledge is assumed which I don’t yet have :wink:

And I see some settings in ArcMap which I cannot map in GRASS.

So if anybody can help that would really be helpful.

Thanks,

Paul Meems

The Netherlands

Paul Meems:

Hi list,

Hi Paul :slight_smile:
  

I've just subscribed to this list as suggested by Daniel Lee (see mail send

approx. 30 min. ago).

Hope you'll njoy the quality of this list.

[..]

I didn't read your post completely -- not much of a free-time. However, I'd
like to point you to the respective GRASS-wiki page:

<http://grasswiki.osgeo.org/wiki/R.sun&gt;

Already checked?

Best, Nikos

Hi Paul,

Welcome to the list :slight_smile: Here are a couple of pointers:

···

2012/12/27 Paul Meems <bontepaarden@gmail.com>

The ‘Input options’ tab already raises questions for me. For aspect and slope map in ArcMap FROM_DEM is used so I select my clipped tiff again. My area is located in The Netherlands so I use 90 for aspect. I don’t see something in ArcMap that looks like linkein so I leave this blank. The same for albedo. I’m not sure what to use for longin and latin. My tiff is projected (Amersfoort/RD_New). I’m not sure either what to use for coefbh, coefdh, horizon or horizonstep.

For slope and aspect, you need to use maps of the slope and aspect in your study area. They can both be calculated with r.slope.aspect. Using 90 for aspect because you’re in the Netherlands doesn’t make sense since the aspect is the orientation of each sloped pixel - a hill in the Netherlands has north, east, south and west sides just like anywhere else.

I’ve heard that it’s possible to just leave these options blank and have r.sun calculate slope and aspect on the fly for you, but I’ve seen mixed reviews of that and have no personal experience in doing so since my company’s programs were written at a time when those options were required and - well, if I can, I don’t change a running system unless I’ve got a good reason to :slight_smile:

The projection of your tiff itself shouldn’t matter because GRASS doesn’t use the projection of single maps - you work inside a location and the location has a single location. This forces you to use one single coordinate system for your entire project, removing the temptation to do on-the-fly reprojection, which is a really, really good idea. If your projection doesn’t match that of your map, you didn’t import it right (you can check the projection using g.proj).

coefbh, coefdh, horizon and horizonstep can be left blank. coefbh and coefdh just help you make more realistic assessments - I’m not sure how realistic you need to be - and horizon and horizonstep are similar. You can read about them in the manual but if you’re not sure what to enter, I wouldn’t touch it.

On the ‘Output options’ tab I’m completely puzzled. I would have expected to set file names but all I can do is select my clipped tif.

GRASS doesn’t work with external files, it creates maps that it manages in an internal database. You just enter the names of the maps you want. If you need them as files later, you can export them.

The ‘Optional’ tab. I want the calculation to use nearby houses, trees and chimneys so I check ‘s’. ‘step’ I keep as 0.5, assuming this is the same as ArcMap’s ‘hour interval’. I don’t know what declin or dist should be. For time Mode 1 is mentioned. What are the different modes?

These are described pretty well in the manual. If you’re working with a headless Ubuntu server, just google it. All the GRASS manuals are available online. r.sun’s manual is located at http://grass.osgeo.org/grass64/manuals/r.sun.html.

For ArcMap I need to pass the Latitude. I can’t find that for r.sun.

You don’t need to in GRASS. ArcMap assumes the same latitude for the entire map (bad). GRASS computes the solar zenith and azimuth dependent on each pixel’s latitude (good).

Hope that helps!

Daniel

Thanks Daniel,

This really helps. I understand it more, not all :wink:

I started creating the slope and aspect files first using:

r.slope.aspect elevation=“w001001@temp” slope=“slope” aspect=“aspect” format=“degrees” prec=“float” zfactor=1.0 min_slp_allowed=0.0

But this didn’t work. It took 0 seconds and I got empty data files.

I can view my input file so I assume that it is good.

Reading the manual doesn’t give me any clues what I’m doing wrong.

My input file contains several houses so slope and aspect can be calculated.

Any new pointers are much appreciated.

···

Paul

Paul Meems
Release manager, configuration manager
and forum moderator of MapWindow GIS.
www.mapwindow.org

Owner of MapWindow.nl - Support for
Dutch speaking users.
www.mapwindow.nl

2012/12/27 Daniel Lee <lee@isi-solutions.org>

Hi Paul,

Welcome to the list :slight_smile: Here are a couple of pointers:

2012/12/27 Paul Meems <bontepaarden@gmail.com>

The ‘Input options’ tab already raises questions for me. For aspect and slope map in ArcMap FROM_DEM is used so I select my clipped tiff again. My area is located in The Netherlands so I use 90 for aspect. I don’t see something in ArcMap that looks like linkein so I leave this blank. The same for albedo. I’m not sure what to use for longin and latin. My tiff is projected (Amersfoort/RD_New). I’m not sure either what to use for coefbh, coefdh, horizon or horizonstep.

For slope and aspect, you need to use maps of the slope and aspect in your study area. They can both be calculated with r.slope.aspect. Using 90 for aspect because you’re in the Netherlands doesn’t make sense since the aspect is the orientation of each sloped pixel - a hill in the Netherlands has north, east, south and west sides just like anywhere else.

I’ve heard that it’s possible to just leave these options blank and have r.sun calculate slope and aspect on the fly for you, but I’ve seen mixed reviews of that and have no personal experience in doing so since my company’s programs were written at a time when those options were required and - well, if I can, I don’t change a running system unless I’ve got a good reason to :slight_smile:

The projection of your tiff itself shouldn’t matter because GRASS doesn’t use the projection of single maps - you work inside a location and the location has a single location. This forces you to use one single coordinate system for your entire project, removing the temptation to do on-the-fly reprojection, which is a really, really good idea. If your projection doesn’t match that of your map, you didn’t import it right (you can check the projection using g.proj).

coefbh, coefdh, horizon and horizonstep can be left blank. coefbh and coefdh just help you make more realistic assessments - I’m not sure how realistic you need to be - and horizon and horizonstep are similar. You can read about them in the manual but if you’re not sure what to enter, I wouldn’t touch it.

On the ‘Output options’ tab I’m completely puzzled. I would have expected to set file names but all I can do is select my clipped tif.

GRASS doesn’t work with external files, it creates maps that it manages in an internal database. You just enter the names of the maps you want. If you need them as files later, you can export them.

The ‘Optional’ tab. I want the calculation to use nearby houses, trees and chimneys so I check ‘s’. ‘step’ I keep as 0.5, assuming this is the same as ArcMap’s ‘hour interval’. I don’t know what declin or dist should be. For time Mode 1 is mentioned. What are the different modes?

These are described pretty well in the manual. If you’re working with a headless Ubuntu server, just google it. All the GRASS manuals are available online. r.sun’s manual is located at http://grass.osgeo.org/grass64/manuals/r.sun.html.

For ArcMap I need to pass the Latitude. I can’t find that for r.sun.

You don’t need to in GRASS. ArcMap assumes the same latitude for the entire map (bad). GRASS computes the solar zenith and azimuth dependent on each pixel’s latitude (good).

Hope that helps!

Daniel

Doing some more searching using Google and changing my keywords I found the answer to my own question below.

I need to call g.region rast=your_DEM to match my computational region first.

I did that and now I have slope and aspect files. It is still very fast (1 second) but the files look OK.

I will now continue with the rest.
Sorry for the noise. I’ll use Google more before posting :wink:

···

Paul

Paul Meems
Release manager, configuration manager
and forum moderator of MapWindow GIS.
www.mapwindow.org

Owner of MapWindow.nl - Support for
Dutch speaking users.
www.mapwindow.nl

2012/12/28 Paul Meems <bontepaarden@gmail.com>

Thanks Daniel,

This really helps. I understand it more, not all :wink:

I started creating the slope and aspect files first using:

r.slope.aspect elevation=“w001001@temp” slope=“slope” aspect=“aspect” format=“degrees” prec=“float” zfactor=1.0 min_slp_allowed=0.0

But this didn’t work. It took 0 seconds and I got empty data files.

I can view my input file so I assume that it is good.

Reading the manual doesn’t give me any clues what I’m doing wrong.

My input file contains several houses so slope and aspect can be calculated.

Any new pointers are much appreciated.

Paul

Paul Meems
Release manager, configuration manager
and forum moderator of MapWindow GIS.
www.mapwindow.org

Owner of MapWindow.nl - Support for
Dutch speaking users.
www.mapwindow.nl

2012/12/27 Daniel Lee <lee@isi-solutions.org>

Hi Paul,

Welcome to the list :slight_smile: Here are a couple of pointers:

2012/12/27 Paul Meems <bontepaarden@gmail.com>

The ‘Input options’ tab already raises questions for me. For aspect and slope map in ArcMap FROM_DEM is used so I select my clipped tiff again. My area is located in The Netherlands so I use 90 for aspect. I don’t see something in ArcMap that looks like linkein so I leave this blank. The same for albedo. I’m not sure what to use for longin and latin. My tiff is projected (Amersfoort/RD_New). I’m not sure either what to use for coefbh, coefdh, horizon or horizonstep.

For slope and aspect, you need to use maps of the slope and aspect in your study area. They can both be calculated with r.slope.aspect. Using 90 for aspect because you’re in the Netherlands doesn’t make sense since the aspect is the orientation of each sloped pixel - a hill in the Netherlands has north, east, south and west sides just like anywhere else.

I’ve heard that it’s possible to just leave these options blank and have r.sun calculate slope and aspect on the fly for you, but I’ve seen mixed reviews of that and have no personal experience in doing so since my company’s programs were written at a time when those options were required and - well, if I can, I don’t change a running system unless I’ve got a good reason to :slight_smile:

The projection of your tiff itself shouldn’t matter because GRASS doesn’t use the projection of single maps - you work inside a location and the location has a single location. This forces you to use one single coordinate system for your entire project, removing the temptation to do on-the-fly reprojection, which is a really, really good idea. If your projection doesn’t match that of your map, you didn’t import it right (you can check the projection using g.proj).

coefbh, coefdh, horizon and horizonstep can be left blank. coefbh and coefdh just help you make more realistic assessments - I’m not sure how realistic you need to be - and horizon and horizonstep are similar. You can read about them in the manual but if you’re not sure what to enter, I wouldn’t touch it.

On the ‘Output options’ tab I’m completely puzzled. I would have expected to set file names but all I can do is select my clipped tif.

GRASS doesn’t work with external files, it creates maps that it manages in an internal database. You just enter the names of the maps you want. If you need them as files later, you can export them.

The ‘Optional’ tab. I want the calculation to use nearby houses, trees and chimneys so I check ‘s’. ‘step’ I keep as 0.5, assuming this is the same as ArcMap’s ‘hour interval’. I don’t know what declin or dist should be. For time Mode 1 is mentioned. What are the different modes?

These are described pretty well in the manual. If you’re working with a headless Ubuntu server, just google it. All the GRASS manuals are available online. r.sun’s manual is located at http://grass.osgeo.org/grass64/manuals/r.sun.html.

For ArcMap I need to pass the Latitude. I can’t find that for r.sun.

You don’t need to in GRASS. ArcMap assumes the same latitude for the entire map (bad). GRASS computes the solar zenith and azimuth dependent on each pixel’s latitude (good).

Hope that helps!

Daniel

On Friday 28 December 2012 09:13:28 Paul Meems wrote:

Thanks Daniel,

This really helps. I understand it more, not all :wink:

I started creating the slope and aspect files first using:
r.slope.aspect elevation="w001001@temp" slope="slope" aspect="aspect"
format="degrees" prec="float" zfactor=1.0 min_slp_allowed=0.0
But this didn't work. It took 0 seconds and I got empty data files.
I can view my input file so I assume that it is good.
Reading the manual doesn't give me any clues what I'm doing wrong.

My input file contains several houses so slope and aspect can be calculated.

Any new pointers are much appreciated.

Did you set the computational region [0]?

to set the region to the elevation map, you can use the GUI, or type:

g.region rast="w001001@temp"

Pietro

[0] http://grasswiki.osgeo.org/wiki/Computational_region