AddOns: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
Line 70: Line 70:


===Vector add-ons===
===Vector add-ons===
* [http://geni.ath.cx/grass/v.out.gmt v.out.gmt] is a shell script that exports a polygon vector file into GMT xy file. psbasemap code was copied from Hamish's r.out.gmt. <BR>'''Author:''' Huidae Cho


* [http://geo4.uibk.ac.at/tilde/kindl/grass/v.strahler.tgz v.strahler] is a module that calculates the Strahler Order for all lines of a given dendritic network. <BR>'''Author:''' Florian Kindl
* [http://geo4.uibk.ac.at/tilde/kindl/grass/v.strahler.tgz v.strahler] is a module that calculates the Strahler Order for all lines of a given dendritic network. <BR>'''Author:''' Florian Kindl


* [http://svg.cc/grass/index.html v.out.svg] is a module that exports SVG notation along with optional attribute data directly from GRASS 6.x vector layers. <BR>'''Author:''' Klaus Förster
* [http://svg.cc/grass/index.html v.out.svg] is a module that exports SVG notation along with optional attribute data directly from GRASS 6.x vector layers. <BR>'''Author:''' Klaus Förster

Revision as of 03:51, 22 September 2006

This page contains references to user contributions and add-ons



Copyright and licensing information

Please be sure to include copyright and licensing information in the header comments of your code so that others may know how they can use, extend, modify, and redistribute your work.

e.g. at the top of a shell script:

#!/bin/sh
############################################################################
#
# MODULE:       v.in.e00
#
# AUTHOR(S):    Markus Neteler, Otto Dassau
#
# PURPOSE:      Import E00 data into a GRASS vector map
#               Imports single and split E00 files (.e00, .e01, .e02 ...)
#
# COPYRIGHT:    (c) 2004, 2005 GDF Hannover bR, http://www.gdf-hannover.de
#
#               This program is free software under the GNU General Public
#               License (>=v2). Read the file COPYING that comes with GRASS
#               for details.
#
#############################################################################
#
# REQUIREMENTS:
#      -  avcimport: http://avce00.maptools.org

[script follows]


Shell script coding standards

Please have a look at our Shell script coding standards before submitting here.


Miscellaneous Add-ons

  • utm_which_zone.sh is a shell script to determine UTM zone from Lat/Lon input. Requires Octave to be installed. A shell-only version is available which only requires awk.
    Authors: Hamish Bowman (Octave part), Markus Neteler (shell script wrapper), Daniel Calvelo (sh+awk version)


  • Perl scripts for converting data forth and back between Excel files and PostgreSQL: pg2xls.pl reads data from PostgreSQL and produces an excel workbook; xls2sql.pl reads excel files and outputs SQL statements to be fed into an RDBMS. Both scripts need modules from CPAN, especially Spreadsheet::ParseExcel for xls2sql.pl and Spreadsheet::WriteExcel::FromDB and its dependencies for pg2sql.pl. Check the source headers for more info.
    Authors: Daniel Calvelo (xls2sql.pl), Markus Neteler (pg2xls.pl)


  • dbf2sql is a Perl script for translating dbf-tables into a sql-command. dbf-tables are read using dbfdump-command from dbd-xbase-perl module (dbd::xbase and getopt::long have to be installed from CPAN first). There are problems, if the last column of the table contains characters. Suggestions for improvements welcome!
    Author:Wolfgang Qual


  • azimuth2.c is a small C program to calculate the azimuth and length of vector lines exported by GRASS-GIS as ASCII files (like this: v.out.ascii input=vector output=ascii format=standard). It is useful for create rose diagrams of lineament maps. Improvements on the original code after suggestions by Örs Téglásy, Hungary.
    Author: Carlos Henrique Grohmann

GRASS 5.x

Vector add-ons for GRASS 5

Raster add-ons for GRASS 5

  • r.gmtg The groundwater modelling tool for grass. A module to use MODFLOW within GRASS.
    Author: Jaime Carrera


GRASS 6.x

Vector add-ons

  • v.out.gmt is a shell script that exports a polygon vector file into GMT xy file. psbasemap code was copied from Hamish's r.out.gmt.
    Author: Huidae Cho


  • v.strahler is a module that calculates the Strahler Order for all lines of a given dendritic network.
    Author: Florian Kindl


  • v.out.svg is a module that exports SVG notation along with optional attribute data directly from GRASS 6.x vector layers.
    Author: Klaus Förster


  • v.trees3d is a module for making 3D trees from input vector point file.
    Author: Jachym Cepicky


  • v.lda is a shell script for calculating Ian Johnson's (U. Sidney) Local Density Analysis values to measure clustering of point data at different neighborhood radii. There is an option to create a simple line graph of the results. There have been reports of problems creating the line graph on Cygwin installations of GRASS.
    Author: Michael Barton


  • v.append is a shell script combining two vector files AND their associated attribute tables. The vector files should be of the same type and, for best results, should have identically formatted attribute tables.
    Author: Michael Barton


  • v.group generates a new vector map with the same geometry as an existing map. The new map has categories and a table based on grouping by the values in certain columns of the existing map's table. The values in these columns are preserved in the table for the new map. It's like a v.reclass that preserves data.
    Author: Cedric Shock


  • v.out.ascii.db is a shell script for exporting vector point data coordinates and selected attribute columns to either a file or to the console.
    Author: Hamish Bowman


  • v.rasterbounds is a shell script for creating polygon-vector file of rasterfile boundaries. The best version of GRASS is 6.1+. If you are using GRASS < 6.1, you have to be in the same mapset as your raster maps are from.
    Author: Jachym Cepicky


  • v.3Dtin is a shell script for making 3D-vector of the 2D ouput from v.delauny.
    Author: Jachym Cepicky


  • v.sample.buffer is a shell script that samples rasters in buffers of a specified size around features in a specified vector file. Sampling results are added as attributes to the vector file. This script was designed for sampling vegetation indices and DEM derived attributes for bird point counts. Sampling results can be one or more basic statistics such as mean, range, max, etc.
    Author: Trevor Wiens


  • v.variogram is a script that create an omnidirectional experimental semi-variogram. This scripts require R-statistics software installed on your machine.
    Author: Ivan Marchesini, Pierluigi De Rosa


  • v.krige is a script that do a surface interpolation from vector point data by Kriging method.The interpolated value of a cell is determined by using an omnidirectional variogram model fitted starting from model parameter given by user desumed from the experimental semi variogram produced by v.variogram.
    Author: Ivan Marchesini, Pierluigi De Rosa


  • v.lmeasure and v.revlmeasure are two perl scripts that place equidistant vector points along a given arbitrary vector line starting from the beginning or end of the vector line, respectively. Resulting vector points are labeled with the distance from origin.
    Author: Mats Schuh


  • v.swathwidth creates a vector map representing the sea bottom coverage of a multibeam (swath) sonar survey.
    Author: David Finlayson


  • v.flip flips the direction of selected vector lines.
    Author: Maciej Sieczka


  • v.digatt (shell script) Interactively assign numeric table attributes to series of vector objects. It is meant to be effective by avoiding to type in the attribute value for all single objects again and again. The user is prompted for typing in an attribute value which is assigned to all objects selected by mouseclick afterwards. Next the display is redrawn after updating the table column. Zooming allows to change the region before the old value can be reused or a new one can be typed in (or copied by mouse from another object) in order to assign it to the next series of objects etc. It is tested not very extensively yet. Therefore better work with a copy of your map and consider using v.digit or d.what.vect -e alternatively. screenshot.
    Author: Andreas Philipp


  • v.in.gama converts GNU GaMa XML output file to a GRASS vector map layer.
    Author: Martin Landa

Raster add-ons

  • r.roughness is a shell script to calculate the surface roughness of a DEM, using r.surf.area and v.surf.rst.
    Author: Carlos Henrique Grohmann


  • r.gauss is Gaussian and Laplacian of Gaussian filter for GRASS. It is written in C language.
    Author: Jachym Cepicky


  • r.mlv is Mean of least variance filter for GRASS. It is an edge-preserving (or even edge-enhacing) filter, which should serve for removing additive noise from images. It is written in C language.
    Author: Jachym Cepicky


  • r.bilateral Bilateral filter is an edge-preserving filter, which combines domain and range filtering. It is written in C language.
    Author: Jachym Cepicky


  • Zero crossing is a simple Perl script, finds the ,,zero crossings`` from the Laplacian of Gaussian filter (see above). It is really very simple, the edges don't need to be really on that pixel, where they are detected, no interpolation is performed.
    Author: Jachym Cepicky
    Usage:
    zc.pl -i input -o output |r.mapcalc


  • Local maxima is a Perl script for r.mapcalc. It detects local maxima of the image.
    Author: Jachym Cepicky
    Usage:
    local_maxima.pl -i input -o output -s matrix_size|r.mapcalc



  • r.pack and r.unpack are two GRASS scripts for transfering raster maps to another computer as a single file.
    Author: Hamish Bowman


  • dominant_dir.m and calc_terraflow_dir.m are two Matlab scripts for determining the dominant flow direction from a r.terraflow MFD map and converting into a GRASS aspect map for use with d.rast.arrow, etc.
    Author: Hamish Bowman


  • r.in.onearth for download and import satellite images direct from the NASA onearth WMS server into GRASS.
    Author: Soeren Gebbert


  • r.tileset generates a list of tiles and sizes in a source projection that cover the region in the current database with appropriate resolution. The size of individual tiles can be constrained. Only tiles intersecting the current region are returned. These tilings are appropriate for requesting data from another projection to meet the specifications of the current region. For example, it could be used to generate tile requests to a latitude / longitude WMS server like this r.tileset -w sourceproj="+init=epsg:4326".
    Author: Cedric Shock


  • r.csr integrates several Grass programs to produce colored, shaded-relief rasters in one step. Accepts single or multiple elevation/bathymetry maps as input; optionally will fill data holidays with 3x3 median filter, multiple times, if required; can apply color maps from a) input raster, b) another raster in MAPSET, or c) from a rules file; otherwise, rainbow colorbar is applied. Output colored, shaded-relief rasters can optionally be exported to tiff format and archived using tar with gzip/bzip2 compression if appropriate flags are given. Shading parameters can be modified, though useful defaults are given. (Right-click and choose 'Save Link As')
    Author: Eric Patton


  • r.fragment fragments a raster into a user-defined set of smaller tiles according to an input number of rows and columns. Optionally, a null value threshold can be set to filter out candidate tiles that would have a large percentage of null cells. (Right-click and choose 'Save Link As')
    Author: Eric Patton


  • r.eucdist creates a raster map estimating the euclidean distance from known cells.
    Author: David Finlayson


  • r.smoothpatch creates a composite of two rasters using a distance-weighted average across the transition to smooth the edges.
    Author: David Finlayson


  • r.li is meant to be a more flexible and faster replacement of the old r.le. Currently under development (help welcome).

Wiki page
Mailing list
Authors: Claudio Porta, Davide Spano, Serena Pallecchi, Faunalia


  • r.surf.nnbathy interpolates surface from rasterized input using nn natural neighbor intepolation library.
    Author: Maciej Sieczka


General add-ons

  • g.laptop.sh is an interactive shell script to extract raster and vector data from current Location into a new one. Data can be copied or extracted in current or original resolution and region extend. This script was written to extract smaller parts of a GRASS location to be able to present them on a laptop without the necessity to transfer huge data. Maps do not have to be in the same mapset.
    Author: Otto Dassau


  • Readline completion for GRASS commands under the bash shell: grass-complete won't clutter the environment but needs to be installed; grass_rlcompleter.sh needs almost no installation but will pollute the environment. Grass-Complete currently requires Bash version 2.05 for proper install.
    Author: Alexandre Sorokine (grass-complete), Daniel Calvelo (grass_rlcompleter.sh)


Imagery add-ons

  • i.atcorr Atmospheric Correction using Christo Zietsman's implementation of 6s code in C/C++. The Old Page was rescued by Christo recently and copied here. Compiled in CVS but not tested. Update: The source code is not yet functional in GRASS CVS, Adaptation is going-on.
    Author: Christo Zietsman


  • i.warp61 is a shell script that will use gdalwarp to rectify a raw input image using thin plate splines. The map should be imported into GRASS with r.in.gdal and GCPs set with i.points. Input is the raw image (GeoTIFF, JPEG, etc). Output is a GeoTIFF in the imagery group's target location's map projection. Requires a recent (early 2006) version of GRASS 6.1, or newer.
    Author: Hamish Bowman


Display add-ons

  • pd-GRASS: Parallel Display for GRASS GIS
    Author: Alex Sorokine

IconSymbols

  • Symbols which can be used with d.vect, d.graph, and ps.map.


  • d.frame.quarter is a shell script that will split the display into four quadrants using d.frame. Individual frames are named uno, dos, tres, cuatro, and full_screen.
    Author: Hamish Bowman


  • d.hyperlink is an interactive shell script that allows the viewing of hyperlinked images from a vector's attribute table in an external image viewer. Queries can be made via SQL statements or interactive mouse-clicking. The attribute table must be pre-populated with a column containing the image to link the vector to; the user also specifies the image folder in the current MAPSET where the images are located. The script currently supports gimp, Eye of Gnome, gthumb, gpdf, and Inkscape image viewers. (Right-click and choose 'Save Link As')
    Author: Eric Patton


  • d.stations is a shell script that quickly displays vector points (or sites for GRASS 5.4 and below).
    Author: Hamish Bowman


  • d.varea is a shell script that quickly displays vector areas.
    Author: Hamish Bowman

Postscript add-ons

  • ps.atlas is a shell script that makes more maps on current region according to input *.psmap file. General map can be stored as vector file. The resulting *.eps maps can be automatically converted to *.pdf files.
    Author: Jachym Cepicky



AreaFillPatterns

  • Hatches for ps.map's vareas

GRASS and UMN Mapserver