GRASS GIS for ArcGIS users: Difference between revisions
⚠️Wenzeslaus (talk | contribs) (add 3D) |
⚠️Wenzeslaus (talk | contribs) (→Raster algebra: basic info) |
||
Line 19: | Line 19: | ||
== Raster algebra == | == Raster algebra == | ||
Current ArcGIS raster calculator syntax is based on Python and the actual implementation is in Python. In GRASS GIS the map algebra is available through {{cmd|r.mapcalc}} module or its convenient GUI wrapper ''Raster Map Calculator''. | |||
=== Quotes === | |||
In ArcGIS map algebra layer names must be quoted. In GRASS GIS, the quotes are optional and usually not used. There is few cases where it is necessary to use quotes and that is when raster map name contains dashes (which would be interpreted as minus operator). However, best practice is not to use dashes in map names at all (since map name should be ideally also usable without quoting in SQL). When writing Python script and you want it to be really robust. Then you may want to use quiting. | |||
=== Whitespace === | |||
In ArcGIS map algebra operators must be surrounded by spaces. In GRASS GIS, the spaces around operators are optional, however it is a best practice to use them. | |||
=== Functions === | |||
{| class="wikitable sortable" | |||
|- | |||
! ArcGIS | |||
! GRASS GIS | |||
! Notes | |||
|- | |||
| Con | |||
| if | |||
| | |||
|- | |||
| IsNull | |||
| isnull | |||
|- | |||
| Int | |||
| int | |||
| | |||
|- | |||
| Float | |||
| float, double | |||
| GRASS GIS has two floating point numeric types. First is single precision floating point number (float) with corresponding raster map type is FCELL. Second is double precision floating point number (double) with corresponding raster map type is DCELL. | |||
|} | |||
=== Further notes === | |||
Note that there are different algebras in GRASS GIS, namely it is 3D raster algebra which the same as the standard 2D one with few differences to accommodate 3D rasters and then it is temporal algebra which contains a lot of additional syntax to work with spatio-temporal data. | |||
== Cost analysis == | == Cost analysis == |
Revision as of 22:04, 20 August 2015
Projections
ArcGIS supports on-the-fly projection of spatial data while GRASS GIS considers this as a bad practice and requires user to have consistent projection for all the data entering the analysis.
Data, databases and file formats
In ArcGIS, users often have data in different directories on disk. GRASS GIS sets a specific system to organize the data. First, data must be in one directory called GRASS GIS database directory. You can have one or more of these directories on your disk. This directory contains GRASS Locations. All data in one Location have the same projection (coordinate system, datum). Location is a directory which contains GRASS Mapsets. Mapset contains raster and vector maps (layers) and other geospatial data.
Cartography
The standard display in GRASS GIS
3D visualization
In GRASS GIS, the 3D view is integrated into the main graphical user interface (GUI) while in ArcGIS suite, there is a separate tool ArcScene. The GRASS GIS library which is behind the 3D view is called NVIZ. The integration of NVIZ into GUI which is called wxGUI is called wxNVIZ. The 3D visualization is also available as a module called m.nviz.image (usable from command line or Python).
In GRASS GIS, when you are in 2D and you switch to 3D, all raster map layers are automatically added to the 3D view as surfaces. This means that if you have in 2D a digital elevation model, you will see it as a 3D visualization of terrain in 3D. The colors set will be the same colors as in 2D. This is different from ArcScene where the raster layer is initially flat and you have to specify in properties which raster should be used to create the surface.
Raster algebra
Current ArcGIS raster calculator syntax is based on Python and the actual implementation is in Python. In GRASS GIS the map algebra is available through r.mapcalc module or its convenient GUI wrapper Raster Map Calculator.
Quotes
In ArcGIS map algebra layer names must be quoted. In GRASS GIS, the quotes are optional and usually not used. There is few cases where it is necessary to use quotes and that is when raster map name contains dashes (which would be interpreted as minus operator). However, best practice is not to use dashes in map names at all (since map name should be ideally also usable without quoting in SQL). When writing Python script and you want it to be really robust. Then you may want to use quiting.
Whitespace
In ArcGIS map algebra operators must be surrounded by spaces. In GRASS GIS, the spaces around operators are optional, however it is a best practice to use them.
Functions
ArcGIS | GRASS GIS | Notes |
---|---|---|
Con | if | |
IsNull | isnull | |
Int | int | |
Float | float, double | GRASS GIS has two floating point numeric types. First is single precision floating point number (float) with corresponding raster map type is FCELL. Second is double precision floating point number (double) with corresponding raster map type is DCELL. |
Further notes
Note that there are different algebras in GRASS GIS, namely it is 3D raster algebra which the same as the standard 2D one with few differences to accommodate 3D rasters and then it is temporal algebra which contains a lot of additional syntax to work with spatio-temporal data.