<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://grasswiki.osgeo.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=%E2%9A%A0%EF%B8%8FKrejcmat</id>
	<title>GRASS-Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://grasswiki.osgeo.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=%E2%9A%A0%EF%B8%8FKrejcmat"/>
	<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/wiki/Special:Contributions/%E2%9A%A0%EF%B8%8FKrejcmat"/>
	<updated>2026-05-26T05:27:32Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=GRASS_GIS_contributors_meetings_in_San_Michele/February_2016&amp;diff=22582</id>
		<title>GRASS GIS contributors meetings in San Michele/February 2016</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=GRASS_GIS_contributors_meetings_in_San_Michele/February_2016&amp;diff=22582"/>
		<updated>2016-02-23T19:29:46Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* Participants and reports */ add matej stuff&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Date ===&lt;br /&gt;
&lt;br /&gt;
15-20 February 2016&lt;br /&gt;
&lt;br /&gt;
=== Agenda ===&lt;br /&gt;
&lt;br /&gt;
====Community stuff:====&lt;br /&gt;
* plan https://grasswiki.osgeo.org/wiki/Paris_Code_Sprint_2016_Agenda&lt;br /&gt;
&lt;br /&gt;
====Time-based task:====&lt;br /&gt;
&lt;br /&gt;
* Wed morning - GIS.lab (Markus, Luca, Ludka, Martin, ...)&lt;br /&gt;
* Fri morning - OSM data -&amp;gt; Vector network analysis with turntable (Markus, Luca, Stepan, ...)&lt;br /&gt;
&lt;br /&gt;
====Raster:====&lt;br /&gt;
* discuss and ideally activate new raster compression scheme in &amp;quot;trunk&amp;quot; ({{trac|2750}})&lt;br /&gt;
** code: lib/raster/init.c, line 124&lt;br /&gt;
** Plan:&lt;br /&gt;
*** Null data are by default DEFLATE compressed: hence, if GRASS_COMPRESS_NULLS=1 or not defined at all. So, if the user sets GRASS_COMPRESS_NULLS to anything else than 1, Null data will not be compressed.&lt;br /&gt;
*** Note: Backward NULL file compression compatibility could be implemented in relbranch70 only by ZLIB's DEFLATE (see https://trac.osgeo.org/grass/ticket/2750#comment:36). Hence ZLIB may qualify for the default NULL compression algorithm. &lt;br /&gt;
&lt;br /&gt;
====Projections:====&lt;br /&gt;
&lt;br /&gt;
* issues postponed to [[Paris Code Sprint 2016 Agenda]]&lt;br /&gt;
&lt;br /&gt;
====Core:====&lt;br /&gt;
* Kickstart of GRASS with LatLong predefined, open import wizard | switch projection&lt;br /&gt;
&lt;br /&gt;
====QA:====&lt;br /&gt;
* integrate &amp;quot;coverity scan&amp;quot; with Travis, https://scan.coverity.com/travis_ci&lt;br /&gt;
* check &amp;quot;coverity scan&amp;quot;: copy-paste errors, https://scan.coverity.com/projects/1038&lt;br /&gt;
&lt;br /&gt;
====winGRASS:====&lt;br /&gt;
* install https://icl.cs.utk.edu/lapack-for-windows/ or https://www.scipy.org/scipylib/building/windows.html#blas-lapack-and-atlas&lt;br /&gt;
&lt;br /&gt;
====Web CMS:====&lt;br /&gt;
* discuss CMS migration to Wordpress&lt;br /&gt;
&lt;br /&gt;
====OSM data -&amp;gt; Vector network analysis with turntable====&lt;br /&gt;
* Add turntable support for OSM data&lt;br /&gt;
* discuss: How the whole solution should look like?&lt;br /&gt;
====Addons:====&lt;br /&gt;
&lt;br /&gt;
* Update include/Make to reflect Addons with libs&lt;br /&gt;
&lt;br /&gt;
=== Participants and reports ===&lt;br /&gt;
&lt;br /&gt;
* Martin Landa&lt;br /&gt;
* Ludmila&lt;br /&gt;
&lt;br /&gt;
* Matej&lt;br /&gt;
&lt;br /&gt;
==== Luca ====&lt;br /&gt;
* closed tickets {{trac|2261}} {{trac|2319}} {{trac|2912}}&lt;br /&gt;
* started to work on {{trac|2294}}.... continue in [[GRASS Community Sprint Paris 2016|Paris]]&lt;br /&gt;
&lt;br /&gt;
==== Markus ====&lt;br /&gt;
&lt;br /&gt;
* Developed https://grasswiki.osgeo.org/wiki/Community_Sprint_Funding along with Martin and Luca&lt;br /&gt;
* checked {{trac|2916}} - Arch configure issue&lt;br /&gt;
&lt;br /&gt;
==== Martin ====&lt;br /&gt;
&lt;br /&gt;
* Various Graphical Modeler improvements (collaboration with Ludmila) - {{trac|2782}}, {{trac|2904}}&lt;br /&gt;
* Vagrant improvements&lt;br /&gt;
* Various wxGUI improvements and fixes&lt;br /&gt;
* Element name issue (3d-raster to raster_3d)&lt;br /&gt;
* wxGUI data catalog fixes and improvements (copy, rename, delete maps)&lt;br /&gt;
* Fix wxGUI addons handling (when addons contains more commands) &lt;br /&gt;
* Fix g.extension compilation of r.green addons&lt;br /&gt;
* winGRASS: switch to GDAL 2.0&lt;br /&gt;
* [https://trac.osgeo.org/grass/timeline?from=Feb+21%2C+2016&amp;amp;daysback=7&amp;amp;authors=martinl&amp;amp;milestone=on&amp;amp;ticket=on&amp;amp;changeset=on&amp;amp;wiki=on&amp;amp;update=Update Logs overview]&lt;br /&gt;
&lt;br /&gt;
==== Matej ====&lt;br /&gt;
* Started with the [https://github.com/krejcmat/grass-hdfs package] for handling [https://github.com/Esri/spatial-framework-for-hadoop/wiki The Spatial Framework for Hadoop] with using GRASS &lt;br /&gt;
* Fixing configuration of [https://github.com/krejcmat/hadoop-spatial-framework-docker hadoop-spatial-framework-docker]&lt;br /&gt;
&lt;br /&gt;
==== Stepan ====&lt;br /&gt;
* worked on modification of db library to allow proper work with 64bit integers  (not yet commited needs discussion)&lt;br /&gt;
* created init version of v.in.osm module  {{rev|67912}} by turek&lt;br /&gt;
* created draft (not yet commited) of v.db.category module to build category crosstable between two layers&lt;br /&gt;
* worked on worflow OSM data -&amp;gt; GRASS -&amp;gt;  v.net.* analyses with turntable&lt;br /&gt;
&lt;br /&gt;
=== Photos ===&lt;br /&gt;
&lt;br /&gt;
[[Image:GRASS GIS contributors meetings in San Michele February 2016.jpg|400px]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Workshops]]&lt;br /&gt;
[[Category: Code Sprint]]&lt;br /&gt;
[[Category: 2016]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install&amp;diff=22356</id>
		<title>Compile and Install</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install&amp;diff=22356"/>
		<updated>2016-02-06T18:30:22Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* GRASS 7 on Debian Wheezy */ Add python-gdal dependency&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- {{MoveToTrac}} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Disclaimer''': This page explains how to turn the GRASS GIS source code into an installable binary package (&amp;quot;compilation&amp;quot;) for different operating systems. If you just want to get ready-to-use binaries, go [http://grass.osgeo.org/download/ here], otherwise read on...&lt;br /&gt;
&lt;br /&gt;
== How to do compilation and installation of GRASS GIS? ==&lt;br /&gt;
&lt;br /&gt;
Here we explain the procedure to compile GRASS from SVN, but it also applies to official GRASS 6 releases.&lt;br /&gt;
&lt;br /&gt;
''For installation of precompiled binary packages, see the main [[Installation Guide]].''&lt;br /&gt;
&lt;br /&gt;
For detailed information on compilation, please see the [http://grass.osgeo.org/grass64/source/INSTALL INSTALL] file in the source code.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
==== Extra libraries ====&lt;br /&gt;
GRASS needs at least two extra libraries: PROJ and GDAL/OGR&lt;br /&gt;
&lt;br /&gt;
''Note: if you want to have DBMS support in GDAL (subsequently in GRASS) you have to perform the &amp;quot;Optional&amp;quot; steps below as well.''&lt;br /&gt;
&lt;br /&gt;
* [http://trac.osgeo.org/proj/ PROJ4] for management of projections (with proj-datumgrid-1.3.zip support)&lt;br /&gt;
* Optional: [http://trac.osgeo.org/geos/ GEOS]&lt;br /&gt;
* Optional: [http://www.postgresql.org PostgreSQL], [http://www.mysql.org mySQL], [http://www.unixodbc.org unixODBC], [http://www.sqlite.org SQLite] (SQLite is needed for [[QGIS]])&lt;br /&gt;
* [http://www.gdal.org GDAL/OGR] for reading and writing various GIS data formats (interoperability)&lt;br /&gt;
&lt;br /&gt;
You have to install these two libraries '''first''' (see below how to get them precompiled for your system).&lt;br /&gt;
&lt;br /&gt;
It is easiest to obtain a prepackaged version of these libraries (e.g., .rpm; .deb) for your particular operating system and run the corresponding package installation (e.g., rpm -Uhv packagename.rpm; apt-get) in a terminal window. Take care to also install the development packages of these libraries (...-devel packages). If there is no prepackage version, then you will have to download the source code (see links above, source code packages usually ends in .tar.gz or .zip) and compile it (you must have a C compiler installed as part of your operating system). The Web sites show the steps to compile the libraries.&lt;br /&gt;
&lt;br /&gt;
Other libraries needed to run GRASS are listed on the {{website|grass64/source/REQUIREMENTS.html|requirements page}}.&lt;br /&gt;
&lt;br /&gt;
To compile, you will also need the respective &amp;quot;-devel&amp;quot; packages.&lt;br /&gt;
&lt;br /&gt;
==== Download GRASS GIS source code ====&lt;br /&gt;
Then [http://grass.osgeo.org/download/software/sources/ download the GRASS GIS source code] of course.&lt;br /&gt;
&lt;br /&gt;
=== Generic Compilation and installation procedure ===&lt;br /&gt;
&lt;br /&gt;
* It is wise that compilation processes are carried out as a normal user: If you want to get the source code in a place where  you do not have write permissions (e.g. in /usr/local/src/) just follow this:&lt;br /&gt;
      cd /usr/local/src/ &lt;br /&gt;
      su -c 'mkdir grass6'&lt;br /&gt;
      su -c 'chown yourlogin:yourgroup grass6'&lt;br /&gt;
&lt;br /&gt;
Otherwise if you have permissions just continue as a normal user:&lt;br /&gt;
      cd /usr/local/src/&lt;br /&gt;
      svn checkout ...&lt;br /&gt;
&lt;br /&gt;
* do a code checkout from the SVN source code repository&lt;br /&gt;
: checkout the latest GRASS 6.x from SVN (see: {{twiki|DownloadSource}})&lt;br /&gt;
&lt;br /&gt;
* in the grass6 directory, you will find the precious INSTALL file, open it with your favourite pager/editor and read it carefully!&lt;br /&gt;
&lt;br /&gt;
* run configure with parameters to adapt the compile process to your own system. To see what options can be passed to it, run:&lt;br /&gt;
 ./configure --help | less &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The minimum set of configure parameters is &lt;br /&gt;
      ./configure ### --&amp;gt;&lt;br /&gt;
It may (!) look like this:&lt;br /&gt;
 &lt;br /&gt;
      ./configure \&lt;br /&gt;
          --with-cxx \&lt;br /&gt;
          --with-sqlite \&lt;br /&gt;
          --with-postgres-libs=/usr/include/pgsql/libpq \&lt;br /&gt;
          --with-postgres-includes=/usr/include/pgsql \&lt;br /&gt;
          --with-freetype \&lt;br /&gt;
          --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
          --with-motif \&lt;br /&gt;
          --with-proj-share=/usr/share/proj&lt;br /&gt;
&lt;br /&gt;
You may have to explicitly state the path for certain packages (i.e., gdal). The Unix 'locate' command will come in handy for finding the path of the package you need (you may have to run locate as root ex: sudo locate gdal-config).&lt;br /&gt;
&lt;br /&gt;
Please note that the paths mentioned may widely vary due to the distribution used.&lt;br /&gt;
See [[Compile_and_Install#Platform_Specific_Notes|Platform Specific Notes]] below.&lt;br /&gt;
&lt;br /&gt;
Depending on your needs it may be a good idea to include debugging hooks.&lt;br /&gt;
: See [[GRASS_Debugging#Compile_Time_Setup]].&lt;br /&gt;
 CFLAGS=&amp;quot;-ggdb -Wall -Werror-implicit-function-declaration&amp;quot; ./configure ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the end of configuration process you should get report not much different from this:&lt;br /&gt;
&lt;br /&gt;
GRASS is now configured for:  i686-pc-linux-gnu&lt;br /&gt;
 &lt;br /&gt;
 Source directory:            /usr/src/grass6&lt;br /&gt;
 Build directory:             /usr/src/grass6&lt;br /&gt;
 Installation directory:      /usr/local/grass-6.3.svn&lt;br /&gt;
 Startup script in directory: ${exec_prefix}/bin&lt;br /&gt;
 C compiler:                  gcc -g -O2 &lt;br /&gt;
 C++ compiler:                c++ -g -O2&lt;br /&gt;
 FORTRAN compiler:            &lt;br /&gt;
 Building shared libraries:   yes&lt;br /&gt;
 64bit support:               no&lt;br /&gt;
 &lt;br /&gt;
  NVIZ:                       yes&lt;br /&gt;
 &lt;br /&gt;
  BLAS support:               no&lt;br /&gt;
  C++ support:                yes&lt;br /&gt;
  DWG support:                no&lt;br /&gt;
  FFMPEG support:             no&lt;br /&gt;
  FFTW support:               yes&lt;br /&gt;
  FreeType support:           yes&lt;br /&gt;
  GDAL support:               yes&lt;br /&gt;
  GLw support:                no&lt;br /&gt;
  LAPACK support:             no&lt;br /&gt;
  Large File Support (LFS):   no&lt;br /&gt;
  Motif support:              no&lt;br /&gt;
  MySQL support:              no&lt;br /&gt;
  NLS support:                no&lt;br /&gt;
  ODBC support:               no&lt;br /&gt;
  OGR support:                yes&lt;br /&gt;
  OpenGL(R) support:          yes&lt;br /&gt;
  PNG support:                yes&lt;br /&gt;
  PostgreSQL support:         yes&lt;br /&gt;
  Readline support:           no&lt;br /&gt;
  SQLite support:             no&lt;br /&gt;
  Tcl/Tk support:             yes&lt;br /&gt;
  TIFF support:               yes&lt;br /&gt;
  X11 support:                yes&lt;br /&gt;
  &lt;br /&gt;
* Let's compile it (takes a little while...)!&lt;br /&gt;
      make&lt;br /&gt;
* At the end, you should get report not much different from this:&lt;br /&gt;
 ----------------------------------------------------------------------&lt;br /&gt;
 Following modules are missing the 'description.html' file in src code:&lt;br /&gt;
 ----------------------------------------------------------------------&lt;br /&gt;
 GRASS GIS compilation log&lt;br /&gt;
 -------------------------&lt;br /&gt;
 Started compilation: Ne kvě 28 13:18:43 CEST 2006&lt;br /&gt;
 --&lt;br /&gt;
 Errors in:&lt;br /&gt;
 --&lt;br /&gt;
 Finished compilation: Ne kvě 28 13:43:40 CEST 2006&lt;br /&gt;
 (In case of errors please change into the directory with error and run 'make')&lt;br /&gt;
&lt;br /&gt;
* If there is any error, change directory to directory with error and run &amp;quot;make&amp;quot; again. Report occuring bug to grass mailing list&lt;br /&gt;
* Once the installation process is finished, you're ready to install GRASS system wide.&lt;br /&gt;
      su -c 'make install'&lt;br /&gt;
* enjoy GRASS: &lt;br /&gt;
      grass64&lt;br /&gt;
&lt;br /&gt;
=== What else? ===&lt;br /&gt;
&lt;br /&gt;
If you want to use [http://www.qgis.org QGIS], then also compile the GRASS-GDAL/OGR plugin. This is also useful to access your GRASS-data&lt;br /&gt;
from other application using GDAL/OGR like [http://thuban.intevation.de thuban].&lt;br /&gt;
* [[Compile and install GRASS and QGIS with GDAL/OGR Plugin]] (enables QGIS to read GRASS data directly)&lt;br /&gt;
&lt;br /&gt;
=== Compile and install GDAL-GRASS plugin ===&lt;br /&gt;
&lt;br /&gt;
* See [[Compile and install GDAL-GRASS plugin]]&lt;br /&gt;
&lt;br /&gt;
=== Platform Specific Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Linux ====&lt;br /&gt;
&lt;br /&gt;
Linux cames in various flavours, i.e. distributions.&lt;br /&gt;
&lt;br /&gt;
===== Debian =====&lt;br /&gt;
&lt;br /&gt;
Read the instructions here:&lt;br /&gt;
: http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/debian/README.debian&lt;br /&gt;
&lt;br /&gt;
   # first install PROJ, GDAL, etc.&lt;br /&gt;
   cd grass64/&lt;br /&gt;
   # follow instructions in debian/README.debian&lt;br /&gt;
   fakeroot buildpackage&lt;br /&gt;
&lt;br /&gt;
* Official [http://wiki.debian.org/DebianGis DebianGIS] packaging control files:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strike&amp;gt;&lt;br /&gt;
  http://svn.debian.org/viewsvn/pkg-grass/packages/grass/&lt;br /&gt;
  svn co svn://svn.debian.org/svn/pkg-grass/packages/grass/trunk/&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  svn co svn://svn.debian.org/svn/pkg-grass/packages/grass/branches/&amp;lt;GRASS Version&amp;gt;&lt;br /&gt;
&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Available on git server:&lt;br /&gt;
  git://git.debian.org/git/pkg-grass/grass.git&lt;br /&gt;
&lt;br /&gt;
  http://anonscm.debian.org/cgit/pkg-grass/grass.git/&lt;br /&gt;
&lt;br /&gt;
====== GRASS 6.1 on Debian Sarge ======&lt;br /&gt;
&lt;br /&gt;
* [http://hamish.bowman.googlepages.com/debiangisfiles#compile Compiling GRASS 6.1-CVS on Debian/OldStable (aka 3.1, Sarge)]&lt;br /&gt;
&lt;br /&gt;
====== GRASS 6.4 on Debian Lenny ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
  apt-get install flex bison libreadline-dev libncurses5-dev lesstif2-dev debhelper dpatch libtiff4-dev \&lt;br /&gt;
          tcl-dev tk-dev libfftw3-dev libxmu-dev libfreetype6-dev autoconf2.13 autotools-dev doxygen \&lt;br /&gt;
          libmysqlclient15-dev graphviz libsqlite3-dev python-wxgtk2.8 libcairo2-dev libwxgtk2.8-dev \&lt;br /&gt;
          python-dev libgdal1-dev  libgdal1-1.5.0 libproj-dev libproj0 proj-data mysql&lt;br /&gt;
&lt;br /&gt;
# Important: avoid using CFLAGS=&amp;quot;... -Werror-implicit-function-declaration&amp;quot; (also on later Debian versions), see {{trac|1684}}&lt;br /&gt;
&lt;br /&gt;
Configure:&lt;br /&gt;
  ./configure \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-postgres --with-postgres-includes=/usr/include/postgresql \&lt;br /&gt;
  --with-mysql --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib/mysql \&lt;br /&gt;
  --with-odbc \&lt;br /&gt;
  --with-cairo \&lt;br /&gt;
  --with-proj-share=/usr/share/proj \&lt;br /&gt;
  --with-tcltk-includes=/usr/include/tcl8.4/ \&lt;br /&gt;
  --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
  --with-motif --with-fftw --with-nls --with-python \&lt;br /&gt;
  --with-x --x-libraries=/usr/lib/x86_64-linux-gnu&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
  sudo make install&lt;br /&gt;
&lt;br /&gt;
====== GRASS 6.4 on Debian Jessie ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
  apt-get install flex bison debhelper dpatch autoconf2.13 autotools-dev \&lt;br /&gt;
    python-dev g++ gcc gettext graphviz libcairo2-dev libfftw3-dev tcl-dev tk-dev \&lt;br /&gt;
    libfreetype6-dev libgdal1h libgdal1-dev libglu1-mesa-dev libglw1-mesa-dev \&lt;br /&gt;
    libncurses5-dev libreadline-dev libsqlite3-dev libtiff5-dev \&lt;br /&gt;
    libwxgtk3.0-dev libxmu-dev libxmu-headers libxt-dev mesa-common-dev \&lt;br /&gt;
    libproj-dev proj-bin python-numpy python-wxgtk3.0 subversion wx-common zlib1g-dev \&lt;br /&gt;
    netcdf-bin libnetcdf-dev libatlas-dev libgegl-dev doxygen postgresql mysql-server \&lt;br /&gt;
    libgeotiff-dev libblas-dev libgeotiff-epsg libxmu-dev libxt-dev libx11-dev&lt;br /&gt;
&lt;br /&gt;
# Important: avoid using CFLAGS=&amp;quot;... -Werror-implicit-function-declaration&amp;quot; (also on later Debian versions), see {{trac|1684}}&lt;br /&gt;
&lt;br /&gt;
Configure:&lt;br /&gt;
  ./configure \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-postgres \&lt;br /&gt;
  --with-odbc \&lt;br /&gt;
  --with-cairo \&lt;br /&gt;
  --with-geos \&lt;br /&gt;
  --with-proj-share=/usr/share/proj \&lt;br /&gt;
  --with-tcltk-includes=/usr/include/tcl8.6/ \&lt;br /&gt;
  --with-mysql --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib/mysql \&lt;br /&gt;
  --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
  --with-motif \&lt;br /&gt;
  --with-fftw \&lt;br /&gt;
  --with-nls \&lt;br /&gt;
  --with-postgres-includes=/usr/include/postgresql \&lt;br /&gt;
  --with-python \&lt;br /&gt;
  --with-x --x-libraries=/usr/lib/x86_64-linux-gnu&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
  sudo make install&lt;br /&gt;
&lt;br /&gt;
====== GRASS 7 on Debian Squeeze ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
 apt-get install flex bison debhelper dpatch autoconf2.13 autotools-dev python-dev \&lt;br /&gt;
     g++ gcc gettext graphviz libcairo2-dev libfftw3-dev libfreetype6-dev \&lt;br /&gt;
     libgdal1 libgdal1-dev libglu1-mesa-dev libglw1-mesa-dev \&lt;br /&gt;
     libncurses5-dev libproj-dev libreadline-dev libsqlite3-dev libtiff4-dev \&lt;br /&gt;
     libwxgtk2.8-dev libxmu-dev libxmu-headers libxt-dev mesa-common-dev \&lt;br /&gt;
     proj-bin python-numpy python-wxgtk2.8 subversion wx-common zlib1g-dev&lt;br /&gt;
&lt;br /&gt;
Download source code:&lt;br /&gt;
&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
Configure:&lt;br /&gt;
 &lt;br /&gt;
 cd grass_trunk/&lt;br /&gt;
 CFLAGS=&amp;quot;-Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused&amp;quot; \&lt;br /&gt;
 CXXFLAGS=&amp;quot;-Wall&amp;quot;  \&lt;br /&gt;
  ./configure --prefix=/usr/local \&lt;br /&gt;
  --with-gdal --with-proj --with-proj-share=/usr/share \&lt;br /&gt;
  --with-glw --with-nls --with-readline \&lt;br /&gt;
  --without-tcltk \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-cairo --with-python=/usr/bin/python2.6-config --with-wxwidgets \&lt;br /&gt;
  --with-geos --with-pthread&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
  sudo make install  # installs as /usr/local/bin/grass71&lt;br /&gt;
&lt;br /&gt;
====== GRASS 7 on Debian Wheezy ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
&lt;br /&gt;
 # note: cmake and libboost-all-dev only needed for optional libLAS&lt;br /&gt;
 sudo apt-get install cmake libboost-all-dev&lt;br /&gt;
 &lt;br /&gt;
 sudo apt-get install flex bison debhelper dpatch autoconf2.13 autotools-dev \&lt;br /&gt;
   python-dev g++ gcc gettext graphviz libcairo2-dev libfftw3-dev libfreetype6-dev \&lt;br /&gt;
   libgdal1 libgdal1-dev libglu1-mesa-dev libglw1-mesa-dev libncurses5-dev libproj-dev \&lt;br /&gt;
   libreadline-dev libtiff4-dev libwxgtk2.8-dev libxmu-dev libxmu-headers \&lt;br /&gt;
   libxt-dev mesa-common-dev proj-bin python-numpy python-wxgtk2.8 subversion wx-common \&lt;br /&gt;
   zlib1g-dev netcdf-bin libatlas-dev libgegl-dev opencl-headers ocl-icd-libopencl1 \&lt;br /&gt;
   libsqlite3-dev postgresql python-sphinx python-gdal&lt;br /&gt;
&lt;br /&gt;
Download and Install libLAS&lt;br /&gt;
 wget http://download.osgeo.org/liblas/libLAS-1.7.0.tar.gz&lt;br /&gt;
 tar -zxvf libLAS-1.7.0.tar.gz&lt;br /&gt;
 cd libLAS-1.7.0/&lt;br /&gt;
 mkdir makefiles&lt;br /&gt;
 cd makefiles&lt;br /&gt;
 cmake -G &amp;quot;Unix Makefiles&amp;quot; ../&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
 sudo ldconfig&lt;br /&gt;
 cd ../..&lt;br /&gt;
&lt;br /&gt;
Download of GRASS GIS 7 source code:&lt;br /&gt;
 wget http://grass.osgeo.org/grass70/source/grass-7.0.0.tar.gz&lt;br /&gt;
 tar -zxvf grass-7.0.0.tar.gz&lt;br /&gt;
&lt;br /&gt;
Configure:&lt;br /&gt;
 cd grass-7.0.0&lt;br /&gt;
 CFLAGS=&amp;quot;-g -Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused&amp;quot; CXXFLAGS=&amp;quot;-g -Wall&amp;quot; \&lt;br /&gt;
 ./configure \&lt;br /&gt;
    --prefix=/usr/local \&lt;br /&gt;
    --with-gdal \&lt;br /&gt;
    --with-proj --with-proj-share=/usr/share \&lt;br /&gt;
    --with-glw --with-nls --with-readline \&lt;br /&gt;
    --with-cxx --enable-largefile \&lt;br /&gt;
    --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
    --with-sqlite --with-cairo --with-python=/usr/bin/python-config \&lt;br /&gt;
    --with-wxwidgets --with-geos --with-blas \&lt;br /&gt;
    --with-lapack-includes=/usr/lib/lapack --with-liblas=yes \&lt;br /&gt;
    --with-netcdf=/usr/bin/nc-config --with-odbc=yes \&lt;br /&gt;
    --with-openmp=yes --with-pthread=yes --with-postgres=yes \&lt;br /&gt;
    --with-postgres-includes=/usr/include/postgresql \&lt;br /&gt;
    --with-postgres-libs=/usr/lib/postgresql&lt;br /&gt;
 &lt;br /&gt;
 #     --with-mysql=yes --with-mysql-includes=/usr/include/mysql \&lt;br /&gt;
 #    --with-mysql-libs=/usr/lib/mysql \&lt;br /&gt;
&lt;br /&gt;
GRASS GIS 7 is now configured (example):&lt;br /&gt;
&lt;br /&gt;
  Source directory:           /home/user/grass-7.0.0&lt;br /&gt;
  Build directory:            /home/user/grass-7.0.0&lt;br /&gt;
  Installation directory:     ${prefix}/grass-7.0.0&lt;br /&gt;
  Startup script in directory:${exec_prefix}/bin&lt;br /&gt;
  C compiler:                 gcc -g -Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused &lt;br /&gt;
  C++ compiler:               c++ -g -Wall&lt;br /&gt;
  Building shared libraries:  yes&lt;br /&gt;
  OpenGL platform:            X11&lt;br /&gt;
  MacOSX application:         no&lt;br /&gt;
  MacOSX architectures:       &lt;br /&gt;
  MacOSX SDK:                 &lt;br /&gt;
  BLAS support:               yes&lt;br /&gt;
  C++ support:                yes&lt;br /&gt;
  Cairo support:              yes&lt;br /&gt;
  DWG support:                no&lt;br /&gt;
  FFTW support:               yes&lt;br /&gt;
  FreeType support:           yes&lt;br /&gt;
  GDAL support:               yes&lt;br /&gt;
  GEOS support:               yes&lt;br /&gt;
  LAPACK support:             no&lt;br /&gt;
  Large File support (LFS):   yes&lt;br /&gt;
  libLAS support:             yes&lt;br /&gt;
  MySQL support:              no&lt;br /&gt;
  NetCDF support:             yes&lt;br /&gt;
  NLS support:                yes&lt;br /&gt;
  ODBC support:               yes&lt;br /&gt;
  OGR support:                yes&lt;br /&gt;
  OpenCL support:             no&lt;br /&gt;
  OpenGL support:             yes&lt;br /&gt;
  OpenMP support:             yes&lt;br /&gt;
  PNG support:                yes&lt;br /&gt;
  POSIX thread support:       yes&lt;br /&gt;
  PostgreSQL support:         yes&lt;br /&gt;
  Readline support:           yes&lt;br /&gt;
  Regex support:              yes&lt;br /&gt;
  SQLite support:             yes&lt;br /&gt;
  TIFF support:               yes&lt;br /&gt;
  wxWidgets support:          yes&lt;br /&gt;
  X11 support:                no&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
 make -j2&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
 sudo make install   # installs as /usr/local/bin/grass70&lt;br /&gt;
&lt;br /&gt;
Launch:&lt;br /&gt;
 grass70&lt;br /&gt;
&lt;br /&gt;
====== GRASS 7 on Debian Jessie ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
 sudo apt-get install cmake libboost-all-dev flex bison debhelper dpatch autoconf2.13 \&lt;br /&gt;
    autotools-dev python-dev g++ gcc gettext graphviz libcairo2-dev libfftw3-dev \&lt;br /&gt;
    libfreetype6-dev libgdal1h libgdal1-dev libglu1-mesa-dev libglw1-mesa-dev \&lt;br /&gt;
    libncurses5-dev libproj-dev libreadline-dev libsqlite3-dev libtiff5-dev \&lt;br /&gt;
    libwxgtk3.0-dev libxmu-dev libxmu-headers libxt-dev mesa-common-dev \&lt;br /&gt;
    proj-bin python-numpy python-wxgtk3.0 subversion wx-common zlib1g-dev \&lt;br /&gt;
    netcdf-bin libnetcdf-dev libgegl-dev  doxygen python-sphinx \&lt;br /&gt;
    postgresql libgeotiff-dev libblas-dev mysql-server \&lt;br /&gt;
    libatlas-dev libblas-dev liblapack3gf liblapack-dev&lt;br /&gt;
    # opencl-headers ocl-icd-libopencl1   liblas-bin liblas-c-dev python-gdal&lt;br /&gt;
&lt;br /&gt;
Download and compile libLAS (or simply install 'liblas-c-dev ', see above):&lt;br /&gt;
 wget http://download.osgeo.org/liblas/libLAS-1.8.0.tar.bz2&lt;br /&gt;
 tar xjf libLAS-1.8.0.tar.bz2&lt;br /&gt;
 mkdir libLAS-1.8.0/makefiles&lt;br /&gt;
 cd libLAS-1.8.0/makefiles&lt;br /&gt;
 cmake -G &amp;quot;Unix Makefiles&amp;quot; ../&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
Download and compile GRASS 7:&lt;br /&gt;
 # (check there for later version)&lt;br /&gt;
 wget http://grass.osgeo.org/grass70/source/grass-7.0.0.tar.gz&lt;br /&gt;
 tar xzfv grass-7.0.0.tar.gz&lt;br /&gt;
 cd grass-7.0.0&lt;br /&gt;
 CFLAGS=&amp;quot;-g -Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused&amp;quot; \&lt;br /&gt;
 CXXFLAGS=&amp;quot;-g -Wall&amp;quot;  \&lt;br /&gt;
 ./configure \&lt;br /&gt;
    --prefix=/usr/local \&lt;br /&gt;
    --with-gdal --with-proj --with-proj-share=/usr/share \&lt;br /&gt;
    --with-glw --with-nls --with-readline \&lt;br /&gt;
    --with-cxx --enable-largefile \&lt;br /&gt;
    --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
    --with-sqlite --with-cairo --with-python=/usr/bin/python-config \&lt;br /&gt;
    --with-wxwidgets --with-geos \&lt;br /&gt;
    --with-blas --with-blas-includes=/usr/include/atlas/ \&lt;br /&gt;
    --with-lapack --with-lapack-includes=/usr/include/atlas/ \&lt;br /&gt;
    --with-netcdf=/usr/bin/nc-config --with-odbc=yes \&lt;br /&gt;
    --with-openmp=yes --with-pthread=no --with-postgres=yes \&lt;br /&gt;
    --with-postgres-includes=/usr/include/postgresql \&lt;br /&gt;
    --with-postgres-libs=/usr/lib/postgresql \&lt;br /&gt;
    --with-mysql=yes --with-mysql-includes=/usr/include/mysql \&lt;br /&gt;
    --with-mysql-libs=/usr/lib/mysql&lt;br /&gt;
 make -j2&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
 sudo make install  # installs as /usr/local/bin/grass70&lt;br /&gt;
&lt;br /&gt;
===== Ubuntu =====&lt;br /&gt;
&lt;br /&gt;
There is a dedicated page on how to [[Compile_and_Install_Ubuntu | Compile the GRASS GIS source code &amp;amp; install it in Ubuntu]].&lt;br /&gt;
&lt;br /&gt;
===== Linux Mint =====&lt;br /&gt;
&lt;br /&gt;
Install packages needed for compilation:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install build-essential flex make bison gcc libgcc1 g++ \&lt;br /&gt;
 cmake ccache python python-dev python-qt4 python-qt4-dev python-opengl \&lt;br /&gt;
 python-wxversion python-wxtools python-wxgtk2.8 python-dateutil \&lt;br /&gt;
 libgsl0-dev python-numpy wx2.8-headers wx-common libwxgtk2.8-dev \&lt;br /&gt;
 libwxgtk2.8-dbg libwxbase2.8-dev  libwxbase2.8-dbg libncurses5-dev \&lt;br /&gt;
 zlib1g-dev gettext libtiff-dev libpnglite-dev tcl8.5-dev tk8.5-dev \&lt;br /&gt;
 libcairo2 libcairo2-dev sqlite3 libsqlite3-dev libpq-dev libreadline6 \&lt;br /&gt;
 libreadline6-dev libfreetype6-dev txt2tags libfftw3-3 libfftw3-dev \&lt;br /&gt;
 libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql \&lt;br /&gt;
 libqt4-qt3support lsb-qt4 qt4-designer qt4-dev-tools qt4-doc \&lt;br /&gt;
 qt4-qtconfig libapt-pkg-perl resolvconf libjasper-dev ruby subversion \&lt;br /&gt;
 ffmpeg ffmpeg2theora libffmpegthumbnailer-dev libavcodec-dev libxmu-dev \&lt;br /&gt;
 libavformat-dev libswscale-dev checkinstall libglu1-mesa-dev libxmu-dev \&lt;br /&gt;
 libproj-dev  proj-bin python-gdal&lt;br /&gt;
&lt;br /&gt;
CFLAGS=&amp;quot;-Wall&amp;quot; ./configure  --with-cxx  --with-gdal \&lt;br /&gt;
 --with-proj --with-proj-share=/usr/share/proj/ \&lt;br /&gt;
 --with-geos  --without-postgres \&lt;br /&gt;
 --with-nls  --with-opengl-includes=/usr/include/GL/ \&lt;br /&gt;
 --with-x --with-fftw  --with-freetype \&lt;br /&gt;
 --with-freetype-includes=/usr/include/freetype2  --with-sqlite \&lt;br /&gt;
 --with-python=/usr/bin/python2.7-config  --with-wx=/usr/bin/wx-config \&lt;br /&gt;
 --with-wxwidgets  --with-cairo  --enable-largefile&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Mandriva =====&lt;br /&gt;
&lt;br /&gt;
Installation of dependencies (urpmi will ask you a few more):&lt;br /&gt;
&lt;br /&gt;
'''Mandriva 2009:''' (take out the '64' everywhere if you are on 32bit)&lt;br /&gt;
  # as root&lt;br /&gt;
    urpmi flex bison zlib-devel tiff-devel png-devel tcl-devel tk-devel sqlite3-devel \&lt;br /&gt;
          mesagl1-devel mesaglu1-devel lib64xmu6-devel gcc-c++ gettext \&lt;br /&gt;
          lib64wxgtk2.8 lib64wxgtk2.8-devel lib64wxgtkgl2.8 wxgtk2.8 \&lt;br /&gt;
          lib64wxPythonGTK2.8 lib64wxPythonGTK2.8-devel wxPythonGTK wxPythonGTK-wxversion&lt;br /&gt;
    exit&lt;br /&gt;
&lt;br /&gt;
'''Mandriva 2010:''' (take out the '64' everywhere if you are on 32bit) - see also [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/grass/current/SPECS/ SPEC] file&lt;br /&gt;
  # as root&lt;br /&gt;
    # installation of PROJ and GDAL&lt;br /&gt;
    urpmi proj proj-devel gdal gdal-devel gcc-gfortran lib64openssl1.0.0 \&lt;br /&gt;
          lib64openssl1.0.0-devel postgresql8.4-devel lib64pq8.4&lt;br /&gt;
 &lt;br /&gt;
    # installation of compilation environment&lt;br /&gt;
    urpmi flex bison zlib-devel tiff-devel png-devel tcl-devel tk-devel sqlite3-devel \&lt;br /&gt;
          lib64mesagl1-devel lib64mesaglu1-devel lib64xmu6-devel gcc-c++ gettext \&lt;br /&gt;
          lib64wxgtk2.8 lib64wxgtk2.8-devel lib64wxgtkgl2.8 wxgtk2.8 \&lt;br /&gt;
          lib64wxPythonGTK2.8 lib64wxPythonGTK2.8-devel wxPythonGTK wxPythonGTK-wxversion&lt;br /&gt;
    exit&lt;br /&gt;
&lt;br /&gt;
Then, to configure GRASS, run (64 bit stuff optional of course):&lt;br /&gt;
  #  as user&lt;br /&gt;
  ./configure \&lt;br /&gt;
    --enable-64bit --with-libs=/usr/lib64 \&lt;br /&gt;
    --with-cxx \&lt;br /&gt;
    --with-gdal=/usr/local/bin/gdal-config \&lt;br /&gt;
    --with-sqlite \&lt;br /&gt;
    --with-nls \&lt;br /&gt;
    --with-python \&lt;br /&gt;
    --with-wxwidgets=/usr/lib/wxPython/bin/wx-config \&lt;br /&gt;
    --with-fftw \&lt;br /&gt;
    --with-ffmpeg --with-ffmpeg-includes=&amp;quot;/usr/include/libav* /usr/include/libpostproc /usr/include/libswscale&amp;quot; \&lt;br /&gt;
    --with-motif \&lt;br /&gt;
    --with-mysql --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib64 \&lt;br /&gt;
    --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
    --enable-largefile&lt;br /&gt;
&lt;br /&gt;
   # compilation (use -j2 ior -j4 parameter on multi-core CPUs to accelerate):   &lt;br /&gt;
    make&lt;br /&gt;
&lt;br /&gt;
Installation:&lt;br /&gt;
    su&lt;br /&gt;
    # this will install into /usr/local/&lt;br /&gt;
    make install&lt;br /&gt;
    exit&lt;br /&gt;
&lt;br /&gt;
===== Enterprise Linux =====&lt;br /&gt;
&lt;br /&gt;
Enterprise Linux (EL) and derivatives (that is, Red Hat Enterprise Linux, CentOS and Scientific Linux) is a popular and robust platform for servers and computing-heavy workstations, and is therefore a good fit for GIS specific requirements.&lt;br /&gt;
&lt;br /&gt;
See: http://wiki.osgeo.org/wiki/Enterprise_Linux_GIS&lt;br /&gt;
&lt;br /&gt;
===== Scientific Linux =====&lt;br /&gt;
&lt;br /&gt;
See Centos&lt;br /&gt;
&lt;br /&gt;
===== CentOS =====&lt;br /&gt;
&lt;br /&gt;
You first need to add the EPEL repository for PROJ.4 and GDAL, see [https://fedoraproject.org/wiki/EPEL/FAQ#How_can_I_install_the_packages_from_the_EPEL_software_repository.3F here]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strike&amp;gt;&lt;br /&gt;
Preparation '''Centos 5''' (old):&lt;br /&gt;
  yum install epel-release&lt;br /&gt;
 &lt;br /&gt;
  # Note: CentOS 5 comes with Python 2.4 which lacks python-config, hence two extra tweaks are needed.&lt;br /&gt;
  yum install flex bison zlib-devel tcl-devel tk-devel gcc-c++ gettext \&lt;br /&gt;
              libtiff-devel libpng-devel sqlite-devel \&lt;br /&gt;
              mesa-libGL-devel mesa-libGLU-devel mesa-libGLw-devel \&lt;br /&gt;
              mesa-libOSMesa-devel libXmu-devel python-devel gtk2-devel\&lt;br /&gt;
              ncurses-devel postgresql-devel make&lt;br /&gt;
&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Preparation '''Centos 6''' | '''Scientific Linux 6''':&lt;br /&gt;
  yum install epel-release&lt;br /&gt;
 &lt;br /&gt;
  yum install flex bison make zlib-devel gcc-c++ gettext \&lt;br /&gt;
              sqlite-devel mesa-libGL-devel mesa-libGLU-devel \&lt;br /&gt;
              libXmu-devel libX11-devel fftw-devel libtiff-devel \&lt;br /&gt;
              lesstif-devel python-devel numpy wxPython wxGTK-devel \&lt;br /&gt;
              proj proj-devel proj-epsg proj-nad libxml2 gdal gdal-devel geos geos-devel \&lt;br /&gt;
              python-dateutil python-imaging python-matplotlib&lt;br /&gt;
  # only GRASS GIS 6: install also tcl-devel tk-devel&lt;br /&gt;
&lt;br /&gt;
Preparation '''Centos 7''' | '''Scientific Linux 7''':&lt;br /&gt;
  yum install epel-release&lt;br /&gt;
 &lt;br /&gt;
  yum install flex bison make zlib-devel gcc-c++ gettext \&lt;br /&gt;
              sqlite-devel mesa-libGL-devel mesa-libGLU-devel \&lt;br /&gt;
              libXmu-devel libX11-devel fftw-devel libtiff-devel \&lt;br /&gt;
              lesstif-devel python-devel numpy wxPython wxGTK-devel \&lt;br /&gt;
              proj proj-devel proj-epsg proj-nad libxml2 gdal gdal-devel geos geos-devel \&lt;br /&gt;
              netcdf netcdf-devel blas-devel lapack-devel atlas-devel \&lt;br /&gt;
              python-dateutil python-imaging python-matplotlib python-sphinx \&lt;br /&gt;
              doxygen subversion&lt;br /&gt;
&lt;br /&gt;
'''GRASS GIS 7 compilation and installation'''&lt;br /&gt;
&lt;br /&gt;
[http://grass.osgeo.org/download/software/sources/ Download source code] (e.g., --&amp;gt; &amp;quot;Download latest 7.0-svn code (SVN))&amp;quot; and configure GRASS 7 (suggestion: save this as script):&lt;br /&gt;
&lt;br /&gt;
 ./configure \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --with-proj --with-proj-share=/usr/share/proj \&lt;br /&gt;
  --with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-python \&lt;br /&gt;
  --with-cairo --with-cairo-ldflags=-lfontconfig \&lt;br /&gt;
  --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
  --with-wxwidgets=/usr/bin/wx-config \&lt;br /&gt;
  --with-openmp \&lt;br /&gt;
  --with-blas --with-blas-includes=/usr/include/atlas-x86_64-base/ \&lt;br /&gt;
  --with-lapack --with-lapack-includes=/usr/include/atlas-x86_64-base/ \&lt;br /&gt;
  --with-fftw \&lt;br /&gt;
  --with-geos \&lt;br /&gt;
  --with-netcdf \&lt;br /&gt;
  --without-ffmpeg \&lt;br /&gt;
  --without-mysql \&lt;br /&gt;
  --without-postgres \&lt;br /&gt;
  --without-odbc \&lt;br /&gt;
  --without-fftw&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
    make&lt;br /&gt;
or on a multicore system (number depends of available cores):&lt;br /&gt;
    make -j4&lt;br /&gt;
&lt;br /&gt;
For a system wide installation, run as root user:&lt;br /&gt;
    make install&lt;br /&gt;
OR simply run it directly from the source code directory (substitute ARCH with i686 or x86_64):&lt;br /&gt;
&lt;br /&gt;
    bin.$ARCH/grass70 -gui&lt;br /&gt;
&lt;br /&gt;
In this case, for convenience, add it to the search path:&lt;br /&gt;
    mkdir $HOME/bin&lt;br /&gt;
    cd $HOME/bin&lt;br /&gt;
    # example:&lt;br /&gt;
    ln -s $HOME/software/grass70_release/bin.i686-pc-linux-gnu/grass70 .&lt;br /&gt;
&lt;br /&gt;
Now use it subsequently with&lt;br /&gt;
    grass70 -gui&lt;br /&gt;
&lt;br /&gt;
===== Gentoo =====&lt;br /&gt;
&lt;br /&gt;
  ./configure \&lt;br /&gt;
    --with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
See also http://packages.gentoo.org/package/sci-geosciences/grass&lt;br /&gt;
&lt;br /&gt;
===== Funtoo =====&lt;br /&gt;
&lt;br /&gt;
The [http://grasswiki.osgeo.org/wiki/Compile_and_Install#Generic_Compilation_and_installation_procedure Generic Compilation &amp;amp; installation procedure] applies also for the [http://www.funtoo.org/ Funtoo] Linux meta-distribution. The following example scripts are provided as a mean to get started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====== Installing dependencies ======&lt;br /&gt;
&lt;br /&gt;
'''''Following likely needs to be updated!'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# # Searching for missing packages, e.g. wxwidgets&lt;br /&gt;
# e-file wx-config&lt;br /&gt;
&lt;br /&gt;
# emerge dependecies -- This will take quite some time! Hint: net-libs/webkit-gtk&lt;br /&gt;
USE=&amp;quot;curl xls fftw gmath motif  wxwidgets gml hdf5 jpeg2k mdb netcdf odbc ogdi opencl postgres spatialite sqlite szip&amp;quot; \&lt;br /&gt;
emerge -av proj geos gdal \&lt;br /&gt;
	   xerces \&lt;br /&gt;
	   mesa motif libGLw  \&lt;br /&gt;
	   tcl tk clang llvm byacc opencl \&lt;br /&gt;
	   unixODBC postgresql-base ogdi spatialite \&lt;br /&gt;
	   libgeotiff hdf5 netcdf \&lt;br /&gt;
	   eselect-postgresql eselect-opencl eselect-wxwidgets \&lt;br /&gt;
	   wxpython pyopengl \&lt;br /&gt;
	   fftw&lt;br /&gt;
&lt;br /&gt;
# before compiling&lt;br /&gt;
eselect python set 1 # probably #1 is python 2.7&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====== Example Scripts ======&lt;br /&gt;
&lt;br /&gt;
A simple configuration and compilation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# clean previous configuration&lt;br /&gt;
make distclean&lt;br /&gt;
&lt;br /&gt;
# update source code&lt;br /&gt;
svn up&lt;br /&gt;
&lt;br /&gt;
# renice! source: &amp;lt;http://lists.osgeo.org/pipermail/grass-user/2013-May/068229.html&amp;gt;&lt;br /&gt;
renice +17 -p $$&lt;br /&gt;
&lt;br /&gt;
# configure&lt;br /&gt;
./configure \&lt;br /&gt;
--with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
2&amp;gt;&amp;amp;1 | tee config_log.txt&lt;br /&gt;
&lt;br /&gt;
# compile&lt;br /&gt;
time make -j13&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An attempt for a complete configuration and compilation '''checking'''. In addition, this script times each of the executed commands (need for scrolling back!).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# clean previous configuration&lt;br /&gt;
time make distclean&lt;br /&gt;
&lt;br /&gt;
# update&lt;br /&gt;
time svn up&lt;br /&gt;
&lt;br /&gt;
# renice! source: &amp;lt;http://lists.osgeo.org/pipermail/grass-user/2013-May/068229.html&amp;gt;&lt;br /&gt;
renice +17 -p $$&lt;br /&gt;
&lt;br /&gt;
# configure&lt;br /&gt;
CFLAGS=&amp;quot;-ggdb -march=native -Wall -Werror-implicit-function-declaration&amp;quot; \&lt;br /&gt;
./configure \&lt;br /&gt;
--with-cxx \&lt;br /&gt;
--with-includes=/usr/include/ --with-libs=/usr/lib64/ \&lt;br /&gt;
--with-proj \&lt;br /&gt;
--with-proj-includes=/usr/include/ \&lt;br /&gt;
--with-proj-libs=/usr/lib64/ \&lt;br /&gt;
--with-proj-share=/usr/share/proj/ \&lt;br /&gt;
--with-geos \&lt;br /&gt;
--with-geos=/usr/bin/geos-config \&lt;br /&gt;
--with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
--with-x \&lt;br /&gt;
--with-motif \&lt;br /&gt;
--with-cairo \&lt;br /&gt;
--with-opengl-libs=/usr/include/GL \&lt;br /&gt;
--without-ffmpeg \&lt;br /&gt;
--with-python=yes --with-python=/usr/bin/python2.7-config \&lt;br /&gt;
--with-wxwidgets \&lt;br /&gt;
--with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
--with-odbc=yes \&lt;br /&gt;
--with-sqlite=yes \&lt;br /&gt;
--with-mysql=yes --with-mysql-includes=&amp;quot;/usr/include/mysql&amp;quot; --with-mysql-libs=/usr/lib/mysql \&lt;br /&gt;
--with-postgres=yes --with-postgresql=yes --with-postgres-includes=&amp;quot;/usr/include/postgresql&amp;quot; \&lt;br /&gt;
--with-opencl --with-openmp --with-pthread \&lt;br /&gt;
--with-lapack \&lt;br /&gt;
--with-fftw \&lt;br /&gt;
--with-readline \&lt;br /&gt;
--with-regex \&lt;br /&gt;
--with-nls \&lt;br /&gt;
--with-jpeg \&lt;br /&gt;
--with-tiff \&lt;br /&gt;
--with-png \&lt;br /&gt;
--with-netcdf \&lt;br /&gt;
--without-opendwg \&lt;br /&gt;
--enable-largefile=yes \&lt;br /&gt;
2&amp;gt;&amp;amp;1 | tee config_log.txt&lt;br /&gt;
&lt;br /&gt;
# check &amp;quot;make&amp;quot;&lt;br /&gt;
time make check&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Fedora =====&lt;br /&gt;
&lt;br /&gt;
====== GRASS GIS 6 on Fedora ======&lt;br /&gt;
&lt;br /&gt;
'''Preparation''' for the compilation of GRASS GIS 6 source code (F16-F21):&lt;br /&gt;
&lt;br /&gt;
  yum install proj-devel gdal-devel sqlite-devel ffmpeg-devel mesa-libGL-devel \&lt;br /&gt;
              mesa-libGLU-devel libXmu-devel libX11-devel tcl-devel tk-devel geos \&lt;br /&gt;
              fftw-devel libtiff-devel lesstif-devel python-devel numpy wxPython wxGTK-devel \&lt;br /&gt;
              gcc gcc-c++ bison flex ncurses-devel proj-epsg proj-nad xml2 subversion&lt;br /&gt;
&lt;br /&gt;
''Note 1: that currently gdal-devel has (too) many dependencies and may lead to a massive download of extra packages (200 on a fresh Fedora 16 install). Hopefully solved in later Fedora versions.''&lt;br /&gt;
&lt;br /&gt;
''Note 2: the optional ffmpeg-devel comes from the rpmfusion-free repository ([http://rpmfusion.org/Configuration/ configuration]).''&lt;br /&gt;
&lt;br /&gt;
'''Download''' the source code:&lt;br /&gt;
* GRASS GIS 6: [http://grass.osgeo.org/download/software/sources/ release package] - [http://grass.osgeo.org/grass64/source/snapshot/ weekly snapshot] - [http://trac.osgeo.org/grass/wiki/DownloadSource#GRASS6.4 SVN repository]&lt;br /&gt;
&lt;br /&gt;
'''Configure''': This is an ''example'' how to configure the source code on a Fedora system:&lt;br /&gt;
&lt;br /&gt;
  ./configure \&lt;br /&gt;
   --with-cxx \&lt;br /&gt;
   --with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
   --with-proj --with-proj-share=/usr/share/proj \&lt;br /&gt;
   --with-sqlite \&lt;br /&gt;
   --with-nls \&lt;br /&gt;
   --with-geos \&lt;br /&gt;
   --with-wxwidgets=/usr/bin/wx-config \&lt;br /&gt;
   --with-python=/usr/bin/python-config \&lt;br /&gt;
   --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
   --enable-largefile \&lt;br /&gt;
   --without-odbc \&lt;br /&gt;
   --with-fftw&lt;br /&gt;
&lt;br /&gt;
Extra: If you also want '''FFMPEG''' support - it requires 'yum install fftw-devel'. Then add to the configuration lines above:&lt;br /&gt;
&lt;br /&gt;
     --with-ffmpeg --with-ffmpeg-includes=&amp;quot;/usr/include/ffmpeg /usr/include/ffmpeg/libav* /usr/include/ffmpeg/libpostproc /usr/include/ffmpeg/libswscale&amp;quot; \&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally '''compile''' the configured source code:&lt;br /&gt;
    make&lt;br /&gt;
   or on multicore (number depends of available cores):&lt;br /&gt;
    make -j4&lt;br /&gt;
   and&lt;br /&gt;
    make install # requires root permissions unless you become owner of /usr/local/&lt;br /&gt;
&lt;br /&gt;
Then use GRASS GIS 6 and enjoy!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====== GRASS GIS 7 on Fedora ======&lt;br /&gt;
&lt;br /&gt;
'''Preparation''' for the compilation of GRASS GIS 7 source code (F20-F22):&lt;br /&gt;
&lt;br /&gt;
  dnf install gcc gcc-c++ bison flex ncurses-devel proj-epsg proj-nad xml2 \&lt;br /&gt;
              proj-devel gdal gdal-devel gdal-python sqlite-devel mesa-libGL-devel \&lt;br /&gt;
              fftw-devel mesa-libGLU-devel libXmu-devel libX11-devel geos geos-devel \&lt;br /&gt;
              libtiff-devel lesstif-devel python-devel numpy wxPython wxGTK-devel \&lt;br /&gt;
              python-dateutil python-imaging python-matplotlib-wx subversion doxygen python-sphinx&lt;br /&gt;
&lt;br /&gt;
  # optionally also:  netcdf-devel postgresql-devel&lt;br /&gt;
&lt;br /&gt;
''Note 1: the optional ffmpeg-devel comes from the rpmfusion-free repository ([http://rpmfusion.org/Configuration/ configuration]).''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Download''' the source code:&lt;br /&gt;
* GRASS GIS 7: [http://grass.osgeo.org/grass70/source/snapshot/ weekly snapshot] - [http://trac.osgeo.org/grass/wiki/DownloadSource#GRASS7 SVN repository]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Configure''': This is an example how to configure the source code on a Fedora system:&lt;br /&gt;
&lt;br /&gt;
  ./configure \&lt;br /&gt;
   --with-cxx \&lt;br /&gt;
   --with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
   --with-proj --with-proj-share=/usr/share/proj \&lt;br /&gt;
   --with-python=/usr/bin/python-config \&lt;br /&gt;
   --with-geos \&lt;br /&gt;
   --with-sqlite \&lt;br /&gt;
   --with-nls \&lt;br /&gt;
   --with-wxwidgets=/usr/bin/wx-config \&lt;br /&gt;
   --with-fftw \&lt;br /&gt;
   --with-cairo --with-cairo-ldflags=-lfontconfig \&lt;br /&gt;
   --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
   --enable-largefile \&lt;br /&gt;
   --without-odbc&lt;br /&gt;
&lt;br /&gt;
''Extra 1:'' If you also want '''FFMPEG support''' - it requires 'dnf install fftw-devel' from the rpmfusion-free repository. Then add to the configuration lines above:&lt;br /&gt;
&lt;br /&gt;
     --with-ffmpeg --with-ffmpeg-includes=&amp;quot;/usr/include/ffmpeg /usr/include/ffmpeg/libav* /usr/include/ffmpeg/libpostproc /usr/include/ffmpeg/libswscale&amp;quot; \&lt;br /&gt;
&lt;br /&gt;
''Extra 2:'' For '''LAPACK/BLAS support''' (addons i.spec.unmix, v.kriging etc), install &amp;quot;dnf install lapack lapack-devel blas blas-devel atlas atlas-devel&amp;quot;. Then add to the configuration lines above:&lt;br /&gt;
  --with-blas --with-blas-includes=/usr/include/atlas-x86_64-base/ \&lt;br /&gt;
  --with-lapack --with-lapack-includes=/usr/include/atlas-x86_64-base/ \&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally '''compile''' the configured source code:&lt;br /&gt;
    make&lt;br /&gt;
   or on multicore (number depends of available cores):&lt;br /&gt;
    make -j4&lt;br /&gt;
   and&lt;br /&gt;
    make install # requires root permissions unless you become owner of /usr/local/&lt;br /&gt;
&lt;br /&gt;
Then use GRASS GIS 7 and enjoy!&lt;br /&gt;
&lt;br /&gt;
===== openSUSE =====&lt;br /&gt;
&lt;br /&gt;
To build GRASS on openSUSE:&lt;br /&gt;
&lt;br /&gt;
RPM packages to be installed:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 sudo zypper install bison flex freetype2-devel fftw3-devel gcc-c++ \&lt;br /&gt;
   libgdal-devel libgeos-devel libjpeg-devel libpng-devel libtiff-devel \&lt;br /&gt;
   man proj libproj-devel readline-devel netcdf-devel ncurses-devel \&lt;br /&gt;
   mysql-devel postgresql-devel sqlite-devel unixODBC-devel \&lt;br /&gt;
   tcl-devel tk-devel xorg-x11-Mesa-devel libXmu-devel \&lt;br /&gt;
   python-numpy python-dateutil python-devel python-opengl \&lt;br /&gt;
   python-wxWidgets python-xml python-dateutil wxWidgets-devel \&lt;br /&gt;
   zlib-devel doxygen python-sphinx&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source code configuration:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 ./configure \&lt;br /&gt;
 	--enable-largefile \&lt;br /&gt;
	--with-proj-share=/usr/share/proj \&lt;br /&gt;
	--with-cxx \&lt;br /&gt;
	--with-lapack=yes \&lt;br /&gt;
	--with-x \&lt;br /&gt;
	--with-motif \&lt;br /&gt;
	--with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
	--with-postgres --with-postgres-includes=/usr/include/pgsql \&lt;br /&gt;
	--with-mysql --with-mysql-includes=/usr/include/mysql \&lt;br /&gt;
	--with-fftw \&lt;br /&gt;
	--with-readline \&lt;br /&gt;
	--with-netcdf \&lt;br /&gt;
	--with-curses \&lt;br /&gt;
	--with-geos \&lt;br /&gt;
	--with-nls \&lt;br /&gt;
	--with-sqlite \&lt;br /&gt;
	--with-freetype \&lt;br /&gt;
	--with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
	--with-wxwidgets \&lt;br /&gt;
	--with-odbc \&lt;br /&gt;
	--with-python&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then compile with &amp;quot;make [-j2]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===== Arch Linux =====&lt;br /&gt;
&lt;br /&gt;
The easiest/fastest way is to build GRASS GIS using AUR:&lt;br /&gt;
&lt;br /&gt;
https://aur.archlinux.org/packages/?O=0&amp;amp;K=grass (msieczka: I would recommend my set of PKBUILDs - https://aur.archlinux.org/packages/?K=czk&amp;amp;SeB=m. They are most feature-rich, up-to-date and allow to have various versions installed alongside each other without conflicts.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But if you want to compile it yourself you have to keep in mind that in Arch Linux the default Python version 3.&lt;br /&gt;
&lt;br /&gt;
 python --version&lt;br /&gt;
&lt;br /&gt;
 Python 3.3.1&lt;br /&gt;
&lt;br /&gt;
Therefore, to build GRASS GIS (version 7 in this example), we can use either use virtualenv or symlink python2 and python2-config in a given directory. &lt;br /&gt;
Let's use the latter approach&lt;br /&gt;
&lt;br /&gt;
 sudo ln -s /usr/bin/python2 $HOME/usr/bin/python&lt;br /&gt;
 sudo ln -s /usr/bin/python2-config $HOME/usr/bin/python-config&lt;br /&gt;
&lt;br /&gt;
We can now start building GRASS 7&lt;br /&gt;
&lt;br /&gt;
 export PATH=~/usr/bin:$PATH &amp;amp;&amp;amp; \&lt;br /&gt;
 ./configure \&lt;br /&gt;
 --enable-debug \&lt;br /&gt;
 --enable-64bit \&lt;br /&gt;
 --with-libs=/usr/lib64  \&lt;br /&gt;
 --with-cxx \&lt;br /&gt;
 --with-readline \&lt;br /&gt;
 --with-zlib-includes=&amp;quot;/usr/include/&amp;quot; \&lt;br /&gt;
 --with-freetype=yes \&lt;br /&gt;
 --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
 --enable-largefile=yes \&lt;br /&gt;
 --with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
 --with-proj-share=/usr/share/proj/ \&lt;br /&gt;
 --with-geos=/usr/bin/geos-config \&lt;br /&gt;
 --with-cairo \&lt;br /&gt;
 --with-odbc \&lt;br /&gt;
 --with-pthread \&lt;br /&gt;
 --with-liblas=/usr/local/bin/liblas-config  \&lt;br /&gt;
 --with-fftw-includes=&amp;quot;/usr/include/&amp;quot; \&lt;br /&gt;
 --with-fftw-libs=/usr/lib/ \&lt;br /&gt;
 --with-tcltk-includes=&amp;quot;/usr/include/&amp;quot; \&lt;br /&gt;
 --with-wxwidgets \&lt;br /&gt;
 --with-postgres=yes \&lt;br /&gt;
 --with-postgres-includes=&amp;quot;/usr/include/postgresql/internal&amp;quot; \&lt;br /&gt;
 --with-postgres-libs=&amp;quot;/usr/include/postgresql/internal/libpq&amp;quot; \&lt;br /&gt;
 --with-sqlite=yes \&lt;br /&gt;
 --with-python=yes \&lt;br /&gt;
 --with-liblas \&lt;br /&gt;
 --with-netcdf &lt;br /&gt;
&lt;br /&gt;
Now let's compile and install it&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
Now the final step required to use GRASS with python2 is to create a bash script &amp;quot;grass&amp;quot; (or the name you want)&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 export PATH=~/usr/bin:$PATH&lt;br /&gt;
 python2 /usr/local/bin/grass70&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And make it executable and copy it somewhere in the PATH&lt;br /&gt;
&lt;br /&gt;
 chmod+x grass&lt;br /&gt;
 sudo cp grass /usr/local/bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's done, you can enjoy GRASS 7 in Arch, just type &amp;quot;grass&amp;quot; (or the name you gave to the script) in the terminal to launch it.&lt;br /&gt;
&lt;br /&gt;
===== RPM SPEC files =====&lt;br /&gt;
* ... can be found in the source code, rpm/ directory, &lt;br /&gt;
* or [https://build.opensuse.org/package/show?package=grass&amp;amp;project=Application%3AGeo OpenSuSe]&lt;br /&gt;
* or [https://admin.fedoraproject.org/pkgdb/acls/name/grass Fedora]&lt;br /&gt;
* or [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/grass/ Mandriva] (there are also [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/proj/ proj4], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/geos/ geos], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/gdal/ gdal], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/gdal-grass/ gdal-grass-plugin], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/qgis/ qgis] etc)&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
===== Zaurus =====&lt;br /&gt;
&lt;br /&gt;
... see [http://wiki.debian.org/?GrassGISonZaurus here] for instructions&lt;br /&gt;
&lt;br /&gt;
==== Mac OSX ====&lt;br /&gt;
&lt;br /&gt;
===== Conventional installation =====&lt;br /&gt;
* see the source/macosx readme ([http://trac.osgeo.org/grass/browser/grass/trunk/macosx/ReadMe.rtf Trac link])&lt;br /&gt;
* main page [[Compiling on MacOSX]]&lt;br /&gt;
* main page [[Packaging on MacOSX]]&lt;br /&gt;
* [http://grass.osgeo.org/download/software/mac-osx/ official download site]&lt;br /&gt;
* [http://www.kyngchaos.com/software/frameworks#build_scripts build scripts for dependencies]&lt;br /&gt;
* solving errors at starting GRASS GIS: [[MacOSX GRASS errors]]&lt;br /&gt;
=====[[Compiling on MacOSX using homebrew]] =====&lt;br /&gt;
&lt;br /&gt;
==== FreeBSD / NetBSD ====&lt;br /&gt;
&lt;br /&gt;
The recommended compiler tools are GCC, GNU make, GNU coreutils (for install), and flex. All are available through the respective package managing tools (pkg_add for FreeBSD and pkgin install for NetBSD) and for recent *BSD versions most likely installed by default.&lt;br /&gt;
&lt;br /&gt;
GRASS 6.x and GRASS 7 should compile on FreeBSD 8.0 or later and NetBSD 5.0 or later (maybe also on updated NetBSD 4.x).&lt;br /&gt;
&lt;br /&gt;
It is highly recommended to install GDAL/OGR and PROJ4 first. These libraries and tools are available as [http://www.freebsd.org/ports/ ports for FreeBSD] and [http://www.pkgsrc.org/ packages for NetBSD].&lt;br /&gt;
&lt;br /&gt;
Optional functionality is listed with ''./configure --help'', and related libraries and tools might need to be installed first.&lt;br /&gt;
&lt;br /&gt;
==== Solaris ====&lt;br /&gt;
&lt;br /&gt;
* ''2008 Oct 15'': see [http://lists.osgeo.org/pipermail/grass-user/2008-October/047093.html this post on the grass mailing list]&lt;br /&gt;
&lt;br /&gt;
===== 11 SPARC/i86pc =====&lt;br /&gt;
&lt;br /&gt;
The recommended compiler tools are GCC, GNU make, GNU coreutils (for install), and flex. All are available through the Solaris package manager.&lt;br /&gt;
&lt;br /&gt;
Most dependencies are available through the Solaris package manager. GDAL and proj4 can either be compiled from source or installed e.g. from [http://www.opencsw.org/ OpenCSW]. If packages are installed from OpenCSW, the linker flags need to be set with&lt;br /&gt;
&lt;br /&gt;
      LDFLAGS=&amp;quot;-Wl,-R/opt/csw/lib -L/opt/csw/lib -Wl,-R/opt/csw/gxx/lib -L/opt/csw/gxx/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
See also the [http://www.opencsw.org/use-it/ OpenCSW documentation].&lt;br /&gt;
&lt;br /&gt;
===== 10 SPARC/i86pc =====&lt;br /&gt;
&lt;br /&gt;
* get gcc compiler and tools. There are several sources: Solaris Companion CD (SFW pkg, installs in /opt/sfw/), Blastwave ([http://www.blastwave.org], CSW pkg, installs in /opt/csw/) or Sunfreeware ([http://www.sunfreeware.com], SMC pkg, installs in /usr/local/). &lt;br /&gt;
Needed Packages from Sunfreeware: SMCbinut, SMCbison, SMCcoreu, SMCfindu, SMCflex, SMCgawk, SMCgcc, SMCgrep, SMCgzip, SMCless, SMClibt, SMClicon, SMCmake, SMCncurs, SMCproj, SMCsed, SMCtar, SMCtcl, SMCtiff, SMCtk, SMCunzip, SMCzlib. &lt;br /&gt;
&lt;br /&gt;
* compile and install fftw-library ([http://www.fftw.org]). You need to re-compile the library with: &lt;br /&gt;
&lt;br /&gt;
      ./configure --with-pic --enable-shared; make ; make install. &lt;br /&gt;
&lt;br /&gt;
The pre-built packages don't work. &lt;br /&gt;
&lt;br /&gt;
* compile and install gdal library (see documentation of gdal, [http://www.gdal.org]).&lt;br /&gt;
&lt;br /&gt;
* compile and install any additional libraries (e. g. GEOS, [http://geos.refractions.net]). &lt;br /&gt;
&lt;br /&gt;
* set compiler flags and path. e. g.: &lt;br /&gt;
&lt;br /&gt;
      # on ultra-sparc machine:&lt;br /&gt;
      CFLAGS=&amp;quot;-O3 -mcpu=v9&amp;quot;&lt;br /&gt;
      CXXFLAGS=&amp;quot;-O3 -mcpu=v9&amp;quot;&lt;br /&gt;
      PATH=&amp;quot;/usr/local/bin:/opt/sfw/bin:/usr/ccs/bin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
      export CFLAGS CXXFLAGS PATH&lt;br /&gt;
&lt;br /&gt;
Path has to be changed for the packages (Sunfreeware: /usr/local/bin, Solaris Companion: /opt/sfw/bin, Blastwave: /opt/csw/bin). &lt;br /&gt;
&lt;br /&gt;
* Next configure, e. g.: &lt;br /&gt;
&lt;br /&gt;
      ./configure --with-postgres-includes=/usr/include/pgsql/ \&lt;br /&gt;
      --with-postgres-libs=/usr/lib --with-postgres=yes \&lt;br /&gt;
      --with-includes=/usr/local/include/ncurses&lt;br /&gt;
&lt;br /&gt;
If you use n(ew)curses, you have to include the path /usr/local/include/ncurses. &lt;br /&gt;
&lt;br /&gt;
then:&lt;br /&gt;
&lt;br /&gt;
      make&lt;br /&gt;
      su&lt;br /&gt;
      make install&lt;br /&gt;
&lt;br /&gt;
If the shared libraries are not found at runtime of the modules, use 'crle' to add the paths of the libraries for the dynamic linker, e. g. as root:&lt;br /&gt;
&lt;br /&gt;
      crle -l /lib:/usr/lib:/usr/local/lib:/opt/sfw/lib:/usr/X11/lib&lt;br /&gt;
&lt;br /&gt;
Be careful not to omit a library path, the system may be unusable if you forget the /lib path.&lt;br /&gt;
&lt;br /&gt;
==== AIX ====&lt;br /&gt;
&lt;br /&gt;
A recent [ftp://ftp.gnu.org/gnu/make/ GNU make] (&amp;gt;= 3.81) and GNU coreutils are required. These are available with the [http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/download.html IBM AIX toolbox] or through third-party AIX software repositories, e.g. [http://www.bullfreeware.com/ bullfreeware] and [http://www.perzl.org/aix/ perzl.org]. Note that 'make' does not work, only 'gmake' works. &lt;br /&gt;
&lt;br /&gt;
General instructions to compile on AIX are e.g. [http://www.perzl.org/aix/index.php?n=Main.Instructions here]&lt;br /&gt;
&lt;br /&gt;
On AIX, compilation results by default in 32 bit applications and static libraries. The [http://www.ibm.com/developerworks/aix/library/au-gnu.html IBM documentation] explains how to build 64 bit applications and shared libraries with GCC.&lt;br /&gt;
&lt;br /&gt;
'''GRASS 6: Using the IBM xlc compiler:'''&lt;br /&gt;
* ''see [http://thread.gmane.org/gmane.comp.gis.grass.user/32667 this mailing list thread]''&lt;br /&gt;
&lt;br /&gt;
Mike wrote in 2009:&lt;br /&gt;
&lt;br /&gt;
After attempting all the suggestions, I finally used&lt;br /&gt;
--disable-shared on the configure command, and all but&lt;br /&gt;
a handful of modules successfully compiled. I was able to&lt;br /&gt;
individually address the ones that failed through Makefile&lt;br /&gt;
edits and several small source code/header file edits.&lt;br /&gt;
&lt;br /&gt;
The environment variables and configure command that worked were:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# xlc compiler:&lt;br /&gt;
export PATH=/usr/local/bin:/opt/freeware/bin:$PATH&lt;br /&gt;
export OBJECT_MODE=64&lt;br /&gt;
export LIBICONV=/opt/freeware&lt;br /&gt;
export CC=&amp;quot;xlc_r -q64&amp;quot;&lt;br /&gt;
export CFLAGS=&amp;quot;-O -qstrict&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;xlC_r -q64&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;-O -qstrict&amp;quot;&lt;br /&gt;
export AR=&amp;quot;ar -X64&amp;quot;&lt;br /&gt;
export F77=&amp;quot;xlf_r -q64&amp;quot;&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I/afs/isis/pkg/libpng/include -I/usr/local/include -I$LIBICONV/include -I/usr/lpp/X11/include/X11&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L/usr/local/lib -L$LIBICONV/lib -L/usr/lib -L/usr/X11R6/lib -lc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/afs/isis/pkg/grass-6.4.0 \&lt;br /&gt;
  --enable-64bit \&lt;br /&gt;
  --disable-shared \&lt;br /&gt;
  --with-includes=&amp;quot;/usr/include/fontconfig /usr/include/X11 /usr/include/X11/Xft /usr/include/X11/ext&amp;quot; \&lt;br /&gt;
  --x-includes=/usr/include/X11 \&lt;br /&gt;
  --x-libraries=/usr/X11R6/lib \&lt;br /&gt;
  --with-fftw-includes=/afs/isis/pkg/fftw-3.2.2/include \&lt;br /&gt;
  --with-fftw-libs=/afs/isis/pkg/fftw-3.2.2/lib \&lt;br /&gt;
  --with-gdal=/afs/isis/pkg/gdal/bin/gdal-config \&lt;br /&gt;
  --with-proj-includes=/afs/isis/pkg/proj/include \&lt;br /&gt;
  --with-proj-libs=/afs/isis/pkg/proj/lib \&lt;br /&gt;
  --with-proj-share=/afs/isis/pkg/proj/share/proj \&lt;br /&gt;
  --with-tcltk-includes=/usr/local/include \&lt;br /&gt;
  --with-tcltk-libs=/usr/local/lib \&lt;br /&gt;
  --with-opengl-includes=/usr/include/GL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''GRASS 7: Using the IBM xlc compiler:'''&lt;br /&gt;
&lt;br /&gt;
Get and install (in this order):&lt;br /&gt;
* [ftp://ftp.gnu.org/gnu/tar/ GNU tar]&lt;br /&gt;
* [ftp://ftp.gnu.org/gnu/make/ GNU make] (&amp;gt;= 3.81)&lt;br /&gt;
* [http://www.sqlite.org SQLite]&lt;br /&gt;
* [http://trac.osgeo.org/proj/ PROJ.4] (for ./configure parameters, see [[Talk:Compile and Install|here]])&lt;br /&gt;
* [http://www.gdal.org GDAL] (for ./configure parameters, see [[Talk:Compile and Install|here]])&lt;br /&gt;
* [http://grass.osgeo.org/grass70/source/snapshot/ GRASS GIS 7]&lt;br /&gt;
&lt;br /&gt;
The environment variables and configure command that worked:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
## AIX 5.x&lt;br /&gt;
&lt;br /&gt;
export LIBPATH=/opt/freeware/lib64:/opt/freeware/lib&lt;br /&gt;
# make 'ar' happy&lt;br /&gt;
export OBJECT_MODE=64&lt;br /&gt;
&lt;br /&gt;
PREFIX=$HOME/private/bin&lt;br /&gt;
./configure \&lt;br /&gt;
  --prefix=$PREFIX \&lt;br /&gt;
  --disable-shared \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-proj-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-proj-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-proj-share=$PREFIX/share/proj/ \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-sqlite-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-sqlite-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-tiff=no \&lt;br /&gt;
  --with-png=no \&lt;br /&gt;
  --with-fftw=no \&lt;br /&gt;
  --with-cairo=no \&lt;br /&gt;
  --with-freetype=no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''GRASS 7: Using the GNU gcc compiler:'''&lt;br /&gt;
&lt;br /&gt;
Get and install (in this order):&lt;br /&gt;
* if needed, [ftp://ftp.gnu.org/gnu/tar/ GNU tar]&lt;br /&gt;
* if needed (the name is often 'gmake' and not 'make') [ftp://ftp.gnu.org/gnu/make/ GNU make] (&amp;gt;= 3.81)&lt;br /&gt;
* [http://www.sqlite.org SQLite]&lt;br /&gt;
* [http://trac.osgeo.org/proj/ PROJ.4] (for ./configure parameters, see [[Talk:Compile and Install|here]])&lt;br /&gt;
* [http://www.gdal.org GDAL] (for ./configure parameters, see [[Talk:Compile and Install|here]])&lt;br /&gt;
* [http://grass.osgeo.org/grass70/source/snapshot/ GRASS GIS 7]&lt;br /&gt;
&lt;br /&gt;
The environment variables and configure command that worked for AIX 5.x:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
## AIX 5.x&lt;br /&gt;
&lt;br /&gt;
export LIBPATH=/opt/freeware/lib64:/opt/freeware/lib&lt;br /&gt;
# make 'ar' happy&lt;br /&gt;
export OBJECT_MODE=64&lt;br /&gt;
&lt;br /&gt;
PREFIX=$HOME/private/bin&lt;br /&gt;
CFLAGS='-ansi -D_ALL_SOURCE=1 -D_POSIX_SOURCE=1 -D_POSIX_C_SOURCE=200809L -Dinline=' ./configure \&lt;br /&gt;
  --prefix=$PREFIX \&lt;br /&gt;
  --disable-shared \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-proj-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-proj-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-proj-share=$PREFIX/share/proj/ \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-sqlite-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-sqlite-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-tiff=no \&lt;br /&gt;
  --with-png=no \&lt;br /&gt;
  --with-fftw=no \&lt;br /&gt;
  --with-cairo=no \&lt;br /&gt;
  --with-freetype=no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The environment variables and configure command that worked for AIX 7.x:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
## AIX 7.x&lt;br /&gt;
export CC=&amp;quot;gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;g++&amp;quot;&lt;br /&gt;
PREFIX=$HOME/bin&lt;br /&gt;
&lt;br /&gt;
LDFLAGS=&amp;quot;-Wl,-bsvr4,-R,/opt/freeware/lib -L/opt/freeware/lib&amp;quot; CPPFLAGS=&amp;quot;-I/opt/freeware/include&amp;quot; ./configure \&lt;br /&gt;
  --prefix=$PREFIX \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --enable-shared \&lt;br /&gt;
  --with-includes=/opt/freeware/include --with-libs=/opt/freeware/lib \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-proj-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-proj-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-proj-share=$PREFIX/share/proj/ \&lt;br /&gt;
  --with-gdal=$PREFIX/bin/gdal-config \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-sqlite-libs=$PREFIX/lib --with-sqlite-includes=$PREFIX/include \&lt;br /&gt;
  --with-png=no \&lt;br /&gt;
  --with-tiff=no \&lt;br /&gt;
  --with-fftw=no \&lt;br /&gt;
  --with-cairo=no \&lt;br /&gt;
  --with-opengl=no \&lt;br /&gt;
  --with-freetype=no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MS-Windows ====&lt;br /&gt;
&lt;br /&gt;
===== MS-Windows/Cygwin =====&lt;br /&gt;
&lt;br /&gt;
* See the [[Cygwin]] wiki pages&lt;br /&gt;
&lt;br /&gt;
===== MS-Windows/native =====&lt;br /&gt;
&lt;br /&gt;
====== Compile ======&lt;br /&gt;
&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/CompileOnWindows GRASS Windows Native Binary Building Guide] (GRASS 6.4.x + 7.x)&lt;br /&gt;
* &amp;lt;strike&amp;gt;[http://www.webalice.it/marco.pasetti/grass/BuildFromSource.html GRASS Windows Native Binary Building Guide] (GRASS 6.3.x) &amp;lt;/strike&amp;gt;&lt;br /&gt;
* See/adapt [http://blog.qgis.org/node/124 idea] for unattended install of QGIS (et al) from [http://trac.osgeo.org/osgeo4w/ OSGeo4W] from the QuantumGIS Blog.&lt;br /&gt;
&lt;br /&gt;
See also [[WinGRASS Current Status]] for latest updates.&lt;br /&gt;
&lt;br /&gt;
=== Common problems and solutions ===&lt;br /&gt;
&lt;br /&gt;
During compilation, error can occur if certain packages are not installed. Here a list of problems with solution:&lt;br /&gt;
&lt;br /&gt;
* error: X11/Xlib.h: No such file or directory&lt;br /&gt;
** this suggests that you don't have the X headers installed&lt;br /&gt;
** Solution: Install the libx11-dev package&lt;br /&gt;
&lt;br /&gt;
* error:  g.list: error while loading shared libraries: libgdal1.6.0.so.1: cannot open shared object file: No such file or directory&lt;br /&gt;
** this error appears in the shell right after the user clicks GUI's &amp;quot;Start GRASS&amp;quot; button. The GUI shows an error about geographic extent and gets closed afterwards.&lt;br /&gt;
** It happens when you launch bin.i686 executable on 64bit system. Be careful and choose the right architecture.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Static compilation ===&lt;br /&gt;
&lt;br /&gt;
In order to get static rather than dynamically linked binaries, configure like this:&lt;br /&gt;
&lt;br /&gt;
  ./configure --disable-shared --enable-static&lt;br /&gt;
&lt;br /&gt;
This will however break the wxGUI and GRASS 7 completely because &amp;quot;ctypes&amp;quot; wants to link against shared libs, or there is something in the static libs that &amp;quot;ctypes&amp;quot; does not like.&lt;br /&gt;
&lt;br /&gt;
=== Optimization ===&lt;br /&gt;
&lt;br /&gt;
GCC and other compilers support [http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/Optimize-Options.html#Optimize-Options optimization]&lt;br /&gt;
&lt;br /&gt;
If you would like to set compiler optimisations, for a possibly faster binary, type (don't enter a &amp;quot;;&amp;quot; anywhere):&lt;br /&gt;
&lt;br /&gt;
        CFLAGS=-O ./configure&lt;br /&gt;
or,&lt;br /&gt;
        setenv CFLAGS -O&lt;br /&gt;
        ./configure&lt;br /&gt;
&lt;br /&gt;
whichever works on your shell. Use -O2 instead of -O if your compiler supports this (note: O is the letter, not zero). Using the &amp;quot;gcc&amp;quot; compiler, you can also specify processor specific flags (examples, please suggest better settings to us):&lt;br /&gt;
&lt;br /&gt;
  CFLAGS=&amp;quot;-mcpu=athlon -O2&amp;quot; # AMD Athlon processor with code optimisations&lt;br /&gt;
  CFLAGS=&amp;quot;-march=amdfam10&amp;quot;  # AMD Phenom II X4 64bit processor with gcc &amp;gt;=4.3&lt;br /&gt;
  CFLAGS=&amp;quot;-mcpu=pentium&amp;quot;    # Intel Pentium processor&lt;br /&gt;
  CFLAGS=&amp;quot;-mcpu=pentium4&amp;quot;   # Intel Pentium4 processor&lt;br /&gt;
  CFLAGS=&amp;quot;-O2 -msse -msse2 -mfpmath=sse -minline-all-stringops&amp;quot; # Intel XEON 64bit processor&lt;br /&gt;
  CFLAGS=&amp;quot;-mtune=nocona -m64 -minline-all-stringops&amp;quot;            # Intel Pentium 64bit processor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To find out optional CFLAGS for your platform, enter:&lt;br /&gt;
  gcc -dumpspecs&lt;br /&gt;
&lt;br /&gt;
See also: http://gcc.gnu.org/&lt;br /&gt;
&lt;br /&gt;
A real fast GRASS version (and small binaries) will be created with LDFLAGS set to &amp;quot;stripping&amp;quot; (but this disables debugging):&lt;br /&gt;
&lt;br /&gt;
  CFLAGS=&amp;quot;-O2 -mcpu=&amp;lt;cpu_see_above&amp;gt; -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure&lt;br /&gt;
&lt;br /&gt;
=== Configure options and their meanings ===&lt;br /&gt;
&lt;br /&gt;
For configure there are many options and some GRASS modules are built only if some options are set. Here are listed common configuration options with short explanation.&lt;br /&gt;
&lt;br /&gt;
* --prefix=/path - Sets path where GRASS will be installed. GRASS will reside in /path/grass-version.&lt;br /&gt;
* --enable-largefile - Enables large (&amp;gt;2Gb on 32bit systems) support. For current large file support status look at [[Large File Support]] page.&lt;br /&gt;
* --with-cxx - Enables compilation of C++ code. Required for r.terraflow module.&lt;br /&gt;
* --with-readline - Enables readline support. If readline is enabled, you can use its history/editing facilities when entering r.mapcalc expressions on stdin.&lt;br /&gt;
* --with-glw - Enables GLw support. The GLw library provides OpenGL &amp;quot;canvas&amp;quot; widgets for Athena and Motif. &lt;br /&gt;
 &lt;br /&gt;
 That switch is unnecessary for normal compilation. It's only&lt;br /&gt;
 required for r3.showdspf, which isn't normally built; if you &lt;br /&gt;
 want it, you have build it manually &lt;br /&gt;
 (e.g. &amp;quot;make -C raster3d/r3.showdspf&amp;quot;).&lt;br /&gt;
 As similar functionality is now provided by NVIZ, r3.showdspf&lt;br /&gt;
 is deprecated.&lt;br /&gt;
 r3.showdspf uses the Motif widget (so you also need a &lt;br /&gt;
 Motif library, e.g. Lesstif or OpenMotif).&lt;br /&gt;
 [http://grass.itc.it/pipermail/grassuser/2006-December/037475.html Glynn Clements at GRASS-user mailing list]&lt;br /&gt;
&lt;br /&gt;
=== Parallelized compilation on multi-core CPUs ===&lt;br /&gt;
&lt;br /&gt;
You can dramatically accelerate the compilation of the GRASS code with the -j flag of &amp;quot;make&amp;quot; if you have a multi-core CPU system. This determines the maximum number of jobs to have running at once, so cores don't have to sit idle waiting for jobs on other cores to complete. A good rule of thumb for this value is &amp;lt;tt&amp;gt;number_of_cores * 1.5&amp;lt;/tt&amp;gt;, but note that setting any higher than the actual number of cores will only affect the timing slightly. For example, on a dual-core processor:&lt;br /&gt;
  make -j 4&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- CFLAGS=&amp;quot;-pipe&amp;quot; doesn't seem to help much --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== GRASS-GDAL plugin ==&lt;br /&gt;
&lt;br /&gt;
* see [[Compile and install GRASS and QGIS with GDAL/OGR Plugin]]&lt;br /&gt;
&lt;br /&gt;
== Addons ==&lt;br /&gt;
&lt;br /&gt;
Please note that the installation of [[AddOns/GRASS_6|Addons]] can be easily done with the {{cmd|g.extension}} manager. The compile instructions below are aiming at own development.&lt;br /&gt;
&lt;br /&gt;
=== Compiled modules ===&lt;br /&gt;
&lt;br /&gt;
This is the general way which works for C modules as well as scripts (Python or Shell/Bash modules) which has HTML documentation.&lt;br /&gt;
&lt;br /&gt;
'''Requirements:'''&lt;br /&gt;
&lt;br /&gt;
Either:&lt;br /&gt;
* a binary GRASS package, or&lt;br /&gt;
* source code which has been prepared with:&lt;br /&gt;
    ./configure [opionally flags]&lt;br /&gt;
    make libs&lt;br /&gt;
&lt;br /&gt;
Each of the [[GRASS_AddOns|addon]] modules should come with a Makefile. To compile it, just run:&lt;br /&gt;
    make MODULE_TOPDIR=/path/to/grass64/&lt;br /&gt;
&lt;br /&gt;
Note that the &amp;lt;tt&amp;gt;/path/to/grass64&amp;lt;/tt&amp;gt; has to be absolute, not relative.&lt;br /&gt;
&lt;br /&gt;
If using Bash it may be useful to set that up as an alias:&lt;br /&gt;
    alias gmake64='make MODULE_TOPDIR=/path/to/grass64/'&lt;br /&gt;
&lt;br /&gt;
Installation (perhaps requires &amp;quot;sudo&amp;quot;):&lt;br /&gt;
    make MODULE_TOPDIR=/path/to/grass64/ install&lt;br /&gt;
&lt;br /&gt;
Note: Compiled addons may require a re-compilation if you changed/updated your GRASS standard binaries.&lt;br /&gt;
&lt;br /&gt;
==== If binary comes with a -dev package ====&lt;br /&gt;
&lt;br /&gt;
''(work in progress, this text states how it eventually will be :)''&lt;br /&gt;
Nowadays one does not need to the source code, nor compiling GRASS by oneself to be able to add add-ons. On Debian, you can just install the grass-dev package and then run:&lt;br /&gt;
 make MODULE_TOPDIR=/usr/lib/grass64/ INST_DIR=/usr/lib/grass64/&lt;br /&gt;
&lt;br /&gt;
The grass-dev package essentially provides GRASS's &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt; header files and Make configuration files.&lt;br /&gt;
&lt;br /&gt;
=== Scripts ===&lt;br /&gt;
&lt;br /&gt;
If the addon module is a script, it is sufficient to copy it into the (GRASS binaries) path somewhere. Alternatively, install addons into a separate GRASS addons binaries/scripts directory which is easier to maintain. It avoids getting clobbered every time you reinstall GRASS. To use these separately stored scripts, set and export the GRASS_ADDON_PATH environment variable before starting GRASS and it will automatically be added to the module search path (see the {{cmd|variables}} help page). To simplify this, do for example:&lt;br /&gt;
&lt;br /&gt;
 # add in $HOME/.bashrc:&lt;br /&gt;
 GRASS_ADDON_PATH=/usr/local/grass/addons/&lt;br /&gt;
 export GRASS_ADDON_PATH&lt;br /&gt;
&lt;br /&gt;
Make sure that the script is executable, then just call it in GRASS typing the filename. Python scripts need to be called writing the extension as well, like:&lt;br /&gt;
 &lt;br /&gt;
 GRASS 6.5.svn (spearfish60):~ &amp;gt; v.krige.py&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Documentation]]&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install&amp;diff=22355</id>
		<title>Compile and Install</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install&amp;diff=22355"/>
		<updated>2016-02-06T18:29:38Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* GRASS 7 on Debian Jessie */  Add python-gdal dependency&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- {{MoveToTrac}} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Disclaimer''': This page explains how to turn the GRASS GIS source code into an installable binary package (&amp;quot;compilation&amp;quot;) for different operating systems. If you just want to get ready-to-use binaries, go [http://grass.osgeo.org/download/ here], otherwise read on...&lt;br /&gt;
&lt;br /&gt;
== How to do compilation and installation of GRASS GIS? ==&lt;br /&gt;
&lt;br /&gt;
Here we explain the procedure to compile GRASS from SVN, but it also applies to official GRASS 6 releases.&lt;br /&gt;
&lt;br /&gt;
''For installation of precompiled binary packages, see the main [[Installation Guide]].''&lt;br /&gt;
&lt;br /&gt;
For detailed information on compilation, please see the [http://grass.osgeo.org/grass64/source/INSTALL INSTALL] file in the source code.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
==== Extra libraries ====&lt;br /&gt;
GRASS needs at least two extra libraries: PROJ and GDAL/OGR&lt;br /&gt;
&lt;br /&gt;
''Note: if you want to have DBMS support in GDAL (subsequently in GRASS) you have to perform the &amp;quot;Optional&amp;quot; steps below as well.''&lt;br /&gt;
&lt;br /&gt;
* [http://trac.osgeo.org/proj/ PROJ4] for management of projections (with proj-datumgrid-1.3.zip support)&lt;br /&gt;
* Optional: [http://trac.osgeo.org/geos/ GEOS]&lt;br /&gt;
* Optional: [http://www.postgresql.org PostgreSQL], [http://www.mysql.org mySQL], [http://www.unixodbc.org unixODBC], [http://www.sqlite.org SQLite] (SQLite is needed for [[QGIS]])&lt;br /&gt;
* [http://www.gdal.org GDAL/OGR] for reading and writing various GIS data formats (interoperability)&lt;br /&gt;
&lt;br /&gt;
You have to install these two libraries '''first''' (see below how to get them precompiled for your system).&lt;br /&gt;
&lt;br /&gt;
It is easiest to obtain a prepackaged version of these libraries (e.g., .rpm; .deb) for your particular operating system and run the corresponding package installation (e.g., rpm -Uhv packagename.rpm; apt-get) in a terminal window. Take care to also install the development packages of these libraries (...-devel packages). If there is no prepackage version, then you will have to download the source code (see links above, source code packages usually ends in .tar.gz or .zip) and compile it (you must have a C compiler installed as part of your operating system). The Web sites show the steps to compile the libraries.&lt;br /&gt;
&lt;br /&gt;
Other libraries needed to run GRASS are listed on the {{website|grass64/source/REQUIREMENTS.html|requirements page}}.&lt;br /&gt;
&lt;br /&gt;
To compile, you will also need the respective &amp;quot;-devel&amp;quot; packages.&lt;br /&gt;
&lt;br /&gt;
==== Download GRASS GIS source code ====&lt;br /&gt;
Then [http://grass.osgeo.org/download/software/sources/ download the GRASS GIS source code] of course.&lt;br /&gt;
&lt;br /&gt;
=== Generic Compilation and installation procedure ===&lt;br /&gt;
&lt;br /&gt;
* It is wise that compilation processes are carried out as a normal user: If you want to get the source code in a place where  you do not have write permissions (e.g. in /usr/local/src/) just follow this:&lt;br /&gt;
      cd /usr/local/src/ &lt;br /&gt;
      su -c 'mkdir grass6'&lt;br /&gt;
      su -c 'chown yourlogin:yourgroup grass6'&lt;br /&gt;
&lt;br /&gt;
Otherwise if you have permissions just continue as a normal user:&lt;br /&gt;
      cd /usr/local/src/&lt;br /&gt;
      svn checkout ...&lt;br /&gt;
&lt;br /&gt;
* do a code checkout from the SVN source code repository&lt;br /&gt;
: checkout the latest GRASS 6.x from SVN (see: {{twiki|DownloadSource}})&lt;br /&gt;
&lt;br /&gt;
* in the grass6 directory, you will find the precious INSTALL file, open it with your favourite pager/editor and read it carefully!&lt;br /&gt;
&lt;br /&gt;
* run configure with parameters to adapt the compile process to your own system. To see what options can be passed to it, run:&lt;br /&gt;
 ./configure --help | less &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The minimum set of configure parameters is &lt;br /&gt;
      ./configure ### --&amp;gt;&lt;br /&gt;
It may (!) look like this:&lt;br /&gt;
 &lt;br /&gt;
      ./configure \&lt;br /&gt;
          --with-cxx \&lt;br /&gt;
          --with-sqlite \&lt;br /&gt;
          --with-postgres-libs=/usr/include/pgsql/libpq \&lt;br /&gt;
          --with-postgres-includes=/usr/include/pgsql \&lt;br /&gt;
          --with-freetype \&lt;br /&gt;
          --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
          --with-motif \&lt;br /&gt;
          --with-proj-share=/usr/share/proj&lt;br /&gt;
&lt;br /&gt;
You may have to explicitly state the path for certain packages (i.e., gdal). The Unix 'locate' command will come in handy for finding the path of the package you need (you may have to run locate as root ex: sudo locate gdal-config).&lt;br /&gt;
&lt;br /&gt;
Please note that the paths mentioned may widely vary due to the distribution used.&lt;br /&gt;
See [[Compile_and_Install#Platform_Specific_Notes|Platform Specific Notes]] below.&lt;br /&gt;
&lt;br /&gt;
Depending on your needs it may be a good idea to include debugging hooks.&lt;br /&gt;
: See [[GRASS_Debugging#Compile_Time_Setup]].&lt;br /&gt;
 CFLAGS=&amp;quot;-ggdb -Wall -Werror-implicit-function-declaration&amp;quot; ./configure ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the end of configuration process you should get report not much different from this:&lt;br /&gt;
&lt;br /&gt;
GRASS is now configured for:  i686-pc-linux-gnu&lt;br /&gt;
 &lt;br /&gt;
 Source directory:            /usr/src/grass6&lt;br /&gt;
 Build directory:             /usr/src/grass6&lt;br /&gt;
 Installation directory:      /usr/local/grass-6.3.svn&lt;br /&gt;
 Startup script in directory: ${exec_prefix}/bin&lt;br /&gt;
 C compiler:                  gcc -g -O2 &lt;br /&gt;
 C++ compiler:                c++ -g -O2&lt;br /&gt;
 FORTRAN compiler:            &lt;br /&gt;
 Building shared libraries:   yes&lt;br /&gt;
 64bit support:               no&lt;br /&gt;
 &lt;br /&gt;
  NVIZ:                       yes&lt;br /&gt;
 &lt;br /&gt;
  BLAS support:               no&lt;br /&gt;
  C++ support:                yes&lt;br /&gt;
  DWG support:                no&lt;br /&gt;
  FFMPEG support:             no&lt;br /&gt;
  FFTW support:               yes&lt;br /&gt;
  FreeType support:           yes&lt;br /&gt;
  GDAL support:               yes&lt;br /&gt;
  GLw support:                no&lt;br /&gt;
  LAPACK support:             no&lt;br /&gt;
  Large File Support (LFS):   no&lt;br /&gt;
  Motif support:              no&lt;br /&gt;
  MySQL support:              no&lt;br /&gt;
  NLS support:                no&lt;br /&gt;
  ODBC support:               no&lt;br /&gt;
  OGR support:                yes&lt;br /&gt;
  OpenGL(R) support:          yes&lt;br /&gt;
  PNG support:                yes&lt;br /&gt;
  PostgreSQL support:         yes&lt;br /&gt;
  Readline support:           no&lt;br /&gt;
  SQLite support:             no&lt;br /&gt;
  Tcl/Tk support:             yes&lt;br /&gt;
  TIFF support:               yes&lt;br /&gt;
  X11 support:                yes&lt;br /&gt;
  &lt;br /&gt;
* Let's compile it (takes a little while...)!&lt;br /&gt;
      make&lt;br /&gt;
* At the end, you should get report not much different from this:&lt;br /&gt;
 ----------------------------------------------------------------------&lt;br /&gt;
 Following modules are missing the 'description.html' file in src code:&lt;br /&gt;
 ----------------------------------------------------------------------&lt;br /&gt;
 GRASS GIS compilation log&lt;br /&gt;
 -------------------------&lt;br /&gt;
 Started compilation: Ne kvě 28 13:18:43 CEST 2006&lt;br /&gt;
 --&lt;br /&gt;
 Errors in:&lt;br /&gt;
 --&lt;br /&gt;
 Finished compilation: Ne kvě 28 13:43:40 CEST 2006&lt;br /&gt;
 (In case of errors please change into the directory with error and run 'make')&lt;br /&gt;
&lt;br /&gt;
* If there is any error, change directory to directory with error and run &amp;quot;make&amp;quot; again. Report occuring bug to grass mailing list&lt;br /&gt;
* Once the installation process is finished, you're ready to install GRASS system wide.&lt;br /&gt;
      su -c 'make install'&lt;br /&gt;
* enjoy GRASS: &lt;br /&gt;
      grass64&lt;br /&gt;
&lt;br /&gt;
=== What else? ===&lt;br /&gt;
&lt;br /&gt;
If you want to use [http://www.qgis.org QGIS], then also compile the GRASS-GDAL/OGR plugin. This is also useful to access your GRASS-data&lt;br /&gt;
from other application using GDAL/OGR like [http://thuban.intevation.de thuban].&lt;br /&gt;
* [[Compile and install GRASS and QGIS with GDAL/OGR Plugin]] (enables QGIS to read GRASS data directly)&lt;br /&gt;
&lt;br /&gt;
=== Compile and install GDAL-GRASS plugin ===&lt;br /&gt;
&lt;br /&gt;
* See [[Compile and install GDAL-GRASS plugin]]&lt;br /&gt;
&lt;br /&gt;
=== Platform Specific Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Linux ====&lt;br /&gt;
&lt;br /&gt;
Linux cames in various flavours, i.e. distributions.&lt;br /&gt;
&lt;br /&gt;
===== Debian =====&lt;br /&gt;
&lt;br /&gt;
Read the instructions here:&lt;br /&gt;
: http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/debian/README.debian&lt;br /&gt;
&lt;br /&gt;
   # first install PROJ, GDAL, etc.&lt;br /&gt;
   cd grass64/&lt;br /&gt;
   # follow instructions in debian/README.debian&lt;br /&gt;
   fakeroot buildpackage&lt;br /&gt;
&lt;br /&gt;
* Official [http://wiki.debian.org/DebianGis DebianGIS] packaging control files:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strike&amp;gt;&lt;br /&gt;
  http://svn.debian.org/viewsvn/pkg-grass/packages/grass/&lt;br /&gt;
  svn co svn://svn.debian.org/svn/pkg-grass/packages/grass/trunk/&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  svn co svn://svn.debian.org/svn/pkg-grass/packages/grass/branches/&amp;lt;GRASS Version&amp;gt;&lt;br /&gt;
&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Available on git server:&lt;br /&gt;
  git://git.debian.org/git/pkg-grass/grass.git&lt;br /&gt;
&lt;br /&gt;
  http://anonscm.debian.org/cgit/pkg-grass/grass.git/&lt;br /&gt;
&lt;br /&gt;
====== GRASS 6.1 on Debian Sarge ======&lt;br /&gt;
&lt;br /&gt;
* [http://hamish.bowman.googlepages.com/debiangisfiles#compile Compiling GRASS 6.1-CVS on Debian/OldStable (aka 3.1, Sarge)]&lt;br /&gt;
&lt;br /&gt;
====== GRASS 6.4 on Debian Lenny ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
  apt-get install flex bison libreadline-dev libncurses5-dev lesstif2-dev debhelper dpatch libtiff4-dev \&lt;br /&gt;
          tcl-dev tk-dev libfftw3-dev libxmu-dev libfreetype6-dev autoconf2.13 autotools-dev doxygen \&lt;br /&gt;
          libmysqlclient15-dev graphviz libsqlite3-dev python-wxgtk2.8 libcairo2-dev libwxgtk2.8-dev \&lt;br /&gt;
          python-dev libgdal1-dev  libgdal1-1.5.0 libproj-dev libproj0 proj-data mysql&lt;br /&gt;
&lt;br /&gt;
# Important: avoid using CFLAGS=&amp;quot;... -Werror-implicit-function-declaration&amp;quot; (also on later Debian versions), see {{trac|1684}}&lt;br /&gt;
&lt;br /&gt;
Configure:&lt;br /&gt;
  ./configure \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-postgres --with-postgres-includes=/usr/include/postgresql \&lt;br /&gt;
  --with-mysql --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib/mysql \&lt;br /&gt;
  --with-odbc \&lt;br /&gt;
  --with-cairo \&lt;br /&gt;
  --with-proj-share=/usr/share/proj \&lt;br /&gt;
  --with-tcltk-includes=/usr/include/tcl8.4/ \&lt;br /&gt;
  --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
  --with-motif --with-fftw --with-nls --with-python \&lt;br /&gt;
  --with-x --x-libraries=/usr/lib/x86_64-linux-gnu&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
  sudo make install&lt;br /&gt;
&lt;br /&gt;
====== GRASS 6.4 on Debian Jessie ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
  apt-get install flex bison debhelper dpatch autoconf2.13 autotools-dev \&lt;br /&gt;
    python-dev g++ gcc gettext graphviz libcairo2-dev libfftw3-dev tcl-dev tk-dev \&lt;br /&gt;
    libfreetype6-dev libgdal1h libgdal1-dev libglu1-mesa-dev libglw1-mesa-dev \&lt;br /&gt;
    libncurses5-dev libreadline-dev libsqlite3-dev libtiff5-dev \&lt;br /&gt;
    libwxgtk3.0-dev libxmu-dev libxmu-headers libxt-dev mesa-common-dev \&lt;br /&gt;
    libproj-dev proj-bin python-numpy python-wxgtk3.0 subversion wx-common zlib1g-dev \&lt;br /&gt;
    netcdf-bin libnetcdf-dev libatlas-dev libgegl-dev doxygen postgresql mysql-server \&lt;br /&gt;
    libgeotiff-dev libblas-dev libgeotiff-epsg libxmu-dev libxt-dev libx11-dev&lt;br /&gt;
&lt;br /&gt;
# Important: avoid using CFLAGS=&amp;quot;... -Werror-implicit-function-declaration&amp;quot; (also on later Debian versions), see {{trac|1684}}&lt;br /&gt;
&lt;br /&gt;
Configure:&lt;br /&gt;
  ./configure \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-postgres \&lt;br /&gt;
  --with-odbc \&lt;br /&gt;
  --with-cairo \&lt;br /&gt;
  --with-geos \&lt;br /&gt;
  --with-proj-share=/usr/share/proj \&lt;br /&gt;
  --with-tcltk-includes=/usr/include/tcl8.6/ \&lt;br /&gt;
  --with-mysql --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib/mysql \&lt;br /&gt;
  --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
  --with-motif \&lt;br /&gt;
  --with-fftw \&lt;br /&gt;
  --with-nls \&lt;br /&gt;
  --with-postgres-includes=/usr/include/postgresql \&lt;br /&gt;
  --with-python \&lt;br /&gt;
  --with-x --x-libraries=/usr/lib/x86_64-linux-gnu&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
  sudo make install&lt;br /&gt;
&lt;br /&gt;
====== GRASS 7 on Debian Squeeze ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
 apt-get install flex bison debhelper dpatch autoconf2.13 autotools-dev python-dev \&lt;br /&gt;
     g++ gcc gettext graphviz libcairo2-dev libfftw3-dev libfreetype6-dev \&lt;br /&gt;
     libgdal1 libgdal1-dev libglu1-mesa-dev libglw1-mesa-dev \&lt;br /&gt;
     libncurses5-dev libproj-dev libreadline-dev libsqlite3-dev libtiff4-dev \&lt;br /&gt;
     libwxgtk2.8-dev libxmu-dev libxmu-headers libxt-dev mesa-common-dev \&lt;br /&gt;
     proj-bin python-numpy python-wxgtk2.8 subversion wx-common zlib1g-dev&lt;br /&gt;
&lt;br /&gt;
Download source code:&lt;br /&gt;
&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
Configure:&lt;br /&gt;
 &lt;br /&gt;
 cd grass_trunk/&lt;br /&gt;
 CFLAGS=&amp;quot;-Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused&amp;quot; \&lt;br /&gt;
 CXXFLAGS=&amp;quot;-Wall&amp;quot;  \&lt;br /&gt;
  ./configure --prefix=/usr/local \&lt;br /&gt;
  --with-gdal --with-proj --with-proj-share=/usr/share \&lt;br /&gt;
  --with-glw --with-nls --with-readline \&lt;br /&gt;
  --without-tcltk \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-cairo --with-python=/usr/bin/python2.6-config --with-wxwidgets \&lt;br /&gt;
  --with-geos --with-pthread&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
  sudo make install  # installs as /usr/local/bin/grass71&lt;br /&gt;
&lt;br /&gt;
====== GRASS 7 on Debian Wheezy ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
&lt;br /&gt;
 # note: cmake and libboost-all-dev only needed for optional libLAS&lt;br /&gt;
 sudo apt-get install cmake libboost-all-dev&lt;br /&gt;
 &lt;br /&gt;
 sudo apt-get install flex bison debhelper dpatch autoconf2.13 autotools-dev \&lt;br /&gt;
   python-dev g++ gcc gettext graphviz libcairo2-dev libfftw3-dev libfreetype6-dev \&lt;br /&gt;
   libgdal1 libgdal1-dev libglu1-mesa-dev libglw1-mesa-dev libncurses5-dev libproj-dev \&lt;br /&gt;
   libreadline-dev libtiff4-dev libwxgtk2.8-dev libxmu-dev libxmu-headers \&lt;br /&gt;
   libxt-dev mesa-common-dev proj-bin python-numpy python-wxgtk2.8 subversion wx-common \&lt;br /&gt;
   zlib1g-dev netcdf-bin libatlas-dev libgegl-dev opencl-headers ocl-icd-libopencl1 \&lt;br /&gt;
   libsqlite3-dev postgresql python-sphinx&lt;br /&gt;
&lt;br /&gt;
Download and Install libLAS&lt;br /&gt;
 wget http://download.osgeo.org/liblas/libLAS-1.7.0.tar.gz&lt;br /&gt;
 tar -zxvf libLAS-1.7.0.tar.gz&lt;br /&gt;
 cd libLAS-1.7.0/&lt;br /&gt;
 mkdir makefiles&lt;br /&gt;
 cd makefiles&lt;br /&gt;
 cmake -G &amp;quot;Unix Makefiles&amp;quot; ../&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
 sudo ldconfig&lt;br /&gt;
 cd ../..&lt;br /&gt;
&lt;br /&gt;
Download of GRASS GIS 7 source code:&lt;br /&gt;
 wget http://grass.osgeo.org/grass70/source/grass-7.0.0.tar.gz&lt;br /&gt;
 tar -zxvf grass-7.0.0.tar.gz&lt;br /&gt;
&lt;br /&gt;
Configure:&lt;br /&gt;
 cd grass-7.0.0&lt;br /&gt;
 CFLAGS=&amp;quot;-g -Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused&amp;quot; CXXFLAGS=&amp;quot;-g -Wall&amp;quot; \&lt;br /&gt;
 ./configure \&lt;br /&gt;
    --prefix=/usr/local \&lt;br /&gt;
    --with-gdal \&lt;br /&gt;
    --with-proj --with-proj-share=/usr/share \&lt;br /&gt;
    --with-glw --with-nls --with-readline \&lt;br /&gt;
    --with-cxx --enable-largefile \&lt;br /&gt;
    --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
    --with-sqlite --with-cairo --with-python=/usr/bin/python-config \&lt;br /&gt;
    --with-wxwidgets --with-geos --with-blas \&lt;br /&gt;
    --with-lapack-includes=/usr/lib/lapack --with-liblas=yes \&lt;br /&gt;
    --with-netcdf=/usr/bin/nc-config --with-odbc=yes \&lt;br /&gt;
    --with-openmp=yes --with-pthread=yes --with-postgres=yes \&lt;br /&gt;
    --with-postgres-includes=/usr/include/postgresql \&lt;br /&gt;
    --with-postgres-libs=/usr/lib/postgresql&lt;br /&gt;
 &lt;br /&gt;
 #     --with-mysql=yes --with-mysql-includes=/usr/include/mysql \&lt;br /&gt;
 #    --with-mysql-libs=/usr/lib/mysql \&lt;br /&gt;
&lt;br /&gt;
GRASS GIS 7 is now configured (example):&lt;br /&gt;
&lt;br /&gt;
  Source directory:           /home/user/grass-7.0.0&lt;br /&gt;
  Build directory:            /home/user/grass-7.0.0&lt;br /&gt;
  Installation directory:     ${prefix}/grass-7.0.0&lt;br /&gt;
  Startup script in directory:${exec_prefix}/bin&lt;br /&gt;
  C compiler:                 gcc -g -Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused &lt;br /&gt;
  C++ compiler:               c++ -g -Wall&lt;br /&gt;
  Building shared libraries:  yes&lt;br /&gt;
  OpenGL platform:            X11&lt;br /&gt;
  MacOSX application:         no&lt;br /&gt;
  MacOSX architectures:       &lt;br /&gt;
  MacOSX SDK:                 &lt;br /&gt;
  BLAS support:               yes&lt;br /&gt;
  C++ support:                yes&lt;br /&gt;
  Cairo support:              yes&lt;br /&gt;
  DWG support:                no&lt;br /&gt;
  FFTW support:               yes&lt;br /&gt;
  FreeType support:           yes&lt;br /&gt;
  GDAL support:               yes&lt;br /&gt;
  GEOS support:               yes&lt;br /&gt;
  LAPACK support:             no&lt;br /&gt;
  Large File support (LFS):   yes&lt;br /&gt;
  libLAS support:             yes&lt;br /&gt;
  MySQL support:              no&lt;br /&gt;
  NetCDF support:             yes&lt;br /&gt;
  NLS support:                yes&lt;br /&gt;
  ODBC support:               yes&lt;br /&gt;
  OGR support:                yes&lt;br /&gt;
  OpenCL support:             no&lt;br /&gt;
  OpenGL support:             yes&lt;br /&gt;
  OpenMP support:             yes&lt;br /&gt;
  PNG support:                yes&lt;br /&gt;
  POSIX thread support:       yes&lt;br /&gt;
  PostgreSQL support:         yes&lt;br /&gt;
  Readline support:           yes&lt;br /&gt;
  Regex support:              yes&lt;br /&gt;
  SQLite support:             yes&lt;br /&gt;
  TIFF support:               yes&lt;br /&gt;
  wxWidgets support:          yes&lt;br /&gt;
  X11 support:                no&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
 make -j2&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
 sudo make install   # installs as /usr/local/bin/grass70&lt;br /&gt;
&lt;br /&gt;
Launch:&lt;br /&gt;
 grass70&lt;br /&gt;
&lt;br /&gt;
====== GRASS 7 on Debian Jessie ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
 sudo apt-get install cmake libboost-all-dev flex bison debhelper dpatch autoconf2.13 \&lt;br /&gt;
    autotools-dev python-dev g++ gcc gettext graphviz libcairo2-dev libfftw3-dev \&lt;br /&gt;
    libfreetype6-dev libgdal1h libgdal1-dev libglu1-mesa-dev libglw1-mesa-dev \&lt;br /&gt;
    libncurses5-dev libproj-dev libreadline-dev libsqlite3-dev libtiff5-dev \&lt;br /&gt;
    libwxgtk3.0-dev libxmu-dev libxmu-headers libxt-dev mesa-common-dev \&lt;br /&gt;
    proj-bin python-numpy python-wxgtk3.0 subversion wx-common zlib1g-dev \&lt;br /&gt;
    netcdf-bin libnetcdf-dev libgegl-dev  doxygen python-sphinx \&lt;br /&gt;
    postgresql libgeotiff-dev libblas-dev mysql-server \&lt;br /&gt;
    libatlas-dev libblas-dev liblapack3gf liblapack-dev&lt;br /&gt;
    # opencl-headers ocl-icd-libopencl1   liblas-bin liblas-c-dev python-gdal&lt;br /&gt;
&lt;br /&gt;
Download and compile libLAS (or simply install 'liblas-c-dev ', see above):&lt;br /&gt;
 wget http://download.osgeo.org/liblas/libLAS-1.8.0.tar.bz2&lt;br /&gt;
 tar xjf libLAS-1.8.0.tar.bz2&lt;br /&gt;
 mkdir libLAS-1.8.0/makefiles&lt;br /&gt;
 cd libLAS-1.8.0/makefiles&lt;br /&gt;
 cmake -G &amp;quot;Unix Makefiles&amp;quot; ../&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
Download and compile GRASS 7:&lt;br /&gt;
 # (check there for later version)&lt;br /&gt;
 wget http://grass.osgeo.org/grass70/source/grass-7.0.0.tar.gz&lt;br /&gt;
 tar xzfv grass-7.0.0.tar.gz&lt;br /&gt;
 cd grass-7.0.0&lt;br /&gt;
 CFLAGS=&amp;quot;-g -Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused&amp;quot; \&lt;br /&gt;
 CXXFLAGS=&amp;quot;-g -Wall&amp;quot;  \&lt;br /&gt;
 ./configure \&lt;br /&gt;
    --prefix=/usr/local \&lt;br /&gt;
    --with-gdal --with-proj --with-proj-share=/usr/share \&lt;br /&gt;
    --with-glw --with-nls --with-readline \&lt;br /&gt;
    --with-cxx --enable-largefile \&lt;br /&gt;
    --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
    --with-sqlite --with-cairo --with-python=/usr/bin/python-config \&lt;br /&gt;
    --with-wxwidgets --with-geos \&lt;br /&gt;
    --with-blas --with-blas-includes=/usr/include/atlas/ \&lt;br /&gt;
    --with-lapack --with-lapack-includes=/usr/include/atlas/ \&lt;br /&gt;
    --with-netcdf=/usr/bin/nc-config --with-odbc=yes \&lt;br /&gt;
    --with-openmp=yes --with-pthread=no --with-postgres=yes \&lt;br /&gt;
    --with-postgres-includes=/usr/include/postgresql \&lt;br /&gt;
    --with-postgres-libs=/usr/lib/postgresql \&lt;br /&gt;
    --with-mysql=yes --with-mysql-includes=/usr/include/mysql \&lt;br /&gt;
    --with-mysql-libs=/usr/lib/mysql&lt;br /&gt;
 make -j2&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
 sudo make install  # installs as /usr/local/bin/grass70&lt;br /&gt;
&lt;br /&gt;
===== Ubuntu =====&lt;br /&gt;
&lt;br /&gt;
There is a dedicated page on how to [[Compile_and_Install_Ubuntu | Compile the GRASS GIS source code &amp;amp; install it in Ubuntu]].&lt;br /&gt;
&lt;br /&gt;
===== Linux Mint =====&lt;br /&gt;
&lt;br /&gt;
Install packages needed for compilation:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install build-essential flex make bison gcc libgcc1 g++ \&lt;br /&gt;
 cmake ccache python python-dev python-qt4 python-qt4-dev python-opengl \&lt;br /&gt;
 python-wxversion python-wxtools python-wxgtk2.8 python-dateutil \&lt;br /&gt;
 libgsl0-dev python-numpy wx2.8-headers wx-common libwxgtk2.8-dev \&lt;br /&gt;
 libwxgtk2.8-dbg libwxbase2.8-dev  libwxbase2.8-dbg libncurses5-dev \&lt;br /&gt;
 zlib1g-dev gettext libtiff-dev libpnglite-dev tcl8.5-dev tk8.5-dev \&lt;br /&gt;
 libcairo2 libcairo2-dev sqlite3 libsqlite3-dev libpq-dev libreadline6 \&lt;br /&gt;
 libreadline6-dev libfreetype6-dev txt2tags libfftw3-3 libfftw3-dev \&lt;br /&gt;
 libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql \&lt;br /&gt;
 libqt4-qt3support lsb-qt4 qt4-designer qt4-dev-tools qt4-doc \&lt;br /&gt;
 qt4-qtconfig libapt-pkg-perl resolvconf libjasper-dev ruby subversion \&lt;br /&gt;
 ffmpeg ffmpeg2theora libffmpegthumbnailer-dev libavcodec-dev libxmu-dev \&lt;br /&gt;
 libavformat-dev libswscale-dev checkinstall libglu1-mesa-dev libxmu-dev \&lt;br /&gt;
 libproj-dev  proj-bin python-gdal&lt;br /&gt;
&lt;br /&gt;
CFLAGS=&amp;quot;-Wall&amp;quot; ./configure  --with-cxx  --with-gdal \&lt;br /&gt;
 --with-proj --with-proj-share=/usr/share/proj/ \&lt;br /&gt;
 --with-geos  --without-postgres \&lt;br /&gt;
 --with-nls  --with-opengl-includes=/usr/include/GL/ \&lt;br /&gt;
 --with-x --with-fftw  --with-freetype \&lt;br /&gt;
 --with-freetype-includes=/usr/include/freetype2  --with-sqlite \&lt;br /&gt;
 --with-python=/usr/bin/python2.7-config  --with-wx=/usr/bin/wx-config \&lt;br /&gt;
 --with-wxwidgets  --with-cairo  --enable-largefile&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Mandriva =====&lt;br /&gt;
&lt;br /&gt;
Installation of dependencies (urpmi will ask you a few more):&lt;br /&gt;
&lt;br /&gt;
'''Mandriva 2009:''' (take out the '64' everywhere if you are on 32bit)&lt;br /&gt;
  # as root&lt;br /&gt;
    urpmi flex bison zlib-devel tiff-devel png-devel tcl-devel tk-devel sqlite3-devel \&lt;br /&gt;
          mesagl1-devel mesaglu1-devel lib64xmu6-devel gcc-c++ gettext \&lt;br /&gt;
          lib64wxgtk2.8 lib64wxgtk2.8-devel lib64wxgtkgl2.8 wxgtk2.8 \&lt;br /&gt;
          lib64wxPythonGTK2.8 lib64wxPythonGTK2.8-devel wxPythonGTK wxPythonGTK-wxversion&lt;br /&gt;
    exit&lt;br /&gt;
&lt;br /&gt;
'''Mandriva 2010:''' (take out the '64' everywhere if you are on 32bit) - see also [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/grass/current/SPECS/ SPEC] file&lt;br /&gt;
  # as root&lt;br /&gt;
    # installation of PROJ and GDAL&lt;br /&gt;
    urpmi proj proj-devel gdal gdal-devel gcc-gfortran lib64openssl1.0.0 \&lt;br /&gt;
          lib64openssl1.0.0-devel postgresql8.4-devel lib64pq8.4&lt;br /&gt;
 &lt;br /&gt;
    # installation of compilation environment&lt;br /&gt;
    urpmi flex bison zlib-devel tiff-devel png-devel tcl-devel tk-devel sqlite3-devel \&lt;br /&gt;
          lib64mesagl1-devel lib64mesaglu1-devel lib64xmu6-devel gcc-c++ gettext \&lt;br /&gt;
          lib64wxgtk2.8 lib64wxgtk2.8-devel lib64wxgtkgl2.8 wxgtk2.8 \&lt;br /&gt;
          lib64wxPythonGTK2.8 lib64wxPythonGTK2.8-devel wxPythonGTK wxPythonGTK-wxversion&lt;br /&gt;
    exit&lt;br /&gt;
&lt;br /&gt;
Then, to configure GRASS, run (64 bit stuff optional of course):&lt;br /&gt;
  #  as user&lt;br /&gt;
  ./configure \&lt;br /&gt;
    --enable-64bit --with-libs=/usr/lib64 \&lt;br /&gt;
    --with-cxx \&lt;br /&gt;
    --with-gdal=/usr/local/bin/gdal-config \&lt;br /&gt;
    --with-sqlite \&lt;br /&gt;
    --with-nls \&lt;br /&gt;
    --with-python \&lt;br /&gt;
    --with-wxwidgets=/usr/lib/wxPython/bin/wx-config \&lt;br /&gt;
    --with-fftw \&lt;br /&gt;
    --with-ffmpeg --with-ffmpeg-includes=&amp;quot;/usr/include/libav* /usr/include/libpostproc /usr/include/libswscale&amp;quot; \&lt;br /&gt;
    --with-motif \&lt;br /&gt;
    --with-mysql --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib64 \&lt;br /&gt;
    --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
    --enable-largefile&lt;br /&gt;
&lt;br /&gt;
   # compilation (use -j2 ior -j4 parameter on multi-core CPUs to accelerate):   &lt;br /&gt;
    make&lt;br /&gt;
&lt;br /&gt;
Installation:&lt;br /&gt;
    su&lt;br /&gt;
    # this will install into /usr/local/&lt;br /&gt;
    make install&lt;br /&gt;
    exit&lt;br /&gt;
&lt;br /&gt;
===== Enterprise Linux =====&lt;br /&gt;
&lt;br /&gt;
Enterprise Linux (EL) and derivatives (that is, Red Hat Enterprise Linux, CentOS and Scientific Linux) is a popular and robust platform for servers and computing-heavy workstations, and is therefore a good fit for GIS specific requirements.&lt;br /&gt;
&lt;br /&gt;
See: http://wiki.osgeo.org/wiki/Enterprise_Linux_GIS&lt;br /&gt;
&lt;br /&gt;
===== Scientific Linux =====&lt;br /&gt;
&lt;br /&gt;
See Centos&lt;br /&gt;
&lt;br /&gt;
===== CentOS =====&lt;br /&gt;
&lt;br /&gt;
You first need to add the EPEL repository for PROJ.4 and GDAL, see [https://fedoraproject.org/wiki/EPEL/FAQ#How_can_I_install_the_packages_from_the_EPEL_software_repository.3F here]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strike&amp;gt;&lt;br /&gt;
Preparation '''Centos 5''' (old):&lt;br /&gt;
  yum install epel-release&lt;br /&gt;
 &lt;br /&gt;
  # Note: CentOS 5 comes with Python 2.4 which lacks python-config, hence two extra tweaks are needed.&lt;br /&gt;
  yum install flex bison zlib-devel tcl-devel tk-devel gcc-c++ gettext \&lt;br /&gt;
              libtiff-devel libpng-devel sqlite-devel \&lt;br /&gt;
              mesa-libGL-devel mesa-libGLU-devel mesa-libGLw-devel \&lt;br /&gt;
              mesa-libOSMesa-devel libXmu-devel python-devel gtk2-devel\&lt;br /&gt;
              ncurses-devel postgresql-devel make&lt;br /&gt;
&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Preparation '''Centos 6''' | '''Scientific Linux 6''':&lt;br /&gt;
  yum install epel-release&lt;br /&gt;
 &lt;br /&gt;
  yum install flex bison make zlib-devel gcc-c++ gettext \&lt;br /&gt;
              sqlite-devel mesa-libGL-devel mesa-libGLU-devel \&lt;br /&gt;
              libXmu-devel libX11-devel fftw-devel libtiff-devel \&lt;br /&gt;
              lesstif-devel python-devel numpy wxPython wxGTK-devel \&lt;br /&gt;
              proj proj-devel proj-epsg proj-nad libxml2 gdal gdal-devel geos geos-devel \&lt;br /&gt;
              python-dateutil python-imaging python-matplotlib&lt;br /&gt;
  # only GRASS GIS 6: install also tcl-devel tk-devel&lt;br /&gt;
&lt;br /&gt;
Preparation '''Centos 7''' | '''Scientific Linux 7''':&lt;br /&gt;
  yum install epel-release&lt;br /&gt;
 &lt;br /&gt;
  yum install flex bison make zlib-devel gcc-c++ gettext \&lt;br /&gt;
              sqlite-devel mesa-libGL-devel mesa-libGLU-devel \&lt;br /&gt;
              libXmu-devel libX11-devel fftw-devel libtiff-devel \&lt;br /&gt;
              lesstif-devel python-devel numpy wxPython wxGTK-devel \&lt;br /&gt;
              proj proj-devel proj-epsg proj-nad libxml2 gdal gdal-devel geos geos-devel \&lt;br /&gt;
              netcdf netcdf-devel blas-devel lapack-devel atlas-devel \&lt;br /&gt;
              python-dateutil python-imaging python-matplotlib python-sphinx \&lt;br /&gt;
              doxygen subversion&lt;br /&gt;
&lt;br /&gt;
'''GRASS GIS 7 compilation and installation'''&lt;br /&gt;
&lt;br /&gt;
[http://grass.osgeo.org/download/software/sources/ Download source code] (e.g., --&amp;gt; &amp;quot;Download latest 7.0-svn code (SVN))&amp;quot; and configure GRASS 7 (suggestion: save this as script):&lt;br /&gt;
&lt;br /&gt;
 ./configure \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --with-proj --with-proj-share=/usr/share/proj \&lt;br /&gt;
  --with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-python \&lt;br /&gt;
  --with-cairo --with-cairo-ldflags=-lfontconfig \&lt;br /&gt;
  --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
  --with-wxwidgets=/usr/bin/wx-config \&lt;br /&gt;
  --with-openmp \&lt;br /&gt;
  --with-blas --with-blas-includes=/usr/include/atlas-x86_64-base/ \&lt;br /&gt;
  --with-lapack --with-lapack-includes=/usr/include/atlas-x86_64-base/ \&lt;br /&gt;
  --with-fftw \&lt;br /&gt;
  --with-geos \&lt;br /&gt;
  --with-netcdf \&lt;br /&gt;
  --without-ffmpeg \&lt;br /&gt;
  --without-mysql \&lt;br /&gt;
  --without-postgres \&lt;br /&gt;
  --without-odbc \&lt;br /&gt;
  --without-fftw&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
    make&lt;br /&gt;
or on a multicore system (number depends of available cores):&lt;br /&gt;
    make -j4&lt;br /&gt;
&lt;br /&gt;
For a system wide installation, run as root user:&lt;br /&gt;
    make install&lt;br /&gt;
OR simply run it directly from the source code directory (substitute ARCH with i686 or x86_64):&lt;br /&gt;
&lt;br /&gt;
    bin.$ARCH/grass70 -gui&lt;br /&gt;
&lt;br /&gt;
In this case, for convenience, add it to the search path:&lt;br /&gt;
    mkdir $HOME/bin&lt;br /&gt;
    cd $HOME/bin&lt;br /&gt;
    # example:&lt;br /&gt;
    ln -s $HOME/software/grass70_release/bin.i686-pc-linux-gnu/grass70 .&lt;br /&gt;
&lt;br /&gt;
Now use it subsequently with&lt;br /&gt;
    grass70 -gui&lt;br /&gt;
&lt;br /&gt;
===== Gentoo =====&lt;br /&gt;
&lt;br /&gt;
  ./configure \&lt;br /&gt;
    --with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
See also http://packages.gentoo.org/package/sci-geosciences/grass&lt;br /&gt;
&lt;br /&gt;
===== Funtoo =====&lt;br /&gt;
&lt;br /&gt;
The [http://grasswiki.osgeo.org/wiki/Compile_and_Install#Generic_Compilation_and_installation_procedure Generic Compilation &amp;amp; installation procedure] applies also for the [http://www.funtoo.org/ Funtoo] Linux meta-distribution. The following example scripts are provided as a mean to get started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====== Installing dependencies ======&lt;br /&gt;
&lt;br /&gt;
'''''Following likely needs to be updated!'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# # Searching for missing packages, e.g. wxwidgets&lt;br /&gt;
# e-file wx-config&lt;br /&gt;
&lt;br /&gt;
# emerge dependecies -- This will take quite some time! Hint: net-libs/webkit-gtk&lt;br /&gt;
USE=&amp;quot;curl xls fftw gmath motif  wxwidgets gml hdf5 jpeg2k mdb netcdf odbc ogdi opencl postgres spatialite sqlite szip&amp;quot; \&lt;br /&gt;
emerge -av proj geos gdal \&lt;br /&gt;
	   xerces \&lt;br /&gt;
	   mesa motif libGLw  \&lt;br /&gt;
	   tcl tk clang llvm byacc opencl \&lt;br /&gt;
	   unixODBC postgresql-base ogdi spatialite \&lt;br /&gt;
	   libgeotiff hdf5 netcdf \&lt;br /&gt;
	   eselect-postgresql eselect-opencl eselect-wxwidgets \&lt;br /&gt;
	   wxpython pyopengl \&lt;br /&gt;
	   fftw&lt;br /&gt;
&lt;br /&gt;
# before compiling&lt;br /&gt;
eselect python set 1 # probably #1 is python 2.7&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====== Example Scripts ======&lt;br /&gt;
&lt;br /&gt;
A simple configuration and compilation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# clean previous configuration&lt;br /&gt;
make distclean&lt;br /&gt;
&lt;br /&gt;
# update source code&lt;br /&gt;
svn up&lt;br /&gt;
&lt;br /&gt;
# renice! source: &amp;lt;http://lists.osgeo.org/pipermail/grass-user/2013-May/068229.html&amp;gt;&lt;br /&gt;
renice +17 -p $$&lt;br /&gt;
&lt;br /&gt;
# configure&lt;br /&gt;
./configure \&lt;br /&gt;
--with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
2&amp;gt;&amp;amp;1 | tee config_log.txt&lt;br /&gt;
&lt;br /&gt;
# compile&lt;br /&gt;
time make -j13&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An attempt for a complete configuration and compilation '''checking'''. In addition, this script times each of the executed commands (need for scrolling back!).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# clean previous configuration&lt;br /&gt;
time make distclean&lt;br /&gt;
&lt;br /&gt;
# update&lt;br /&gt;
time svn up&lt;br /&gt;
&lt;br /&gt;
# renice! source: &amp;lt;http://lists.osgeo.org/pipermail/grass-user/2013-May/068229.html&amp;gt;&lt;br /&gt;
renice +17 -p $$&lt;br /&gt;
&lt;br /&gt;
# configure&lt;br /&gt;
CFLAGS=&amp;quot;-ggdb -march=native -Wall -Werror-implicit-function-declaration&amp;quot; \&lt;br /&gt;
./configure \&lt;br /&gt;
--with-cxx \&lt;br /&gt;
--with-includes=/usr/include/ --with-libs=/usr/lib64/ \&lt;br /&gt;
--with-proj \&lt;br /&gt;
--with-proj-includes=/usr/include/ \&lt;br /&gt;
--with-proj-libs=/usr/lib64/ \&lt;br /&gt;
--with-proj-share=/usr/share/proj/ \&lt;br /&gt;
--with-geos \&lt;br /&gt;
--with-geos=/usr/bin/geos-config \&lt;br /&gt;
--with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
--with-x \&lt;br /&gt;
--with-motif \&lt;br /&gt;
--with-cairo \&lt;br /&gt;
--with-opengl-libs=/usr/include/GL \&lt;br /&gt;
--without-ffmpeg \&lt;br /&gt;
--with-python=yes --with-python=/usr/bin/python2.7-config \&lt;br /&gt;
--with-wxwidgets \&lt;br /&gt;
--with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
--with-odbc=yes \&lt;br /&gt;
--with-sqlite=yes \&lt;br /&gt;
--with-mysql=yes --with-mysql-includes=&amp;quot;/usr/include/mysql&amp;quot; --with-mysql-libs=/usr/lib/mysql \&lt;br /&gt;
--with-postgres=yes --with-postgresql=yes --with-postgres-includes=&amp;quot;/usr/include/postgresql&amp;quot; \&lt;br /&gt;
--with-opencl --with-openmp --with-pthread \&lt;br /&gt;
--with-lapack \&lt;br /&gt;
--with-fftw \&lt;br /&gt;
--with-readline \&lt;br /&gt;
--with-regex \&lt;br /&gt;
--with-nls \&lt;br /&gt;
--with-jpeg \&lt;br /&gt;
--with-tiff \&lt;br /&gt;
--with-png \&lt;br /&gt;
--with-netcdf \&lt;br /&gt;
--without-opendwg \&lt;br /&gt;
--enable-largefile=yes \&lt;br /&gt;
2&amp;gt;&amp;amp;1 | tee config_log.txt&lt;br /&gt;
&lt;br /&gt;
# check &amp;quot;make&amp;quot;&lt;br /&gt;
time make check&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Fedora =====&lt;br /&gt;
&lt;br /&gt;
====== GRASS GIS 6 on Fedora ======&lt;br /&gt;
&lt;br /&gt;
'''Preparation''' for the compilation of GRASS GIS 6 source code (F16-F21):&lt;br /&gt;
&lt;br /&gt;
  yum install proj-devel gdal-devel sqlite-devel ffmpeg-devel mesa-libGL-devel \&lt;br /&gt;
              mesa-libGLU-devel libXmu-devel libX11-devel tcl-devel tk-devel geos \&lt;br /&gt;
              fftw-devel libtiff-devel lesstif-devel python-devel numpy wxPython wxGTK-devel \&lt;br /&gt;
              gcc gcc-c++ bison flex ncurses-devel proj-epsg proj-nad xml2 subversion&lt;br /&gt;
&lt;br /&gt;
''Note 1: that currently gdal-devel has (too) many dependencies and may lead to a massive download of extra packages (200 on a fresh Fedora 16 install). Hopefully solved in later Fedora versions.''&lt;br /&gt;
&lt;br /&gt;
''Note 2: the optional ffmpeg-devel comes from the rpmfusion-free repository ([http://rpmfusion.org/Configuration/ configuration]).''&lt;br /&gt;
&lt;br /&gt;
'''Download''' the source code:&lt;br /&gt;
* GRASS GIS 6: [http://grass.osgeo.org/download/software/sources/ release package] - [http://grass.osgeo.org/grass64/source/snapshot/ weekly snapshot] - [http://trac.osgeo.org/grass/wiki/DownloadSource#GRASS6.4 SVN repository]&lt;br /&gt;
&lt;br /&gt;
'''Configure''': This is an ''example'' how to configure the source code on a Fedora system:&lt;br /&gt;
&lt;br /&gt;
  ./configure \&lt;br /&gt;
   --with-cxx \&lt;br /&gt;
   --with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
   --with-proj --with-proj-share=/usr/share/proj \&lt;br /&gt;
   --with-sqlite \&lt;br /&gt;
   --with-nls \&lt;br /&gt;
   --with-geos \&lt;br /&gt;
   --with-wxwidgets=/usr/bin/wx-config \&lt;br /&gt;
   --with-python=/usr/bin/python-config \&lt;br /&gt;
   --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
   --enable-largefile \&lt;br /&gt;
   --without-odbc \&lt;br /&gt;
   --with-fftw&lt;br /&gt;
&lt;br /&gt;
Extra: If you also want '''FFMPEG''' support - it requires 'yum install fftw-devel'. Then add to the configuration lines above:&lt;br /&gt;
&lt;br /&gt;
     --with-ffmpeg --with-ffmpeg-includes=&amp;quot;/usr/include/ffmpeg /usr/include/ffmpeg/libav* /usr/include/ffmpeg/libpostproc /usr/include/ffmpeg/libswscale&amp;quot; \&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally '''compile''' the configured source code:&lt;br /&gt;
    make&lt;br /&gt;
   or on multicore (number depends of available cores):&lt;br /&gt;
    make -j4&lt;br /&gt;
   and&lt;br /&gt;
    make install # requires root permissions unless you become owner of /usr/local/&lt;br /&gt;
&lt;br /&gt;
Then use GRASS GIS 6 and enjoy!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====== GRASS GIS 7 on Fedora ======&lt;br /&gt;
&lt;br /&gt;
'''Preparation''' for the compilation of GRASS GIS 7 source code (F20-F22):&lt;br /&gt;
&lt;br /&gt;
  dnf install gcc gcc-c++ bison flex ncurses-devel proj-epsg proj-nad xml2 \&lt;br /&gt;
              proj-devel gdal gdal-devel gdal-python sqlite-devel mesa-libGL-devel \&lt;br /&gt;
              fftw-devel mesa-libGLU-devel libXmu-devel libX11-devel geos geos-devel \&lt;br /&gt;
              libtiff-devel lesstif-devel python-devel numpy wxPython wxGTK-devel \&lt;br /&gt;
              python-dateutil python-imaging python-matplotlib-wx subversion doxygen python-sphinx&lt;br /&gt;
&lt;br /&gt;
  # optionally also:  netcdf-devel postgresql-devel&lt;br /&gt;
&lt;br /&gt;
''Note 1: the optional ffmpeg-devel comes from the rpmfusion-free repository ([http://rpmfusion.org/Configuration/ configuration]).''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Download''' the source code:&lt;br /&gt;
* GRASS GIS 7: [http://grass.osgeo.org/grass70/source/snapshot/ weekly snapshot] - [http://trac.osgeo.org/grass/wiki/DownloadSource#GRASS7 SVN repository]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Configure''': This is an example how to configure the source code on a Fedora system:&lt;br /&gt;
&lt;br /&gt;
  ./configure \&lt;br /&gt;
   --with-cxx \&lt;br /&gt;
   --with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
   --with-proj --with-proj-share=/usr/share/proj \&lt;br /&gt;
   --with-python=/usr/bin/python-config \&lt;br /&gt;
   --with-geos \&lt;br /&gt;
   --with-sqlite \&lt;br /&gt;
   --with-nls \&lt;br /&gt;
   --with-wxwidgets=/usr/bin/wx-config \&lt;br /&gt;
   --with-fftw \&lt;br /&gt;
   --with-cairo --with-cairo-ldflags=-lfontconfig \&lt;br /&gt;
   --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
   --enable-largefile \&lt;br /&gt;
   --without-odbc&lt;br /&gt;
&lt;br /&gt;
''Extra 1:'' If you also want '''FFMPEG support''' - it requires 'dnf install fftw-devel' from the rpmfusion-free repository. Then add to the configuration lines above:&lt;br /&gt;
&lt;br /&gt;
     --with-ffmpeg --with-ffmpeg-includes=&amp;quot;/usr/include/ffmpeg /usr/include/ffmpeg/libav* /usr/include/ffmpeg/libpostproc /usr/include/ffmpeg/libswscale&amp;quot; \&lt;br /&gt;
&lt;br /&gt;
''Extra 2:'' For '''LAPACK/BLAS support''' (addons i.spec.unmix, v.kriging etc), install &amp;quot;dnf install lapack lapack-devel blas blas-devel atlas atlas-devel&amp;quot;. Then add to the configuration lines above:&lt;br /&gt;
  --with-blas --with-blas-includes=/usr/include/atlas-x86_64-base/ \&lt;br /&gt;
  --with-lapack --with-lapack-includes=/usr/include/atlas-x86_64-base/ \&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally '''compile''' the configured source code:&lt;br /&gt;
    make&lt;br /&gt;
   or on multicore (number depends of available cores):&lt;br /&gt;
    make -j4&lt;br /&gt;
   and&lt;br /&gt;
    make install # requires root permissions unless you become owner of /usr/local/&lt;br /&gt;
&lt;br /&gt;
Then use GRASS GIS 7 and enjoy!&lt;br /&gt;
&lt;br /&gt;
===== openSUSE =====&lt;br /&gt;
&lt;br /&gt;
To build GRASS on openSUSE:&lt;br /&gt;
&lt;br /&gt;
RPM packages to be installed:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 sudo zypper install bison flex freetype2-devel fftw3-devel gcc-c++ \&lt;br /&gt;
   libgdal-devel libgeos-devel libjpeg-devel libpng-devel libtiff-devel \&lt;br /&gt;
   man proj libproj-devel readline-devel netcdf-devel ncurses-devel \&lt;br /&gt;
   mysql-devel postgresql-devel sqlite-devel unixODBC-devel \&lt;br /&gt;
   tcl-devel tk-devel xorg-x11-Mesa-devel libXmu-devel \&lt;br /&gt;
   python-numpy python-dateutil python-devel python-opengl \&lt;br /&gt;
   python-wxWidgets python-xml python-dateutil wxWidgets-devel \&lt;br /&gt;
   zlib-devel doxygen python-sphinx&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source code configuration:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 ./configure \&lt;br /&gt;
 	--enable-largefile \&lt;br /&gt;
	--with-proj-share=/usr/share/proj \&lt;br /&gt;
	--with-cxx \&lt;br /&gt;
	--with-lapack=yes \&lt;br /&gt;
	--with-x \&lt;br /&gt;
	--with-motif \&lt;br /&gt;
	--with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
	--with-postgres --with-postgres-includes=/usr/include/pgsql \&lt;br /&gt;
	--with-mysql --with-mysql-includes=/usr/include/mysql \&lt;br /&gt;
	--with-fftw \&lt;br /&gt;
	--with-readline \&lt;br /&gt;
	--with-netcdf \&lt;br /&gt;
	--with-curses \&lt;br /&gt;
	--with-geos \&lt;br /&gt;
	--with-nls \&lt;br /&gt;
	--with-sqlite \&lt;br /&gt;
	--with-freetype \&lt;br /&gt;
	--with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
	--with-wxwidgets \&lt;br /&gt;
	--with-odbc \&lt;br /&gt;
	--with-python&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then compile with &amp;quot;make [-j2]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===== Arch Linux =====&lt;br /&gt;
&lt;br /&gt;
The easiest/fastest way is to build GRASS GIS using AUR:&lt;br /&gt;
&lt;br /&gt;
https://aur.archlinux.org/packages/?O=0&amp;amp;K=grass (msieczka: I would recommend my set of PKBUILDs - https://aur.archlinux.org/packages/?K=czk&amp;amp;SeB=m. They are most feature-rich, up-to-date and allow to have various versions installed alongside each other without conflicts.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But if you want to compile it yourself you have to keep in mind that in Arch Linux the default Python version 3.&lt;br /&gt;
&lt;br /&gt;
 python --version&lt;br /&gt;
&lt;br /&gt;
 Python 3.3.1&lt;br /&gt;
&lt;br /&gt;
Therefore, to build GRASS GIS (version 7 in this example), we can use either use virtualenv or symlink python2 and python2-config in a given directory. &lt;br /&gt;
Let's use the latter approach&lt;br /&gt;
&lt;br /&gt;
 sudo ln -s /usr/bin/python2 $HOME/usr/bin/python&lt;br /&gt;
 sudo ln -s /usr/bin/python2-config $HOME/usr/bin/python-config&lt;br /&gt;
&lt;br /&gt;
We can now start building GRASS 7&lt;br /&gt;
&lt;br /&gt;
 export PATH=~/usr/bin:$PATH &amp;amp;&amp;amp; \&lt;br /&gt;
 ./configure \&lt;br /&gt;
 --enable-debug \&lt;br /&gt;
 --enable-64bit \&lt;br /&gt;
 --with-libs=/usr/lib64  \&lt;br /&gt;
 --with-cxx \&lt;br /&gt;
 --with-readline \&lt;br /&gt;
 --with-zlib-includes=&amp;quot;/usr/include/&amp;quot; \&lt;br /&gt;
 --with-freetype=yes \&lt;br /&gt;
 --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
 --enable-largefile=yes \&lt;br /&gt;
 --with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
 --with-proj-share=/usr/share/proj/ \&lt;br /&gt;
 --with-geos=/usr/bin/geos-config \&lt;br /&gt;
 --with-cairo \&lt;br /&gt;
 --with-odbc \&lt;br /&gt;
 --with-pthread \&lt;br /&gt;
 --with-liblas=/usr/local/bin/liblas-config  \&lt;br /&gt;
 --with-fftw-includes=&amp;quot;/usr/include/&amp;quot; \&lt;br /&gt;
 --with-fftw-libs=/usr/lib/ \&lt;br /&gt;
 --with-tcltk-includes=&amp;quot;/usr/include/&amp;quot; \&lt;br /&gt;
 --with-wxwidgets \&lt;br /&gt;
 --with-postgres=yes \&lt;br /&gt;
 --with-postgres-includes=&amp;quot;/usr/include/postgresql/internal&amp;quot; \&lt;br /&gt;
 --with-postgres-libs=&amp;quot;/usr/include/postgresql/internal/libpq&amp;quot; \&lt;br /&gt;
 --with-sqlite=yes \&lt;br /&gt;
 --with-python=yes \&lt;br /&gt;
 --with-liblas \&lt;br /&gt;
 --with-netcdf &lt;br /&gt;
&lt;br /&gt;
Now let's compile and install it&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
Now the final step required to use GRASS with python2 is to create a bash script &amp;quot;grass&amp;quot; (or the name you want)&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 export PATH=~/usr/bin:$PATH&lt;br /&gt;
 python2 /usr/local/bin/grass70&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And make it executable and copy it somewhere in the PATH&lt;br /&gt;
&lt;br /&gt;
 chmod+x grass&lt;br /&gt;
 sudo cp grass /usr/local/bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's done, you can enjoy GRASS 7 in Arch, just type &amp;quot;grass&amp;quot; (or the name you gave to the script) in the terminal to launch it.&lt;br /&gt;
&lt;br /&gt;
===== RPM SPEC files =====&lt;br /&gt;
* ... can be found in the source code, rpm/ directory, &lt;br /&gt;
* or [https://build.opensuse.org/package/show?package=grass&amp;amp;project=Application%3AGeo OpenSuSe]&lt;br /&gt;
* or [https://admin.fedoraproject.org/pkgdb/acls/name/grass Fedora]&lt;br /&gt;
* or [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/grass/ Mandriva] (there are also [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/proj/ proj4], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/geos/ geos], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/gdal/ gdal], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/gdal-grass/ gdal-grass-plugin], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/qgis/ qgis] etc)&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
===== Zaurus =====&lt;br /&gt;
&lt;br /&gt;
... see [http://wiki.debian.org/?GrassGISonZaurus here] for instructions&lt;br /&gt;
&lt;br /&gt;
==== Mac OSX ====&lt;br /&gt;
&lt;br /&gt;
===== Conventional installation =====&lt;br /&gt;
* see the source/macosx readme ([http://trac.osgeo.org/grass/browser/grass/trunk/macosx/ReadMe.rtf Trac link])&lt;br /&gt;
* main page [[Compiling on MacOSX]]&lt;br /&gt;
* main page [[Packaging on MacOSX]]&lt;br /&gt;
* [http://grass.osgeo.org/download/software/mac-osx/ official download site]&lt;br /&gt;
* [http://www.kyngchaos.com/software/frameworks#build_scripts build scripts for dependencies]&lt;br /&gt;
* solving errors at starting GRASS GIS: [[MacOSX GRASS errors]]&lt;br /&gt;
=====[[Compiling on MacOSX using homebrew]] =====&lt;br /&gt;
&lt;br /&gt;
==== FreeBSD / NetBSD ====&lt;br /&gt;
&lt;br /&gt;
The recommended compiler tools are GCC, GNU make, GNU coreutils (for install), and flex. All are available through the respective package managing tools (pkg_add for FreeBSD and pkgin install for NetBSD) and for recent *BSD versions most likely installed by default.&lt;br /&gt;
&lt;br /&gt;
GRASS 6.x and GRASS 7 should compile on FreeBSD 8.0 or later and NetBSD 5.0 or later (maybe also on updated NetBSD 4.x).&lt;br /&gt;
&lt;br /&gt;
It is highly recommended to install GDAL/OGR and PROJ4 first. These libraries and tools are available as [http://www.freebsd.org/ports/ ports for FreeBSD] and [http://www.pkgsrc.org/ packages for NetBSD].&lt;br /&gt;
&lt;br /&gt;
Optional functionality is listed with ''./configure --help'', and related libraries and tools might need to be installed first.&lt;br /&gt;
&lt;br /&gt;
==== Solaris ====&lt;br /&gt;
&lt;br /&gt;
* ''2008 Oct 15'': see [http://lists.osgeo.org/pipermail/grass-user/2008-October/047093.html this post on the grass mailing list]&lt;br /&gt;
&lt;br /&gt;
===== 11 SPARC/i86pc =====&lt;br /&gt;
&lt;br /&gt;
The recommended compiler tools are GCC, GNU make, GNU coreutils (for install), and flex. All are available through the Solaris package manager.&lt;br /&gt;
&lt;br /&gt;
Most dependencies are available through the Solaris package manager. GDAL and proj4 can either be compiled from source or installed e.g. from [http://www.opencsw.org/ OpenCSW]. If packages are installed from OpenCSW, the linker flags need to be set with&lt;br /&gt;
&lt;br /&gt;
      LDFLAGS=&amp;quot;-Wl,-R/opt/csw/lib -L/opt/csw/lib -Wl,-R/opt/csw/gxx/lib -L/opt/csw/gxx/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
See also the [http://www.opencsw.org/use-it/ OpenCSW documentation].&lt;br /&gt;
&lt;br /&gt;
===== 10 SPARC/i86pc =====&lt;br /&gt;
&lt;br /&gt;
* get gcc compiler and tools. There are several sources: Solaris Companion CD (SFW pkg, installs in /opt/sfw/), Blastwave ([http://www.blastwave.org], CSW pkg, installs in /opt/csw/) or Sunfreeware ([http://www.sunfreeware.com], SMC pkg, installs in /usr/local/). &lt;br /&gt;
Needed Packages from Sunfreeware: SMCbinut, SMCbison, SMCcoreu, SMCfindu, SMCflex, SMCgawk, SMCgcc, SMCgrep, SMCgzip, SMCless, SMClibt, SMClicon, SMCmake, SMCncurs, SMCproj, SMCsed, SMCtar, SMCtcl, SMCtiff, SMCtk, SMCunzip, SMCzlib. &lt;br /&gt;
&lt;br /&gt;
* compile and install fftw-library ([http://www.fftw.org]). You need to re-compile the library with: &lt;br /&gt;
&lt;br /&gt;
      ./configure --with-pic --enable-shared; make ; make install. &lt;br /&gt;
&lt;br /&gt;
The pre-built packages don't work. &lt;br /&gt;
&lt;br /&gt;
* compile and install gdal library (see documentation of gdal, [http://www.gdal.org]).&lt;br /&gt;
&lt;br /&gt;
* compile and install any additional libraries (e. g. GEOS, [http://geos.refractions.net]). &lt;br /&gt;
&lt;br /&gt;
* set compiler flags and path. e. g.: &lt;br /&gt;
&lt;br /&gt;
      # on ultra-sparc machine:&lt;br /&gt;
      CFLAGS=&amp;quot;-O3 -mcpu=v9&amp;quot;&lt;br /&gt;
      CXXFLAGS=&amp;quot;-O3 -mcpu=v9&amp;quot;&lt;br /&gt;
      PATH=&amp;quot;/usr/local/bin:/opt/sfw/bin:/usr/ccs/bin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
      export CFLAGS CXXFLAGS PATH&lt;br /&gt;
&lt;br /&gt;
Path has to be changed for the packages (Sunfreeware: /usr/local/bin, Solaris Companion: /opt/sfw/bin, Blastwave: /opt/csw/bin). &lt;br /&gt;
&lt;br /&gt;
* Next configure, e. g.: &lt;br /&gt;
&lt;br /&gt;
      ./configure --with-postgres-includes=/usr/include/pgsql/ \&lt;br /&gt;
      --with-postgres-libs=/usr/lib --with-postgres=yes \&lt;br /&gt;
      --with-includes=/usr/local/include/ncurses&lt;br /&gt;
&lt;br /&gt;
If you use n(ew)curses, you have to include the path /usr/local/include/ncurses. &lt;br /&gt;
&lt;br /&gt;
then:&lt;br /&gt;
&lt;br /&gt;
      make&lt;br /&gt;
      su&lt;br /&gt;
      make install&lt;br /&gt;
&lt;br /&gt;
If the shared libraries are not found at runtime of the modules, use 'crle' to add the paths of the libraries for the dynamic linker, e. g. as root:&lt;br /&gt;
&lt;br /&gt;
      crle -l /lib:/usr/lib:/usr/local/lib:/opt/sfw/lib:/usr/X11/lib&lt;br /&gt;
&lt;br /&gt;
Be careful not to omit a library path, the system may be unusable if you forget the /lib path.&lt;br /&gt;
&lt;br /&gt;
==== AIX ====&lt;br /&gt;
&lt;br /&gt;
A recent [ftp://ftp.gnu.org/gnu/make/ GNU make] (&amp;gt;= 3.81) and GNU coreutils are required. These are available with the [http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/download.html IBM AIX toolbox] or through third-party AIX software repositories, e.g. [http://www.bullfreeware.com/ bullfreeware] and [http://www.perzl.org/aix/ perzl.org]. Note that 'make' does not work, only 'gmake' works. &lt;br /&gt;
&lt;br /&gt;
General instructions to compile on AIX are e.g. [http://www.perzl.org/aix/index.php?n=Main.Instructions here]&lt;br /&gt;
&lt;br /&gt;
On AIX, compilation results by default in 32 bit applications and static libraries. The [http://www.ibm.com/developerworks/aix/library/au-gnu.html IBM documentation] explains how to build 64 bit applications and shared libraries with GCC.&lt;br /&gt;
&lt;br /&gt;
'''GRASS 6: Using the IBM xlc compiler:'''&lt;br /&gt;
* ''see [http://thread.gmane.org/gmane.comp.gis.grass.user/32667 this mailing list thread]''&lt;br /&gt;
&lt;br /&gt;
Mike wrote in 2009:&lt;br /&gt;
&lt;br /&gt;
After attempting all the suggestions, I finally used&lt;br /&gt;
--disable-shared on the configure command, and all but&lt;br /&gt;
a handful of modules successfully compiled. I was able to&lt;br /&gt;
individually address the ones that failed through Makefile&lt;br /&gt;
edits and several small source code/header file edits.&lt;br /&gt;
&lt;br /&gt;
The environment variables and configure command that worked were:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# xlc compiler:&lt;br /&gt;
export PATH=/usr/local/bin:/opt/freeware/bin:$PATH&lt;br /&gt;
export OBJECT_MODE=64&lt;br /&gt;
export LIBICONV=/opt/freeware&lt;br /&gt;
export CC=&amp;quot;xlc_r -q64&amp;quot;&lt;br /&gt;
export CFLAGS=&amp;quot;-O -qstrict&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;xlC_r -q64&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;-O -qstrict&amp;quot;&lt;br /&gt;
export AR=&amp;quot;ar -X64&amp;quot;&lt;br /&gt;
export F77=&amp;quot;xlf_r -q64&amp;quot;&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I/afs/isis/pkg/libpng/include -I/usr/local/include -I$LIBICONV/include -I/usr/lpp/X11/include/X11&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L/usr/local/lib -L$LIBICONV/lib -L/usr/lib -L/usr/X11R6/lib -lc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/afs/isis/pkg/grass-6.4.0 \&lt;br /&gt;
  --enable-64bit \&lt;br /&gt;
  --disable-shared \&lt;br /&gt;
  --with-includes=&amp;quot;/usr/include/fontconfig /usr/include/X11 /usr/include/X11/Xft /usr/include/X11/ext&amp;quot; \&lt;br /&gt;
  --x-includes=/usr/include/X11 \&lt;br /&gt;
  --x-libraries=/usr/X11R6/lib \&lt;br /&gt;
  --with-fftw-includes=/afs/isis/pkg/fftw-3.2.2/include \&lt;br /&gt;
  --with-fftw-libs=/afs/isis/pkg/fftw-3.2.2/lib \&lt;br /&gt;
  --with-gdal=/afs/isis/pkg/gdal/bin/gdal-config \&lt;br /&gt;
  --with-proj-includes=/afs/isis/pkg/proj/include \&lt;br /&gt;
  --with-proj-libs=/afs/isis/pkg/proj/lib \&lt;br /&gt;
  --with-proj-share=/afs/isis/pkg/proj/share/proj \&lt;br /&gt;
  --with-tcltk-includes=/usr/local/include \&lt;br /&gt;
  --with-tcltk-libs=/usr/local/lib \&lt;br /&gt;
  --with-opengl-includes=/usr/include/GL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''GRASS 7: Using the IBM xlc compiler:'''&lt;br /&gt;
&lt;br /&gt;
Get and install (in this order):&lt;br /&gt;
* [ftp://ftp.gnu.org/gnu/tar/ GNU tar]&lt;br /&gt;
* [ftp://ftp.gnu.org/gnu/make/ GNU make] (&amp;gt;= 3.81)&lt;br /&gt;
* [http://www.sqlite.org SQLite]&lt;br /&gt;
* [http://trac.osgeo.org/proj/ PROJ.4] (for ./configure parameters, see [[Talk:Compile and Install|here]])&lt;br /&gt;
* [http://www.gdal.org GDAL] (for ./configure parameters, see [[Talk:Compile and Install|here]])&lt;br /&gt;
* [http://grass.osgeo.org/grass70/source/snapshot/ GRASS GIS 7]&lt;br /&gt;
&lt;br /&gt;
The environment variables and configure command that worked:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
## AIX 5.x&lt;br /&gt;
&lt;br /&gt;
export LIBPATH=/opt/freeware/lib64:/opt/freeware/lib&lt;br /&gt;
# make 'ar' happy&lt;br /&gt;
export OBJECT_MODE=64&lt;br /&gt;
&lt;br /&gt;
PREFIX=$HOME/private/bin&lt;br /&gt;
./configure \&lt;br /&gt;
  --prefix=$PREFIX \&lt;br /&gt;
  --disable-shared \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-proj-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-proj-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-proj-share=$PREFIX/share/proj/ \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-sqlite-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-sqlite-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-tiff=no \&lt;br /&gt;
  --with-png=no \&lt;br /&gt;
  --with-fftw=no \&lt;br /&gt;
  --with-cairo=no \&lt;br /&gt;
  --with-freetype=no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''GRASS 7: Using the GNU gcc compiler:'''&lt;br /&gt;
&lt;br /&gt;
Get and install (in this order):&lt;br /&gt;
* if needed, [ftp://ftp.gnu.org/gnu/tar/ GNU tar]&lt;br /&gt;
* if needed (the name is often 'gmake' and not 'make') [ftp://ftp.gnu.org/gnu/make/ GNU make] (&amp;gt;= 3.81)&lt;br /&gt;
* [http://www.sqlite.org SQLite]&lt;br /&gt;
* [http://trac.osgeo.org/proj/ PROJ.4] (for ./configure parameters, see [[Talk:Compile and Install|here]])&lt;br /&gt;
* [http://www.gdal.org GDAL] (for ./configure parameters, see [[Talk:Compile and Install|here]])&lt;br /&gt;
* [http://grass.osgeo.org/grass70/source/snapshot/ GRASS GIS 7]&lt;br /&gt;
&lt;br /&gt;
The environment variables and configure command that worked for AIX 5.x:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
## AIX 5.x&lt;br /&gt;
&lt;br /&gt;
export LIBPATH=/opt/freeware/lib64:/opt/freeware/lib&lt;br /&gt;
# make 'ar' happy&lt;br /&gt;
export OBJECT_MODE=64&lt;br /&gt;
&lt;br /&gt;
PREFIX=$HOME/private/bin&lt;br /&gt;
CFLAGS='-ansi -D_ALL_SOURCE=1 -D_POSIX_SOURCE=1 -D_POSIX_C_SOURCE=200809L -Dinline=' ./configure \&lt;br /&gt;
  --prefix=$PREFIX \&lt;br /&gt;
  --disable-shared \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-proj-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-proj-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-proj-share=$PREFIX/share/proj/ \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-sqlite-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-sqlite-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-tiff=no \&lt;br /&gt;
  --with-png=no \&lt;br /&gt;
  --with-fftw=no \&lt;br /&gt;
  --with-cairo=no \&lt;br /&gt;
  --with-freetype=no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The environment variables and configure command that worked for AIX 7.x:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
## AIX 7.x&lt;br /&gt;
export CC=&amp;quot;gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;g++&amp;quot;&lt;br /&gt;
PREFIX=$HOME/bin&lt;br /&gt;
&lt;br /&gt;
LDFLAGS=&amp;quot;-Wl,-bsvr4,-R,/opt/freeware/lib -L/opt/freeware/lib&amp;quot; CPPFLAGS=&amp;quot;-I/opt/freeware/include&amp;quot; ./configure \&lt;br /&gt;
  --prefix=$PREFIX \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --enable-shared \&lt;br /&gt;
  --with-includes=/opt/freeware/include --with-libs=/opt/freeware/lib \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-proj-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-proj-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-proj-share=$PREFIX/share/proj/ \&lt;br /&gt;
  --with-gdal=$PREFIX/bin/gdal-config \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-sqlite-libs=$PREFIX/lib --with-sqlite-includes=$PREFIX/include \&lt;br /&gt;
  --with-png=no \&lt;br /&gt;
  --with-tiff=no \&lt;br /&gt;
  --with-fftw=no \&lt;br /&gt;
  --with-cairo=no \&lt;br /&gt;
  --with-opengl=no \&lt;br /&gt;
  --with-freetype=no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MS-Windows ====&lt;br /&gt;
&lt;br /&gt;
===== MS-Windows/Cygwin =====&lt;br /&gt;
&lt;br /&gt;
* See the [[Cygwin]] wiki pages&lt;br /&gt;
&lt;br /&gt;
===== MS-Windows/native =====&lt;br /&gt;
&lt;br /&gt;
====== Compile ======&lt;br /&gt;
&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/CompileOnWindows GRASS Windows Native Binary Building Guide] (GRASS 6.4.x + 7.x)&lt;br /&gt;
* &amp;lt;strike&amp;gt;[http://www.webalice.it/marco.pasetti/grass/BuildFromSource.html GRASS Windows Native Binary Building Guide] (GRASS 6.3.x) &amp;lt;/strike&amp;gt;&lt;br /&gt;
* See/adapt [http://blog.qgis.org/node/124 idea] for unattended install of QGIS (et al) from [http://trac.osgeo.org/osgeo4w/ OSGeo4W] from the QuantumGIS Blog.&lt;br /&gt;
&lt;br /&gt;
See also [[WinGRASS Current Status]] for latest updates.&lt;br /&gt;
&lt;br /&gt;
=== Common problems and solutions ===&lt;br /&gt;
&lt;br /&gt;
During compilation, error can occur if certain packages are not installed. Here a list of problems with solution:&lt;br /&gt;
&lt;br /&gt;
* error: X11/Xlib.h: No such file or directory&lt;br /&gt;
** this suggests that you don't have the X headers installed&lt;br /&gt;
** Solution: Install the libx11-dev package&lt;br /&gt;
&lt;br /&gt;
* error:  g.list: error while loading shared libraries: libgdal1.6.0.so.1: cannot open shared object file: No such file or directory&lt;br /&gt;
** this error appears in the shell right after the user clicks GUI's &amp;quot;Start GRASS&amp;quot; button. The GUI shows an error about geographic extent and gets closed afterwards.&lt;br /&gt;
** It happens when you launch bin.i686 executable on 64bit system. Be careful and choose the right architecture.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Static compilation ===&lt;br /&gt;
&lt;br /&gt;
In order to get static rather than dynamically linked binaries, configure like this:&lt;br /&gt;
&lt;br /&gt;
  ./configure --disable-shared --enable-static&lt;br /&gt;
&lt;br /&gt;
This will however break the wxGUI and GRASS 7 completely because &amp;quot;ctypes&amp;quot; wants to link against shared libs, or there is something in the static libs that &amp;quot;ctypes&amp;quot; does not like.&lt;br /&gt;
&lt;br /&gt;
=== Optimization ===&lt;br /&gt;
&lt;br /&gt;
GCC and other compilers support [http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/Optimize-Options.html#Optimize-Options optimization]&lt;br /&gt;
&lt;br /&gt;
If you would like to set compiler optimisations, for a possibly faster binary, type (don't enter a &amp;quot;;&amp;quot; anywhere):&lt;br /&gt;
&lt;br /&gt;
        CFLAGS=-O ./configure&lt;br /&gt;
or,&lt;br /&gt;
        setenv CFLAGS -O&lt;br /&gt;
        ./configure&lt;br /&gt;
&lt;br /&gt;
whichever works on your shell. Use -O2 instead of -O if your compiler supports this (note: O is the letter, not zero). Using the &amp;quot;gcc&amp;quot; compiler, you can also specify processor specific flags (examples, please suggest better settings to us):&lt;br /&gt;
&lt;br /&gt;
  CFLAGS=&amp;quot;-mcpu=athlon -O2&amp;quot; # AMD Athlon processor with code optimisations&lt;br /&gt;
  CFLAGS=&amp;quot;-march=amdfam10&amp;quot;  # AMD Phenom II X4 64bit processor with gcc &amp;gt;=4.3&lt;br /&gt;
  CFLAGS=&amp;quot;-mcpu=pentium&amp;quot;    # Intel Pentium processor&lt;br /&gt;
  CFLAGS=&amp;quot;-mcpu=pentium4&amp;quot;   # Intel Pentium4 processor&lt;br /&gt;
  CFLAGS=&amp;quot;-O2 -msse -msse2 -mfpmath=sse -minline-all-stringops&amp;quot; # Intel XEON 64bit processor&lt;br /&gt;
  CFLAGS=&amp;quot;-mtune=nocona -m64 -minline-all-stringops&amp;quot;            # Intel Pentium 64bit processor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To find out optional CFLAGS for your platform, enter:&lt;br /&gt;
  gcc -dumpspecs&lt;br /&gt;
&lt;br /&gt;
See also: http://gcc.gnu.org/&lt;br /&gt;
&lt;br /&gt;
A real fast GRASS version (and small binaries) will be created with LDFLAGS set to &amp;quot;stripping&amp;quot; (but this disables debugging):&lt;br /&gt;
&lt;br /&gt;
  CFLAGS=&amp;quot;-O2 -mcpu=&amp;lt;cpu_see_above&amp;gt; -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure&lt;br /&gt;
&lt;br /&gt;
=== Configure options and their meanings ===&lt;br /&gt;
&lt;br /&gt;
For configure there are many options and some GRASS modules are built only if some options are set. Here are listed common configuration options with short explanation.&lt;br /&gt;
&lt;br /&gt;
* --prefix=/path - Sets path where GRASS will be installed. GRASS will reside in /path/grass-version.&lt;br /&gt;
* --enable-largefile - Enables large (&amp;gt;2Gb on 32bit systems) support. For current large file support status look at [[Large File Support]] page.&lt;br /&gt;
* --with-cxx - Enables compilation of C++ code. Required for r.terraflow module.&lt;br /&gt;
* --with-readline - Enables readline support. If readline is enabled, you can use its history/editing facilities when entering r.mapcalc expressions on stdin.&lt;br /&gt;
* --with-glw - Enables GLw support. The GLw library provides OpenGL &amp;quot;canvas&amp;quot; widgets for Athena and Motif. &lt;br /&gt;
 &lt;br /&gt;
 That switch is unnecessary for normal compilation. It's only&lt;br /&gt;
 required for r3.showdspf, which isn't normally built; if you &lt;br /&gt;
 want it, you have build it manually &lt;br /&gt;
 (e.g. &amp;quot;make -C raster3d/r3.showdspf&amp;quot;).&lt;br /&gt;
 As similar functionality is now provided by NVIZ, r3.showdspf&lt;br /&gt;
 is deprecated.&lt;br /&gt;
 r3.showdspf uses the Motif widget (so you also need a &lt;br /&gt;
 Motif library, e.g. Lesstif or OpenMotif).&lt;br /&gt;
 [http://grass.itc.it/pipermail/grassuser/2006-December/037475.html Glynn Clements at GRASS-user mailing list]&lt;br /&gt;
&lt;br /&gt;
=== Parallelized compilation on multi-core CPUs ===&lt;br /&gt;
&lt;br /&gt;
You can dramatically accelerate the compilation of the GRASS code with the -j flag of &amp;quot;make&amp;quot; if you have a multi-core CPU system. This determines the maximum number of jobs to have running at once, so cores don't have to sit idle waiting for jobs on other cores to complete. A good rule of thumb for this value is &amp;lt;tt&amp;gt;number_of_cores * 1.5&amp;lt;/tt&amp;gt;, but note that setting any higher than the actual number of cores will only affect the timing slightly. For example, on a dual-core processor:&lt;br /&gt;
  make -j 4&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- CFLAGS=&amp;quot;-pipe&amp;quot; doesn't seem to help much --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== GRASS-GDAL plugin ==&lt;br /&gt;
&lt;br /&gt;
* see [[Compile and install GRASS and QGIS with GDAL/OGR Plugin]]&lt;br /&gt;
&lt;br /&gt;
== Addons ==&lt;br /&gt;
&lt;br /&gt;
Please note that the installation of [[AddOns/GRASS_6|Addons]] can be easily done with the {{cmd|g.extension}} manager. The compile instructions below are aiming at own development.&lt;br /&gt;
&lt;br /&gt;
=== Compiled modules ===&lt;br /&gt;
&lt;br /&gt;
This is the general way which works for C modules as well as scripts (Python or Shell/Bash modules) which has HTML documentation.&lt;br /&gt;
&lt;br /&gt;
'''Requirements:'''&lt;br /&gt;
&lt;br /&gt;
Either:&lt;br /&gt;
* a binary GRASS package, or&lt;br /&gt;
* source code which has been prepared with:&lt;br /&gt;
    ./configure [opionally flags]&lt;br /&gt;
    make libs&lt;br /&gt;
&lt;br /&gt;
Each of the [[GRASS_AddOns|addon]] modules should come with a Makefile. To compile it, just run:&lt;br /&gt;
    make MODULE_TOPDIR=/path/to/grass64/&lt;br /&gt;
&lt;br /&gt;
Note that the &amp;lt;tt&amp;gt;/path/to/grass64&amp;lt;/tt&amp;gt; has to be absolute, not relative.&lt;br /&gt;
&lt;br /&gt;
If using Bash it may be useful to set that up as an alias:&lt;br /&gt;
    alias gmake64='make MODULE_TOPDIR=/path/to/grass64/'&lt;br /&gt;
&lt;br /&gt;
Installation (perhaps requires &amp;quot;sudo&amp;quot;):&lt;br /&gt;
    make MODULE_TOPDIR=/path/to/grass64/ install&lt;br /&gt;
&lt;br /&gt;
Note: Compiled addons may require a re-compilation if you changed/updated your GRASS standard binaries.&lt;br /&gt;
&lt;br /&gt;
==== If binary comes with a -dev package ====&lt;br /&gt;
&lt;br /&gt;
''(work in progress, this text states how it eventually will be :)''&lt;br /&gt;
Nowadays one does not need to the source code, nor compiling GRASS by oneself to be able to add add-ons. On Debian, you can just install the grass-dev package and then run:&lt;br /&gt;
 make MODULE_TOPDIR=/usr/lib/grass64/ INST_DIR=/usr/lib/grass64/&lt;br /&gt;
&lt;br /&gt;
The grass-dev package essentially provides GRASS's &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt; header files and Make configuration files.&lt;br /&gt;
&lt;br /&gt;
=== Scripts ===&lt;br /&gt;
&lt;br /&gt;
If the addon module is a script, it is sufficient to copy it into the (GRASS binaries) path somewhere. Alternatively, install addons into a separate GRASS addons binaries/scripts directory which is easier to maintain. It avoids getting clobbered every time you reinstall GRASS. To use these separately stored scripts, set and export the GRASS_ADDON_PATH environment variable before starting GRASS and it will automatically be added to the module search path (see the {{cmd|variables}} help page). To simplify this, do for example:&lt;br /&gt;
&lt;br /&gt;
 # add in $HOME/.bashrc:&lt;br /&gt;
 GRASS_ADDON_PATH=/usr/local/grass/addons/&lt;br /&gt;
 export GRASS_ADDON_PATH&lt;br /&gt;
&lt;br /&gt;
Make sure that the script is executable, then just call it in GRASS typing the filename. Python scripts need to be called writing the extension as well, like:&lt;br /&gt;
 &lt;br /&gt;
 GRASS 6.5.svn (spearfish60):~ &amp;gt; v.krige.py&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Documentation]]&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install&amp;diff=22354</id>
		<title>Compile and Install</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install&amp;diff=22354"/>
		<updated>2016-02-06T18:29:06Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* Linux Mint */  Add python-gdal dependency&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- {{MoveToTrac}} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Disclaimer''': This page explains how to turn the GRASS GIS source code into an installable binary package (&amp;quot;compilation&amp;quot;) for different operating systems. If you just want to get ready-to-use binaries, go [http://grass.osgeo.org/download/ here], otherwise read on...&lt;br /&gt;
&lt;br /&gt;
== How to do compilation and installation of GRASS GIS? ==&lt;br /&gt;
&lt;br /&gt;
Here we explain the procedure to compile GRASS from SVN, but it also applies to official GRASS 6 releases.&lt;br /&gt;
&lt;br /&gt;
''For installation of precompiled binary packages, see the main [[Installation Guide]].''&lt;br /&gt;
&lt;br /&gt;
For detailed information on compilation, please see the [http://grass.osgeo.org/grass64/source/INSTALL INSTALL] file in the source code.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
==== Extra libraries ====&lt;br /&gt;
GRASS needs at least two extra libraries: PROJ and GDAL/OGR&lt;br /&gt;
&lt;br /&gt;
''Note: if you want to have DBMS support in GDAL (subsequently in GRASS) you have to perform the &amp;quot;Optional&amp;quot; steps below as well.''&lt;br /&gt;
&lt;br /&gt;
* [http://trac.osgeo.org/proj/ PROJ4] for management of projections (with proj-datumgrid-1.3.zip support)&lt;br /&gt;
* Optional: [http://trac.osgeo.org/geos/ GEOS]&lt;br /&gt;
* Optional: [http://www.postgresql.org PostgreSQL], [http://www.mysql.org mySQL], [http://www.unixodbc.org unixODBC], [http://www.sqlite.org SQLite] (SQLite is needed for [[QGIS]])&lt;br /&gt;
* [http://www.gdal.org GDAL/OGR] for reading and writing various GIS data formats (interoperability)&lt;br /&gt;
&lt;br /&gt;
You have to install these two libraries '''first''' (see below how to get them precompiled for your system).&lt;br /&gt;
&lt;br /&gt;
It is easiest to obtain a prepackaged version of these libraries (e.g., .rpm; .deb) for your particular operating system and run the corresponding package installation (e.g., rpm -Uhv packagename.rpm; apt-get) in a terminal window. Take care to also install the development packages of these libraries (...-devel packages). If there is no prepackage version, then you will have to download the source code (see links above, source code packages usually ends in .tar.gz or .zip) and compile it (you must have a C compiler installed as part of your operating system). The Web sites show the steps to compile the libraries.&lt;br /&gt;
&lt;br /&gt;
Other libraries needed to run GRASS are listed on the {{website|grass64/source/REQUIREMENTS.html|requirements page}}.&lt;br /&gt;
&lt;br /&gt;
To compile, you will also need the respective &amp;quot;-devel&amp;quot; packages.&lt;br /&gt;
&lt;br /&gt;
==== Download GRASS GIS source code ====&lt;br /&gt;
Then [http://grass.osgeo.org/download/software/sources/ download the GRASS GIS source code] of course.&lt;br /&gt;
&lt;br /&gt;
=== Generic Compilation and installation procedure ===&lt;br /&gt;
&lt;br /&gt;
* It is wise that compilation processes are carried out as a normal user: If you want to get the source code in a place where  you do not have write permissions (e.g. in /usr/local/src/) just follow this:&lt;br /&gt;
      cd /usr/local/src/ &lt;br /&gt;
      su -c 'mkdir grass6'&lt;br /&gt;
      su -c 'chown yourlogin:yourgroup grass6'&lt;br /&gt;
&lt;br /&gt;
Otherwise if you have permissions just continue as a normal user:&lt;br /&gt;
      cd /usr/local/src/&lt;br /&gt;
      svn checkout ...&lt;br /&gt;
&lt;br /&gt;
* do a code checkout from the SVN source code repository&lt;br /&gt;
: checkout the latest GRASS 6.x from SVN (see: {{twiki|DownloadSource}})&lt;br /&gt;
&lt;br /&gt;
* in the grass6 directory, you will find the precious INSTALL file, open it with your favourite pager/editor and read it carefully!&lt;br /&gt;
&lt;br /&gt;
* run configure with parameters to adapt the compile process to your own system. To see what options can be passed to it, run:&lt;br /&gt;
 ./configure --help | less &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The minimum set of configure parameters is &lt;br /&gt;
      ./configure ### --&amp;gt;&lt;br /&gt;
It may (!) look like this:&lt;br /&gt;
 &lt;br /&gt;
      ./configure \&lt;br /&gt;
          --with-cxx \&lt;br /&gt;
          --with-sqlite \&lt;br /&gt;
          --with-postgres-libs=/usr/include/pgsql/libpq \&lt;br /&gt;
          --with-postgres-includes=/usr/include/pgsql \&lt;br /&gt;
          --with-freetype \&lt;br /&gt;
          --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
          --with-motif \&lt;br /&gt;
          --with-proj-share=/usr/share/proj&lt;br /&gt;
&lt;br /&gt;
You may have to explicitly state the path for certain packages (i.e., gdal). The Unix 'locate' command will come in handy for finding the path of the package you need (you may have to run locate as root ex: sudo locate gdal-config).&lt;br /&gt;
&lt;br /&gt;
Please note that the paths mentioned may widely vary due to the distribution used.&lt;br /&gt;
See [[Compile_and_Install#Platform_Specific_Notes|Platform Specific Notes]] below.&lt;br /&gt;
&lt;br /&gt;
Depending on your needs it may be a good idea to include debugging hooks.&lt;br /&gt;
: See [[GRASS_Debugging#Compile_Time_Setup]].&lt;br /&gt;
 CFLAGS=&amp;quot;-ggdb -Wall -Werror-implicit-function-declaration&amp;quot; ./configure ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the end of configuration process you should get report not much different from this:&lt;br /&gt;
&lt;br /&gt;
GRASS is now configured for:  i686-pc-linux-gnu&lt;br /&gt;
 &lt;br /&gt;
 Source directory:            /usr/src/grass6&lt;br /&gt;
 Build directory:             /usr/src/grass6&lt;br /&gt;
 Installation directory:      /usr/local/grass-6.3.svn&lt;br /&gt;
 Startup script in directory: ${exec_prefix}/bin&lt;br /&gt;
 C compiler:                  gcc -g -O2 &lt;br /&gt;
 C++ compiler:                c++ -g -O2&lt;br /&gt;
 FORTRAN compiler:            &lt;br /&gt;
 Building shared libraries:   yes&lt;br /&gt;
 64bit support:               no&lt;br /&gt;
 &lt;br /&gt;
  NVIZ:                       yes&lt;br /&gt;
 &lt;br /&gt;
  BLAS support:               no&lt;br /&gt;
  C++ support:                yes&lt;br /&gt;
  DWG support:                no&lt;br /&gt;
  FFMPEG support:             no&lt;br /&gt;
  FFTW support:               yes&lt;br /&gt;
  FreeType support:           yes&lt;br /&gt;
  GDAL support:               yes&lt;br /&gt;
  GLw support:                no&lt;br /&gt;
  LAPACK support:             no&lt;br /&gt;
  Large File Support (LFS):   no&lt;br /&gt;
  Motif support:              no&lt;br /&gt;
  MySQL support:              no&lt;br /&gt;
  NLS support:                no&lt;br /&gt;
  ODBC support:               no&lt;br /&gt;
  OGR support:                yes&lt;br /&gt;
  OpenGL(R) support:          yes&lt;br /&gt;
  PNG support:                yes&lt;br /&gt;
  PostgreSQL support:         yes&lt;br /&gt;
  Readline support:           no&lt;br /&gt;
  SQLite support:             no&lt;br /&gt;
  Tcl/Tk support:             yes&lt;br /&gt;
  TIFF support:               yes&lt;br /&gt;
  X11 support:                yes&lt;br /&gt;
  &lt;br /&gt;
* Let's compile it (takes a little while...)!&lt;br /&gt;
      make&lt;br /&gt;
* At the end, you should get report not much different from this:&lt;br /&gt;
 ----------------------------------------------------------------------&lt;br /&gt;
 Following modules are missing the 'description.html' file in src code:&lt;br /&gt;
 ----------------------------------------------------------------------&lt;br /&gt;
 GRASS GIS compilation log&lt;br /&gt;
 -------------------------&lt;br /&gt;
 Started compilation: Ne kvě 28 13:18:43 CEST 2006&lt;br /&gt;
 --&lt;br /&gt;
 Errors in:&lt;br /&gt;
 --&lt;br /&gt;
 Finished compilation: Ne kvě 28 13:43:40 CEST 2006&lt;br /&gt;
 (In case of errors please change into the directory with error and run 'make')&lt;br /&gt;
&lt;br /&gt;
* If there is any error, change directory to directory with error and run &amp;quot;make&amp;quot; again. Report occuring bug to grass mailing list&lt;br /&gt;
* Once the installation process is finished, you're ready to install GRASS system wide.&lt;br /&gt;
      su -c 'make install'&lt;br /&gt;
* enjoy GRASS: &lt;br /&gt;
      grass64&lt;br /&gt;
&lt;br /&gt;
=== What else? ===&lt;br /&gt;
&lt;br /&gt;
If you want to use [http://www.qgis.org QGIS], then also compile the GRASS-GDAL/OGR plugin. This is also useful to access your GRASS-data&lt;br /&gt;
from other application using GDAL/OGR like [http://thuban.intevation.de thuban].&lt;br /&gt;
* [[Compile and install GRASS and QGIS with GDAL/OGR Plugin]] (enables QGIS to read GRASS data directly)&lt;br /&gt;
&lt;br /&gt;
=== Compile and install GDAL-GRASS plugin ===&lt;br /&gt;
&lt;br /&gt;
* See [[Compile and install GDAL-GRASS plugin]]&lt;br /&gt;
&lt;br /&gt;
=== Platform Specific Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Linux ====&lt;br /&gt;
&lt;br /&gt;
Linux cames in various flavours, i.e. distributions.&lt;br /&gt;
&lt;br /&gt;
===== Debian =====&lt;br /&gt;
&lt;br /&gt;
Read the instructions here:&lt;br /&gt;
: http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/debian/README.debian&lt;br /&gt;
&lt;br /&gt;
   # first install PROJ, GDAL, etc.&lt;br /&gt;
   cd grass64/&lt;br /&gt;
   # follow instructions in debian/README.debian&lt;br /&gt;
   fakeroot buildpackage&lt;br /&gt;
&lt;br /&gt;
* Official [http://wiki.debian.org/DebianGis DebianGIS] packaging control files:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strike&amp;gt;&lt;br /&gt;
  http://svn.debian.org/viewsvn/pkg-grass/packages/grass/&lt;br /&gt;
  svn co svn://svn.debian.org/svn/pkg-grass/packages/grass/trunk/&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  svn co svn://svn.debian.org/svn/pkg-grass/packages/grass/branches/&amp;lt;GRASS Version&amp;gt;&lt;br /&gt;
&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Available on git server:&lt;br /&gt;
  git://git.debian.org/git/pkg-grass/grass.git&lt;br /&gt;
&lt;br /&gt;
  http://anonscm.debian.org/cgit/pkg-grass/grass.git/&lt;br /&gt;
&lt;br /&gt;
====== GRASS 6.1 on Debian Sarge ======&lt;br /&gt;
&lt;br /&gt;
* [http://hamish.bowman.googlepages.com/debiangisfiles#compile Compiling GRASS 6.1-CVS on Debian/OldStable (aka 3.1, Sarge)]&lt;br /&gt;
&lt;br /&gt;
====== GRASS 6.4 on Debian Lenny ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
  apt-get install flex bison libreadline-dev libncurses5-dev lesstif2-dev debhelper dpatch libtiff4-dev \&lt;br /&gt;
          tcl-dev tk-dev libfftw3-dev libxmu-dev libfreetype6-dev autoconf2.13 autotools-dev doxygen \&lt;br /&gt;
          libmysqlclient15-dev graphviz libsqlite3-dev python-wxgtk2.8 libcairo2-dev libwxgtk2.8-dev \&lt;br /&gt;
          python-dev libgdal1-dev  libgdal1-1.5.0 libproj-dev libproj0 proj-data mysql&lt;br /&gt;
&lt;br /&gt;
# Important: avoid using CFLAGS=&amp;quot;... -Werror-implicit-function-declaration&amp;quot; (also on later Debian versions), see {{trac|1684}}&lt;br /&gt;
&lt;br /&gt;
Configure:&lt;br /&gt;
  ./configure \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-postgres --with-postgres-includes=/usr/include/postgresql \&lt;br /&gt;
  --with-mysql --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib/mysql \&lt;br /&gt;
  --with-odbc \&lt;br /&gt;
  --with-cairo \&lt;br /&gt;
  --with-proj-share=/usr/share/proj \&lt;br /&gt;
  --with-tcltk-includes=/usr/include/tcl8.4/ \&lt;br /&gt;
  --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
  --with-motif --with-fftw --with-nls --with-python \&lt;br /&gt;
  --with-x --x-libraries=/usr/lib/x86_64-linux-gnu&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
  sudo make install&lt;br /&gt;
&lt;br /&gt;
====== GRASS 6.4 on Debian Jessie ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
  apt-get install flex bison debhelper dpatch autoconf2.13 autotools-dev \&lt;br /&gt;
    python-dev g++ gcc gettext graphviz libcairo2-dev libfftw3-dev tcl-dev tk-dev \&lt;br /&gt;
    libfreetype6-dev libgdal1h libgdal1-dev libglu1-mesa-dev libglw1-mesa-dev \&lt;br /&gt;
    libncurses5-dev libreadline-dev libsqlite3-dev libtiff5-dev \&lt;br /&gt;
    libwxgtk3.0-dev libxmu-dev libxmu-headers libxt-dev mesa-common-dev \&lt;br /&gt;
    libproj-dev proj-bin python-numpy python-wxgtk3.0 subversion wx-common zlib1g-dev \&lt;br /&gt;
    netcdf-bin libnetcdf-dev libatlas-dev libgegl-dev doxygen postgresql mysql-server \&lt;br /&gt;
    libgeotiff-dev libblas-dev libgeotiff-epsg libxmu-dev libxt-dev libx11-dev&lt;br /&gt;
&lt;br /&gt;
# Important: avoid using CFLAGS=&amp;quot;... -Werror-implicit-function-declaration&amp;quot; (also on later Debian versions), see {{trac|1684}}&lt;br /&gt;
&lt;br /&gt;
Configure:&lt;br /&gt;
  ./configure \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-postgres \&lt;br /&gt;
  --with-odbc \&lt;br /&gt;
  --with-cairo \&lt;br /&gt;
  --with-geos \&lt;br /&gt;
  --with-proj-share=/usr/share/proj \&lt;br /&gt;
  --with-tcltk-includes=/usr/include/tcl8.6/ \&lt;br /&gt;
  --with-mysql --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib/mysql \&lt;br /&gt;
  --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
  --with-motif \&lt;br /&gt;
  --with-fftw \&lt;br /&gt;
  --with-nls \&lt;br /&gt;
  --with-postgres-includes=/usr/include/postgresql \&lt;br /&gt;
  --with-python \&lt;br /&gt;
  --with-x --x-libraries=/usr/lib/x86_64-linux-gnu&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
  sudo make install&lt;br /&gt;
&lt;br /&gt;
====== GRASS 7 on Debian Squeeze ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
 apt-get install flex bison debhelper dpatch autoconf2.13 autotools-dev python-dev \&lt;br /&gt;
     g++ gcc gettext graphviz libcairo2-dev libfftw3-dev libfreetype6-dev \&lt;br /&gt;
     libgdal1 libgdal1-dev libglu1-mesa-dev libglw1-mesa-dev \&lt;br /&gt;
     libncurses5-dev libproj-dev libreadline-dev libsqlite3-dev libtiff4-dev \&lt;br /&gt;
     libwxgtk2.8-dev libxmu-dev libxmu-headers libxt-dev mesa-common-dev \&lt;br /&gt;
     proj-bin python-numpy python-wxgtk2.8 subversion wx-common zlib1g-dev&lt;br /&gt;
&lt;br /&gt;
Download source code:&lt;br /&gt;
&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
Configure:&lt;br /&gt;
 &lt;br /&gt;
 cd grass_trunk/&lt;br /&gt;
 CFLAGS=&amp;quot;-Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused&amp;quot; \&lt;br /&gt;
 CXXFLAGS=&amp;quot;-Wall&amp;quot;  \&lt;br /&gt;
  ./configure --prefix=/usr/local \&lt;br /&gt;
  --with-gdal --with-proj --with-proj-share=/usr/share \&lt;br /&gt;
  --with-glw --with-nls --with-readline \&lt;br /&gt;
  --without-tcltk \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-cairo --with-python=/usr/bin/python2.6-config --with-wxwidgets \&lt;br /&gt;
  --with-geos --with-pthread&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
  sudo make install  # installs as /usr/local/bin/grass71&lt;br /&gt;
&lt;br /&gt;
====== GRASS 7 on Debian Wheezy ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
&lt;br /&gt;
 # note: cmake and libboost-all-dev only needed for optional libLAS&lt;br /&gt;
 sudo apt-get install cmake libboost-all-dev&lt;br /&gt;
 &lt;br /&gt;
 sudo apt-get install flex bison debhelper dpatch autoconf2.13 autotools-dev \&lt;br /&gt;
   python-dev g++ gcc gettext graphviz libcairo2-dev libfftw3-dev libfreetype6-dev \&lt;br /&gt;
   libgdal1 libgdal1-dev libglu1-mesa-dev libglw1-mesa-dev libncurses5-dev libproj-dev \&lt;br /&gt;
   libreadline-dev libtiff4-dev libwxgtk2.8-dev libxmu-dev libxmu-headers \&lt;br /&gt;
   libxt-dev mesa-common-dev proj-bin python-numpy python-wxgtk2.8 subversion wx-common \&lt;br /&gt;
   zlib1g-dev netcdf-bin libatlas-dev libgegl-dev opencl-headers ocl-icd-libopencl1 \&lt;br /&gt;
   libsqlite3-dev postgresql python-sphinx&lt;br /&gt;
&lt;br /&gt;
Download and Install libLAS&lt;br /&gt;
 wget http://download.osgeo.org/liblas/libLAS-1.7.0.tar.gz&lt;br /&gt;
 tar -zxvf libLAS-1.7.0.tar.gz&lt;br /&gt;
 cd libLAS-1.7.0/&lt;br /&gt;
 mkdir makefiles&lt;br /&gt;
 cd makefiles&lt;br /&gt;
 cmake -G &amp;quot;Unix Makefiles&amp;quot; ../&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
 sudo ldconfig&lt;br /&gt;
 cd ../..&lt;br /&gt;
&lt;br /&gt;
Download of GRASS GIS 7 source code:&lt;br /&gt;
 wget http://grass.osgeo.org/grass70/source/grass-7.0.0.tar.gz&lt;br /&gt;
 tar -zxvf grass-7.0.0.tar.gz&lt;br /&gt;
&lt;br /&gt;
Configure:&lt;br /&gt;
 cd grass-7.0.0&lt;br /&gt;
 CFLAGS=&amp;quot;-g -Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused&amp;quot; CXXFLAGS=&amp;quot;-g -Wall&amp;quot; \&lt;br /&gt;
 ./configure \&lt;br /&gt;
    --prefix=/usr/local \&lt;br /&gt;
    --with-gdal \&lt;br /&gt;
    --with-proj --with-proj-share=/usr/share \&lt;br /&gt;
    --with-glw --with-nls --with-readline \&lt;br /&gt;
    --with-cxx --enable-largefile \&lt;br /&gt;
    --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
    --with-sqlite --with-cairo --with-python=/usr/bin/python-config \&lt;br /&gt;
    --with-wxwidgets --with-geos --with-blas \&lt;br /&gt;
    --with-lapack-includes=/usr/lib/lapack --with-liblas=yes \&lt;br /&gt;
    --with-netcdf=/usr/bin/nc-config --with-odbc=yes \&lt;br /&gt;
    --with-openmp=yes --with-pthread=yes --with-postgres=yes \&lt;br /&gt;
    --with-postgres-includes=/usr/include/postgresql \&lt;br /&gt;
    --with-postgres-libs=/usr/lib/postgresql&lt;br /&gt;
 &lt;br /&gt;
 #     --with-mysql=yes --with-mysql-includes=/usr/include/mysql \&lt;br /&gt;
 #    --with-mysql-libs=/usr/lib/mysql \&lt;br /&gt;
&lt;br /&gt;
GRASS GIS 7 is now configured (example):&lt;br /&gt;
&lt;br /&gt;
  Source directory:           /home/user/grass-7.0.0&lt;br /&gt;
  Build directory:            /home/user/grass-7.0.0&lt;br /&gt;
  Installation directory:     ${prefix}/grass-7.0.0&lt;br /&gt;
  Startup script in directory:${exec_prefix}/bin&lt;br /&gt;
  C compiler:                 gcc -g -Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused &lt;br /&gt;
  C++ compiler:               c++ -g -Wall&lt;br /&gt;
  Building shared libraries:  yes&lt;br /&gt;
  OpenGL platform:            X11&lt;br /&gt;
  MacOSX application:         no&lt;br /&gt;
  MacOSX architectures:       &lt;br /&gt;
  MacOSX SDK:                 &lt;br /&gt;
  BLAS support:               yes&lt;br /&gt;
  C++ support:                yes&lt;br /&gt;
  Cairo support:              yes&lt;br /&gt;
  DWG support:                no&lt;br /&gt;
  FFTW support:               yes&lt;br /&gt;
  FreeType support:           yes&lt;br /&gt;
  GDAL support:               yes&lt;br /&gt;
  GEOS support:               yes&lt;br /&gt;
  LAPACK support:             no&lt;br /&gt;
  Large File support (LFS):   yes&lt;br /&gt;
  libLAS support:             yes&lt;br /&gt;
  MySQL support:              no&lt;br /&gt;
  NetCDF support:             yes&lt;br /&gt;
  NLS support:                yes&lt;br /&gt;
  ODBC support:               yes&lt;br /&gt;
  OGR support:                yes&lt;br /&gt;
  OpenCL support:             no&lt;br /&gt;
  OpenGL support:             yes&lt;br /&gt;
  OpenMP support:             yes&lt;br /&gt;
  PNG support:                yes&lt;br /&gt;
  POSIX thread support:       yes&lt;br /&gt;
  PostgreSQL support:         yes&lt;br /&gt;
  Readline support:           yes&lt;br /&gt;
  Regex support:              yes&lt;br /&gt;
  SQLite support:             yes&lt;br /&gt;
  TIFF support:               yes&lt;br /&gt;
  wxWidgets support:          yes&lt;br /&gt;
  X11 support:                no&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
 make -j2&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
 sudo make install   # installs as /usr/local/bin/grass70&lt;br /&gt;
&lt;br /&gt;
Launch:&lt;br /&gt;
 grass70&lt;br /&gt;
&lt;br /&gt;
====== GRASS 7 on Debian Jessie ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
 sudo apt-get install cmake libboost-all-dev flex bison debhelper dpatch autoconf2.13 \&lt;br /&gt;
    autotools-dev python-dev g++ gcc gettext graphviz libcairo2-dev libfftw3-dev \&lt;br /&gt;
    libfreetype6-dev libgdal1h libgdal1-dev libglu1-mesa-dev libglw1-mesa-dev \&lt;br /&gt;
    libncurses5-dev libproj-dev libreadline-dev libsqlite3-dev libtiff5-dev \&lt;br /&gt;
    libwxgtk3.0-dev libxmu-dev libxmu-headers libxt-dev mesa-common-dev \&lt;br /&gt;
    proj-bin python-numpy python-wxgtk3.0 subversion wx-common zlib1g-dev \&lt;br /&gt;
    netcdf-bin libnetcdf-dev libgegl-dev  doxygen python-sphinx \&lt;br /&gt;
    postgresql libgeotiff-dev libblas-dev mysql-server \&lt;br /&gt;
    libatlas-dev libblas-dev liblapack3gf liblapack-dev&lt;br /&gt;
    # opencl-headers ocl-icd-libopencl1   liblas-bin liblas-c-dev&lt;br /&gt;
&lt;br /&gt;
Download and compile libLAS (or simply install 'liblas-c-dev ', see above):&lt;br /&gt;
 wget http://download.osgeo.org/liblas/libLAS-1.8.0.tar.bz2&lt;br /&gt;
 tar xjf libLAS-1.8.0.tar.bz2&lt;br /&gt;
 mkdir libLAS-1.8.0/makefiles&lt;br /&gt;
 cd libLAS-1.8.0/makefiles&lt;br /&gt;
 cmake -G &amp;quot;Unix Makefiles&amp;quot; ../&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
Download and compile GRASS 7:&lt;br /&gt;
 # (check there for later version)&lt;br /&gt;
 wget http://grass.osgeo.org/grass70/source/grass-7.0.0.tar.gz&lt;br /&gt;
 tar xzfv grass-7.0.0.tar.gz&lt;br /&gt;
 cd grass-7.0.0&lt;br /&gt;
 CFLAGS=&amp;quot;-g -Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused&amp;quot; \&lt;br /&gt;
 CXXFLAGS=&amp;quot;-g -Wall&amp;quot;  \&lt;br /&gt;
 ./configure \&lt;br /&gt;
    --prefix=/usr/local \&lt;br /&gt;
    --with-gdal --with-proj --with-proj-share=/usr/share \&lt;br /&gt;
    --with-glw --with-nls --with-readline \&lt;br /&gt;
    --with-cxx --enable-largefile \&lt;br /&gt;
    --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
    --with-sqlite --with-cairo --with-python=/usr/bin/python-config \&lt;br /&gt;
    --with-wxwidgets --with-geos \&lt;br /&gt;
    --with-blas --with-blas-includes=/usr/include/atlas/ \&lt;br /&gt;
    --with-lapack --with-lapack-includes=/usr/include/atlas/ \&lt;br /&gt;
    --with-netcdf=/usr/bin/nc-config --with-odbc=yes \&lt;br /&gt;
    --with-openmp=yes --with-pthread=no --with-postgres=yes \&lt;br /&gt;
    --with-postgres-includes=/usr/include/postgresql \&lt;br /&gt;
    --with-postgres-libs=/usr/lib/postgresql \&lt;br /&gt;
    --with-mysql=yes --with-mysql-includes=/usr/include/mysql \&lt;br /&gt;
    --with-mysql-libs=/usr/lib/mysql&lt;br /&gt;
 make -j2&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
 sudo make install  # installs as /usr/local/bin/grass70&lt;br /&gt;
&lt;br /&gt;
===== Ubuntu =====&lt;br /&gt;
&lt;br /&gt;
There is a dedicated page on how to [[Compile_and_Install_Ubuntu | Compile the GRASS GIS source code &amp;amp; install it in Ubuntu]].&lt;br /&gt;
&lt;br /&gt;
===== Linux Mint =====&lt;br /&gt;
&lt;br /&gt;
Install packages needed for compilation:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install build-essential flex make bison gcc libgcc1 g++ \&lt;br /&gt;
 cmake ccache python python-dev python-qt4 python-qt4-dev python-opengl \&lt;br /&gt;
 python-wxversion python-wxtools python-wxgtk2.8 python-dateutil \&lt;br /&gt;
 libgsl0-dev python-numpy wx2.8-headers wx-common libwxgtk2.8-dev \&lt;br /&gt;
 libwxgtk2.8-dbg libwxbase2.8-dev  libwxbase2.8-dbg libncurses5-dev \&lt;br /&gt;
 zlib1g-dev gettext libtiff-dev libpnglite-dev tcl8.5-dev tk8.5-dev \&lt;br /&gt;
 libcairo2 libcairo2-dev sqlite3 libsqlite3-dev libpq-dev libreadline6 \&lt;br /&gt;
 libreadline6-dev libfreetype6-dev txt2tags libfftw3-3 libfftw3-dev \&lt;br /&gt;
 libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql \&lt;br /&gt;
 libqt4-qt3support lsb-qt4 qt4-designer qt4-dev-tools qt4-doc \&lt;br /&gt;
 qt4-qtconfig libapt-pkg-perl resolvconf libjasper-dev ruby subversion \&lt;br /&gt;
 ffmpeg ffmpeg2theora libffmpegthumbnailer-dev libavcodec-dev libxmu-dev \&lt;br /&gt;
 libavformat-dev libswscale-dev checkinstall libglu1-mesa-dev libxmu-dev \&lt;br /&gt;
 libproj-dev  proj-bin python-gdal&lt;br /&gt;
&lt;br /&gt;
CFLAGS=&amp;quot;-Wall&amp;quot; ./configure  --with-cxx  --with-gdal \&lt;br /&gt;
 --with-proj --with-proj-share=/usr/share/proj/ \&lt;br /&gt;
 --with-geos  --without-postgres \&lt;br /&gt;
 --with-nls  --with-opengl-includes=/usr/include/GL/ \&lt;br /&gt;
 --with-x --with-fftw  --with-freetype \&lt;br /&gt;
 --with-freetype-includes=/usr/include/freetype2  --with-sqlite \&lt;br /&gt;
 --with-python=/usr/bin/python2.7-config  --with-wx=/usr/bin/wx-config \&lt;br /&gt;
 --with-wxwidgets  --with-cairo  --enable-largefile&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Mandriva =====&lt;br /&gt;
&lt;br /&gt;
Installation of dependencies (urpmi will ask you a few more):&lt;br /&gt;
&lt;br /&gt;
'''Mandriva 2009:''' (take out the '64' everywhere if you are on 32bit)&lt;br /&gt;
  # as root&lt;br /&gt;
    urpmi flex bison zlib-devel tiff-devel png-devel tcl-devel tk-devel sqlite3-devel \&lt;br /&gt;
          mesagl1-devel mesaglu1-devel lib64xmu6-devel gcc-c++ gettext \&lt;br /&gt;
          lib64wxgtk2.8 lib64wxgtk2.8-devel lib64wxgtkgl2.8 wxgtk2.8 \&lt;br /&gt;
          lib64wxPythonGTK2.8 lib64wxPythonGTK2.8-devel wxPythonGTK wxPythonGTK-wxversion&lt;br /&gt;
    exit&lt;br /&gt;
&lt;br /&gt;
'''Mandriva 2010:''' (take out the '64' everywhere if you are on 32bit) - see also [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/grass/current/SPECS/ SPEC] file&lt;br /&gt;
  # as root&lt;br /&gt;
    # installation of PROJ and GDAL&lt;br /&gt;
    urpmi proj proj-devel gdal gdal-devel gcc-gfortran lib64openssl1.0.0 \&lt;br /&gt;
          lib64openssl1.0.0-devel postgresql8.4-devel lib64pq8.4&lt;br /&gt;
 &lt;br /&gt;
    # installation of compilation environment&lt;br /&gt;
    urpmi flex bison zlib-devel tiff-devel png-devel tcl-devel tk-devel sqlite3-devel \&lt;br /&gt;
          lib64mesagl1-devel lib64mesaglu1-devel lib64xmu6-devel gcc-c++ gettext \&lt;br /&gt;
          lib64wxgtk2.8 lib64wxgtk2.8-devel lib64wxgtkgl2.8 wxgtk2.8 \&lt;br /&gt;
          lib64wxPythonGTK2.8 lib64wxPythonGTK2.8-devel wxPythonGTK wxPythonGTK-wxversion&lt;br /&gt;
    exit&lt;br /&gt;
&lt;br /&gt;
Then, to configure GRASS, run (64 bit stuff optional of course):&lt;br /&gt;
  #  as user&lt;br /&gt;
  ./configure \&lt;br /&gt;
    --enable-64bit --with-libs=/usr/lib64 \&lt;br /&gt;
    --with-cxx \&lt;br /&gt;
    --with-gdal=/usr/local/bin/gdal-config \&lt;br /&gt;
    --with-sqlite \&lt;br /&gt;
    --with-nls \&lt;br /&gt;
    --with-python \&lt;br /&gt;
    --with-wxwidgets=/usr/lib/wxPython/bin/wx-config \&lt;br /&gt;
    --with-fftw \&lt;br /&gt;
    --with-ffmpeg --with-ffmpeg-includes=&amp;quot;/usr/include/libav* /usr/include/libpostproc /usr/include/libswscale&amp;quot; \&lt;br /&gt;
    --with-motif \&lt;br /&gt;
    --with-mysql --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib64 \&lt;br /&gt;
    --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
    --enable-largefile&lt;br /&gt;
&lt;br /&gt;
   # compilation (use -j2 ior -j4 parameter on multi-core CPUs to accelerate):   &lt;br /&gt;
    make&lt;br /&gt;
&lt;br /&gt;
Installation:&lt;br /&gt;
    su&lt;br /&gt;
    # this will install into /usr/local/&lt;br /&gt;
    make install&lt;br /&gt;
    exit&lt;br /&gt;
&lt;br /&gt;
===== Enterprise Linux =====&lt;br /&gt;
&lt;br /&gt;
Enterprise Linux (EL) and derivatives (that is, Red Hat Enterprise Linux, CentOS and Scientific Linux) is a popular and robust platform for servers and computing-heavy workstations, and is therefore a good fit for GIS specific requirements.&lt;br /&gt;
&lt;br /&gt;
See: http://wiki.osgeo.org/wiki/Enterprise_Linux_GIS&lt;br /&gt;
&lt;br /&gt;
===== Scientific Linux =====&lt;br /&gt;
&lt;br /&gt;
See Centos&lt;br /&gt;
&lt;br /&gt;
===== CentOS =====&lt;br /&gt;
&lt;br /&gt;
You first need to add the EPEL repository for PROJ.4 and GDAL, see [https://fedoraproject.org/wiki/EPEL/FAQ#How_can_I_install_the_packages_from_the_EPEL_software_repository.3F here]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strike&amp;gt;&lt;br /&gt;
Preparation '''Centos 5''' (old):&lt;br /&gt;
  yum install epel-release&lt;br /&gt;
 &lt;br /&gt;
  # Note: CentOS 5 comes with Python 2.4 which lacks python-config, hence two extra tweaks are needed.&lt;br /&gt;
  yum install flex bison zlib-devel tcl-devel tk-devel gcc-c++ gettext \&lt;br /&gt;
              libtiff-devel libpng-devel sqlite-devel \&lt;br /&gt;
              mesa-libGL-devel mesa-libGLU-devel mesa-libGLw-devel \&lt;br /&gt;
              mesa-libOSMesa-devel libXmu-devel python-devel gtk2-devel\&lt;br /&gt;
              ncurses-devel postgresql-devel make&lt;br /&gt;
&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Preparation '''Centos 6''' | '''Scientific Linux 6''':&lt;br /&gt;
  yum install epel-release&lt;br /&gt;
 &lt;br /&gt;
  yum install flex bison make zlib-devel gcc-c++ gettext \&lt;br /&gt;
              sqlite-devel mesa-libGL-devel mesa-libGLU-devel \&lt;br /&gt;
              libXmu-devel libX11-devel fftw-devel libtiff-devel \&lt;br /&gt;
              lesstif-devel python-devel numpy wxPython wxGTK-devel \&lt;br /&gt;
              proj proj-devel proj-epsg proj-nad libxml2 gdal gdal-devel geos geos-devel \&lt;br /&gt;
              python-dateutil python-imaging python-matplotlib&lt;br /&gt;
  # only GRASS GIS 6: install also tcl-devel tk-devel&lt;br /&gt;
&lt;br /&gt;
Preparation '''Centos 7''' | '''Scientific Linux 7''':&lt;br /&gt;
  yum install epel-release&lt;br /&gt;
 &lt;br /&gt;
  yum install flex bison make zlib-devel gcc-c++ gettext \&lt;br /&gt;
              sqlite-devel mesa-libGL-devel mesa-libGLU-devel \&lt;br /&gt;
              libXmu-devel libX11-devel fftw-devel libtiff-devel \&lt;br /&gt;
              lesstif-devel python-devel numpy wxPython wxGTK-devel \&lt;br /&gt;
              proj proj-devel proj-epsg proj-nad libxml2 gdal gdal-devel geos geos-devel \&lt;br /&gt;
              netcdf netcdf-devel blas-devel lapack-devel atlas-devel \&lt;br /&gt;
              python-dateutil python-imaging python-matplotlib python-sphinx \&lt;br /&gt;
              doxygen subversion&lt;br /&gt;
&lt;br /&gt;
'''GRASS GIS 7 compilation and installation'''&lt;br /&gt;
&lt;br /&gt;
[http://grass.osgeo.org/download/software/sources/ Download source code] (e.g., --&amp;gt; &amp;quot;Download latest 7.0-svn code (SVN))&amp;quot; and configure GRASS 7 (suggestion: save this as script):&lt;br /&gt;
&lt;br /&gt;
 ./configure \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --with-proj --with-proj-share=/usr/share/proj \&lt;br /&gt;
  --with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-python \&lt;br /&gt;
  --with-cairo --with-cairo-ldflags=-lfontconfig \&lt;br /&gt;
  --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
  --with-wxwidgets=/usr/bin/wx-config \&lt;br /&gt;
  --with-openmp \&lt;br /&gt;
  --with-blas --with-blas-includes=/usr/include/atlas-x86_64-base/ \&lt;br /&gt;
  --with-lapack --with-lapack-includes=/usr/include/atlas-x86_64-base/ \&lt;br /&gt;
  --with-fftw \&lt;br /&gt;
  --with-geos \&lt;br /&gt;
  --with-netcdf \&lt;br /&gt;
  --without-ffmpeg \&lt;br /&gt;
  --without-mysql \&lt;br /&gt;
  --without-postgres \&lt;br /&gt;
  --without-odbc \&lt;br /&gt;
  --without-fftw&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
    make&lt;br /&gt;
or on a multicore system (number depends of available cores):&lt;br /&gt;
    make -j4&lt;br /&gt;
&lt;br /&gt;
For a system wide installation, run as root user:&lt;br /&gt;
    make install&lt;br /&gt;
OR simply run it directly from the source code directory (substitute ARCH with i686 or x86_64):&lt;br /&gt;
&lt;br /&gt;
    bin.$ARCH/grass70 -gui&lt;br /&gt;
&lt;br /&gt;
In this case, for convenience, add it to the search path:&lt;br /&gt;
    mkdir $HOME/bin&lt;br /&gt;
    cd $HOME/bin&lt;br /&gt;
    # example:&lt;br /&gt;
    ln -s $HOME/software/grass70_release/bin.i686-pc-linux-gnu/grass70 .&lt;br /&gt;
&lt;br /&gt;
Now use it subsequently with&lt;br /&gt;
    grass70 -gui&lt;br /&gt;
&lt;br /&gt;
===== Gentoo =====&lt;br /&gt;
&lt;br /&gt;
  ./configure \&lt;br /&gt;
    --with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
See also http://packages.gentoo.org/package/sci-geosciences/grass&lt;br /&gt;
&lt;br /&gt;
===== Funtoo =====&lt;br /&gt;
&lt;br /&gt;
The [http://grasswiki.osgeo.org/wiki/Compile_and_Install#Generic_Compilation_and_installation_procedure Generic Compilation &amp;amp; installation procedure] applies also for the [http://www.funtoo.org/ Funtoo] Linux meta-distribution. The following example scripts are provided as a mean to get started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====== Installing dependencies ======&lt;br /&gt;
&lt;br /&gt;
'''''Following likely needs to be updated!'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# # Searching for missing packages, e.g. wxwidgets&lt;br /&gt;
# e-file wx-config&lt;br /&gt;
&lt;br /&gt;
# emerge dependecies -- This will take quite some time! Hint: net-libs/webkit-gtk&lt;br /&gt;
USE=&amp;quot;curl xls fftw gmath motif  wxwidgets gml hdf5 jpeg2k mdb netcdf odbc ogdi opencl postgres spatialite sqlite szip&amp;quot; \&lt;br /&gt;
emerge -av proj geos gdal \&lt;br /&gt;
	   xerces \&lt;br /&gt;
	   mesa motif libGLw  \&lt;br /&gt;
	   tcl tk clang llvm byacc opencl \&lt;br /&gt;
	   unixODBC postgresql-base ogdi spatialite \&lt;br /&gt;
	   libgeotiff hdf5 netcdf \&lt;br /&gt;
	   eselect-postgresql eselect-opencl eselect-wxwidgets \&lt;br /&gt;
	   wxpython pyopengl \&lt;br /&gt;
	   fftw&lt;br /&gt;
&lt;br /&gt;
# before compiling&lt;br /&gt;
eselect python set 1 # probably #1 is python 2.7&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====== Example Scripts ======&lt;br /&gt;
&lt;br /&gt;
A simple configuration and compilation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# clean previous configuration&lt;br /&gt;
make distclean&lt;br /&gt;
&lt;br /&gt;
# update source code&lt;br /&gt;
svn up&lt;br /&gt;
&lt;br /&gt;
# renice! source: &amp;lt;http://lists.osgeo.org/pipermail/grass-user/2013-May/068229.html&amp;gt;&lt;br /&gt;
renice +17 -p $$&lt;br /&gt;
&lt;br /&gt;
# configure&lt;br /&gt;
./configure \&lt;br /&gt;
--with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
2&amp;gt;&amp;amp;1 | tee config_log.txt&lt;br /&gt;
&lt;br /&gt;
# compile&lt;br /&gt;
time make -j13&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An attempt for a complete configuration and compilation '''checking'''. In addition, this script times each of the executed commands (need for scrolling back!).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# clean previous configuration&lt;br /&gt;
time make distclean&lt;br /&gt;
&lt;br /&gt;
# update&lt;br /&gt;
time svn up&lt;br /&gt;
&lt;br /&gt;
# renice! source: &amp;lt;http://lists.osgeo.org/pipermail/grass-user/2013-May/068229.html&amp;gt;&lt;br /&gt;
renice +17 -p $$&lt;br /&gt;
&lt;br /&gt;
# configure&lt;br /&gt;
CFLAGS=&amp;quot;-ggdb -march=native -Wall -Werror-implicit-function-declaration&amp;quot; \&lt;br /&gt;
./configure \&lt;br /&gt;
--with-cxx \&lt;br /&gt;
--with-includes=/usr/include/ --with-libs=/usr/lib64/ \&lt;br /&gt;
--with-proj \&lt;br /&gt;
--with-proj-includes=/usr/include/ \&lt;br /&gt;
--with-proj-libs=/usr/lib64/ \&lt;br /&gt;
--with-proj-share=/usr/share/proj/ \&lt;br /&gt;
--with-geos \&lt;br /&gt;
--with-geos=/usr/bin/geos-config \&lt;br /&gt;
--with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
--with-x \&lt;br /&gt;
--with-motif \&lt;br /&gt;
--with-cairo \&lt;br /&gt;
--with-opengl-libs=/usr/include/GL \&lt;br /&gt;
--without-ffmpeg \&lt;br /&gt;
--with-python=yes --with-python=/usr/bin/python2.7-config \&lt;br /&gt;
--with-wxwidgets \&lt;br /&gt;
--with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
--with-odbc=yes \&lt;br /&gt;
--with-sqlite=yes \&lt;br /&gt;
--with-mysql=yes --with-mysql-includes=&amp;quot;/usr/include/mysql&amp;quot; --with-mysql-libs=/usr/lib/mysql \&lt;br /&gt;
--with-postgres=yes --with-postgresql=yes --with-postgres-includes=&amp;quot;/usr/include/postgresql&amp;quot; \&lt;br /&gt;
--with-opencl --with-openmp --with-pthread \&lt;br /&gt;
--with-lapack \&lt;br /&gt;
--with-fftw \&lt;br /&gt;
--with-readline \&lt;br /&gt;
--with-regex \&lt;br /&gt;
--with-nls \&lt;br /&gt;
--with-jpeg \&lt;br /&gt;
--with-tiff \&lt;br /&gt;
--with-png \&lt;br /&gt;
--with-netcdf \&lt;br /&gt;
--without-opendwg \&lt;br /&gt;
--enable-largefile=yes \&lt;br /&gt;
2&amp;gt;&amp;amp;1 | tee config_log.txt&lt;br /&gt;
&lt;br /&gt;
# check &amp;quot;make&amp;quot;&lt;br /&gt;
time make check&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Fedora =====&lt;br /&gt;
&lt;br /&gt;
====== GRASS GIS 6 on Fedora ======&lt;br /&gt;
&lt;br /&gt;
'''Preparation''' for the compilation of GRASS GIS 6 source code (F16-F21):&lt;br /&gt;
&lt;br /&gt;
  yum install proj-devel gdal-devel sqlite-devel ffmpeg-devel mesa-libGL-devel \&lt;br /&gt;
              mesa-libGLU-devel libXmu-devel libX11-devel tcl-devel tk-devel geos \&lt;br /&gt;
              fftw-devel libtiff-devel lesstif-devel python-devel numpy wxPython wxGTK-devel \&lt;br /&gt;
              gcc gcc-c++ bison flex ncurses-devel proj-epsg proj-nad xml2 subversion&lt;br /&gt;
&lt;br /&gt;
''Note 1: that currently gdal-devel has (too) many dependencies and may lead to a massive download of extra packages (200 on a fresh Fedora 16 install). Hopefully solved in later Fedora versions.''&lt;br /&gt;
&lt;br /&gt;
''Note 2: the optional ffmpeg-devel comes from the rpmfusion-free repository ([http://rpmfusion.org/Configuration/ configuration]).''&lt;br /&gt;
&lt;br /&gt;
'''Download''' the source code:&lt;br /&gt;
* GRASS GIS 6: [http://grass.osgeo.org/download/software/sources/ release package] - [http://grass.osgeo.org/grass64/source/snapshot/ weekly snapshot] - [http://trac.osgeo.org/grass/wiki/DownloadSource#GRASS6.4 SVN repository]&lt;br /&gt;
&lt;br /&gt;
'''Configure''': This is an ''example'' how to configure the source code on a Fedora system:&lt;br /&gt;
&lt;br /&gt;
  ./configure \&lt;br /&gt;
   --with-cxx \&lt;br /&gt;
   --with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
   --with-proj --with-proj-share=/usr/share/proj \&lt;br /&gt;
   --with-sqlite \&lt;br /&gt;
   --with-nls \&lt;br /&gt;
   --with-geos \&lt;br /&gt;
   --with-wxwidgets=/usr/bin/wx-config \&lt;br /&gt;
   --with-python=/usr/bin/python-config \&lt;br /&gt;
   --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
   --enable-largefile \&lt;br /&gt;
   --without-odbc \&lt;br /&gt;
   --with-fftw&lt;br /&gt;
&lt;br /&gt;
Extra: If you also want '''FFMPEG''' support - it requires 'yum install fftw-devel'. Then add to the configuration lines above:&lt;br /&gt;
&lt;br /&gt;
     --with-ffmpeg --with-ffmpeg-includes=&amp;quot;/usr/include/ffmpeg /usr/include/ffmpeg/libav* /usr/include/ffmpeg/libpostproc /usr/include/ffmpeg/libswscale&amp;quot; \&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally '''compile''' the configured source code:&lt;br /&gt;
    make&lt;br /&gt;
   or on multicore (number depends of available cores):&lt;br /&gt;
    make -j4&lt;br /&gt;
   and&lt;br /&gt;
    make install # requires root permissions unless you become owner of /usr/local/&lt;br /&gt;
&lt;br /&gt;
Then use GRASS GIS 6 and enjoy!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====== GRASS GIS 7 on Fedora ======&lt;br /&gt;
&lt;br /&gt;
'''Preparation''' for the compilation of GRASS GIS 7 source code (F20-F22):&lt;br /&gt;
&lt;br /&gt;
  dnf install gcc gcc-c++ bison flex ncurses-devel proj-epsg proj-nad xml2 \&lt;br /&gt;
              proj-devel gdal gdal-devel gdal-python sqlite-devel mesa-libGL-devel \&lt;br /&gt;
              fftw-devel mesa-libGLU-devel libXmu-devel libX11-devel geos geos-devel \&lt;br /&gt;
              libtiff-devel lesstif-devel python-devel numpy wxPython wxGTK-devel \&lt;br /&gt;
              python-dateutil python-imaging python-matplotlib-wx subversion doxygen python-sphinx&lt;br /&gt;
&lt;br /&gt;
  # optionally also:  netcdf-devel postgresql-devel&lt;br /&gt;
&lt;br /&gt;
''Note 1: the optional ffmpeg-devel comes from the rpmfusion-free repository ([http://rpmfusion.org/Configuration/ configuration]).''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Download''' the source code:&lt;br /&gt;
* GRASS GIS 7: [http://grass.osgeo.org/grass70/source/snapshot/ weekly snapshot] - [http://trac.osgeo.org/grass/wiki/DownloadSource#GRASS7 SVN repository]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Configure''': This is an example how to configure the source code on a Fedora system:&lt;br /&gt;
&lt;br /&gt;
  ./configure \&lt;br /&gt;
   --with-cxx \&lt;br /&gt;
   --with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
   --with-proj --with-proj-share=/usr/share/proj \&lt;br /&gt;
   --with-python=/usr/bin/python-config \&lt;br /&gt;
   --with-geos \&lt;br /&gt;
   --with-sqlite \&lt;br /&gt;
   --with-nls \&lt;br /&gt;
   --with-wxwidgets=/usr/bin/wx-config \&lt;br /&gt;
   --with-fftw \&lt;br /&gt;
   --with-cairo --with-cairo-ldflags=-lfontconfig \&lt;br /&gt;
   --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
   --enable-largefile \&lt;br /&gt;
   --without-odbc&lt;br /&gt;
&lt;br /&gt;
''Extra 1:'' If you also want '''FFMPEG support''' - it requires 'dnf install fftw-devel' from the rpmfusion-free repository. Then add to the configuration lines above:&lt;br /&gt;
&lt;br /&gt;
     --with-ffmpeg --with-ffmpeg-includes=&amp;quot;/usr/include/ffmpeg /usr/include/ffmpeg/libav* /usr/include/ffmpeg/libpostproc /usr/include/ffmpeg/libswscale&amp;quot; \&lt;br /&gt;
&lt;br /&gt;
''Extra 2:'' For '''LAPACK/BLAS support''' (addons i.spec.unmix, v.kriging etc), install &amp;quot;dnf install lapack lapack-devel blas blas-devel atlas atlas-devel&amp;quot;. Then add to the configuration lines above:&lt;br /&gt;
  --with-blas --with-blas-includes=/usr/include/atlas-x86_64-base/ \&lt;br /&gt;
  --with-lapack --with-lapack-includes=/usr/include/atlas-x86_64-base/ \&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally '''compile''' the configured source code:&lt;br /&gt;
    make&lt;br /&gt;
   or on multicore (number depends of available cores):&lt;br /&gt;
    make -j4&lt;br /&gt;
   and&lt;br /&gt;
    make install # requires root permissions unless you become owner of /usr/local/&lt;br /&gt;
&lt;br /&gt;
Then use GRASS GIS 7 and enjoy!&lt;br /&gt;
&lt;br /&gt;
===== openSUSE =====&lt;br /&gt;
&lt;br /&gt;
To build GRASS on openSUSE:&lt;br /&gt;
&lt;br /&gt;
RPM packages to be installed:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 sudo zypper install bison flex freetype2-devel fftw3-devel gcc-c++ \&lt;br /&gt;
   libgdal-devel libgeos-devel libjpeg-devel libpng-devel libtiff-devel \&lt;br /&gt;
   man proj libproj-devel readline-devel netcdf-devel ncurses-devel \&lt;br /&gt;
   mysql-devel postgresql-devel sqlite-devel unixODBC-devel \&lt;br /&gt;
   tcl-devel tk-devel xorg-x11-Mesa-devel libXmu-devel \&lt;br /&gt;
   python-numpy python-dateutil python-devel python-opengl \&lt;br /&gt;
   python-wxWidgets python-xml python-dateutil wxWidgets-devel \&lt;br /&gt;
   zlib-devel doxygen python-sphinx&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source code configuration:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 ./configure \&lt;br /&gt;
 	--enable-largefile \&lt;br /&gt;
	--with-proj-share=/usr/share/proj \&lt;br /&gt;
	--with-cxx \&lt;br /&gt;
	--with-lapack=yes \&lt;br /&gt;
	--with-x \&lt;br /&gt;
	--with-motif \&lt;br /&gt;
	--with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
	--with-postgres --with-postgres-includes=/usr/include/pgsql \&lt;br /&gt;
	--with-mysql --with-mysql-includes=/usr/include/mysql \&lt;br /&gt;
	--with-fftw \&lt;br /&gt;
	--with-readline \&lt;br /&gt;
	--with-netcdf \&lt;br /&gt;
	--with-curses \&lt;br /&gt;
	--with-geos \&lt;br /&gt;
	--with-nls \&lt;br /&gt;
	--with-sqlite \&lt;br /&gt;
	--with-freetype \&lt;br /&gt;
	--with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
	--with-wxwidgets \&lt;br /&gt;
	--with-odbc \&lt;br /&gt;
	--with-python&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then compile with &amp;quot;make [-j2]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===== Arch Linux =====&lt;br /&gt;
&lt;br /&gt;
The easiest/fastest way is to build GRASS GIS using AUR:&lt;br /&gt;
&lt;br /&gt;
https://aur.archlinux.org/packages/?O=0&amp;amp;K=grass (msieczka: I would recommend my set of PKBUILDs - https://aur.archlinux.org/packages/?K=czk&amp;amp;SeB=m. They are most feature-rich, up-to-date and allow to have various versions installed alongside each other without conflicts.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But if you want to compile it yourself you have to keep in mind that in Arch Linux the default Python version 3.&lt;br /&gt;
&lt;br /&gt;
 python --version&lt;br /&gt;
&lt;br /&gt;
 Python 3.3.1&lt;br /&gt;
&lt;br /&gt;
Therefore, to build GRASS GIS (version 7 in this example), we can use either use virtualenv or symlink python2 and python2-config in a given directory. &lt;br /&gt;
Let's use the latter approach&lt;br /&gt;
&lt;br /&gt;
 sudo ln -s /usr/bin/python2 $HOME/usr/bin/python&lt;br /&gt;
 sudo ln -s /usr/bin/python2-config $HOME/usr/bin/python-config&lt;br /&gt;
&lt;br /&gt;
We can now start building GRASS 7&lt;br /&gt;
&lt;br /&gt;
 export PATH=~/usr/bin:$PATH &amp;amp;&amp;amp; \&lt;br /&gt;
 ./configure \&lt;br /&gt;
 --enable-debug \&lt;br /&gt;
 --enable-64bit \&lt;br /&gt;
 --with-libs=/usr/lib64  \&lt;br /&gt;
 --with-cxx \&lt;br /&gt;
 --with-readline \&lt;br /&gt;
 --with-zlib-includes=&amp;quot;/usr/include/&amp;quot; \&lt;br /&gt;
 --with-freetype=yes \&lt;br /&gt;
 --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
 --enable-largefile=yes \&lt;br /&gt;
 --with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
 --with-proj-share=/usr/share/proj/ \&lt;br /&gt;
 --with-geos=/usr/bin/geos-config \&lt;br /&gt;
 --with-cairo \&lt;br /&gt;
 --with-odbc \&lt;br /&gt;
 --with-pthread \&lt;br /&gt;
 --with-liblas=/usr/local/bin/liblas-config  \&lt;br /&gt;
 --with-fftw-includes=&amp;quot;/usr/include/&amp;quot; \&lt;br /&gt;
 --with-fftw-libs=/usr/lib/ \&lt;br /&gt;
 --with-tcltk-includes=&amp;quot;/usr/include/&amp;quot; \&lt;br /&gt;
 --with-wxwidgets \&lt;br /&gt;
 --with-postgres=yes \&lt;br /&gt;
 --with-postgres-includes=&amp;quot;/usr/include/postgresql/internal&amp;quot; \&lt;br /&gt;
 --with-postgres-libs=&amp;quot;/usr/include/postgresql/internal/libpq&amp;quot; \&lt;br /&gt;
 --with-sqlite=yes \&lt;br /&gt;
 --with-python=yes \&lt;br /&gt;
 --with-liblas \&lt;br /&gt;
 --with-netcdf &lt;br /&gt;
&lt;br /&gt;
Now let's compile and install it&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
Now the final step required to use GRASS with python2 is to create a bash script &amp;quot;grass&amp;quot; (or the name you want)&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 export PATH=~/usr/bin:$PATH&lt;br /&gt;
 python2 /usr/local/bin/grass70&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And make it executable and copy it somewhere in the PATH&lt;br /&gt;
&lt;br /&gt;
 chmod+x grass&lt;br /&gt;
 sudo cp grass /usr/local/bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's done, you can enjoy GRASS 7 in Arch, just type &amp;quot;grass&amp;quot; (or the name you gave to the script) in the terminal to launch it.&lt;br /&gt;
&lt;br /&gt;
===== RPM SPEC files =====&lt;br /&gt;
* ... can be found in the source code, rpm/ directory, &lt;br /&gt;
* or [https://build.opensuse.org/package/show?package=grass&amp;amp;project=Application%3AGeo OpenSuSe]&lt;br /&gt;
* or [https://admin.fedoraproject.org/pkgdb/acls/name/grass Fedora]&lt;br /&gt;
* or [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/grass/ Mandriva] (there are also [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/proj/ proj4], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/geos/ geos], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/gdal/ gdal], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/gdal-grass/ gdal-grass-plugin], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/qgis/ qgis] etc)&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
===== Zaurus =====&lt;br /&gt;
&lt;br /&gt;
... see [http://wiki.debian.org/?GrassGISonZaurus here] for instructions&lt;br /&gt;
&lt;br /&gt;
==== Mac OSX ====&lt;br /&gt;
&lt;br /&gt;
===== Conventional installation =====&lt;br /&gt;
* see the source/macosx readme ([http://trac.osgeo.org/grass/browser/grass/trunk/macosx/ReadMe.rtf Trac link])&lt;br /&gt;
* main page [[Compiling on MacOSX]]&lt;br /&gt;
* main page [[Packaging on MacOSX]]&lt;br /&gt;
* [http://grass.osgeo.org/download/software/mac-osx/ official download site]&lt;br /&gt;
* [http://www.kyngchaos.com/software/frameworks#build_scripts build scripts for dependencies]&lt;br /&gt;
* solving errors at starting GRASS GIS: [[MacOSX GRASS errors]]&lt;br /&gt;
=====[[Compiling on MacOSX using homebrew]] =====&lt;br /&gt;
&lt;br /&gt;
==== FreeBSD / NetBSD ====&lt;br /&gt;
&lt;br /&gt;
The recommended compiler tools are GCC, GNU make, GNU coreutils (for install), and flex. All are available through the respective package managing tools (pkg_add for FreeBSD and pkgin install for NetBSD) and for recent *BSD versions most likely installed by default.&lt;br /&gt;
&lt;br /&gt;
GRASS 6.x and GRASS 7 should compile on FreeBSD 8.0 or later and NetBSD 5.0 or later (maybe also on updated NetBSD 4.x).&lt;br /&gt;
&lt;br /&gt;
It is highly recommended to install GDAL/OGR and PROJ4 first. These libraries and tools are available as [http://www.freebsd.org/ports/ ports for FreeBSD] and [http://www.pkgsrc.org/ packages for NetBSD].&lt;br /&gt;
&lt;br /&gt;
Optional functionality is listed with ''./configure --help'', and related libraries and tools might need to be installed first.&lt;br /&gt;
&lt;br /&gt;
==== Solaris ====&lt;br /&gt;
&lt;br /&gt;
* ''2008 Oct 15'': see [http://lists.osgeo.org/pipermail/grass-user/2008-October/047093.html this post on the grass mailing list]&lt;br /&gt;
&lt;br /&gt;
===== 11 SPARC/i86pc =====&lt;br /&gt;
&lt;br /&gt;
The recommended compiler tools are GCC, GNU make, GNU coreutils (for install), and flex. All are available through the Solaris package manager.&lt;br /&gt;
&lt;br /&gt;
Most dependencies are available through the Solaris package manager. GDAL and proj4 can either be compiled from source or installed e.g. from [http://www.opencsw.org/ OpenCSW]. If packages are installed from OpenCSW, the linker flags need to be set with&lt;br /&gt;
&lt;br /&gt;
      LDFLAGS=&amp;quot;-Wl,-R/opt/csw/lib -L/opt/csw/lib -Wl,-R/opt/csw/gxx/lib -L/opt/csw/gxx/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
See also the [http://www.opencsw.org/use-it/ OpenCSW documentation].&lt;br /&gt;
&lt;br /&gt;
===== 10 SPARC/i86pc =====&lt;br /&gt;
&lt;br /&gt;
* get gcc compiler and tools. There are several sources: Solaris Companion CD (SFW pkg, installs in /opt/sfw/), Blastwave ([http://www.blastwave.org], CSW pkg, installs in /opt/csw/) or Sunfreeware ([http://www.sunfreeware.com], SMC pkg, installs in /usr/local/). &lt;br /&gt;
Needed Packages from Sunfreeware: SMCbinut, SMCbison, SMCcoreu, SMCfindu, SMCflex, SMCgawk, SMCgcc, SMCgrep, SMCgzip, SMCless, SMClibt, SMClicon, SMCmake, SMCncurs, SMCproj, SMCsed, SMCtar, SMCtcl, SMCtiff, SMCtk, SMCunzip, SMCzlib. &lt;br /&gt;
&lt;br /&gt;
* compile and install fftw-library ([http://www.fftw.org]). You need to re-compile the library with: &lt;br /&gt;
&lt;br /&gt;
      ./configure --with-pic --enable-shared; make ; make install. &lt;br /&gt;
&lt;br /&gt;
The pre-built packages don't work. &lt;br /&gt;
&lt;br /&gt;
* compile and install gdal library (see documentation of gdal, [http://www.gdal.org]).&lt;br /&gt;
&lt;br /&gt;
* compile and install any additional libraries (e. g. GEOS, [http://geos.refractions.net]). &lt;br /&gt;
&lt;br /&gt;
* set compiler flags and path. e. g.: &lt;br /&gt;
&lt;br /&gt;
      # on ultra-sparc machine:&lt;br /&gt;
      CFLAGS=&amp;quot;-O3 -mcpu=v9&amp;quot;&lt;br /&gt;
      CXXFLAGS=&amp;quot;-O3 -mcpu=v9&amp;quot;&lt;br /&gt;
      PATH=&amp;quot;/usr/local/bin:/opt/sfw/bin:/usr/ccs/bin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
      export CFLAGS CXXFLAGS PATH&lt;br /&gt;
&lt;br /&gt;
Path has to be changed for the packages (Sunfreeware: /usr/local/bin, Solaris Companion: /opt/sfw/bin, Blastwave: /opt/csw/bin). &lt;br /&gt;
&lt;br /&gt;
* Next configure, e. g.: &lt;br /&gt;
&lt;br /&gt;
      ./configure --with-postgres-includes=/usr/include/pgsql/ \&lt;br /&gt;
      --with-postgres-libs=/usr/lib --with-postgres=yes \&lt;br /&gt;
      --with-includes=/usr/local/include/ncurses&lt;br /&gt;
&lt;br /&gt;
If you use n(ew)curses, you have to include the path /usr/local/include/ncurses. &lt;br /&gt;
&lt;br /&gt;
then:&lt;br /&gt;
&lt;br /&gt;
      make&lt;br /&gt;
      su&lt;br /&gt;
      make install&lt;br /&gt;
&lt;br /&gt;
If the shared libraries are not found at runtime of the modules, use 'crle' to add the paths of the libraries for the dynamic linker, e. g. as root:&lt;br /&gt;
&lt;br /&gt;
      crle -l /lib:/usr/lib:/usr/local/lib:/opt/sfw/lib:/usr/X11/lib&lt;br /&gt;
&lt;br /&gt;
Be careful not to omit a library path, the system may be unusable if you forget the /lib path.&lt;br /&gt;
&lt;br /&gt;
==== AIX ====&lt;br /&gt;
&lt;br /&gt;
A recent [ftp://ftp.gnu.org/gnu/make/ GNU make] (&amp;gt;= 3.81) and GNU coreutils are required. These are available with the [http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/download.html IBM AIX toolbox] or through third-party AIX software repositories, e.g. [http://www.bullfreeware.com/ bullfreeware] and [http://www.perzl.org/aix/ perzl.org]. Note that 'make' does not work, only 'gmake' works. &lt;br /&gt;
&lt;br /&gt;
General instructions to compile on AIX are e.g. [http://www.perzl.org/aix/index.php?n=Main.Instructions here]&lt;br /&gt;
&lt;br /&gt;
On AIX, compilation results by default in 32 bit applications and static libraries. The [http://www.ibm.com/developerworks/aix/library/au-gnu.html IBM documentation] explains how to build 64 bit applications and shared libraries with GCC.&lt;br /&gt;
&lt;br /&gt;
'''GRASS 6: Using the IBM xlc compiler:'''&lt;br /&gt;
* ''see [http://thread.gmane.org/gmane.comp.gis.grass.user/32667 this mailing list thread]''&lt;br /&gt;
&lt;br /&gt;
Mike wrote in 2009:&lt;br /&gt;
&lt;br /&gt;
After attempting all the suggestions, I finally used&lt;br /&gt;
--disable-shared on the configure command, and all but&lt;br /&gt;
a handful of modules successfully compiled. I was able to&lt;br /&gt;
individually address the ones that failed through Makefile&lt;br /&gt;
edits and several small source code/header file edits.&lt;br /&gt;
&lt;br /&gt;
The environment variables and configure command that worked were:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# xlc compiler:&lt;br /&gt;
export PATH=/usr/local/bin:/opt/freeware/bin:$PATH&lt;br /&gt;
export OBJECT_MODE=64&lt;br /&gt;
export LIBICONV=/opt/freeware&lt;br /&gt;
export CC=&amp;quot;xlc_r -q64&amp;quot;&lt;br /&gt;
export CFLAGS=&amp;quot;-O -qstrict&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;xlC_r -q64&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;-O -qstrict&amp;quot;&lt;br /&gt;
export AR=&amp;quot;ar -X64&amp;quot;&lt;br /&gt;
export F77=&amp;quot;xlf_r -q64&amp;quot;&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I/afs/isis/pkg/libpng/include -I/usr/local/include -I$LIBICONV/include -I/usr/lpp/X11/include/X11&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L/usr/local/lib -L$LIBICONV/lib -L/usr/lib -L/usr/X11R6/lib -lc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/afs/isis/pkg/grass-6.4.0 \&lt;br /&gt;
  --enable-64bit \&lt;br /&gt;
  --disable-shared \&lt;br /&gt;
  --with-includes=&amp;quot;/usr/include/fontconfig /usr/include/X11 /usr/include/X11/Xft /usr/include/X11/ext&amp;quot; \&lt;br /&gt;
  --x-includes=/usr/include/X11 \&lt;br /&gt;
  --x-libraries=/usr/X11R6/lib \&lt;br /&gt;
  --with-fftw-includes=/afs/isis/pkg/fftw-3.2.2/include \&lt;br /&gt;
  --with-fftw-libs=/afs/isis/pkg/fftw-3.2.2/lib \&lt;br /&gt;
  --with-gdal=/afs/isis/pkg/gdal/bin/gdal-config \&lt;br /&gt;
  --with-proj-includes=/afs/isis/pkg/proj/include \&lt;br /&gt;
  --with-proj-libs=/afs/isis/pkg/proj/lib \&lt;br /&gt;
  --with-proj-share=/afs/isis/pkg/proj/share/proj \&lt;br /&gt;
  --with-tcltk-includes=/usr/local/include \&lt;br /&gt;
  --with-tcltk-libs=/usr/local/lib \&lt;br /&gt;
  --with-opengl-includes=/usr/include/GL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''GRASS 7: Using the IBM xlc compiler:'''&lt;br /&gt;
&lt;br /&gt;
Get and install (in this order):&lt;br /&gt;
* [ftp://ftp.gnu.org/gnu/tar/ GNU tar]&lt;br /&gt;
* [ftp://ftp.gnu.org/gnu/make/ GNU make] (&amp;gt;= 3.81)&lt;br /&gt;
* [http://www.sqlite.org SQLite]&lt;br /&gt;
* [http://trac.osgeo.org/proj/ PROJ.4] (for ./configure parameters, see [[Talk:Compile and Install|here]])&lt;br /&gt;
* [http://www.gdal.org GDAL] (for ./configure parameters, see [[Talk:Compile and Install|here]])&lt;br /&gt;
* [http://grass.osgeo.org/grass70/source/snapshot/ GRASS GIS 7]&lt;br /&gt;
&lt;br /&gt;
The environment variables and configure command that worked:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
## AIX 5.x&lt;br /&gt;
&lt;br /&gt;
export LIBPATH=/opt/freeware/lib64:/opt/freeware/lib&lt;br /&gt;
# make 'ar' happy&lt;br /&gt;
export OBJECT_MODE=64&lt;br /&gt;
&lt;br /&gt;
PREFIX=$HOME/private/bin&lt;br /&gt;
./configure \&lt;br /&gt;
  --prefix=$PREFIX \&lt;br /&gt;
  --disable-shared \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-proj-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-proj-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-proj-share=$PREFIX/share/proj/ \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-sqlite-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-sqlite-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-tiff=no \&lt;br /&gt;
  --with-png=no \&lt;br /&gt;
  --with-fftw=no \&lt;br /&gt;
  --with-cairo=no \&lt;br /&gt;
  --with-freetype=no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''GRASS 7: Using the GNU gcc compiler:'''&lt;br /&gt;
&lt;br /&gt;
Get and install (in this order):&lt;br /&gt;
* if needed, [ftp://ftp.gnu.org/gnu/tar/ GNU tar]&lt;br /&gt;
* if needed (the name is often 'gmake' and not 'make') [ftp://ftp.gnu.org/gnu/make/ GNU make] (&amp;gt;= 3.81)&lt;br /&gt;
* [http://www.sqlite.org SQLite]&lt;br /&gt;
* [http://trac.osgeo.org/proj/ PROJ.4] (for ./configure parameters, see [[Talk:Compile and Install|here]])&lt;br /&gt;
* [http://www.gdal.org GDAL] (for ./configure parameters, see [[Talk:Compile and Install|here]])&lt;br /&gt;
* [http://grass.osgeo.org/grass70/source/snapshot/ GRASS GIS 7]&lt;br /&gt;
&lt;br /&gt;
The environment variables and configure command that worked for AIX 5.x:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
## AIX 5.x&lt;br /&gt;
&lt;br /&gt;
export LIBPATH=/opt/freeware/lib64:/opt/freeware/lib&lt;br /&gt;
# make 'ar' happy&lt;br /&gt;
export OBJECT_MODE=64&lt;br /&gt;
&lt;br /&gt;
PREFIX=$HOME/private/bin&lt;br /&gt;
CFLAGS='-ansi -D_ALL_SOURCE=1 -D_POSIX_SOURCE=1 -D_POSIX_C_SOURCE=200809L -Dinline=' ./configure \&lt;br /&gt;
  --prefix=$PREFIX \&lt;br /&gt;
  --disable-shared \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-proj-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-proj-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-proj-share=$PREFIX/share/proj/ \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-sqlite-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-sqlite-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-tiff=no \&lt;br /&gt;
  --with-png=no \&lt;br /&gt;
  --with-fftw=no \&lt;br /&gt;
  --with-cairo=no \&lt;br /&gt;
  --with-freetype=no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The environment variables and configure command that worked for AIX 7.x:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
## AIX 7.x&lt;br /&gt;
export CC=&amp;quot;gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;g++&amp;quot;&lt;br /&gt;
PREFIX=$HOME/bin&lt;br /&gt;
&lt;br /&gt;
LDFLAGS=&amp;quot;-Wl,-bsvr4,-R,/opt/freeware/lib -L/opt/freeware/lib&amp;quot; CPPFLAGS=&amp;quot;-I/opt/freeware/include&amp;quot; ./configure \&lt;br /&gt;
  --prefix=$PREFIX \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --enable-shared \&lt;br /&gt;
  --with-includes=/opt/freeware/include --with-libs=/opt/freeware/lib \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-proj-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-proj-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-proj-share=$PREFIX/share/proj/ \&lt;br /&gt;
  --with-gdal=$PREFIX/bin/gdal-config \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-sqlite-libs=$PREFIX/lib --with-sqlite-includes=$PREFIX/include \&lt;br /&gt;
  --with-png=no \&lt;br /&gt;
  --with-tiff=no \&lt;br /&gt;
  --with-fftw=no \&lt;br /&gt;
  --with-cairo=no \&lt;br /&gt;
  --with-opengl=no \&lt;br /&gt;
  --with-freetype=no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MS-Windows ====&lt;br /&gt;
&lt;br /&gt;
===== MS-Windows/Cygwin =====&lt;br /&gt;
&lt;br /&gt;
* See the [[Cygwin]] wiki pages&lt;br /&gt;
&lt;br /&gt;
===== MS-Windows/native =====&lt;br /&gt;
&lt;br /&gt;
====== Compile ======&lt;br /&gt;
&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/CompileOnWindows GRASS Windows Native Binary Building Guide] (GRASS 6.4.x + 7.x)&lt;br /&gt;
* &amp;lt;strike&amp;gt;[http://www.webalice.it/marco.pasetti/grass/BuildFromSource.html GRASS Windows Native Binary Building Guide] (GRASS 6.3.x) &amp;lt;/strike&amp;gt;&lt;br /&gt;
* See/adapt [http://blog.qgis.org/node/124 idea] for unattended install of QGIS (et al) from [http://trac.osgeo.org/osgeo4w/ OSGeo4W] from the QuantumGIS Blog.&lt;br /&gt;
&lt;br /&gt;
See also [[WinGRASS Current Status]] for latest updates.&lt;br /&gt;
&lt;br /&gt;
=== Common problems and solutions ===&lt;br /&gt;
&lt;br /&gt;
During compilation, error can occur if certain packages are not installed. Here a list of problems with solution:&lt;br /&gt;
&lt;br /&gt;
* error: X11/Xlib.h: No such file or directory&lt;br /&gt;
** this suggests that you don't have the X headers installed&lt;br /&gt;
** Solution: Install the libx11-dev package&lt;br /&gt;
&lt;br /&gt;
* error:  g.list: error while loading shared libraries: libgdal1.6.0.so.1: cannot open shared object file: No such file or directory&lt;br /&gt;
** this error appears in the shell right after the user clicks GUI's &amp;quot;Start GRASS&amp;quot; button. The GUI shows an error about geographic extent and gets closed afterwards.&lt;br /&gt;
** It happens when you launch bin.i686 executable on 64bit system. Be careful and choose the right architecture.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Static compilation ===&lt;br /&gt;
&lt;br /&gt;
In order to get static rather than dynamically linked binaries, configure like this:&lt;br /&gt;
&lt;br /&gt;
  ./configure --disable-shared --enable-static&lt;br /&gt;
&lt;br /&gt;
This will however break the wxGUI and GRASS 7 completely because &amp;quot;ctypes&amp;quot; wants to link against shared libs, or there is something in the static libs that &amp;quot;ctypes&amp;quot; does not like.&lt;br /&gt;
&lt;br /&gt;
=== Optimization ===&lt;br /&gt;
&lt;br /&gt;
GCC and other compilers support [http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/Optimize-Options.html#Optimize-Options optimization]&lt;br /&gt;
&lt;br /&gt;
If you would like to set compiler optimisations, for a possibly faster binary, type (don't enter a &amp;quot;;&amp;quot; anywhere):&lt;br /&gt;
&lt;br /&gt;
        CFLAGS=-O ./configure&lt;br /&gt;
or,&lt;br /&gt;
        setenv CFLAGS -O&lt;br /&gt;
        ./configure&lt;br /&gt;
&lt;br /&gt;
whichever works on your shell. Use -O2 instead of -O if your compiler supports this (note: O is the letter, not zero). Using the &amp;quot;gcc&amp;quot; compiler, you can also specify processor specific flags (examples, please suggest better settings to us):&lt;br /&gt;
&lt;br /&gt;
  CFLAGS=&amp;quot;-mcpu=athlon -O2&amp;quot; # AMD Athlon processor with code optimisations&lt;br /&gt;
  CFLAGS=&amp;quot;-march=amdfam10&amp;quot;  # AMD Phenom II X4 64bit processor with gcc &amp;gt;=4.3&lt;br /&gt;
  CFLAGS=&amp;quot;-mcpu=pentium&amp;quot;    # Intel Pentium processor&lt;br /&gt;
  CFLAGS=&amp;quot;-mcpu=pentium4&amp;quot;   # Intel Pentium4 processor&lt;br /&gt;
  CFLAGS=&amp;quot;-O2 -msse -msse2 -mfpmath=sse -minline-all-stringops&amp;quot; # Intel XEON 64bit processor&lt;br /&gt;
  CFLAGS=&amp;quot;-mtune=nocona -m64 -minline-all-stringops&amp;quot;            # Intel Pentium 64bit processor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To find out optional CFLAGS for your platform, enter:&lt;br /&gt;
  gcc -dumpspecs&lt;br /&gt;
&lt;br /&gt;
See also: http://gcc.gnu.org/&lt;br /&gt;
&lt;br /&gt;
A real fast GRASS version (and small binaries) will be created with LDFLAGS set to &amp;quot;stripping&amp;quot; (but this disables debugging):&lt;br /&gt;
&lt;br /&gt;
  CFLAGS=&amp;quot;-O2 -mcpu=&amp;lt;cpu_see_above&amp;gt; -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure&lt;br /&gt;
&lt;br /&gt;
=== Configure options and their meanings ===&lt;br /&gt;
&lt;br /&gt;
For configure there are many options and some GRASS modules are built only if some options are set. Here are listed common configuration options with short explanation.&lt;br /&gt;
&lt;br /&gt;
* --prefix=/path - Sets path where GRASS will be installed. GRASS will reside in /path/grass-version.&lt;br /&gt;
* --enable-largefile - Enables large (&amp;gt;2Gb on 32bit systems) support. For current large file support status look at [[Large File Support]] page.&lt;br /&gt;
* --with-cxx - Enables compilation of C++ code. Required for r.terraflow module.&lt;br /&gt;
* --with-readline - Enables readline support. If readline is enabled, you can use its history/editing facilities when entering r.mapcalc expressions on stdin.&lt;br /&gt;
* --with-glw - Enables GLw support. The GLw library provides OpenGL &amp;quot;canvas&amp;quot; widgets for Athena and Motif. &lt;br /&gt;
 &lt;br /&gt;
 That switch is unnecessary for normal compilation. It's only&lt;br /&gt;
 required for r3.showdspf, which isn't normally built; if you &lt;br /&gt;
 want it, you have build it manually &lt;br /&gt;
 (e.g. &amp;quot;make -C raster3d/r3.showdspf&amp;quot;).&lt;br /&gt;
 As similar functionality is now provided by NVIZ, r3.showdspf&lt;br /&gt;
 is deprecated.&lt;br /&gt;
 r3.showdspf uses the Motif widget (so you also need a &lt;br /&gt;
 Motif library, e.g. Lesstif or OpenMotif).&lt;br /&gt;
 [http://grass.itc.it/pipermail/grassuser/2006-December/037475.html Glynn Clements at GRASS-user mailing list]&lt;br /&gt;
&lt;br /&gt;
=== Parallelized compilation on multi-core CPUs ===&lt;br /&gt;
&lt;br /&gt;
You can dramatically accelerate the compilation of the GRASS code with the -j flag of &amp;quot;make&amp;quot; if you have a multi-core CPU system. This determines the maximum number of jobs to have running at once, so cores don't have to sit idle waiting for jobs on other cores to complete. A good rule of thumb for this value is &amp;lt;tt&amp;gt;number_of_cores * 1.5&amp;lt;/tt&amp;gt;, but note that setting any higher than the actual number of cores will only affect the timing slightly. For example, on a dual-core processor:&lt;br /&gt;
  make -j 4&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- CFLAGS=&amp;quot;-pipe&amp;quot; doesn't seem to help much --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== GRASS-GDAL plugin ==&lt;br /&gt;
&lt;br /&gt;
* see [[Compile and install GRASS and QGIS with GDAL/OGR Plugin]]&lt;br /&gt;
&lt;br /&gt;
== Addons ==&lt;br /&gt;
&lt;br /&gt;
Please note that the installation of [[AddOns/GRASS_6|Addons]] can be easily done with the {{cmd|g.extension}} manager. The compile instructions below are aiming at own development.&lt;br /&gt;
&lt;br /&gt;
=== Compiled modules ===&lt;br /&gt;
&lt;br /&gt;
This is the general way which works for C modules as well as scripts (Python or Shell/Bash modules) which has HTML documentation.&lt;br /&gt;
&lt;br /&gt;
'''Requirements:'''&lt;br /&gt;
&lt;br /&gt;
Either:&lt;br /&gt;
* a binary GRASS package, or&lt;br /&gt;
* source code which has been prepared with:&lt;br /&gt;
    ./configure [opionally flags]&lt;br /&gt;
    make libs&lt;br /&gt;
&lt;br /&gt;
Each of the [[GRASS_AddOns|addon]] modules should come with a Makefile. To compile it, just run:&lt;br /&gt;
    make MODULE_TOPDIR=/path/to/grass64/&lt;br /&gt;
&lt;br /&gt;
Note that the &amp;lt;tt&amp;gt;/path/to/grass64&amp;lt;/tt&amp;gt; has to be absolute, not relative.&lt;br /&gt;
&lt;br /&gt;
If using Bash it may be useful to set that up as an alias:&lt;br /&gt;
    alias gmake64='make MODULE_TOPDIR=/path/to/grass64/'&lt;br /&gt;
&lt;br /&gt;
Installation (perhaps requires &amp;quot;sudo&amp;quot;):&lt;br /&gt;
    make MODULE_TOPDIR=/path/to/grass64/ install&lt;br /&gt;
&lt;br /&gt;
Note: Compiled addons may require a re-compilation if you changed/updated your GRASS standard binaries.&lt;br /&gt;
&lt;br /&gt;
==== If binary comes with a -dev package ====&lt;br /&gt;
&lt;br /&gt;
''(work in progress, this text states how it eventually will be :)''&lt;br /&gt;
Nowadays one does not need to the source code, nor compiling GRASS by oneself to be able to add add-ons. On Debian, you can just install the grass-dev package and then run:&lt;br /&gt;
 make MODULE_TOPDIR=/usr/lib/grass64/ INST_DIR=/usr/lib/grass64/&lt;br /&gt;
&lt;br /&gt;
The grass-dev package essentially provides GRASS's &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt; header files and Make configuration files.&lt;br /&gt;
&lt;br /&gt;
=== Scripts ===&lt;br /&gt;
&lt;br /&gt;
If the addon module is a script, it is sufficient to copy it into the (GRASS binaries) path somewhere. Alternatively, install addons into a separate GRASS addons binaries/scripts directory which is easier to maintain. It avoids getting clobbered every time you reinstall GRASS. To use these separately stored scripts, set and export the GRASS_ADDON_PATH environment variable before starting GRASS and it will automatically be added to the module search path (see the {{cmd|variables}} help page). To simplify this, do for example:&lt;br /&gt;
&lt;br /&gt;
 # add in $HOME/.bashrc:&lt;br /&gt;
 GRASS_ADDON_PATH=/usr/local/grass/addons/&lt;br /&gt;
 export GRASS_ADDON_PATH&lt;br /&gt;
&lt;br /&gt;
Make sure that the script is executable, then just call it in GRASS typing the filename. Python scripts need to be called writing the extension as well, like:&lt;br /&gt;
 &lt;br /&gt;
 GRASS 6.5.svn (spearfish60):~ &amp;gt; v.krige.py&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Documentation]]&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=22353</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=22353"/>
		<updated>2016-02-06T10:33:55Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* Requirements and installation */  new dependency discovered&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== Catalogue Service for the Web ==&lt;br /&gt;
[http://www.opengeospatial.org/standards/cat OGC Catalogue Services] support the ability to publish and search collections of descriptive information (metadata) for data, services, and related information objects. Metadata in catalogues represent resource characteristics that can be queried and presented for evaluation and further processing by both humans and software. Catalogue services are required to support the discovery and binding to registered information resources within an information community. &lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014/2015 is currently available in GRASS 7 add-ons. &lt;br /&gt;
* The package for creating and editing metadata according to EN ISO 19115, described here, consists of few modules. The modules r.info.iso, v.info.iso and t.info.iso are command line based and support the conversion from the current native metadata management (r.info, v.info,t.info) into ISO based metadata. The GUI based module - g.gui.metadata offers advanced tools for management of metadata. &lt;br /&gt;
&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
* The package also includes the module g.gui.cswbrowser for searching and browsing metadata catalog (csw). For advanced users there are a few modules for establishing and handling pycsw server:&lt;br /&gt;
 * db.csw.admin - module for administration of pycsw server&lt;br /&gt;
 * db.csw.run - module for starting server on localhost&lt;br /&gt;
 * db.csw.harvest - module for harvesting metadata between two csw.&lt;br /&gt;
&lt;br /&gt;
= Requirements and installation =&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* [http://pycsw.org/ pycsw] package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
sudo pip install -e . &amp;amp;&amp;amp; sudo pip install -r requirements-standalone.txt &amp;amp;&amp;amp; cd ..&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://geopython.github.io/OWSLib/ OWSLib] package - development version (OGC CSW client implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install &amp;amp;&amp;amp; cd ..&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://jinja.pocoo.org/docs/dev/ Jinja2] (one of the most used template engines for Python)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install &amp;amp;&amp;amp; cd ..&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://pygments.org/ Pygments] for highlighting text(for Ubuntu below)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install python-pygments&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* Additionally, python-reportlab is required. The name of the package could vary for your distro.&lt;br /&gt;
&lt;br /&gt;
To install, when in GRASS, type &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
g.extension wx.metadata&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating and editing metadata =&lt;br /&gt;
== Naming of metadata files and storage ==&lt;br /&gt;
The default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example, the default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
== Metadata profile ==&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles (Basic and [http://inspire.ec.europa.eu/index.cfm INSPIRE]). The editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are three build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The INSPIRE profile''' fulfills the [http://inspire.ec.europa.eu/index.cfm/pageid/101 criteria of INSPIRE profile]. In case if is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
* '''The temporal profile''' is based on the GRASS basic profile and includes additional specific attributes for Temporal framework.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso, v.info.iso t.info.iso ==&lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Metadata editor- g.gui.metadata  ==&lt;br /&gt;
The metadata editor (editor) includes a graphical interface for converting metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
Tooltip function helps to fill in the form correctly.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
The editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
=== Fetching values from database backend ===&lt;br /&gt;
The editor automatically fetches keywords from SQLite GRASS GIS backend. Three well know dictionaries are added by default. The user can manually add dictionaries by sql commands. &lt;br /&gt;
Dictionaries are stored in the table ''metadata_themes''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ teble metadta_themes&lt;br /&gt;
! Attribut&lt;br /&gt;
| title&lt;br /&gt;
| keyword&lt;br /&gt;
| date_iso&lt;br /&gt;
| date_type&lt;br /&gt;
|-&lt;br /&gt;
! Date type&lt;br /&gt;
| TEXT || TEXT|| TEXT|| TEXT&lt;br /&gt;
|-&lt;br /&gt;
! Example&lt;br /&gt;
|Example || GEMET - Concepts, version || 2010-01-13 || publication&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:Keywords.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Exporting metadata reports to format PDF ===&lt;br /&gt;
This function allows to export metadata of GRASS maps to report in pdf format. The report template is based on INSPIRE profile. Unknown values of metadata attributes are filled by text $UNKNOWN.&lt;br /&gt;
[[Image:Pdfexp.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
{{YouTube|V7tgOOuRyuA}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GRASS metadata map editor ===&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proceed with this selection.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
=== External metadata editor ===&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
* If the check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
The advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Publishing to csw server ===&lt;br /&gt;
Editor allows direct publishing of edited metadata by CSW(Catalog Service for Web) standard to remote catalogue server. Note that the remote catalogue must allows transaction.&lt;br /&gt;
[[File:Csw publisher.png|650px|center|publishing of metadata directly to remote csw server]]&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* EPSG code must by added in url format. Information of projection is added only if EPSG code is known or if GDAL function for identifying from WKT is succesful.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
  &amp;lt;gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
      &amp;lt;gmd:RS_Identifier&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:code&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;http://www.opengis.net/def/crs/EPSG/0/3035&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:code&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:codeSpace&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;INSPIRE RS registry&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:codeSpace&amp;gt;&lt;br /&gt;
      &amp;lt;/gmd:RS_Identifier&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
  &amp;lt;/gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
&amp;lt;/gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creation of custom ISO based profile =&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
== The first braces ==&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
== Initialize of OWSLib objects ==&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
== Single element ==&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Loop or Condition statements ==&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== The second braces ==&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
== Examples of template ==&lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Tools for working with metadata catalogue (csw) =&lt;br /&gt;
== Browsing and searching- g.gui.cswbrowser ==&lt;br /&gt;
Module g.gui.cswbrowser(Browser) based graphical interface allows managing csw connections, setting filter and searching, browsing results and adding services to GRASS GIS.&lt;br /&gt;
=== Connection manager ===&lt;br /&gt;
Connection manager allows: &lt;br /&gt;
* adding&lt;br /&gt;
* removing&lt;br /&gt;
* loading list of connections from file. &lt;br /&gt;
By default the Browser is initialized by list of few well known csw providers of csw. Button &amp;quot;Service info&amp;quot; shows metadata of the service.&lt;br /&gt;
User can manage connection in two ways:&lt;br /&gt;
* First one is with using hidden storage provided by [http://wxpython.org/Phoenix/docs/html/ConfigBase.html ​wx.Config]. This case is without accessing default connection file.&lt;br /&gt;
* After prompt user also can add/remove connection from default .xml file.&lt;br /&gt;
[[File:ConnectionMgr.png|center|600px|Connection manager in g.gui.cswbrowser]] &lt;br /&gt;
&lt;br /&gt;
=== Searching ===&lt;br /&gt;
Before fetching data from selected csw server is proper to set up searching filter. Searching can be restricted by:&lt;br /&gt;
* DCMI Type (Collection , Dataset , Event , Image , InteractiveResource , MovingImage , PhysicalObject , Service , Software , Sound , StillImage , Text)&lt;br /&gt;
* Area(bounding box)&lt;br /&gt;
** current GRASS GIS computation region&lt;br /&gt;
** manually &lt;br /&gt;
* Keywords&lt;br /&gt;
** basic filter allows to use basic or advance keyword filtering. In the simple case user can define single keywords or multiple keywords with button &amp;quot;+&amp;quot;. Logic operator between keywords is AND(&amp;amp;).&lt;br /&gt;
** second, advanced is based on OGC list of expressions which means that can be set filter with logic relations between keywords or sets of keywords. Dialogue for settings keywords text string is under &amp;quot;Advanced&amp;quot; check-box. Syntax of constraints is based on python list syntax. Each keywords must be in braces&lt;br /&gt;
[[File:Find1.png|center|600px|g.gui.cswbrowser, searching page]]&lt;br /&gt;
==== Advanced keywords filtering ====&lt;br /&gt;
On the left panel of Browser is placed check-box named &amp;quot;Advance&amp;quot;. The keywords advanced dialogue allows to use basic bool operations.&lt;br /&gt;
&lt;br /&gt;
*OR condition&lt;br /&gt;
     a || b || c&lt;br /&gt;
     [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;]&lt;br /&gt;
*AND condition&lt;br /&gt;
     a &amp;amp;&amp;amp; b &amp;amp;&amp;amp; c&lt;br /&gt;
     [ [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;] ]&lt;br /&gt;
*composition&lt;br /&gt;
     (a &amp;amp;&amp;amp; b) || c || d || e&lt;br /&gt;
     [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],[&amp;quot;c&amp;quot;],[&amp;quot;d&amp;quot;],[&amp;quot;e&amp;quot;]] or [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;,&amp;quot;e&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
=== Browsing results===&lt;br /&gt;
On the bottom of Browser is a controller for browsing results. The data from server are fetched by number of items per one transaction. Default is a 20 items. After selection of item in the result table, metadata of record should be displayed. Browser automatically enables buttons on the top of Browser if WMS, WCS or WFS services are available.&lt;br /&gt;
&lt;br /&gt;
=== Setting up csw server ===&lt;br /&gt;
&lt;br /&gt;
== CSW server management ==&lt;br /&gt;
wx.metadata package includes tools for establishing and handling pycsw server. Pycsw stuff consist:&lt;br /&gt;
*db.csw.admin &lt;br /&gt;
*db.csw.run&lt;br /&gt;
*db.csw.harvest&lt;br /&gt;
&lt;br /&gt;
For handling pycsw server can be use standard pythons scripts from pycsw install directory or mentioned three modules.&lt;br /&gt;
&lt;br /&gt;
== Installation and configuration csw server ==&lt;br /&gt;
* Installation pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
e.g.to default path taken from configure file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cd /var/www/pycsw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*deploying pycsw&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pip install -e . &amp;amp;&amp;amp; pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* Create and adjust a configuration file:&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cp default-sample.cfg default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* adjust parameters in ''default.cfg''&lt;br /&gt;
** '''server.home''' - path to installation directory&lt;br /&gt;
** '''repository.database''' - path to SQLite database e.g. $GISDBASE/WGS84/PERMANENT/sqlite/sqlite.db&lt;br /&gt;
** set '''server.url''' to: http://localhost:8000/&lt;br /&gt;
&lt;br /&gt;
*Setup the database(creates tables, indexes, etc.)&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**with module db.csw.admin from GRASS GIS. Flag -s and parameter configure with path to configure file. Path to database is automatically taken from configure file.&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -s configure=/var/www/html/pycsw/default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Load records:&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**db.csw.admin module with parameter -r for load recursively&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -r configure=/var/www/html/pycsw/default.cfg load_records=path/to/xml&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Run the server&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python csw.wsgi&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**db.csw.admin module with parameter path and port&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.run path=/var/www/html/pycsw port=8000&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Harvesting csw catalogue ==&lt;br /&gt;
Module db.csw.harvest allows to copy data from source csw server to destination csw server&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page 2014]&lt;br /&gt;
* [https://trac.osgeo.org/grass/wiki/GSoC/2015/ImprovedMetadata Development page 2015]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=22352</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=22352"/>
		<updated>2016-02-06T10:32:16Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* Requirements and installation */  new dependency discovered&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== Catalogue Service for the Web ==&lt;br /&gt;
[http://www.opengeospatial.org/standards/cat OGC Catalogue Services] support the ability to publish and search collections of descriptive information (metadata) for data, services, and related information objects. Metadata in catalogues represent resource characteristics that can be queried and presented for evaluation and further processing by both humans and software. Catalogue services are required to support the discovery and binding to registered information resources within an information community. &lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014/2015 is currently available in GRASS 7 add-ons. &lt;br /&gt;
* The package for creating and editing metadata according to EN ISO 19115, described here, consists of few modules. The modules r.info.iso, v.info.iso and t.info.iso are command line based and support the conversion from the current native metadata management (r.info, v.info,t.info) into ISO based metadata. The GUI based module - g.gui.metadata offers advanced tools for management of metadata. &lt;br /&gt;
&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
* The package also includes the module g.gui.cswbrowser for searching and browsing metadata catalog (csw). For advanced users there are a few modules for establishing and handling pycsw server:&lt;br /&gt;
 * db.csw.admin - module for administration of pycsw server&lt;br /&gt;
 * db.csw.run - module for starting server on localhost&lt;br /&gt;
 * db.csw.harvest - module for harvesting metadata between two csw.&lt;br /&gt;
&lt;br /&gt;
= Requirements and installation =&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* [http://pycsw.org/ pycsw] package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
sudo pip install -e . &amp;amp;&amp;amp; sudo pip install -r requirements-standalone.txt &amp;amp;&amp;amp; cd ..&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://geopython.github.io/OWSLib/ OWSLib] package - development version (OGC CSW client implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install &amp;amp;&amp;amp; cd ..&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [http://jinja.pocoo.org/docs/dev/ Jinja2] (one of the most used template engines for Python)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install &amp;amp;&amp;amp; cd ..&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [Pygments](http://pygments.org/)for highlighting text(for Ubuntu below)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install python-pygments&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* Additionally, python-reportlab is required. The name of the package could vary for your distro.&lt;br /&gt;
&lt;br /&gt;
To install, when in GRASS, type &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
g.extension wx.metadata&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating and editing metadata =&lt;br /&gt;
== Naming of metadata files and storage ==&lt;br /&gt;
The default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example, the default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
== Metadata profile ==&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles (Basic and [http://inspire.ec.europa.eu/index.cfm INSPIRE]). The editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are three build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The INSPIRE profile''' fulfills the [http://inspire.ec.europa.eu/index.cfm/pageid/101 criteria of INSPIRE profile]. In case if is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
* '''The temporal profile''' is based on the GRASS basic profile and includes additional specific attributes for Temporal framework.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso, v.info.iso t.info.iso ==&lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Metadata editor- g.gui.metadata  ==&lt;br /&gt;
The metadata editor (editor) includes a graphical interface for converting metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
Tooltip function helps to fill in the form correctly.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
The editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
=== Fetching values from database backend ===&lt;br /&gt;
The editor automatically fetches keywords from SQLite GRASS GIS backend. Three well know dictionaries are added by default. The user can manually add dictionaries by sql commands. &lt;br /&gt;
Dictionaries are stored in the table ''metadata_themes''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ teble metadta_themes&lt;br /&gt;
! Attribut&lt;br /&gt;
| title&lt;br /&gt;
| keyword&lt;br /&gt;
| date_iso&lt;br /&gt;
| date_type&lt;br /&gt;
|-&lt;br /&gt;
! Date type&lt;br /&gt;
| TEXT || TEXT|| TEXT|| TEXT&lt;br /&gt;
|-&lt;br /&gt;
! Example&lt;br /&gt;
|Example || GEMET - Concepts, version || 2010-01-13 || publication&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:Keywords.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Exporting metadata reports to format PDF ===&lt;br /&gt;
This function allows to export metadata of GRASS maps to report in pdf format. The report template is based on INSPIRE profile. Unknown values of metadata attributes are filled by text $UNKNOWN.&lt;br /&gt;
[[Image:Pdfexp.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
{{YouTube|V7tgOOuRyuA}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GRASS metadata map editor ===&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proceed with this selection.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
=== External metadata editor ===&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
* If the check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
The advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Publishing to csw server ===&lt;br /&gt;
Editor allows direct publishing of edited metadata by CSW(Catalog Service for Web) standard to remote catalogue server. Note that the remote catalogue must allows transaction.&lt;br /&gt;
[[File:Csw publisher.png|650px|center|publishing of metadata directly to remote csw server]]&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* EPSG code must by added in url format. Information of projection is added only if EPSG code is known or if GDAL function for identifying from WKT is succesful.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
  &amp;lt;gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
      &amp;lt;gmd:RS_Identifier&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:code&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;http://www.opengis.net/def/crs/EPSG/0/3035&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:code&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:codeSpace&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;INSPIRE RS registry&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:codeSpace&amp;gt;&lt;br /&gt;
      &amp;lt;/gmd:RS_Identifier&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
  &amp;lt;/gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
&amp;lt;/gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creation of custom ISO based profile =&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
== The first braces ==&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
== Initialize of OWSLib objects ==&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
== Single element ==&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Loop or Condition statements ==&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== The second braces ==&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
== Examples of template ==&lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Tools for working with metadata catalogue (csw) =&lt;br /&gt;
== Browsing and searching- g.gui.cswbrowser ==&lt;br /&gt;
Module g.gui.cswbrowser(Browser) based graphical interface allows managing csw connections, setting filter and searching, browsing results and adding services to GRASS GIS.&lt;br /&gt;
=== Connection manager ===&lt;br /&gt;
Connection manager allows: &lt;br /&gt;
* adding&lt;br /&gt;
* removing&lt;br /&gt;
* loading list of connections from file. &lt;br /&gt;
By default the Browser is initialized by list of few well known csw providers of csw. Button &amp;quot;Service info&amp;quot; shows metadata of the service.&lt;br /&gt;
User can manage connection in two ways:&lt;br /&gt;
* First one is with using hidden storage provided by [http://wxpython.org/Phoenix/docs/html/ConfigBase.html ​wx.Config]. This case is without accessing default connection file.&lt;br /&gt;
* After prompt user also can add/remove connection from default .xml file.&lt;br /&gt;
[[File:ConnectionMgr.png|center|600px|Connection manager in g.gui.cswbrowser]] &lt;br /&gt;
&lt;br /&gt;
=== Searching ===&lt;br /&gt;
Before fetching data from selected csw server is proper to set up searching filter. Searching can be restricted by:&lt;br /&gt;
* DCMI Type (Collection , Dataset , Event , Image , InteractiveResource , MovingImage , PhysicalObject , Service , Software , Sound , StillImage , Text)&lt;br /&gt;
* Area(bounding box)&lt;br /&gt;
** current GRASS GIS computation region&lt;br /&gt;
** manually &lt;br /&gt;
* Keywords&lt;br /&gt;
** basic filter allows to use basic or advance keyword filtering. In the simple case user can define single keywords or multiple keywords with button &amp;quot;+&amp;quot;. Logic operator between keywords is AND(&amp;amp;).&lt;br /&gt;
** second, advanced is based on OGC list of expressions which means that can be set filter with logic relations between keywords or sets of keywords. Dialogue for settings keywords text string is under &amp;quot;Advanced&amp;quot; check-box. Syntax of constraints is based on python list syntax. Each keywords must be in braces&lt;br /&gt;
[[File:Find1.png|center|600px|g.gui.cswbrowser, searching page]]&lt;br /&gt;
==== Advanced keywords filtering ====&lt;br /&gt;
On the left panel of Browser is placed check-box named &amp;quot;Advance&amp;quot;. The keywords advanced dialogue allows to use basic bool operations.&lt;br /&gt;
&lt;br /&gt;
*OR condition&lt;br /&gt;
     a || b || c&lt;br /&gt;
     [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;]&lt;br /&gt;
*AND condition&lt;br /&gt;
     a &amp;amp;&amp;amp; b &amp;amp;&amp;amp; c&lt;br /&gt;
     [ [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;] ]&lt;br /&gt;
*composition&lt;br /&gt;
     (a &amp;amp;&amp;amp; b) || c || d || e&lt;br /&gt;
     [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],[&amp;quot;c&amp;quot;],[&amp;quot;d&amp;quot;],[&amp;quot;e&amp;quot;]] or [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;,&amp;quot;e&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
=== Browsing results===&lt;br /&gt;
On the bottom of Browser is a controller for browsing results. The data from server are fetched by number of items per one transaction. Default is a 20 items. After selection of item in the result table, metadata of record should be displayed. Browser automatically enables buttons on the top of Browser if WMS, WCS or WFS services are available.&lt;br /&gt;
&lt;br /&gt;
=== Setting up csw server ===&lt;br /&gt;
&lt;br /&gt;
== CSW server management ==&lt;br /&gt;
wx.metadata package includes tools for establishing and handling pycsw server. Pycsw stuff consist:&lt;br /&gt;
*db.csw.admin &lt;br /&gt;
*db.csw.run&lt;br /&gt;
*db.csw.harvest&lt;br /&gt;
&lt;br /&gt;
For handling pycsw server can be use standard pythons scripts from pycsw install directory or mentioned three modules.&lt;br /&gt;
&lt;br /&gt;
== Installation and configuration csw server ==&lt;br /&gt;
* Installation pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
e.g.to default path taken from configure file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cd /var/www/pycsw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*deploying pycsw&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pip install -e . &amp;amp;&amp;amp; pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* Create and adjust a configuration file:&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cp default-sample.cfg default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* adjust parameters in ''default.cfg''&lt;br /&gt;
** '''server.home''' - path to installation directory&lt;br /&gt;
** '''repository.database''' - path to SQLite database e.g. $GISDBASE/WGS84/PERMANENT/sqlite/sqlite.db&lt;br /&gt;
** set '''server.url''' to: http://localhost:8000/&lt;br /&gt;
&lt;br /&gt;
*Setup the database(creates tables, indexes, etc.)&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**with module db.csw.admin from GRASS GIS. Flag -s and parameter configure with path to configure file. Path to database is automatically taken from configure file.&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -s configure=/var/www/html/pycsw/default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Load records:&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**db.csw.admin module with parameter -r for load recursively&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -r configure=/var/www/html/pycsw/default.cfg load_records=path/to/xml&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Run the server&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python csw.wsgi&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**db.csw.admin module with parameter path and port&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.run path=/var/www/html/pycsw port=8000&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Harvesting csw catalogue ==&lt;br /&gt;
Module db.csw.harvest allows to copy data from source csw server to destination csw server&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page 2014]&lt;br /&gt;
* [https://trac.osgeo.org/grass/wiki/GSoC/2015/ImprovedMetadata Development page 2015]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=22080</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=22080"/>
		<updated>2015-10-27T14:25:27Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: more logical structure&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== Catalogue Service for the Web ==&lt;br /&gt;
[http://www.opengeospatial.org/standards/cat]Catalogue services support the ability to publish and search collections of descriptive information (metadata) for data, services, and related information objects. Metadata in catalogues represent resource characteristics that can be queried and presented for evaluation and further processing by both humans and software. Catalogue services are required to support the discovery and binding to registered information resources within an information community. &lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014/2015 is currently available in GRASS add-ons. &lt;br /&gt;
* Package for creating and editing metadata according to EN ISO 19115, described here, consists of few modules. Modules r.info.iso, v.info.iso and t.info.iso are command line based and support conversion from current native metadata management (r.info, v.info,t.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata. For &lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
* Package also includs modue g.gui.cswbrowser for searching and browsing metadata catalog(csw). For advanced users there are few modeles for establishing and handling pycsw server:&lt;br /&gt;
 * db.csw.admin - module for administration of pycsw server&lt;br /&gt;
 * db.csw.run - module for starting server on localhost&lt;br /&gt;
 * db.csw.harvest - modul for harvesting metadata between two csw.&lt;br /&gt;
&lt;br /&gt;
= Requirements and installation =&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
sudo pip install -e . &amp;amp;&amp;amp; sudo pip install -r requirements-standalone.txt &amp;amp;&amp;amp; cd ..&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* owslib package - development version (OGC CSW client implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install &amp;amp;&amp;amp; cd ..&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja2 (one of the most used template engines for Python)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install &amp;amp;&amp;amp; cd ..&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating and editing metadata =&lt;br /&gt;
== Naming of metadata files and storage ==&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
== Metadata profile ==&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles(Basic and Inspire). Editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are three build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile''' fulfills the criteria of INSPIRE profile. In case if is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
* '''The temporal profile''' is based on the Grass basic profile and includes additional specific attributes for Temporal framework.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso, v.info.iso t.info.iso ==&lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Metadata editor- g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
Tooltip function helps to fill in the form correctly.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
=== Fetching values from database backand ===&lt;br /&gt;
Editor automaticaly fetch keywords from SQLite GRASS GIS backend. Three well know dictionaries are added by default. User can manualy add dictionaries by sql commands. &lt;br /&gt;
Dictionaries are stored in table ''metadata_themes''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ teble metadta_themes&lt;br /&gt;
! Attribut&lt;br /&gt;
| title&lt;br /&gt;
| keyword&lt;br /&gt;
| date_iso&lt;br /&gt;
| date_type&lt;br /&gt;
|-&lt;br /&gt;
! Date type&lt;br /&gt;
| TEXT || TEXT|| TEXT|| TEXT&lt;br /&gt;
|-&lt;br /&gt;
! Example&lt;br /&gt;
|Example || GEMET - Concepts, version || 2010-01-13 || publication&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:Keywords.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Exporting metadata reports to format PDF ===&lt;br /&gt;
This funciton allows to export metadata of GRASS maps to report in pdf format. The report template is based on INSPIRE profile. Unknown values of metadta atributes are filled by text $UNKNOWN.&lt;br /&gt;
[[Image:Pdfexp.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
{{YouTube|V7tgOOuRyuA}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GRASS metadata map editor ===&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
=== External metadata editor ===&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Publishing to csw server ===&lt;br /&gt;
Editor allows direct publishing of edited metadata by CSW(Catalog Service for Web) standard to remote catalogue server. Note that the remote catalogue must allows transaction.&lt;br /&gt;
[[File:Csw publisher.png|650px|center|publishing of metadata directly to remote csw server]]&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* EPSG code must by added in url format. Information of projection is added only if EPSG code is known or if GDAL function for identifying from WKT is succesful.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
  &amp;lt;gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
      &amp;lt;gmd:RS_Identifier&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:code&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;http://www.opengis.net/def/crs/EPSG/0/3035&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:code&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:codeSpace&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;INSPIRE RS registry&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:codeSpace&amp;gt;&lt;br /&gt;
      &amp;lt;/gmd:RS_Identifier&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
  &amp;lt;/gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
&amp;lt;/gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creation of custom ISO based profile =&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
== The first braces ==&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
== Initialize of OWSLib objects ==&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
== Single element ==&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Loop or Condition statements ==&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== The second braces ==&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
== Examples of template ==&lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Tools for working with metadata catalogue (csw) =&lt;br /&gt;
== Browsing and searching- g.gui.cswbrowser ==&lt;br /&gt;
Module g.gui.cswbrowser(Browser) based graphical interface allows managing csw connections, setting filter and searching, browsing results and adding services to GRASS GIS.&lt;br /&gt;
=== Connection manager ===&lt;br /&gt;
Connection manager allows: &lt;br /&gt;
* adding&lt;br /&gt;
* removing&lt;br /&gt;
* loading list of connections from file. &lt;br /&gt;
By default the Browser is initialized by list of few well known csw providers of csw. Button &amp;quot;Service info&amp;quot; shows metadata of the service.&lt;br /&gt;
User can manage connection in two ways:&lt;br /&gt;
* First one is with using hidden storage provided by [http://wxpython.org/Phoenix/docs/html/ConfigBase.html ​wx.Config]. This case is without accessing default connection file.&lt;br /&gt;
* After prompt user also can add/remove connection from default .xml file.&lt;br /&gt;
[[File:ConnectionMgr.png|600px|Connection manager in g.gui.cswbrowser]]&lt;br /&gt;
&lt;br /&gt;
=== Searching ===&lt;br /&gt;
Before fetching data from selected csw server is proper to set up searching filter. Searching can be restricted by:&lt;br /&gt;
* DCMI Type (Collection , Dataset , Event , Image , InteractiveResource , MovingImage , PhysicalObject , Service , Software , Sound , StillImage , Text)&lt;br /&gt;
* Area(bounding box)&lt;br /&gt;
** current GRASS GIS computation region&lt;br /&gt;
** manually &lt;br /&gt;
* Keywords&lt;br /&gt;
** basic filter allows to use basic or advance keyword filtering. In the simple case user can define single keywords or multiple keywords with button &amp;quot;+&amp;quot;. Logic operator between keywords is AND(&amp;amp;).&lt;br /&gt;
** second, advanced is based on OGC list of expressions which means that can be set filter with logic relations between keywords or sets of keywords. Dialogue for settings keywords text string is under &amp;quot;Advanced&amp;quot; check-box. Syntax of constraints is based on python list syntax. Each keywords must be in braces&lt;br /&gt;
[[File:Find1.png|600px|g.gui.cswbrowser, searching page]]&lt;br /&gt;
==== Advanced keywords filtering ====&lt;br /&gt;
On the left panel of Browser is placed check-box named &amp;quot;Advance&amp;quot;. The keywords advanced dialogue allows to use basic bool operations.&lt;br /&gt;
&lt;br /&gt;
*OR condition&lt;br /&gt;
     a || b || c&lt;br /&gt;
     [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;]&lt;br /&gt;
*AND condition&lt;br /&gt;
     a &amp;amp;&amp;amp; b &amp;amp;&amp;amp; c&lt;br /&gt;
     [ [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;] ]&lt;br /&gt;
*composition&lt;br /&gt;
     (a &amp;amp;&amp;amp; b) || c || d || e&lt;br /&gt;
     [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],[&amp;quot;c&amp;quot;],[&amp;quot;d&amp;quot;],[&amp;quot;e&amp;quot;]] or [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;,&amp;quot;e&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
=== Browsing results===&lt;br /&gt;
On the bottom of Browser is a controller for browsing results. The data from server are fetched by number of items per one transaction. Default is a 20 items. After selection of item in the result table, metadata of record should be displayed. Browser automatically enables buttons on the top of Browser if WMS, WCS or WFS services are available.&lt;br /&gt;
&lt;br /&gt;
=== Setting up csw server ===&lt;br /&gt;
&lt;br /&gt;
== CSW server management ==&lt;br /&gt;
wx.metadata package includes tools for establishing and handling pycsw server. Pycsw stuff consist:&lt;br /&gt;
*db.csw.admin &lt;br /&gt;
*db.csw.run&lt;br /&gt;
*db.csw.harvest&lt;br /&gt;
&lt;br /&gt;
For handling pycsw server can be use standard pythons scripts from pycsw install directory or mentioned three modules.&lt;br /&gt;
&lt;br /&gt;
== Installation and configuration csw server ==&lt;br /&gt;
* Installation pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
e.g.to default path taken from configure file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cd /var/www/pycsw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*deploying pycsw&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pip install -e . &amp;amp;&amp;amp; pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* Create and adjust a configuration file:&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cp default-sample.cfg default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* adjust parameters in ''default.cfg''&lt;br /&gt;
** '''server.home''' - path to installation directory&lt;br /&gt;
** '''repository.database''' - path to SQLite database e.g. $GISDBASE/WGS84/PERMANENT/sqlite/sqlite.db&lt;br /&gt;
** set '''server.url''' to: http://localhost:8000/&lt;br /&gt;
&lt;br /&gt;
*Setup the database(creates tables, indexes, etc.)&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**with module db.csw.admin from GRASS GIS. Flag -s and parameter configure with path to configure file. Path to database is automatically taken from configure file.&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -s configure=/var/www/html/pycsw/default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Load records:&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**db.csw.admin module with parameter -r for load recursively&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -r configure=/var/www/html/pycsw/default.cfg load_records=path/to/xml&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Run the server&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python csw.wsgi&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**db.csw.admin module with parameter path and port&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.run path=/var/www/html/pycsw port=8000&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Harvesting csw catalogue ==&lt;br /&gt;
Module db.csw.harvest allows to copy data from source csw server to destination csw server&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page 2014]&lt;br /&gt;
* [https://trac.osgeo.org/grass/wiki/GSoC/2015/ImprovedMetadata Development page 2015]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21827</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21827"/>
		<updated>2015-08-21T13:24:44Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: csw publishing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== Catalogue Service for the Web ==&lt;br /&gt;
[http://www.opengeospatial.org/standards/cat]Catalogue services support the ability to publish and search collections of descriptive information (metadata) for data, services, and related information objects. Metadata in catalogues represent resource characteristics that can be queried and presented for evaluation and further processing by both humans and software. Catalogue services are required to support the discovery and binding to registered information resources within an information community. &lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014/2015 is currently available in GRASS add-ons. &lt;br /&gt;
* Package for creating and editing metadata according to EN ISO 19115, described here, consists of few modules. Modules r.info.iso, v.info.iso and t.info.iso are command line based and support conversion from current native metadata management (r.info, v.info,t.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata. For &lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
* Package also includs modue g.gui.cswbrowser for searching and browsing metadata catalog(csw). For advanced users there are few modeles for establishing and handling pycsw server:&lt;br /&gt;
 * db.csw.admin - module for administration of pycsw server&lt;br /&gt;
 * db.csw.run - module for starting server on localhost&lt;br /&gt;
 * db.csw.harvest - modul for harvesting metadata between two csw.&lt;br /&gt;
&lt;br /&gt;
= Requirements and installation =&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
sudo pip install -e . &amp;amp;&amp;amp; sudo pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* owslib package - development version (OGC CSW client implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja2 (one of the most used template engines for Python)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating and editing metadata =&lt;br /&gt;
== Naming of metadata files and storage ==&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
== Metadata profile ==&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles(Basic and Inspire). Editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are three build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile''' fulfills the criteria of INSPIRE profile. In case if is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
* '''The temporal profile''' is based on the Grass basic profile and includes additional specific attributes for Temporal framework.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso, v.info.iso t.info.iso ==&lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Metadata editor- g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
Tooltip function helps to fill in the form correctly.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
=== Fetching values from database backand ===&lt;br /&gt;
Editor automaticaly fetch keywords from SQLite GRASS GIS backend. Three well know dictionaries are added by default. User can manualy add dictionaries by sql commands. &lt;br /&gt;
Dictionaries are stored in table ''metadata_themes''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ teble metadta_themes&lt;br /&gt;
! Attribut&lt;br /&gt;
| title&lt;br /&gt;
| keyword&lt;br /&gt;
| date_iso&lt;br /&gt;
| date_type&lt;br /&gt;
|-&lt;br /&gt;
! Date type&lt;br /&gt;
| TEXT || TEXT|| TEXT|| TEXT&lt;br /&gt;
|-&lt;br /&gt;
! Example&lt;br /&gt;
|Example || GEMET - Concepts, version || 2010-01-13 || publication&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:Keywords.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Exporting metadata reports to format PDF ===&lt;br /&gt;
This funciton allows to export metadata of GRASS maps to report in pdf format. The report template is based on INSPIRE profile. Unknown values of metadta atributes are filled by text $UNKNOWN.&lt;br /&gt;
[[Image:Pdfexp.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
{{YouTube|V7tgOOuRyuA}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GRASS metadata map editor ===&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
=== External metadata editor ===&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Publishing to csw server ===&lt;br /&gt;
Editor allows direct publishing of edited metadata by CSW(Catalog Service for Web) standard to remote catalogue server. Note that the remote catalogue must allows transaction.&lt;br /&gt;
[[File:Csw publisher.png|650px|center|publishing of metadata directly to remote csw server]]&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* EPSG code must by added in url format. Information of projection is added only if EPSG code is known or if GDAL function for identifying from WKT is succesful.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
  &amp;lt;gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
      &amp;lt;gmd:RS_Identifier&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:code&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;http://www.opengis.net/def/crs/EPSG/0/3035&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:code&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:codeSpace&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;INSPIRE RS registry&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:codeSpace&amp;gt;&lt;br /&gt;
      &amp;lt;/gmd:RS_Identifier&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
  &amp;lt;/gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
&amp;lt;/gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Tools for working with metadata catalogue (csw) =&lt;br /&gt;
== Browsing and searching- g.gui.cswbrowser ==&lt;br /&gt;
Module g.gui.cswbrowser(Browser) based graphical interface allows managing csw connections, setting filter and searching, browsing results and adding services to GRASS GIS.&lt;br /&gt;
=== Connection manager ===&lt;br /&gt;
Connection manager allows: &lt;br /&gt;
* adding&lt;br /&gt;
* removing&lt;br /&gt;
* loading list of connections from file. &lt;br /&gt;
By default the Browser is initialized by list of few well known csw providers of csw. Button &amp;quot;Service info&amp;quot; shows metadata of the service.&lt;br /&gt;
User can manage connection in two ways:&lt;br /&gt;
* First one is with using hidden storage provided by [http://wxpython.org/Phoenix/docs/html/ConfigBase.html ​wx.Config]. This case is without accessing default connection file.&lt;br /&gt;
* After prompt user also can add/remove connection from default .xml file.&lt;br /&gt;
[[File:ConnectionMgr.png|600px|Connection manager in g.gui.cswbrowser]]&lt;br /&gt;
&lt;br /&gt;
=== Searching ===&lt;br /&gt;
Before fetching data from selected csw server is proper to set up searching filter. Searching can be restricted by:&lt;br /&gt;
* DCMI Type (Collection , Dataset , Event , Image , InteractiveResource , MovingImage , PhysicalObject , Service , Software , Sound , StillImage , Text)&lt;br /&gt;
* Area(bounding box)&lt;br /&gt;
** current GRASS GIS computation region&lt;br /&gt;
** manually &lt;br /&gt;
* Keywords&lt;br /&gt;
** basic filter allows to use basic or advance keyword filtering. In the simple case user can define single keywords or multiple keywords with button &amp;quot;+&amp;quot;. Logic operator between keywords is AND(&amp;amp;).&lt;br /&gt;
** second, advanced is based on OGC list of expressions which means that can be set filter with logic relations between keywords or sets of keywords. Dialogue for settings keywords text string is under &amp;quot;Advanced&amp;quot; check-box. Syntax of constraints is based on python list syntax. Each keywords must be in braces&lt;br /&gt;
[[File:Find1.png|600px|g.gui.cswbrowser, searching page]]&lt;br /&gt;
==== Advanced keywords filtering ====&lt;br /&gt;
On the left panel of Browser is placed check-box named &amp;quot;Advance&amp;quot;. The keywords advanced dialogue allows to use basic bool operations.&lt;br /&gt;
&lt;br /&gt;
*OR condition&lt;br /&gt;
     a || b || c&lt;br /&gt;
     [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;]&lt;br /&gt;
*AND condition&lt;br /&gt;
     a &amp;amp;&amp;amp; b &amp;amp;&amp;amp; c&lt;br /&gt;
     [ [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;] ]&lt;br /&gt;
*composition&lt;br /&gt;
     (a &amp;amp;&amp;amp; b) || c || d || e&lt;br /&gt;
     [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],[&amp;quot;c&amp;quot;],[&amp;quot;d&amp;quot;],[&amp;quot;e&amp;quot;]] or [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;,&amp;quot;e&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
=== Browsing results===&lt;br /&gt;
On the bottom of Browser is a controller for browsing results. The data from server are fetched by number of items per one transaction. Default is a 20 items. After selection of item in the result table, metadata of record should be displayed. Browser automatically enables buttons on the top of Browser if WMS, WCS or WFS services are available.&lt;br /&gt;
&lt;br /&gt;
=== Setting up csw server ===&lt;br /&gt;
&lt;br /&gt;
== CSW server management ==&lt;br /&gt;
wx.metadata package includes tools for establishing and handling pycsw server. Pycsw stuff consist:&lt;br /&gt;
*db.csw.admin &lt;br /&gt;
*db.csw.run&lt;br /&gt;
*db.csw.harvest&lt;br /&gt;
&lt;br /&gt;
For handling pycsw server can be use standard pythons scripts from pycsw install directory or mentioned three modules.&lt;br /&gt;
&lt;br /&gt;
== Installation and configuration csw server ==&lt;br /&gt;
* Installation pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
e.g.to default path taken from configure file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cd /var/www/pycsw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*deploying pycsw&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pip install -e . &amp;amp;&amp;amp; pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* Create and adjust a configuration file:&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cp default-sample.cfg default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* adjust parameters in ''default.cfg''&lt;br /&gt;
** '''server.home''' - path to installation directory&lt;br /&gt;
** '''repository.database''' - path to SQLite database e.g. $GISDBASE/WGS84/PERMANENT/sqlite/sqlite.db&lt;br /&gt;
** set '''server.url''' to: http://localhost:8000/&lt;br /&gt;
&lt;br /&gt;
*Setup the database(creates tables, indexes, etc.)&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**with module db.csw.admin from GRASS GIS. Flag -s and parameter configure with path to configure file. Path to database is automatically taken from configure file.&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -s configure=/var/www/html/pycsw/default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Load records:&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**db.csw.admin module with parameter -r for load recursively&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -r configure=/var/www/html/pycsw/default.cfg load_records=path/to/xml&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Run the server&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python csw.wsgi&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**db.csw.admin module with parameter path and port&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.run path=/var/www/html/pycsw port=8000&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Harvesting csw catalogue ==&lt;br /&gt;
Module db.csw.harvest allows to copy data from source csw server to destination csw server&lt;br /&gt;
&lt;br /&gt;
= Creation of custom ISO based profile =&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
== The first braces ==&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
== Initialize of OWSLib objects ==&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
== Single element ==&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Loop or Condition statements ==&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== The second braces ==&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
== Examples of template ==&lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=File:Csw_publisher.png&amp;diff=21826</id>
		<title>File:Csw publisher.png</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=File:Csw_publisher.png&amp;diff=21826"/>
		<updated>2015-08-21T13:21:18Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21825</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21825"/>
		<updated>2015-08-21T13:10:50Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* Module g.gui.metadata */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== Catalogue Service for the Web ==&lt;br /&gt;
[http://www.opengeospatial.org/standards/cat]Catalogue services support the ability to publish and search collections of descriptive information (metadata) for data, services, and related information objects. Metadata in catalogues represent resource characteristics that can be queried and presented for evaluation and further processing by both humans and software. Catalogue services are required to support the discovery and binding to registered information resources within an information community. &lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014/2015 is currently available in GRASS add-ons. &lt;br /&gt;
* Package for creating and editing metadata according to EN ISO 19115, described here, consists of few modules. Modules r.info.iso, v.info.iso and t.info.iso are command line based and support conversion from current native metadata management (r.info, v.info,t.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata. For &lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
* Package also includs modue g.gui.cswbrowser for searching and browsing metadata catalog(csw). For advanced users there are few modeles for establishing and handling pycsw server:&lt;br /&gt;
 * db.csw.admin - module for administration of pycsw server&lt;br /&gt;
 * db.csw.run - module for starting server on localhost&lt;br /&gt;
 * db.csw.harvest - modul for harvesting metadata between two csw.&lt;br /&gt;
&lt;br /&gt;
= Requirements and installation =&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
sudo pip install -e . &amp;amp;&amp;amp; sudo pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* owslib package - development version (OGC CSW client implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja2 (one of the most used template engines for Python)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating and editing metadata =&lt;br /&gt;
== Naming of metadata files and storage ==&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
== Metadata profile ==&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles(Basic and Inspire). Editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are three build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile''' fulfills the criteria of INSPIRE profile. In case if is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
* '''The temporal profile''' is based on the Grass basic profile and includes additional specific attributes for Temporal framework.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso, v.info.iso t.info.iso ==&lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Metadata editor- g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
Tooltip function helps to fill in the form correctly.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
=== Fetching values from database backand ===&lt;br /&gt;
Editor automaticaly fetch keywords from SQLite GRASS GIS backend. Three well know dictionaries are added by default. User can manualy add dictionaries by sql commands. &lt;br /&gt;
Dictionaries are stored in table ''metadata_themes''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ teble metadta_themes&lt;br /&gt;
! Attribut&lt;br /&gt;
| title&lt;br /&gt;
| keyword&lt;br /&gt;
| date_iso&lt;br /&gt;
| date_type&lt;br /&gt;
|-&lt;br /&gt;
! Date type&lt;br /&gt;
| TEXT || TEXT|| TEXT|| TEXT&lt;br /&gt;
|-&lt;br /&gt;
! Example&lt;br /&gt;
|Example || GEMET - Concepts, version || 2010-01-13 || publication&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:Keywords.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Exporting metadata reports to format PDF ===&lt;br /&gt;
This funciton allows to export metadata of GRASS maps to report in pdf format. The report template is based on INSPIRE profile. Unknown values of metadta atributes are filled by text $UNKNOWN.&lt;br /&gt;
[[Image:Pdfexp.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
{{YouTube|V7tgOOuRyuA}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GRASS metadata map editor ===&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
=== External metadata editor ===&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* EPSG code must by added in url format. Information of projection is added only if EPSG code is known or if GDAL function for identifying from WKT is succesful.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
  &amp;lt;gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
      &amp;lt;gmd:RS_Identifier&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:code&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;http://www.opengis.net/def/crs/EPSG/0/3035&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:code&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:codeSpace&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;INSPIRE RS registry&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:codeSpace&amp;gt;&lt;br /&gt;
      &amp;lt;/gmd:RS_Identifier&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
  &amp;lt;/gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
&amp;lt;/gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Tools for working with metadata catalogue (csw) =&lt;br /&gt;
== Browsing and searching- g.gui.cswbrowser ==&lt;br /&gt;
Module g.gui.cswbrowser(Browser) based graphical interface allows managing csw connections, setting filter and searching, browsing results and adding services to GRASS GIS.&lt;br /&gt;
=== Connection manager ===&lt;br /&gt;
Connection manager allows: &lt;br /&gt;
* adding&lt;br /&gt;
* removing&lt;br /&gt;
* loading list of connections from file. &lt;br /&gt;
By default the Browser is initialized by list of few well known csw providers of csw. Button &amp;quot;Service info&amp;quot; shows metadata of the service.&lt;br /&gt;
User can manage connection in two ways:&lt;br /&gt;
* First one is with using hidden storage provided by [http://wxpython.org/Phoenix/docs/html/ConfigBase.html ​wx.Config]. This case is without accessing default connection file.&lt;br /&gt;
* After prompt user also can add/remove connection from default .xml file.&lt;br /&gt;
[[File:ConnectionMgr.png|600px|Connection manager in g.gui.cswbrowser]]&lt;br /&gt;
&lt;br /&gt;
=== Searching ===&lt;br /&gt;
Before fetching data from selected csw server is proper to set up searching filter. Searching can be restricted by:&lt;br /&gt;
* DCMI Type (Collection , Dataset , Event , Image , InteractiveResource , MovingImage , PhysicalObject , Service , Software , Sound , StillImage , Text)&lt;br /&gt;
* Area(bounding box)&lt;br /&gt;
** current GRASS GIS computation region&lt;br /&gt;
** manually &lt;br /&gt;
* Keywords&lt;br /&gt;
** basic filter allows to use basic or advance keyword filtering. In the simple case user can define single keywords or multiple keywords with button &amp;quot;+&amp;quot;. Logic operator between keywords is AND(&amp;amp;).&lt;br /&gt;
** second, advanced is based on OGC list of expressions which means that can be set filter with logic relations between keywords or sets of keywords. Dialogue for settings keywords text string is under &amp;quot;Advanced&amp;quot; check-box. Syntax of constraints is based on python list syntax. Each keywords must be in braces&lt;br /&gt;
[[File:Find1.png|600px|g.gui.cswbrowser, searching page]]&lt;br /&gt;
==== Advanced keywords filtering ====&lt;br /&gt;
On the left panel of Browser is placed check-box named &amp;quot;Advance&amp;quot;. The keywords advanced dialogue allows to use basic bool operations.&lt;br /&gt;
&lt;br /&gt;
*OR condition&lt;br /&gt;
     a || b || c&lt;br /&gt;
     [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;]&lt;br /&gt;
*AND condition&lt;br /&gt;
     a &amp;amp;&amp;amp; b &amp;amp;&amp;amp; c&lt;br /&gt;
     [ [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;] ]&lt;br /&gt;
*composition&lt;br /&gt;
     (a &amp;amp;&amp;amp; b) || c || d || e&lt;br /&gt;
     [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],[&amp;quot;c&amp;quot;],[&amp;quot;d&amp;quot;],[&amp;quot;e&amp;quot;]] or [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;,&amp;quot;e&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
=== Browsing results===&lt;br /&gt;
On the bottom of Browser is a controller for browsing results. The data from server are fetched by number of items per one transaction. Default is a 20 items. After selection of item in the result table, metadata of record should be displayed. Browser automatically enables buttons on the top of Browser if WMS, WCS or WFS services are available.&lt;br /&gt;
&lt;br /&gt;
=== Setting up csw server ===&lt;br /&gt;
&lt;br /&gt;
== CSW server management ==&lt;br /&gt;
wx.metadata package includes tools for establishing and handling pycsw server. Pycsw stuff consist:&lt;br /&gt;
*db.csw.admin &lt;br /&gt;
*db.csw.run&lt;br /&gt;
*db.csw.harvest&lt;br /&gt;
&lt;br /&gt;
For handling pycsw server can be use standard pythons scripts from pycsw install directory or mentioned three modules.&lt;br /&gt;
&lt;br /&gt;
== Installation and configuration csw server ==&lt;br /&gt;
* Installation pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
e.g.to default path taken from configure file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cd /var/www/pycsw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*deploying pycsw&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pip install -e . &amp;amp;&amp;amp; pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* Create and adjust a configuration file:&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cp default-sample.cfg default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* adjust parameters in ''default.cfg''&lt;br /&gt;
** '''server.home''' - path to installation directory&lt;br /&gt;
** '''repository.database''' - path to SQLite database e.g. $GISDBASE/WGS84/PERMANENT/sqlite/sqlite.db&lt;br /&gt;
** set '''server.url''' to: http://localhost:8000/&lt;br /&gt;
&lt;br /&gt;
*Setup the database(creates tables, indexes, etc.)&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**with module db.csw.admin from GRASS GIS. Flag -s and parameter configure with path to configure file. Path to database is automatically taken from configure file.&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -s configure=/var/www/html/pycsw/default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Load records:&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**db.csw.admin module with parameter -r for load recursively&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -r configure=/var/www/html/pycsw/default.cfg load_records=path/to/xml&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Run the server&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python csw.wsgi&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**db.csw.admin module with parameter path and port&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.run path=/var/www/html/pycsw port=8000&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Harvesting csw catalogue ==&lt;br /&gt;
Module db.csw.harvest allows to copy data from source csw server to destination csw server&lt;br /&gt;
&lt;br /&gt;
= Creation of custom ISO based profile =&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
== The first braces ==&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
== Initialize of OWSLib objects ==&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
== Single element ==&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Loop or Condition statements ==&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== The second braces ==&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
== Examples of template ==&lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21824</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21824"/>
		<updated>2015-08-21T09:39:20Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* Installation and configuration csw server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== Catalogue Service for the Web ==&lt;br /&gt;
[http://www.opengeospatial.org/standards/cat]Catalogue services support the ability to publish and search collections of descriptive information (metadata) for data, services, and related information objects. Metadata in catalogues represent resource characteristics that can be queried and presented for evaluation and further processing by both humans and software. Catalogue services are required to support the discovery and binding to registered information resources within an information community. &lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014/2015 is currently available in GRASS add-ons. &lt;br /&gt;
* Package for creating and editing metadata according to EN ISO 19115, described here, consists of few modules. Modules r.info.iso, v.info.iso and t.info.iso are command line based and support conversion from current native metadata management (r.info, v.info,t.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata. For &lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
* Package also includs modue g.gui.cswbrowser for searching and browsing metadata catalog(csw). For advanced users there are few modeles for establishing and handling pycsw server:&lt;br /&gt;
 * db.csw.admin - module for administration of pycsw server&lt;br /&gt;
 * db.csw.run - module for starting server on localhost&lt;br /&gt;
 * db.csw.harvest - modul for harvesting metadata between two csw.&lt;br /&gt;
&lt;br /&gt;
= Requirements and installation =&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
sudo pip install -e . &amp;amp;&amp;amp; sudo pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* owslib package - development version (OGC CSW client implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja2 (one of the most used template engines for Python)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating and editing metadata =&lt;br /&gt;
== Naming of metadata files and storage ==&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
== Metadata profile ==&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles(Basic and Inspire). Editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are three build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile''' fulfills the criteria of INSPIRE profile. In case if is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
* '''The temporal profile''' is based on the Grass basic profile and includes additional specific attributes for Temporal framework.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso, v.info.iso t.info.iso ==&lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
Tooltip function helps to fill in the form correctly.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
=== Fetching values from database backand ===&lt;br /&gt;
Editor automaticaly fetch keywords from SQLite GRASS GIS backend. Three well know dictionaries are added by default. User can manualy add dictionaries by sql commands. &lt;br /&gt;
Dictionaries are stored in table ''metadata_themes''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ teble metadta_themes&lt;br /&gt;
! Attribut&lt;br /&gt;
| title&lt;br /&gt;
| keyword&lt;br /&gt;
| date_iso&lt;br /&gt;
| date_type&lt;br /&gt;
|-&lt;br /&gt;
! Date type&lt;br /&gt;
| TEXT || TEXT|| TEXT|| TEXT&lt;br /&gt;
|-&lt;br /&gt;
! Example&lt;br /&gt;
|Example || GEMET - Concepts, version || 2010-01-13 || publication&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:Keywords.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Exporting metadata reports to format PDF ===&lt;br /&gt;
This funciton allows to export metadata of GRASS maps to report in pdf format. The report template is based on INSPIRE profile. Unknown values of metadta atributes are filled by text $UNKNOWN.&lt;br /&gt;
[[Image:Pdfexp.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
{{YouTube|V7tgOOuRyuA}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GRASS metadata map editor ===&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
=== External metadata editor ===&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* EPSG code must by added in url format. Information of projection is added only if EPSG code is known or if GDAL function for identifying from WKT is succesful.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
  &amp;lt;gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
      &amp;lt;gmd:RS_Identifier&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:code&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;http://www.opengis.net/def/crs/EPSG/0/3035&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:code&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:codeSpace&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;INSPIRE RS registry&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:codeSpace&amp;gt;&lt;br /&gt;
      &amp;lt;/gmd:RS_Identifier&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
  &amp;lt;/gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
&amp;lt;/gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Tools for working with metadata catalogue (csw) =&lt;br /&gt;
== Browsing and searching- g.gui.cswbrowser ==&lt;br /&gt;
Module g.gui.cswbrowser(Browser) based graphical interface allows managing csw connections, setting filter and searching, browsing results and adding services to GRASS GIS.&lt;br /&gt;
=== Connection manager ===&lt;br /&gt;
Connection manager allows: &lt;br /&gt;
* adding&lt;br /&gt;
* removing&lt;br /&gt;
* loading list of connections from file. &lt;br /&gt;
By default the Browser is initialized by list of few well known csw providers of csw. Button &amp;quot;Service info&amp;quot; shows metadata of the service.&lt;br /&gt;
User can manage connection in two ways:&lt;br /&gt;
* First one is with using hidden storage provided by [http://wxpython.org/Phoenix/docs/html/ConfigBase.html ​wx.Config]. This case is without accessing default connection file.&lt;br /&gt;
* After prompt user also can add/remove connection from default .xml file.&lt;br /&gt;
[[File:ConnectionMgr.png|600px|Connection manager in g.gui.cswbrowser]]&lt;br /&gt;
&lt;br /&gt;
=== Searching ===&lt;br /&gt;
Before fetching data from selected csw server is proper to set up searching filter. Searching can be restricted by:&lt;br /&gt;
* DCMI Type (Collection , Dataset , Event , Image , InteractiveResource , MovingImage , PhysicalObject , Service , Software , Sound , StillImage , Text)&lt;br /&gt;
* Area(bounding box)&lt;br /&gt;
** current GRASS GIS computation region&lt;br /&gt;
** manually &lt;br /&gt;
* Keywords&lt;br /&gt;
** basic filter allows to use basic or advance keyword filtering. In the simple case user can define single keywords or multiple keywords with button &amp;quot;+&amp;quot;. Logic operator between keywords is AND(&amp;amp;).&lt;br /&gt;
** second, advanced is based on OGC list of expressions which means that can be set filter with logic relations between keywords or sets of keywords. Dialogue for settings keywords text string is under &amp;quot;Advanced&amp;quot; check-box. Syntax of constraints is based on python list syntax. Each keywords must be in braces&lt;br /&gt;
[[File:Find1.png|600px|g.gui.cswbrowser, searching page]]&lt;br /&gt;
==== Advanced keywords filtering ====&lt;br /&gt;
On the left panel of Browser is placed check-box named &amp;quot;Advance&amp;quot;. The keywords advanced dialogue allows to use basic bool operations.&lt;br /&gt;
&lt;br /&gt;
*OR condition&lt;br /&gt;
     a || b || c&lt;br /&gt;
     [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;]&lt;br /&gt;
*AND condition&lt;br /&gt;
     a &amp;amp;&amp;amp; b &amp;amp;&amp;amp; c&lt;br /&gt;
     [ [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;] ]&lt;br /&gt;
*composition&lt;br /&gt;
     (a &amp;amp;&amp;amp; b) || c || d || e&lt;br /&gt;
     [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],[&amp;quot;c&amp;quot;],[&amp;quot;d&amp;quot;],[&amp;quot;e&amp;quot;]] or [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;,&amp;quot;e&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
=== Browsing results===&lt;br /&gt;
On the bottom of Browser is a controller for browsing results. The data from server are fetched by number of items per one transaction. Default is a 20 items. After selection of item in the result table, metadata of record should be displayed. Browser automatically enables buttons on the top of Browser if WMS, WCS or WFS services are available.&lt;br /&gt;
&lt;br /&gt;
=== Setting up csw server ===&lt;br /&gt;
&lt;br /&gt;
== CSW server management ==&lt;br /&gt;
wx.metadata package includes tools for establishing and handling pycsw server. Pycsw stuff consist:&lt;br /&gt;
*db.csw.admin &lt;br /&gt;
*db.csw.run&lt;br /&gt;
*db.csw.harvest&lt;br /&gt;
&lt;br /&gt;
For handling pycsw server can be use standard pythons scripts from pycsw install directory or mentioned three modules.&lt;br /&gt;
&lt;br /&gt;
== Installation and configuration csw server ==&lt;br /&gt;
* Installation pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
e.g.to default path taken from configure file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cd /var/www/pycsw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*deploying pycsw&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pip install -e . &amp;amp;&amp;amp; pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* Create and adjust a configuration file:&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cp default-sample.cfg default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* adjust parameters in ''default.cfg''&lt;br /&gt;
** '''server.home''' - path to installation directory&lt;br /&gt;
** '''repository.database''' - path to SQLite database e.g. $GISDBASE/WGS84/PERMANENT/sqlite/sqlite.db&lt;br /&gt;
** set '''server.url''' to: http://localhost:8000/&lt;br /&gt;
&lt;br /&gt;
*Setup the database(creates tables, indexes, etc.)&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**with module db.csw.admin from GRASS GIS. Flag -s and parameter configure with path to configure file. Path to database is automatically taken from configure file.&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -s configure=/var/www/html/pycsw/default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Load records:&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**db.csw.admin module with parameter -r for load recursively&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -r configure=/var/www/html/pycsw/default.cfg load_records=path/to/xml&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Run the server&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python csw.wsgi&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**db.csw.admin module with parameter path and port&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.run path=/var/www/html/pycsw port=8000&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Harvesting csw catalogue ==&lt;br /&gt;
Module db.csw.harvest allows to copy data from source csw server to destination csw server&lt;br /&gt;
&lt;br /&gt;
= Creation of custom ISO based profile =&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
== The first braces ==&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
== Initialize of OWSLib objects ==&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
== Single element ==&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Loop or Condition statements ==&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== The second braces ==&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
== Examples of template ==&lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21811</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21811"/>
		<updated>2015-08-20T13:08:39Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* Installation and configuration csw server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== Catalogue Service for the Web ==&lt;br /&gt;
[http://www.opengeospatial.org/standards/cat]Catalogue services support the ability to publish and search collections of descriptive information (metadata) for data, services, and related information objects. Metadata in catalogues represent resource characteristics that can be queried and presented for evaluation and further processing by both humans and software. Catalogue services are required to support the discovery and binding to registered information resources within an information community. &lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014/2015 is currently available in GRASS add-ons. &lt;br /&gt;
* Package for creating and editing metadata according to EN ISO 19115, described here, consists of few modules. Modules r.info.iso, v.info.iso and t.info.iso are command line based and support conversion from current native metadata management (r.info, v.info,t.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata. For &lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
* Package also includs modue g.gui.cswbrowser for searching and browsing metadata catalog(csw). For advanced users there are few modeles for establishing and handling pycsw server:&lt;br /&gt;
 * db.csw.admin - module for administration of pycsw server&lt;br /&gt;
 * db.csw.run - module for starting server on localhost&lt;br /&gt;
 * db.csw.harvest - modul for harvesting metadata between two csw.&lt;br /&gt;
&lt;br /&gt;
= Requirements and installation =&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
sudo pip install -e . &amp;amp;&amp;amp; sudo pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* owslib package - development version (OGC CSW client implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja2 (one of the most used template engines for Python)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating and editing metadata =&lt;br /&gt;
== Naming of metadata files and storage ==&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
== Metadata profile ==&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles(Basic and Inspire). Editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are three build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile''' fulfills the criteria of INSPIRE profile. In case if is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
* '''The temporal profile''' is based on the Grass basic profile and includes additional specific attributes for Temporal framework.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso, v.info.iso t.info.iso ==&lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
Tooltip function helps to fill in the form correctly.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
=== Fetching values from database backand ===&lt;br /&gt;
Editor automaticaly fetch keywords from SQLite GRASS GIS backend. Three well know dictionaries are added by default. User can manualy add dictionaries by sql commands. &lt;br /&gt;
Dictionaries are stored in table ''metadata_themes''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ teble metadta_themes&lt;br /&gt;
! Attribut&lt;br /&gt;
| title&lt;br /&gt;
| keyword&lt;br /&gt;
| date_iso&lt;br /&gt;
| date_type&lt;br /&gt;
|-&lt;br /&gt;
! Date type&lt;br /&gt;
| TEXT || TEXT|| TEXT|| TEXT&lt;br /&gt;
|-&lt;br /&gt;
! Example&lt;br /&gt;
|Example || GEMET - Concepts, version || 2010-01-13 || publication&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:Keywords.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Exporting metadata reports to format PDF ===&lt;br /&gt;
This funciton allows to export metadata of GRASS maps to report in pdf format. The report template is based on INSPIRE profile. Unknown values of metadta atributes are filled by text $UNKNOWN.&lt;br /&gt;
[[Image:Pdfexp.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
{{YouTube|V7tgOOuRyuA}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GRASS metadata map editor ===&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
=== External metadata editor ===&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* EPSG code must by added in url format. Information of projection is added only if EPSG code is known or if GDAL function for identifying from WKT is succesful.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
  &amp;lt;gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
      &amp;lt;gmd:RS_Identifier&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:code&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;http://www.opengis.net/def/crs/EPSG/0/3035&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:code&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:codeSpace&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;INSPIRE RS registry&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:codeSpace&amp;gt;&lt;br /&gt;
      &amp;lt;/gmd:RS_Identifier&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
  &amp;lt;/gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
&amp;lt;/gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Tools for working with metadata catalogue (csw) =&lt;br /&gt;
== Browsing and searching- g.gui.cswbrowser ==&lt;br /&gt;
Module g.gui.cswbrowser(Browser) based graphical interface allows managing csw connections, setting filter and searching, browsing results and adding services to GRASS GIS.&lt;br /&gt;
=== Connection manager ===&lt;br /&gt;
Connection manager allows: &lt;br /&gt;
* adding&lt;br /&gt;
* removing&lt;br /&gt;
* loading list of connections from file. &lt;br /&gt;
By default the Browser is initialized by list of few well known csw providers of csw. Button &amp;quot;Service info&amp;quot; shows metadata of the service.&lt;br /&gt;
User can manage connection in two ways:&lt;br /&gt;
* First one is with using hidden storage provided by [http://wxpython.org/Phoenix/docs/html/ConfigBase.html ​wx.Config]. This case is without accessing default connection file.&lt;br /&gt;
* After prompt user also can add/remove connection from default .xml file.&lt;br /&gt;
[[File:ConnectionMgr.png|600px|Connection manager in g.gui.cswbrowser]]&lt;br /&gt;
&lt;br /&gt;
=== Searching ===&lt;br /&gt;
Before fetching data from selected csw server is proper to set up searching filter. Searching can be restricted by:&lt;br /&gt;
* DCMI Type (Collection , Dataset , Event , Image , InteractiveResource , MovingImage , PhysicalObject , Service , Software , Sound , StillImage , Text)&lt;br /&gt;
* Area(bounding box)&lt;br /&gt;
** current GRASS GIS computation region&lt;br /&gt;
** manually &lt;br /&gt;
* Keywords&lt;br /&gt;
** basic filter allows to use basic or advance keyword filtering. In the simple case user can define single keywords or multiple keywords with button &amp;quot;+&amp;quot;. Logic operator between keywords is AND(&amp;amp;).&lt;br /&gt;
** second, advanced is based on OGC list of expressions which means that can be set filter with logic relations between keywords or sets of keywords. Dialogue for settings keywords text string is under &amp;quot;Advanced&amp;quot; check-box. Syntax of constraints is based on python list syntax. Each keywords must be in braces&lt;br /&gt;
[[File:Find1.png|600px|g.gui.cswbrowser, searching page]]&lt;br /&gt;
==== Advanced keywords filtering ====&lt;br /&gt;
On the left panel of Browser is placed check-box named &amp;quot;Advance&amp;quot;. The keywords advanced dialogue allows to use basic bool operations.&lt;br /&gt;
&lt;br /&gt;
*OR condition&lt;br /&gt;
     a || b || c&lt;br /&gt;
     [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;]&lt;br /&gt;
*AND condition&lt;br /&gt;
     a &amp;amp;&amp;amp; b &amp;amp;&amp;amp; c&lt;br /&gt;
     [ [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;] ]&lt;br /&gt;
*composition&lt;br /&gt;
     (a &amp;amp;&amp;amp; b) || c || d || e&lt;br /&gt;
     [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],[&amp;quot;c&amp;quot;],[&amp;quot;d&amp;quot;],[&amp;quot;e&amp;quot;]] or [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;,&amp;quot;e&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
=== Browsing results===&lt;br /&gt;
On the bottom of Browser is a controller for browsing results. The data from server are fetched by number of items per one transaction. Default is a 20 items. After selection of item in the result table, metadata of record should be displayed. Browser automatically enables buttons on the top of Browser if WMS, WCS or WFS services are available.&lt;br /&gt;
&lt;br /&gt;
=== Setting up csw server ===&lt;br /&gt;
&lt;br /&gt;
== CSW server management ==&lt;br /&gt;
wx.metadata package includes tools for establishing and handling pycsw server. Pycsw stuff consist:&lt;br /&gt;
*db.csw.admin &lt;br /&gt;
*db.csw.run&lt;br /&gt;
*db.csw.harvest&lt;br /&gt;
&lt;br /&gt;
For handling pycsw server can be use standard pythons scripts from pycsw install directory or mentioned three modules.&lt;br /&gt;
&lt;br /&gt;
== Installation and configuration csw server ==&lt;br /&gt;
* Installation pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
e.g.to default path taken from configure file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cd /var/www/pycsw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*deploying pycsw&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pip install -e . &amp;amp;&amp;amp; pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* Create and adjust a configuration file:&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cp default-sample.cfg default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* adjust parameters in ''default.cfg''&lt;br /&gt;
** '''server.home''' - path to installation directory&lt;br /&gt;
** '''repository.database''' - path to SQLite database e.g. $GISDBASE/WGS84/PERMANENT/sqlite/sqlite.db&lt;br /&gt;
** set '''server.url''' to: http://localhost:8000/&lt;br /&gt;
&lt;br /&gt;
*Setup the database(creates tables, indexes, etc.)&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**with module db.csw.admin from GRASS GIS. Flag -s and parameter configure with path to configure file. Path to database is automatically taken from configure file.&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -s configure=/var/www/html/pycsw/default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Load records:&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**db.csw.admin module with parameter -r for load recursively&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -r configure=/var/www/html/pycsw/default.cfg load_records=path/to/xml&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Run the server&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python csw.wsgi&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**db.csw.admin module with parameter path and port&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.run path=/var/www/html/pycsw port=8000&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creation of custom ISO based profile =&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
== The first braces ==&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
== Initialize of OWSLib objects ==&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
== Single element ==&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Loop or Condition statements ==&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== The second braces ==&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
== Examples of template ==&lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21810</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21810"/>
		<updated>2015-08-20T13:00:42Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* Installation and configuration csw server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== Catalogue Service for the Web ==&lt;br /&gt;
[http://www.opengeospatial.org/standards/cat]Catalogue services support the ability to publish and search collections of descriptive information (metadata) for data, services, and related information objects. Metadata in catalogues represent resource characteristics that can be queried and presented for evaluation and further processing by both humans and software. Catalogue services are required to support the discovery and binding to registered information resources within an information community. &lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014/2015 is currently available in GRASS add-ons. &lt;br /&gt;
* Package for creating and editing metadata according to EN ISO 19115, described here, consists of few modules. Modules r.info.iso, v.info.iso and t.info.iso are command line based and support conversion from current native metadata management (r.info, v.info,t.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata. For &lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
* Package also includs modue g.gui.cswbrowser for searching and browsing metadata catalog(csw). For advanced users there are few modeles for establishing and handling pycsw server:&lt;br /&gt;
 * db.csw.admin - module for administration of pycsw server&lt;br /&gt;
 * db.csw.run - module for starting server on localhost&lt;br /&gt;
 * db.csw.harvest - modul for harvesting metadata between two csw.&lt;br /&gt;
&lt;br /&gt;
= Requirements and installation =&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
sudo pip install -e . &amp;amp;&amp;amp; sudo pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* owslib package - development version (OGC CSW client implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja2 (one of the most used template engines for Python)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating and editing metadata =&lt;br /&gt;
== Naming of metadata files and storage ==&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
== Metadata profile ==&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles(Basic and Inspire). Editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are three build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile''' fulfills the criteria of INSPIRE profile. In case if is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
* '''The temporal profile''' is based on the Grass basic profile and includes additional specific attributes for Temporal framework.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso, v.info.iso t.info.iso ==&lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
Tooltip function helps to fill in the form correctly.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
=== Fetching values from database backand ===&lt;br /&gt;
Editor automaticaly fetch keywords from SQLite GRASS GIS backend. Three well know dictionaries are added by default. User can manualy add dictionaries by sql commands. &lt;br /&gt;
Dictionaries are stored in table ''metadata_themes''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ teble metadta_themes&lt;br /&gt;
! Attribut&lt;br /&gt;
| title&lt;br /&gt;
| keyword&lt;br /&gt;
| date_iso&lt;br /&gt;
| date_type&lt;br /&gt;
|-&lt;br /&gt;
! Date type&lt;br /&gt;
| TEXT || TEXT|| TEXT|| TEXT&lt;br /&gt;
|-&lt;br /&gt;
! Example&lt;br /&gt;
|Example || GEMET - Concepts, version || 2010-01-13 || publication&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:Keywords.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Exporting metadata reports to format PDF ===&lt;br /&gt;
This funciton allows to export metadata of GRASS maps to report in pdf format. The report template is based on INSPIRE profile. Unknown values of metadta atributes are filled by text $UNKNOWN.&lt;br /&gt;
[[Image:Pdfexp.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
{{YouTube|V7tgOOuRyuA}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GRASS metadata map editor ===&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
=== External metadata editor ===&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* EPSG code must by added in url format. Information of projection is added only if EPSG code is known or if GDAL function for identifying from WKT is succesful.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
  &amp;lt;gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
      &amp;lt;gmd:RS_Identifier&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:code&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;http://www.opengis.net/def/crs/EPSG/0/3035&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:code&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:codeSpace&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;INSPIRE RS registry&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:codeSpace&amp;gt;&lt;br /&gt;
      &amp;lt;/gmd:RS_Identifier&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
  &amp;lt;/gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
&amp;lt;/gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Tools for working with metadata catalogue (csw) =&lt;br /&gt;
== Browsing and searching- g.gui.cswbrowser ==&lt;br /&gt;
Module g.gui.cswbrowser(Browser) based graphical interface allows managing csw connections, setting filter and searching, browsing results and adding services to GRASS GIS.&lt;br /&gt;
=== Connection manager ===&lt;br /&gt;
Connection manager allows: &lt;br /&gt;
* adding&lt;br /&gt;
* removing&lt;br /&gt;
* loading list of connections from file. &lt;br /&gt;
By default the Browser is initialized by list of few well known csw providers of csw. Button &amp;quot;Service info&amp;quot; shows metadata of the service.&lt;br /&gt;
User can manage connection in two ways:&lt;br /&gt;
* First one is with using hidden storage provided by [http://wxpython.org/Phoenix/docs/html/ConfigBase.html ​wx.Config]. This case is without accessing default connection file.&lt;br /&gt;
* After prompt user also can add/remove connection from default .xml file.&lt;br /&gt;
[[File:ConnectionMgr.png|600px|Connection manager in g.gui.cswbrowser]]&lt;br /&gt;
&lt;br /&gt;
=== Searching ===&lt;br /&gt;
Before fetching data from selected csw server is proper to set up searching filter. Searching can be restricted by:&lt;br /&gt;
* DCMI Type (Collection , Dataset , Event , Image , InteractiveResource , MovingImage , PhysicalObject , Service , Software , Sound , StillImage , Text)&lt;br /&gt;
* Area(bounding box)&lt;br /&gt;
** current GRASS GIS computation region&lt;br /&gt;
** manually &lt;br /&gt;
* Keywords&lt;br /&gt;
** basic filter allows to use basic or advance keyword filtering. In the simple case user can define single keywords or multiple keywords with button &amp;quot;+&amp;quot;. Logic operator between keywords is AND(&amp;amp;).&lt;br /&gt;
** second, advanced is based on OGC list of expressions which means that can be set filter with logic relations between keywords or sets of keywords. Dialogue for settings keywords text string is under &amp;quot;Advanced&amp;quot; check-box. Syntax of constraints is based on python list syntax. Each keywords must be in braces&lt;br /&gt;
[[File:Find1.png|600px|g.gui.cswbrowser, searching page]]&lt;br /&gt;
==== Advanced keywords filtering ====&lt;br /&gt;
On the left panel of Browser is placed check-box named &amp;quot;Advance&amp;quot;. The keywords advanced dialogue allows to use basic bool operations.&lt;br /&gt;
&lt;br /&gt;
*OR condition&lt;br /&gt;
     a || b || c&lt;br /&gt;
     [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;]&lt;br /&gt;
*AND condition&lt;br /&gt;
     a &amp;amp;&amp;amp; b &amp;amp;&amp;amp; c&lt;br /&gt;
     [ [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;] ]&lt;br /&gt;
*composition&lt;br /&gt;
     (a &amp;amp;&amp;amp; b) || c || d || e&lt;br /&gt;
     [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],[&amp;quot;c&amp;quot;],[&amp;quot;d&amp;quot;],[&amp;quot;e&amp;quot;]] or [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;,&amp;quot;e&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
=== Browsing results===&lt;br /&gt;
On the bottom of Browser is a controller for browsing results. The data from server are fetched by number of items per one transaction. Default is a 20 items. After selection of item in the result table, metadata of record should be displayed. Browser automatically enables buttons on the top of Browser if WMS, WCS or WFS services are available.&lt;br /&gt;
&lt;br /&gt;
=== Setting up csw server ===&lt;br /&gt;
&lt;br /&gt;
== CSW server management ==&lt;br /&gt;
wx.metadata package includes tools for establishing and handling pycsw server. Pycsw stuff consist:&lt;br /&gt;
*db.csw.admin &lt;br /&gt;
*db.csw.run&lt;br /&gt;
*db.csw.harvest&lt;br /&gt;
&lt;br /&gt;
For handling pycsw server can be use standard pythons scripts from pycsw install directory or mentioned three modules.&lt;br /&gt;
&lt;br /&gt;
== Installation and configuration csw server ==&lt;br /&gt;
* Installation pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
e.g.to default path taken from configure file&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cd /var/www/pycsw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*deploying pycsw&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
$ pip install -e . &amp;amp;&amp;amp; pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Create and adjust a configuration file:&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cp default-sample.cfg default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* adjust parameters in ''default.cfg''&lt;br /&gt;
** '''server.home''' - path to installation directory&lt;br /&gt;
** '''repository.database''' - path to SQLite database e.g. $GISDBASE/WGS84/PERMANENT/sqlite/sqlite.db&lt;br /&gt;
** set '''server.url''' to: http://localhost:8000/&lt;br /&gt;
&lt;br /&gt;
*Setup the database(creates tables, indexes, etc.)&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**with module db.csw.admin from GRASS GIS. Flag -s and parameter configure with path to configure file. Path to database is automatically taken from configure file.&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -s configure=/var/www/html/pycsw/default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Load records:&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**db.csw.admin module with parameter -r for load recursively&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -r configure=/var/www/html/pycsw/default.cfg load_records=path/to/xml&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Run the server&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python csw.wsgi&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**db.csw.admin module with parameter path and port&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.run path=/var/www/html/pycsw port=8000&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creation of custom ISO based profile =&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
== The first braces ==&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
== Initialize of OWSLib objects ==&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
== Single element ==&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Loop or Condition statements ==&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== The second braces ==&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
== Examples of template ==&lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21809</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21809"/>
		<updated>2015-08-20T12:54:23Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* Installation and configuration csw server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== Catalogue Service for the Web ==&lt;br /&gt;
[http://www.opengeospatial.org/standards/cat]Catalogue services support the ability to publish and search collections of descriptive information (metadata) for data, services, and related information objects. Metadata in catalogues represent resource characteristics that can be queried and presented for evaluation and further processing by both humans and software. Catalogue services are required to support the discovery and binding to registered information resources within an information community. &lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014/2015 is currently available in GRASS add-ons. &lt;br /&gt;
* Package for creating and editing metadata according to EN ISO 19115, described here, consists of few modules. Modules r.info.iso, v.info.iso and t.info.iso are command line based and support conversion from current native metadata management (r.info, v.info,t.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata. For &lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
* Package also includs modue g.gui.cswbrowser for searching and browsing metadata catalog(csw). For advanced users there are few modeles for establishing and handling pycsw server:&lt;br /&gt;
 * db.csw.admin - module for administration of pycsw server&lt;br /&gt;
 * db.csw.run - module for starting server on localhost&lt;br /&gt;
 * db.csw.harvest - modul for harvesting metadata between two csw.&lt;br /&gt;
&lt;br /&gt;
= Requirements and installation =&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
sudo pip install -e . &amp;amp;&amp;amp; sudo pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* owslib package - development version (OGC CSW client implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja2 (one of the most used template engines for Python)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating and editing metadata =&lt;br /&gt;
== Naming of metadata files and storage ==&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
== Metadata profile ==&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles(Basic and Inspire). Editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are three build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile''' fulfills the criteria of INSPIRE profile. In case if is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
* '''The temporal profile''' is based on the Grass basic profile and includes additional specific attributes for Temporal framework.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso, v.info.iso t.info.iso ==&lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
Tooltip function helps to fill in the form correctly.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
=== Fetching values from database backand ===&lt;br /&gt;
Editor automaticaly fetch keywords from SQLite GRASS GIS backend. Three well know dictionaries are added by default. User can manualy add dictionaries by sql commands. &lt;br /&gt;
Dictionaries are stored in table ''metadata_themes''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ teble metadta_themes&lt;br /&gt;
! Attribut&lt;br /&gt;
| title&lt;br /&gt;
| keyword&lt;br /&gt;
| date_iso&lt;br /&gt;
| date_type&lt;br /&gt;
|-&lt;br /&gt;
! Date type&lt;br /&gt;
| TEXT || TEXT|| TEXT|| TEXT&lt;br /&gt;
|-&lt;br /&gt;
! Example&lt;br /&gt;
|Example || GEMET - Concepts, version || 2010-01-13 || publication&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:Keywords.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Exporting metadata reports to format PDF ===&lt;br /&gt;
This funciton allows to export metadata of GRASS maps to report in pdf format. The report template is based on INSPIRE profile. Unknown values of metadta atributes are filled by text $UNKNOWN.&lt;br /&gt;
[[Image:Pdfexp.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
{{YouTube|V7tgOOuRyuA}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GRASS metadata map editor ===&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
=== External metadata editor ===&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* EPSG code must by added in url format. Information of projection is added only if EPSG code is known or if GDAL function for identifying from WKT is succesful.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
  &amp;lt;gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
      &amp;lt;gmd:RS_Identifier&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:code&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;http://www.opengis.net/def/crs/EPSG/0/3035&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:code&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:codeSpace&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;INSPIRE RS registry&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:codeSpace&amp;gt;&lt;br /&gt;
      &amp;lt;/gmd:RS_Identifier&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
  &amp;lt;/gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
&amp;lt;/gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Tools for working with metadata catalogue (csw) =&lt;br /&gt;
== Browsing and searching- g.gui.cswbrowser ==&lt;br /&gt;
Module g.gui.cswbrowser(Browser) based graphical interface allows managing csw connections, setting filter and searching, browsing results and adding services to GRASS GIS.&lt;br /&gt;
=== Connection manager ===&lt;br /&gt;
Connection manager allows: &lt;br /&gt;
* adding&lt;br /&gt;
* removing&lt;br /&gt;
* loading list of connections from file. &lt;br /&gt;
By default the Browser is initialized by list of few well known csw providers of csw. Button &amp;quot;Service info&amp;quot; shows metadata of the service.&lt;br /&gt;
User can manage connection in two ways:&lt;br /&gt;
* First one is with using hidden storage provided by [http://wxpython.org/Phoenix/docs/html/ConfigBase.html ​wx.Config]. This case is without accessing default connection file.&lt;br /&gt;
* After prompt user also can add/remove connection from default .xml file.&lt;br /&gt;
[[File:ConnectionMgr.png|600px|Connection manager in g.gui.cswbrowser]]&lt;br /&gt;
&lt;br /&gt;
=== Searching ===&lt;br /&gt;
Before fetching data from selected csw server is proper to set up searching filter. Searching can be restricted by:&lt;br /&gt;
* DCMI Type (Collection , Dataset , Event , Image , InteractiveResource , MovingImage , PhysicalObject , Service , Software , Sound , StillImage , Text)&lt;br /&gt;
* Area(bounding box)&lt;br /&gt;
** current GRASS GIS computation region&lt;br /&gt;
** manually &lt;br /&gt;
* Keywords&lt;br /&gt;
** basic filter allows to use basic or advance keyword filtering. In the simple case user can define single keywords or multiple keywords with button &amp;quot;+&amp;quot;. Logic operator between keywords is AND(&amp;amp;).&lt;br /&gt;
** second, advanced is based on OGC list of expressions which means that can be set filter with logic relations between keywords or sets of keywords. Dialogue for settings keywords text string is under &amp;quot;Advanced&amp;quot; check-box. Syntax of constraints is based on python list syntax. Each keywords must be in braces&lt;br /&gt;
[[File:Find1.png|600px|g.gui.cswbrowser, searching page]]&lt;br /&gt;
==== Advanced keywords filtering ====&lt;br /&gt;
On the left panel of Browser is placed check-box named &amp;quot;Advance&amp;quot;. The keywords advanced dialogue allows to use basic bool operations.&lt;br /&gt;
&lt;br /&gt;
*OR condition&lt;br /&gt;
     a || b || c&lt;br /&gt;
     [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;]&lt;br /&gt;
*AND condition&lt;br /&gt;
     a &amp;amp;&amp;amp; b &amp;amp;&amp;amp; c&lt;br /&gt;
     [ [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;] ]&lt;br /&gt;
*composition&lt;br /&gt;
     (a &amp;amp;&amp;amp; b) || c || d || e&lt;br /&gt;
     [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],[&amp;quot;c&amp;quot;],[&amp;quot;d&amp;quot;],[&amp;quot;e&amp;quot;]] or [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;,&amp;quot;e&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
=== Browsing results===&lt;br /&gt;
On the bottom of Browser is a controller for browsing results. The data from server are fetched by number of items per one transaction. Default is a 20 items. After selection of item in the result table, metadata of record should be displayed. Browser automatically enables buttons on the top of Browser if WMS, WCS or WFS services are available.&lt;br /&gt;
&lt;br /&gt;
=== Setting up csw server ===&lt;br /&gt;
&lt;br /&gt;
== CSW server management ==&lt;br /&gt;
wx.metadata package includes tools for establishing and handling pycsw server. Pycsw stuff consist:&lt;br /&gt;
*db.csw.admin &lt;br /&gt;
*db.csw.run&lt;br /&gt;
*db.csw.harvest&lt;br /&gt;
&lt;br /&gt;
For handling pycsw server can be use standard pythons scripts from pycsw install directory or mentioned three modules.&lt;br /&gt;
&lt;br /&gt;
== Installation and configuration csw server ==&lt;br /&gt;
* Installation pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
e.g.to default path taken from configure file&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cd /var/www/pycsw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*deploying pycsw&lt;br /&gt;
**&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
$ pip install -e . &amp;amp;&amp;amp; pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Create and adjust a configuration file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cp default-sample.cfg default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* adjust parameters in ''default.cfg''&lt;br /&gt;
** '''server.home''' - path to installation directory&lt;br /&gt;
** '''repository.database''' - path to SQLite database e.g. $GISDBASE/WGS84/PERMANENT/sqlite/sqlite.db&lt;br /&gt;
** set '''server.url''' to: http://localhost:8000/&lt;br /&gt;
&lt;br /&gt;
*Setup the database(creates tables, indexes, etc.)&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**with module db.csw.admin from GRASS GIS. Flag -s and parameter configure with path to configure file. Path to database is automatically taken from configure file.&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -s configure=/var/www/html/pycsw/default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Load records:&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**db.csw.admin module with parameter -r for load recursively&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -r configure=/var/www/html/pycsw/default.cfg load_records=path/to/xml&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Run the server&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python csw.wsgi&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**db.csw.admin module with parameter path and port&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.run path=/var/www/html/pycsw port=8000&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creation of custom ISO based profile =&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
== The first braces ==&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
== Initialize of OWSLib objects ==&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
== Single element ==&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Loop or Condition statements ==&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== The second braces ==&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
== Examples of template ==&lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21808</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21808"/>
		<updated>2015-08-20T12:53:16Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== Catalogue Service for the Web ==&lt;br /&gt;
[http://www.opengeospatial.org/standards/cat]Catalogue services support the ability to publish and search collections of descriptive information (metadata) for data, services, and related information objects. Metadata in catalogues represent resource characteristics that can be queried and presented for evaluation and further processing by both humans and software. Catalogue services are required to support the discovery and binding to registered information resources within an information community. &lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014/2015 is currently available in GRASS add-ons. &lt;br /&gt;
* Package for creating and editing metadata according to EN ISO 19115, described here, consists of few modules. Modules r.info.iso, v.info.iso and t.info.iso are command line based and support conversion from current native metadata management (r.info, v.info,t.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata. For &lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
* Package also includs modue g.gui.cswbrowser for searching and browsing metadata catalog(csw). For advanced users there are few modeles for establishing and handling pycsw server:&lt;br /&gt;
 * db.csw.admin - module for administration of pycsw server&lt;br /&gt;
 * db.csw.run - module for starting server on localhost&lt;br /&gt;
 * db.csw.harvest - modul for harvesting metadata between two csw.&lt;br /&gt;
&lt;br /&gt;
= Requirements and installation =&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
sudo pip install -e . &amp;amp;&amp;amp; sudo pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* owslib package - development version (OGC CSW client implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja2 (one of the most used template engines for Python)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating and editing metadata =&lt;br /&gt;
== Naming of metadata files and storage ==&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
== Metadata profile ==&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles(Basic and Inspire). Editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are three build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile''' fulfills the criteria of INSPIRE profile. In case if is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
* '''The temporal profile''' is based on the Grass basic profile and includes additional specific attributes for Temporal framework.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso, v.info.iso t.info.iso ==&lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
Tooltip function helps to fill in the form correctly.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
=== Fetching values from database backand ===&lt;br /&gt;
Editor automaticaly fetch keywords from SQLite GRASS GIS backend. Three well know dictionaries are added by default. User can manualy add dictionaries by sql commands. &lt;br /&gt;
Dictionaries are stored in table ''metadata_themes''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ teble metadta_themes&lt;br /&gt;
! Attribut&lt;br /&gt;
| title&lt;br /&gt;
| keyword&lt;br /&gt;
| date_iso&lt;br /&gt;
| date_type&lt;br /&gt;
|-&lt;br /&gt;
! Date type&lt;br /&gt;
| TEXT || TEXT|| TEXT|| TEXT&lt;br /&gt;
|-&lt;br /&gt;
! Example&lt;br /&gt;
|Example || GEMET - Concepts, version || 2010-01-13 || publication&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:Keywords.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Exporting metadata reports to format PDF ===&lt;br /&gt;
This funciton allows to export metadata of GRASS maps to report in pdf format. The report template is based on INSPIRE profile. Unknown values of metadta atributes are filled by text $UNKNOWN.&lt;br /&gt;
[[Image:Pdfexp.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
{{YouTube|V7tgOOuRyuA}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GRASS metadata map editor ===&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
=== External metadata editor ===&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* EPSG code must by added in url format. Information of projection is added only if EPSG code is known or if GDAL function for identifying from WKT is succesful.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
  &amp;lt;gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
      &amp;lt;gmd:RS_Identifier&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:code&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;http://www.opengis.net/def/crs/EPSG/0/3035&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:code&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:codeSpace&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;INSPIRE RS registry&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:codeSpace&amp;gt;&lt;br /&gt;
      &amp;lt;/gmd:RS_Identifier&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
  &amp;lt;/gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
&amp;lt;/gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Tools for working with metadata catalogue (csw) =&lt;br /&gt;
== Browsing and searching- g.gui.cswbrowser ==&lt;br /&gt;
Module g.gui.cswbrowser(Browser) based graphical interface allows managing csw connections, setting filter and searching, browsing results and adding services to GRASS GIS.&lt;br /&gt;
=== Connection manager ===&lt;br /&gt;
Connection manager allows: &lt;br /&gt;
* adding&lt;br /&gt;
* removing&lt;br /&gt;
* loading list of connections from file. &lt;br /&gt;
By default the Browser is initialized by list of few well known csw providers of csw. Button &amp;quot;Service info&amp;quot; shows metadata of the service.&lt;br /&gt;
User can manage connection in two ways:&lt;br /&gt;
* First one is with using hidden storage provided by [http://wxpython.org/Phoenix/docs/html/ConfigBase.html ​wx.Config]. This case is without accessing default connection file.&lt;br /&gt;
* After prompt user also can add/remove connection from default .xml file.&lt;br /&gt;
[[File:ConnectionMgr.png|600px|Connection manager in g.gui.cswbrowser]]&lt;br /&gt;
&lt;br /&gt;
=== Searching ===&lt;br /&gt;
Before fetching data from selected csw server is proper to set up searching filter. Searching can be restricted by:&lt;br /&gt;
* DCMI Type (Collection , Dataset , Event , Image , InteractiveResource , MovingImage , PhysicalObject , Service , Software , Sound , StillImage , Text)&lt;br /&gt;
* Area(bounding box)&lt;br /&gt;
** current GRASS GIS computation region&lt;br /&gt;
** manually &lt;br /&gt;
* Keywords&lt;br /&gt;
** basic filter allows to use basic or advance keyword filtering. In the simple case user can define single keywords or multiple keywords with button &amp;quot;+&amp;quot;. Logic operator between keywords is AND(&amp;amp;).&lt;br /&gt;
** second, advanced is based on OGC list of expressions which means that can be set filter with logic relations between keywords or sets of keywords. Dialogue for settings keywords text string is under &amp;quot;Advanced&amp;quot; check-box. Syntax of constraints is based on python list syntax. Each keywords must be in braces&lt;br /&gt;
[[File:Find1.png|600px|g.gui.cswbrowser, searching page]]&lt;br /&gt;
==== Advanced keywords filtering ====&lt;br /&gt;
On the left panel of Browser is placed check-box named &amp;quot;Advance&amp;quot;. The keywords advanced dialogue allows to use basic bool operations.&lt;br /&gt;
&lt;br /&gt;
*OR condition&lt;br /&gt;
     a || b || c&lt;br /&gt;
     [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;]&lt;br /&gt;
*AND condition&lt;br /&gt;
     a &amp;amp;&amp;amp; b &amp;amp;&amp;amp; c&lt;br /&gt;
     [ [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;] ]&lt;br /&gt;
*composition&lt;br /&gt;
     (a &amp;amp;&amp;amp; b) || c || d || e&lt;br /&gt;
     [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],[&amp;quot;c&amp;quot;],[&amp;quot;d&amp;quot;],[&amp;quot;e&amp;quot;]] or [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;,&amp;quot;e&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
=== Browsing results===&lt;br /&gt;
On the bottom of Browser is a controller for browsing results. The data from server are fetched by number of items per one transaction. Default is a 20 items. After selection of item in the result table, metadata of record should be displayed. Browser automatically enables buttons on the top of Browser if WMS, WCS or WFS services are available.&lt;br /&gt;
&lt;br /&gt;
=== Setting up csw server ===&lt;br /&gt;
&lt;br /&gt;
== CSW server management ==&lt;br /&gt;
wx.metadata package includes tools for establishing and handling pycsw server. Pycsw stuff consist:&lt;br /&gt;
*db.csw.admin &lt;br /&gt;
*db.csw.run&lt;br /&gt;
*db.csw.harvest&lt;br /&gt;
&lt;br /&gt;
For handling pycsw server can be use standard pythons scripts from pycsw install directory or mentioned three modules.&lt;br /&gt;
&lt;br /&gt;
== Installation and configuration csw server ==&lt;br /&gt;
* Installation pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
** installation may be e.g.to default path taken from configure file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cd /var/www/pycsw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*deploying pycsw&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
        $ git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
        $ pip install -e . &amp;amp;&amp;amp; pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Create and adjust a configuration file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
        $ cp default-sample.cfg default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* adjust parameters in ''default.cfg''&lt;br /&gt;
** '''server.home''' - path to installation directory&lt;br /&gt;
** '''repository.database''' - path to SQLite database e.g. $GISDBASE/WGS84/PERMANENT/sqlite/sqlite.db&lt;br /&gt;
** set '''server.url''' to: http://localhost:8000/&lt;br /&gt;
&lt;br /&gt;
*Setup the database(creates tables, indexes, etc.)&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**with module db.csw.admin from GRASS GIS. Flag -s and parameter configure with path to configure file. Path to database is automatically taken from configure file.&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -s configure=/var/www/html/pycsw/default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Load records:&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**db.csw.admin module with parameter -r for load recursively&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -r configure=/var/www/html/pycsw/default.cfg load_records=path/to/xml&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Run the server&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python csw.wsgi&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**db.csw.admin module with parameter path and port&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.run path=/var/www/html/pycsw port=8000&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creation of custom ISO based profile =&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
== The first braces ==&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
== Initialize of OWSLib objects ==&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
== Single element ==&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Loop or Condition statements ==&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== The second braces ==&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
== Examples of template ==&lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21807</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21807"/>
		<updated>2015-08-20T12:52:41Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== Catalogue Service for the Web ==&lt;br /&gt;
[http://www.opengeospatial.org/standards/cat]Catalogue services support the ability to publish and search collections of descriptive information (metadata) for data, services, and related information objects. Metadata in catalogues represent resource characteristics that can be queried and presented for evaluation and further processing by both humans and software. Catalogue services are required to support the discovery and binding to registered information resources within an information community. &lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014/2015 is currently available in GRASS add-ons. &lt;br /&gt;
* Package for creating and editing metadata according to EN ISO 19115, described here, consists of few modules. Modules r.info.iso, v.info.iso and t.info.iso are command line based and support conversion from current native metadata management (r.info, v.info,t.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata. For &lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
* Package also includs modue g.gui.cswbrowser for searching and browsing metadata catalog(csw). For advanced users there are few modeles for establishing and handling pycsw server:&lt;br /&gt;
 * db.csw.admin - module for administration of pycsw server&lt;br /&gt;
 * db.csw.run - module for starting server on localhost&lt;br /&gt;
 * db.csw.harvest - modul for harvesting metadata between two csw.&lt;br /&gt;
&lt;br /&gt;
= Requirements and installation =&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
sudo pip install -e . &amp;amp;&amp;amp; sudo pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* owslib package - development version (OGC CSW client implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja2 (one of the most used template engines for Python)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating and editing metadata =&lt;br /&gt;
== Naming of metadata files and storage ==&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
== Metadata profile ==&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles(Basic and Inspire). Editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are three build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile''' fulfills the criteria of INSPIRE profile. In case if is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
* '''The temporal profile''' is based on the Grass basic profile and includes additional specific attributes for Temporal framework.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso, v.info.iso t.info.iso ==&lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
Tooltip function helps to fill in the form correctly.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
=== Fetching values from database backand ===&lt;br /&gt;
Editor automaticaly fetch keywords from SQLite GRASS GIS backend. Three well know dictionaries are added by default. User can manualy add dictionaries by sql commands. &lt;br /&gt;
Dictionaries are stored in table ''metadata_themes''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ teble metadta_themes&lt;br /&gt;
! Attribut&lt;br /&gt;
| title&lt;br /&gt;
| keyword&lt;br /&gt;
| date_iso&lt;br /&gt;
| date_type&lt;br /&gt;
|-&lt;br /&gt;
! Date type&lt;br /&gt;
| TEXT || TEXT|| TEXT|| TEXT&lt;br /&gt;
|-&lt;br /&gt;
! Example&lt;br /&gt;
|Example || GEMET - Concepts, version || 2010-01-13 || publication&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:Keywords.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Exporting metadata reports to format PDF ===&lt;br /&gt;
This funciton allows to export metadata of GRASS maps to report in pdf format. The report template is based on INSPIRE profile. Unknown values of metadta atributes are filled by text $UNKNOWN.&lt;br /&gt;
[[Image:Pdfexp.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
{{YouTube|V7tgOOuRyuA}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GRASS metadata map editor ===&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
=== External metadata editor ===&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* EPSG code must by added in url format. Information of projection is added only if EPSG code is known or if GDAL function for identifying from WKT is succesful.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
  &amp;lt;gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
      &amp;lt;gmd:RS_Identifier&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:code&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;http://www.opengis.net/def/crs/EPSG/0/3035&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:code&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:codeSpace&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;INSPIRE RS registry&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:codeSpace&amp;gt;&lt;br /&gt;
      &amp;lt;/gmd:RS_Identifier&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
  &amp;lt;/gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
&amp;lt;/gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Tools for working with metadata catalogue (csw) =&lt;br /&gt;
== Browsing and searching -g.gui.cswbrowser ==&lt;br /&gt;
Module g.gui.cswbrowser(Browser) based graphical interface allows managing csw connections, setting filter and searching, browsing results and adding services to GRASS GIS.&lt;br /&gt;
=== Connection manager ===&lt;br /&gt;
Connection manager allows: &lt;br /&gt;
* adding&lt;br /&gt;
* removing&lt;br /&gt;
* loading list of connections from file. &lt;br /&gt;
By default the Browser is initialized by list of few well known csw providers of csw. Button &amp;quot;Service info&amp;quot; shows metadata of the service.&lt;br /&gt;
User can manage connection in two ways:&lt;br /&gt;
* First one is with using hidden storage provided by [http://wxpython.org/Phoenix/docs/html/ConfigBase.html ​wx.Config]. This case is without accessing default connection file.&lt;br /&gt;
* After prompt user also can add/remove connection from default .xml file.&lt;br /&gt;
[[File:ConnectionMgr.png|600px|Connection manager in g.gui.cswbrowser]]&lt;br /&gt;
&lt;br /&gt;
=== Searching ===&lt;br /&gt;
Before fetching data from selected csw server is proper to set up searching filter. Searching can be restricted by:&lt;br /&gt;
* DCMI Type (Collection , Dataset , Event , Image , InteractiveResource , MovingImage , PhysicalObject , Service , Software , Sound , StillImage , Text)&lt;br /&gt;
* Area(bounding box)&lt;br /&gt;
** current GRASS GIS computation region&lt;br /&gt;
** manually &lt;br /&gt;
* Keywords&lt;br /&gt;
** basic filter allows to use basic or advance keyword filtering. In the simple case user can define single keywords or multiple keywords with button &amp;quot;+&amp;quot;. Logic operator between keywords is AND(&amp;amp;).&lt;br /&gt;
** second, advanced is based on OGC list of expressions which means that can be set filter with logic relations between keywords or sets of keywords. Dialogue for settings keywords text string is under &amp;quot;Advanced&amp;quot; check-box. Syntax of constraints is based on python list syntax. Each keywords must be in braces&lt;br /&gt;
[[File:Find1.png|600px|g.gui.cswbrowser, searching page]]&lt;br /&gt;
==== Advanced keywords filtering ====&lt;br /&gt;
On the left panel of Browser is placed check-box named &amp;quot;Advance&amp;quot;. The keywords advanced dialogue allows to use basic bool operations.&lt;br /&gt;
&lt;br /&gt;
*OR condition&lt;br /&gt;
     a || b || c&lt;br /&gt;
     [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;]&lt;br /&gt;
*AND condition&lt;br /&gt;
     a &amp;amp;&amp;amp; b &amp;amp;&amp;amp; c&lt;br /&gt;
     [ [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;] ]&lt;br /&gt;
*composition&lt;br /&gt;
     (a &amp;amp;&amp;amp; b) || c || d || e&lt;br /&gt;
     [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],[&amp;quot;c&amp;quot;],[&amp;quot;d&amp;quot;],[&amp;quot;e&amp;quot;]] or [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;,&amp;quot;e&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
=== Browsing results===&lt;br /&gt;
On the bottom of Browser is a controller for browsing results. The data from server are fetched by number of items per one transaction. Default is a 20 items. After selection of item in the result table, metadata of record should be displayed. Browser automatically enables buttons on the top of Browser if WMS, WCS or WFS services are available.&lt;br /&gt;
&lt;br /&gt;
=== Setting up csw server ===&lt;br /&gt;
== CSW server management ==&lt;br /&gt;
wx.metadata package includes tools for establishing and handling pycsw server. Pycsw stuff consist:&lt;br /&gt;
*db.csw.admin &lt;br /&gt;
*db.csw.run&lt;br /&gt;
*db.csw.harvest&lt;br /&gt;
&lt;br /&gt;
For handling pycsw server can be use standard pythons scripts from pycsw install directory or mentioned three modules.&lt;br /&gt;
&lt;br /&gt;
== Installation and configuration csw server ==&lt;br /&gt;
* Installation pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
** installation may be e.g.to default path taken from configure file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cd /var/www/pycsw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*deploying pycsw&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
        $ git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
        $ pip install -e . &amp;amp;&amp;amp; pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Create and adjust a configuration file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
        $ cp default-sample.cfg default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* adjust parameters in ''default.cfg''&lt;br /&gt;
** '''server.home''' - path to installation directory&lt;br /&gt;
** '''repository.database''' - path to SQLite database e.g. $GISDBASE/WGS84/PERMANENT/sqlite/sqlite.db&lt;br /&gt;
** set '''server.url''' to: http://localhost:8000/&lt;br /&gt;
&lt;br /&gt;
*Setup the database(creates tables, indexes, etc.)&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**with module db.csw.admin from GRASS GIS. Flag -s and parameter configure with path to configure file. Path to database is automatically taken from configure file.&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -s configure=/var/www/html/pycsw/default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Load records:&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**db.csw.admin module with parameter -r for load recursively&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -r configure=/var/www/html/pycsw/default.cfg load_records=path/to/xml&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Run the server&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python csw.wsgi&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**db.csw.admin module with parameter path and port&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.run path=/var/www/html/pycsw port=8000&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creation of custom ISO based profile =&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
== The first braces ==&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
== Initialize of OWSLib objects ==&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
== Single element ==&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Loop or Condition statements ==&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== The second braces ==&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
== Examples of template ==&lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21806</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21806"/>
		<updated>2015-08-20T12:48:42Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* Setting up csw server- db.csw.admin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== Catalogue Service for the Web ==&lt;br /&gt;
[http://www.opengeospatial.org/standards/cat]Catalogue services support the ability to publish and search collections of descriptive information (metadata) for data, services, and related information objects. Metadata in catalogues represent resource characteristics that can be queried and presented for evaluation and further processing by both humans and software. Catalogue services are required to support the discovery and binding to registered information resources within an information community. &lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014/2015 is currently available in GRASS add-ons. &lt;br /&gt;
* Package for creating and editing metadata according to EN ISO 19115, described here, consists of few modules. Modules r.info.iso, v.info.iso and t.info.iso are command line based and support conversion from current native metadata management (r.info, v.info,t.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata. For &lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
* Package also includs modue g.gui.cswbrowser for searching and browsing metadata catalog(csw). For advanced users there are few modeles for establishing and handling pycsw server:&lt;br /&gt;
 * db.csw.admin - module for administration of pycsw server&lt;br /&gt;
 * db.csw.run - module for starting server on localhost&lt;br /&gt;
 * db.csw.harvest - modul for harvesting metadata between two csw.&lt;br /&gt;
&lt;br /&gt;
= Requirements and installation =&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
sudo pip install -e . &amp;amp;&amp;amp; sudo pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* owslib package - development version (OGC CSW client implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja2 (one of the most used template engines for Python)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating and editing metadata =&lt;br /&gt;
== Naming of metadata files and storage ==&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
== Metadata profile ==&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles(Basic and Inspire). Editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are three build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile''' fulfills the criteria of INSPIRE profile. In case if is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
* '''The temporal profile''' is based on the Grass basic profile and includes additional specific attributes for Temporal framework.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso, v.info.iso t.info.iso ==&lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
Tooltip function helps to fill in the form correctly.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
=== Fetching values from database backand ===&lt;br /&gt;
Editor automaticaly fetch keywords from SQLite GRASS GIS backend. Three well know dictionaries are added by default. User can manualy add dictionaries by sql commands. &lt;br /&gt;
Dictionaries are stored in table ''metadata_themes''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ teble metadta_themes&lt;br /&gt;
! Attribut&lt;br /&gt;
| title&lt;br /&gt;
| keyword&lt;br /&gt;
| date_iso&lt;br /&gt;
| date_type&lt;br /&gt;
|-&lt;br /&gt;
! Date type&lt;br /&gt;
| TEXT || TEXT|| TEXT|| TEXT&lt;br /&gt;
|-&lt;br /&gt;
! Example&lt;br /&gt;
|Example || GEMET - Concepts, version || 2010-01-13 || publication&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:Keywords.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Exporting metadata reports to format PDF ===&lt;br /&gt;
This funciton allows to export metadata of GRASS maps to report in pdf format. The report template is based on INSPIRE profile. Unknown values of metadta atributes are filled by text $UNKNOWN.&lt;br /&gt;
[[Image:Pdfexp.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
{{YouTube|V7tgOOuRyuA}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GRASS metadata map editor ===&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
=== External metadata editor ===&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* EPSG code must by added in url format. Information of projection is added only if EPSG code is known or if GDAL function for identifying from WKT is succesful.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
  &amp;lt;gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
      &amp;lt;gmd:RS_Identifier&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:code&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;http://www.opengis.net/def/crs/EPSG/0/3035&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:code&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:codeSpace&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;INSPIRE RS registry&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:codeSpace&amp;gt;&lt;br /&gt;
      &amp;lt;/gmd:RS_Identifier&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
  &amp;lt;/gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
&amp;lt;/gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Tools for working with metadata catalogue (csw) =&lt;br /&gt;
== Browsing and searching -g.gui.cswbrowser ==&lt;br /&gt;
Module g.gui.cswbrowser(Browser) based graphical interface allows managing csw connections, setting filter and searching, browsing results and adding services to GRASS GIS.&lt;br /&gt;
=== Connection manager ===&lt;br /&gt;
Connection manager allows: &lt;br /&gt;
* adding&lt;br /&gt;
* removing&lt;br /&gt;
* loading list of connections from file. &lt;br /&gt;
By default the Browser is initialized by list of few well known csw providers of csw. Button &amp;quot;Service info&amp;quot; shows metadata of the service.&lt;br /&gt;
User can manage connection in two ways:&lt;br /&gt;
* First one is with using hidden storage provided by [http://wxpython.org/Phoenix/docs/html/ConfigBase.html ​wx.Config]. This case is without accessing default connection file.&lt;br /&gt;
* After prompt user also can add/remove connection from default .xml file.&lt;br /&gt;
[[File:ConnectionMgr.png|600px|Connection manager in g.gui.cswbrowser]]&lt;br /&gt;
&lt;br /&gt;
=== Searching ===&lt;br /&gt;
Before fetching data from selected csw server is proper to set up searching filter. Searching can be restricted by:&lt;br /&gt;
* DCMI Type (Collection , Dataset , Event , Image , InteractiveResource , MovingImage , PhysicalObject , Service , Software , Sound , StillImage , Text)&lt;br /&gt;
* Area(bounding box)&lt;br /&gt;
** current GRASS GIS computation region&lt;br /&gt;
** manually &lt;br /&gt;
* Keywords&lt;br /&gt;
** basic filter allows to use basic or advance keyword filtering. In the simple case user can define single keywords or multiple keywords with button &amp;quot;+&amp;quot;. Logic operator between keywords is AND(&amp;amp;).&lt;br /&gt;
** second, advanced is based on OGC list of expressions which means that can be set filter with logic relations between keywords or sets of keywords. Dialogue for settings keywords text string is under &amp;quot;Advanced&amp;quot; check-box. Syntax of constraints is based on python list syntax. Each keywords must be in braces&lt;br /&gt;
[[File:Find1.png|600px|g.gui.cswbrowser, searching page]]&lt;br /&gt;
==== Advanced keywords filtering ====&lt;br /&gt;
On the left panel of Browser is placed check-box named &amp;quot;Advance&amp;quot;. The keywords advanced dialogue allows to use basic bool operations.&lt;br /&gt;
&lt;br /&gt;
*OR condition&lt;br /&gt;
     a || b || c&lt;br /&gt;
     [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;]&lt;br /&gt;
*AND condition&lt;br /&gt;
     a &amp;amp;&amp;amp; b &amp;amp;&amp;amp; c&lt;br /&gt;
     [ [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;] ]&lt;br /&gt;
*composition&lt;br /&gt;
     (a &amp;amp;&amp;amp; b) || c || d || e&lt;br /&gt;
     [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],[&amp;quot;c&amp;quot;],[&amp;quot;d&amp;quot;],[&amp;quot;e&amp;quot;]] or [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;,&amp;quot;e&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
=== Browsing results===&lt;br /&gt;
On the bottom of Browser is a controller for browsing results. The data from server are fetched by number of items per one transaction. Default is a 20 items. After selection of item in the result table, metadata of record should be displayed. Browser automatically enables buttons on the top of Browser if WMS, WCS or WFS services are available.&lt;br /&gt;
&lt;br /&gt;
== CSW server management ==&lt;br /&gt;
wx.metadata package includes tools for establishing and handling pycsw server. Pycsw stuff consist:&lt;br /&gt;
*db.csw.admin &lt;br /&gt;
*db.csw.run&lt;br /&gt;
*db.csw.harvest&lt;br /&gt;
=== Setting up csw server ===&lt;br /&gt;
== CSW server management ==&lt;br /&gt;
wx.metadata package includes tools for establishing and handling pycsw server. Pycsw stuff consist:&lt;br /&gt;
*db.csw.admin &lt;br /&gt;
*db.csw.run&lt;br /&gt;
*db.csw.harvest&lt;br /&gt;
&lt;br /&gt;
=== Installation and configuration csw server ===&lt;br /&gt;
* Installation pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
** installation may be e.g.to default path taken from configure file&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ cd /var/www/pycsw&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*deploying pycsw&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
        $ git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
        $ pip install -e . &amp;amp;&amp;amp; pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Create and adjust a configuration file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
        $ cp default-sample.cfg default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* adjust parameters in ''default.cfg''&lt;br /&gt;
** '''server.home''' - path to installation directory&lt;br /&gt;
** '''repository.database''' - path to SQLite database e.g. $GISDBASE/WGS84/PERMANENT/sqlite/sqlite.db&lt;br /&gt;
** set '''server.url''' to: http://localhost:8000/&lt;br /&gt;
&lt;br /&gt;
*Setup the database(creates tables, indexes, etc.)&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**with module db.csw.admin from GRASS GIS. Flag -s and parameter configure with path to configure file. Path to database is automatically taken from configure file.&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -s configure=/var/www/html/pycsw/default.cfg&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Load records:&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
pycsw-admin.py -c load_records -f default.cfg -p /path/to/xml/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
**db.csw.admin module with parameter -r for load recursively&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.admin -r configure=/var/www/html/pycsw/default.cfg load_records=path/to/xml&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Run the server&lt;br /&gt;
**with unix command line(in pycsw install dir)&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python csw.wsgi&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
**db.csw.admin module with parameter path and port&lt;br /&gt;
***&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
db.csw.run path=/var/www/html/pycsw port=8000&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creation of custom ISO based profile =&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
== The first braces ==&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
== Initialize of OWSLib objects ==&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
== Single element ==&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Loop or Condition statements ==&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== The second braces ==&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
== Examples of template ==&lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21785</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21785"/>
		<updated>2015-08-14T15:29:29Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* Tools for working with metadata catalogue (csw) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== Catalogue Service for the Web ==&lt;br /&gt;
[http://www.opengeospatial.org/standards/cat]Catalogue services support the ability to publish and search collections of descriptive information (metadata) for data, services, and related information objects. Metadata in catalogues represent resource characteristics that can be queried and presented for evaluation and further processing by both humans and software. Catalogue services are required to support the discovery and binding to registered information resources within an information community. &lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014/2015 is currently available in GRASS add-ons. &lt;br /&gt;
* Package for creating and editing metadata according to EN ISO 19115, described here, consists of few modules. Modules r.info.iso, v.info.iso and t.info.iso are command line based and support conversion from current native metadata management (r.info, v.info,t.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata. For &lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
* Package also includs modue g.gui.cswbrowser for searching and browsing metadata catalog(csw). For advanced users there are few modeles for establishing and handling pycsw server:&lt;br /&gt;
 * db.csw.admin - module for administration of pycsw server&lt;br /&gt;
 * db.csw.run - module for starting server on localhost&lt;br /&gt;
 * db.csw.harvest - modul for harvesting metadata between two csw.&lt;br /&gt;
&lt;br /&gt;
= Requirements and installation =&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
pip install -e . &amp;amp;&amp;amp; pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* owslib package - development version (OGC CSW client implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja2 (one of the most used template engines for Python)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating and editing metadata =&lt;br /&gt;
== Naming of metadata files and storage ==&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
== Metadata profile ==&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles(Basic and Inspire). Editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are three build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile''' fulfills the criteria of INSPIRE profile. In case if is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
* '''The temporal profile''' is based on the Grass basic profile and includes additional specific attributes for Temporal framework.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso, v.info.iso t.info.iso ==&lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
Tooltip function helps to fill in the form correctly.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
=== Fetching values from database backand ===&lt;br /&gt;
Editor automaticaly fetch keywords from SQLite GRASS GIS backend. Three well know dictionaries are added by default. User can manualy add dictionaries by sql commands. &lt;br /&gt;
Dictionaries are stored in table ''metadata_themes''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ teble metadta_themes&lt;br /&gt;
! Attribut&lt;br /&gt;
| title&lt;br /&gt;
| keyword&lt;br /&gt;
| date_iso&lt;br /&gt;
| date_type&lt;br /&gt;
|-&lt;br /&gt;
! Date type&lt;br /&gt;
| TEXT || TEXT|| TEXT|| TEXT&lt;br /&gt;
|-&lt;br /&gt;
! Example&lt;br /&gt;
|Example || GEMET - Concepts, version || 2010-01-13 || publication&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:Keywords.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Exporting metadata reports to format PDF ===&lt;br /&gt;
This funciton allows to export metadata of GRASS maps to report in pdf format. The report template is based on INSPIRE profile. Unknown values of metadta atributes are filled by text $UNKNOWN.&lt;br /&gt;
[[Image:Pdfexp.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
{{YouTube|V7tgOOuRyuA}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GRASS metadata map editor ===&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
=== External metadata editor ===&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* EPSG code must by added in url format. Information of projection is added only if EPSG code is known or if GDAL function for identifying from WKT is succesful.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
  &amp;lt;gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
      &amp;lt;gmd:RS_Identifier&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:code&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;http://www.opengis.net/def/crs/EPSG/0/3035&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:code&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:codeSpace&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;INSPIRE RS registry&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:codeSpace&amp;gt;&lt;br /&gt;
      &amp;lt;/gmd:RS_Identifier&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
  &amp;lt;/gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
&amp;lt;/gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Tools for working with metadata catalogue (csw) =&lt;br /&gt;
== Browsing and searching -g.gui.cswbrowser ==&lt;br /&gt;
Module g.gui.cswbrowser(Browser) based graphical interface allows managing csw connections, setting filter and searching, browsing results and adding services to GRASS GIS.&lt;br /&gt;
=== Connection manager ===&lt;br /&gt;
Connection manager allows: &lt;br /&gt;
* adding&lt;br /&gt;
* removing&lt;br /&gt;
* loading list of connections from file. &lt;br /&gt;
By default the Browser is initialized by list of few well known csw providers of csw. Button &amp;quot;Service info&amp;quot; shows metadata of the service.&lt;br /&gt;
User can manage connection in two ways:&lt;br /&gt;
* First one is with using hidden storage provided by [http://wxpython.org/Phoenix/docs/html/ConfigBase.html ​wx.Config]. This case is without accessing default connection file.&lt;br /&gt;
* After prompt user also can add/remove connection from default .xml file.&lt;br /&gt;
[[File:ConnectionMgr.png|600px|Connection manager in g.gui.cswbrowser]]&lt;br /&gt;
&lt;br /&gt;
=== Searching ===&lt;br /&gt;
Before fetching data from selected csw server is proper to set up searching filter. Searching can be restricted by:&lt;br /&gt;
* DCMI Type (Collection , Dataset , Event , Image , InteractiveResource , MovingImage , PhysicalObject , Service , Software , Sound , StillImage , Text)&lt;br /&gt;
* Area(bounding box)&lt;br /&gt;
** current GRASS GIS computation region&lt;br /&gt;
** manually &lt;br /&gt;
* Keywords&lt;br /&gt;
** basic filter allows to use basic or advance keyword filtering. In the simple case user can define single keywords or multiple keywords with button &amp;quot;+&amp;quot;. Logic operator between keywords is AND(&amp;amp;).&lt;br /&gt;
** second, advanced is based on OGC list of expressions which means that can be set filter with logic relations between keywords or sets of keywords. Dialogue for settings keywords text string is under &amp;quot;Advanced&amp;quot; check-box. Syntax of constraints is based on python list syntax. Each keywords must be in braces&lt;br /&gt;
[[File:Find1.png|600px|g.gui.cswbrowser, searching page]]&lt;br /&gt;
==== Advanced keywords filtering ====&lt;br /&gt;
On the left panel of Browser is placed check-box named &amp;quot;Advance&amp;quot;. The keywords advanced dialogue allows to use basic bool operations.&lt;br /&gt;
&lt;br /&gt;
*OR condition&lt;br /&gt;
     a || b || c&lt;br /&gt;
     [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;]&lt;br /&gt;
*AND condition&lt;br /&gt;
     a &amp;amp;&amp;amp; b &amp;amp;&amp;amp; c&lt;br /&gt;
     [ [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;] ]&lt;br /&gt;
*composition&lt;br /&gt;
     (a &amp;amp;&amp;amp; b) || c || d || e&lt;br /&gt;
     [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],[&amp;quot;c&amp;quot;],[&amp;quot;d&amp;quot;],[&amp;quot;e&amp;quot;]] or [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;,&amp;quot;e&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
=== Browsing results===&lt;br /&gt;
On the bottom of Browser is a controller for browsing results. The data from server are fetched by number of items per one transaction. Default is a 20 items. After selection of item in the result table, metadata of record should be displayed. Browser automatically enables buttons on the top of Browser if WMS, WCS or WFS services are available.&lt;br /&gt;
&lt;br /&gt;
== CSW server management ==&lt;br /&gt;
wx.metadata package includes tools for establishing and handling pycsw server. Pycsw stuff consist:&lt;br /&gt;
*db.csw.admin &lt;br /&gt;
*db.csw.run&lt;br /&gt;
*db.csw.harvest&lt;br /&gt;
=== Setting up csw server- db.csw.admin ===&lt;br /&gt;
&lt;br /&gt;
= Creation of custom ISO based profile =&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
== The first braces ==&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
== Initialize of OWSLib objects ==&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
== Single element ==&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Loop or Condition statements ==&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== The second braces ==&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
== Examples of template ==&lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21784</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21784"/>
		<updated>2015-08-14T14:15:08Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: g.gui.cswbrowser&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== Catalogue Service for the Web ==&lt;br /&gt;
[http://www.opengeospatial.org/standards/cat]Catalogue services support the ability to publish and search collections of descriptive information (metadata) for data, services, and related information objects. Metadata in catalogues represent resource characteristics that can be queried and presented for evaluation and further processing by both humans and software. Catalogue services are required to support the discovery and binding to registered information resources within an information community. &lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014/2015 is currently available in GRASS add-ons. &lt;br /&gt;
* Package for creating and editing metadata according to EN ISO 19115, described here, consists of few modules. Modules r.info.iso, v.info.iso and t.info.iso are command line based and support conversion from current native metadata management (r.info, v.info,t.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata. For &lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
* Package also includs modue g.gui.cswbrowser for searching and browsing metadata catalog(csw). For advanced users there are few modeles for establishing and handling pycsw server:&lt;br /&gt;
 * db.csw.admin - module for administration of pycsw server&lt;br /&gt;
 * db.csw.run - module for starting server on localhost&lt;br /&gt;
 * db.csw.harvest - modul for harvesting metadata between two csw.&lt;br /&gt;
&lt;br /&gt;
= Requirements and installation =&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
pip install -e . &amp;amp;&amp;amp; pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* owslib package - development version (OGC CSW client implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja2 (one of the most used template engines for Python)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating and editing metadata =&lt;br /&gt;
== Naming of metadata files and storage ==&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
== Metadata profile ==&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles(Basic and Inspire). Editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are three build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile''' fulfills the criteria of INSPIRE profile. In case if is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
* '''The temporal profile''' is based on the Grass basic profile and includes additional specific attributes for Temporal framework.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso, v.info.iso t.info.iso ==&lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
Tooltip function helps to fill in the form correctly.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
=== Fetching values from database backand ===&lt;br /&gt;
Editor automaticaly fetch keywords from SQLite GRASS GIS backend. Three well know dictionaries are added by default. User can manualy add dictionaries by sql commands. &lt;br /&gt;
Dictionaries are stored in table ''metadata_themes''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ teble metadta_themes&lt;br /&gt;
! Attribut&lt;br /&gt;
| title&lt;br /&gt;
| keyword&lt;br /&gt;
| date_iso&lt;br /&gt;
| date_type&lt;br /&gt;
|-&lt;br /&gt;
! Date type&lt;br /&gt;
| TEXT || TEXT|| TEXT|| TEXT&lt;br /&gt;
|-&lt;br /&gt;
! Example&lt;br /&gt;
|Example || GEMET - Concepts, version || 2010-01-13 || publication&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:Keywords.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Exporting metadata reports to format PDF ===&lt;br /&gt;
This funciton allows to export metadata of GRASS maps to report in pdf format. The report template is based on INSPIRE profile. Unknown values of metadta atributes are filled by text $UNKNOWN.&lt;br /&gt;
[[Image:Pdfexp.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
{{YouTube|V7tgOOuRyuA}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GRASS metadata map editor ===&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
=== External metadata editor ===&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* EPSG code must by added in url format. Information of projection is added only if EPSG code is known or if GDAL function for identifying from WKT is succesful.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
  &amp;lt;gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
      &amp;lt;gmd:RS_Identifier&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:code&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;http://www.opengis.net/def/crs/EPSG/0/3035&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:code&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:codeSpace&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;INSPIRE RS registry&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:codeSpace&amp;gt;&lt;br /&gt;
      &amp;lt;/gmd:RS_Identifier&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
  &amp;lt;/gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
&amp;lt;/gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Tools for working with metadata catalogue (csw) =&lt;br /&gt;
== Browsing and searching(g.gui.cswbrowser) ==&lt;br /&gt;
Module g.gui.cswbrowser(Browser) based graphical interface allows managing csw connections, setting filter and searching, browsing results and adding services to GRASS GIS.&lt;br /&gt;
=== Connection manager ===&lt;br /&gt;
Connection manager allows: &lt;br /&gt;
* adding&lt;br /&gt;
* removing&lt;br /&gt;
* loading list of connections from file. &lt;br /&gt;
By default the Browser is initialized by list of few well known csw providers of csw. Button &amp;quot;Service info&amp;quot; shows metadata of the service.&lt;br /&gt;
User can manage connection in two ways:&lt;br /&gt;
* First one is with using hidden storage provided by [http://wxpython.org/Phoenix/docs/html/ConfigBase.html ​wx.Config]. This case is without accessing default connection file.&lt;br /&gt;
* After prompt user also can add/remove connection from default .xml file.&lt;br /&gt;
[[File:ConnectionMgr.png|600px|Connection manager in g.gui.cswbrowser]]&lt;br /&gt;
&lt;br /&gt;
=== Searching ===&lt;br /&gt;
Before fetching data from selected csw server is proper to set up searching filter. Searching can be restricted by:&lt;br /&gt;
* DCMI Type (Collection , Dataset , Event , Image , InteractiveResource , MovingImage , PhysicalObject , Service , Software , Sound , StillImage , Text)&lt;br /&gt;
* Area(bounding box)&lt;br /&gt;
** current GRASS GIS computation region&lt;br /&gt;
** manually &lt;br /&gt;
* Keywords&lt;br /&gt;
** basic filter allows to use basic or advance keyword filtering. In the simple case user can define single keywords or multiple keywords with button &amp;quot;+&amp;quot;. Logic operator between keywords is AND(&amp;amp;).&lt;br /&gt;
** second, advanced is based on OGC list of expressions which means that can be set filter with logic relations between keywords or sets of keywords. Dialogue for settings keywords text string is under &amp;quot;Advanced&amp;quot; check-box. Syntax of constraints is based on python list syntax. Each keywords must be in braces&lt;br /&gt;
[[File:Find1.png|600px|g.gui.cswbrowser, searching page]]&lt;br /&gt;
==== Advanced keywords filtering ====&lt;br /&gt;
On the left panel of Browser is placed check-box named &amp;quot;Advance&amp;quot;. The keywords advanced dialogue allows to use basic bool operations.&lt;br /&gt;
&lt;br /&gt;
*OR condition&lt;br /&gt;
     a || b || c&lt;br /&gt;
     [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;]&lt;br /&gt;
*AND condition&lt;br /&gt;
     a &amp;amp;&amp;amp; b &amp;amp;&amp;amp; c&lt;br /&gt;
     [ [&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;,&amp;quot;c&amp;quot;] ]&lt;br /&gt;
*composition&lt;br /&gt;
     (a &amp;amp;&amp;amp; b) || c || d || e&lt;br /&gt;
     [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],[&amp;quot;c&amp;quot;],[&amp;quot;d&amp;quot;],[&amp;quot;e&amp;quot;]] or [[&amp;quot;a&amp;quot;,&amp;quot;b&amp;quot;],&amp;quot;c&amp;quot;,&amp;quot;d&amp;quot;,&amp;quot;e&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
=== Browsing results===&lt;br /&gt;
On the bottom of Browser is a controller for browsing results. The data from server are fetched by number of items per one transaction. Default is a 20 items. After selection of item in the result table, metadata of record should be displayed. Browser automatically enables buttons on the top of Browser if WMS, WCS or WFS services are available.&lt;br /&gt;
&lt;br /&gt;
= Creation of custom ISO based profile =&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
== The first braces ==&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
== Initialize of OWSLib objects ==&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
== Single element ==&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Loop or Condition statements ==&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== The second braces ==&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
== Examples of template ==&lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=File:Find1.png&amp;diff=21783</id>
		<title>File:Find1.png</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=File:Find1.png&amp;diff=21783"/>
		<updated>2015-08-14T14:08:00Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: g.gui.cswbrowser, searching page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;g.gui.cswbrowser, searching page&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=File:ConnectionMgr.png&amp;diff=21779</id>
		<title>File:ConnectionMgr.png</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=File:ConnectionMgr.png&amp;diff=21779"/>
		<updated>2015-08-14T08:48:10Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: Connection manager of g.gui.cswbrowser&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Connection manager of g.gui.cswbrowser&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21778</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21778"/>
		<updated>2015-08-13T14:08:58Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: rebuild structure&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== Catalogue Service for the Web ==&lt;br /&gt;
[http://www.opengeospatial.org/standards/cat]Catalogue services support the ability to publish and search collections of descriptive information (metadata) for data, services, and related information objects. Metadata in catalogues represent resource characteristics that can be queried and presented for evaluation and further processing by both humans and software. Catalogue services are required to support the discovery and binding to registered information resources within an information community. &lt;br /&gt;
&lt;br /&gt;
= About =&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014/2015 is currently available in GRASS add-ons. &lt;br /&gt;
* Package for creating and editing metadata according to EN ISO 19115, described here, consists of few modules. Modules r.info.iso, v.info.iso and t.info.iso are command line based and support conversion from current native metadata management (r.info, v.info,t.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata. For &lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
* Package also includs modue g.gui.cswbrowser for searching and browsing metadata catalog(csw). For advanced users there are few modeles for establishing and handling pycsw server:&lt;br /&gt;
 * db.csw.admin - module for administration of pycsw server&lt;br /&gt;
 * db.csw.run - module for starting server on localhost&lt;br /&gt;
 * db.csw.harvest - modul for harvesting metadata between two csw.&lt;br /&gt;
&lt;br /&gt;
= Requirements and installation =&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
pip install -e . &amp;amp;&amp;amp; pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* owslib package - development version (OGC CSW client implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja2 (one of the most used template engines for Python)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Creating and editing metadata =&lt;br /&gt;
== Naming of metadata files and storage ==&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
== Metadata profile ==&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles(Basic and Inspire). Editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are three build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile''' fulfills the criteria of INSPIRE profile. In case if is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
* '''The temporal profile''' is based on the Grass basic profile and includes additional specific attributes for Temporal framework.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso, v.info.iso t.info.iso ==&lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
Tooltip function helps to fill in the form correctly.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
=== Fetching values from database backand ===&lt;br /&gt;
Editor automaticaly fetch keywords from SQLite GRASS GIS backend. Three well know dictionaries are added by default. User can manualy add dictionaries by sql commands. &lt;br /&gt;
Dictionaries are stored in table ''metadata_themes''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ teble metadta_themes&lt;br /&gt;
! Attribut&lt;br /&gt;
| title&lt;br /&gt;
| keyword&lt;br /&gt;
| date_iso&lt;br /&gt;
| date_type&lt;br /&gt;
|-&lt;br /&gt;
! Date type&lt;br /&gt;
| TEXT || TEXT|| TEXT|| TEXT&lt;br /&gt;
|-&lt;br /&gt;
! Example&lt;br /&gt;
|Example || GEMET - Concepts, version || 2010-01-13 || publication&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:Keywords.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Exporting metadata reports to format PDF ===&lt;br /&gt;
This funciton allows to export metadata of GRASS maps to report in pdf format. The report template is based on INSPIRE profile. Unknown values of metadta atributes are filled by text $UNKNOWN.&lt;br /&gt;
[[Image:Pdfexp.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
{{YouTube|V7tgOOuRyuA}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GRASS metadata map editor ===&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
=== External metadata editor ===&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* EPSG code must by added in url format. Information of projection is added only if EPSG code is known or if GDAL function for identifying from WKT is succesful.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
  &amp;lt;gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
      &amp;lt;gmd:RS_Identifier&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:code&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;http://www.opengis.net/def/crs/EPSG/0/3035&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:code&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:codeSpace&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;INSPIRE RS registry&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:codeSpace&amp;gt;&lt;br /&gt;
      &amp;lt;/gmd:RS_Identifier&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
  &amp;lt;/gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
&amp;lt;/gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Tools for working with metadata catalog =&lt;br /&gt;
== Browsing and searching ==&lt;br /&gt;
GUI based module for managing csw connections, setting filter and searching, browsing results and adding services to GRASS GISS directly is named g.gui.cswbrowser.&lt;br /&gt;
&lt;br /&gt;
= Creation of custom ISO based profile =&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
== The first braces ==&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
== Initialize of OWSLib objects ==&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
== Single element ==&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Loop or Condition statements ==&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
== The second braces ==&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
== Examples of template ==&lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21777</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21777"/>
		<updated>2015-08-13T12:39:16Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: new features of g.gui.metadata(pdf, temporal,sqlite)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014 is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of three modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
== Requirements and installation ==&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
pip install -e . &amp;amp;&amp;amp; pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* owslib package - development version (OGC CSW client implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja2 (one of the most used template engines for Python)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles(Basic and Inspire). Editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are three build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile''' fulfills the criteria of INSPIRE profile. In case if is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
* '''The temporal profile''' is based on the Grass basic profile and includes additional specific attributes for Temporal framework.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
Tooltip function helps to fill in the form correctly.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
=== Fetching values from database backand ===&lt;br /&gt;
Editor automaticaly fetch keywords from SQLite GRASS GIS backend. Three well know dictionaries are added by default. User can manualy add dictionaries by sql commands. &lt;br /&gt;
Dictionaries are stored in table ''metadata_themes''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ teble metadta_themes&lt;br /&gt;
! Attribut&lt;br /&gt;
| title&lt;br /&gt;
| keyword&lt;br /&gt;
| date_iso&lt;br /&gt;
| date_type&lt;br /&gt;
|-&lt;br /&gt;
! Date type&lt;br /&gt;
| TEXT || TEXT|| TEXT|| TEXT&lt;br /&gt;
|-&lt;br /&gt;
! Example&lt;br /&gt;
|Example || GEMET - Concepts, version || 2010-01-13 || publication&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Image:Keywords.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
==== Exporting metadata reports to format PDF ====&lt;br /&gt;
This funciton allows to export metadata of GRASS maps to report in pdf format. The report template is based on INSPIRE profile. Unknown values of metadta atributes are filled by text $UNKNOWN.&lt;br /&gt;
[[Image:Pdfexp.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
{{YouTube|V7tgOOuRyuA}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
==== Video  ====&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
==== Video ====&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Video ====&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* EPSG code must by added in url format. Information of projection is added only if EPSG code is known or if GDAL function for identifying from WKT is succesful.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
  &amp;lt;gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
      &amp;lt;gmd:RS_Identifier&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:code&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;http://www.opengis.net/def/crs/EPSG/0/3035&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:code&amp;gt;&lt;br /&gt;
        &amp;lt;gmd:codeSpace&amp;gt;&lt;br /&gt;
          &amp;lt;gco:CharacterString&amp;gt;INSPIRE RS registry&amp;lt;/gco:CharacterString&amp;gt;&lt;br /&gt;
        &amp;lt;/gmd:codeSpace&amp;gt;&lt;br /&gt;
      &amp;lt;/gmd:RS_Identifier&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:referenceSystemIdentifier&amp;gt;&lt;br /&gt;
  &amp;lt;/gmd:MD_ReferenceSystem&amp;gt;&lt;br /&gt;
&amp;lt;/gmd:referenceSystemInfo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
=== Examples of template === &lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
==== Video tutorial ====&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=File:Pdfexp.png&amp;diff=21776</id>
		<title>File:Pdfexp.png</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=File:Pdfexp.png&amp;diff=21776"/>
		<updated>2015-08-13T11:51:47Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: button for exporting reports to pdf format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;button for exporting reports to pdf format&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=File:Keywords.png&amp;diff=21775</id>
		<title>File:Keywords.png</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=File:Keywords.png&amp;diff=21775"/>
		<updated>2015-08-13T10:23:42Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: Connected gui to Sqlite GRASS db backand&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Connected gui to Sqlite GRASS db backand&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21774</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21774"/>
		<updated>2015-08-13T10:18:41Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* Metadata profile */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014 is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of three modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
== Requirements and installation ==&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
pip install -e . &amp;amp;&amp;amp; pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* owslib package - development version (OGC CSW client implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja2 (one of the most used template engines for Python)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles(Basic and Inspire). Editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are three build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile''' fulfills the criteria of INSPIRE profile. In case if is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
* '''The temporal profile''' is based on the Grass basic profile and includes additional specific attributes for Temporal framework.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
Tooltip function helps to fill in the form correctly.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
==== Video  ====&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
==== Video ====&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Video ====&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
=== Examples of template === &lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
==== Video tutorial ====&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21773</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21773"/>
		<updated>2015-08-13T10:17:15Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014 is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of three modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
== Requirements and installation ==&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
pip install -e . &amp;amp;&amp;amp; pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* owslib package - development version (OGC CSW client implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja2 (one of the most used template engines for Python)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles(Basic and Inspire). Editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are two build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile'''  profile fulfills the criteria of INSPIRE profile. In case if is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
* '''The temporal profile''' is based on the Grass basic profile and includes additional specific attributes for Temporal framework.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
Tooltip function helps to fill in the form correctly.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
==== Video  ====&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
==== Video ====&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Video ====&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
=== Examples of template === &lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
==== Video tutorial ====&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21772</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21772"/>
		<updated>2015-08-13T10:16:53Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: The temporal profile typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014 is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of three modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
== Requirements and installation ==&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
pip install -e . &amp;amp;&amp;amp; pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* owslib package - development version (OGC CSW client implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja2 (one of the most used template engines for Python)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles(Basic and Inspire). Editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are two build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile'''  profile fulfills the criteria of INSPIRE profile. In case if is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
* '''The temporal profile'''is based on the Grass basic profile and includes additional specific attributes for Temporal framework.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
Tooltip function helps to fill in the form correctly.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
==== Video  ====&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
==== Video ====&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Video ====&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
=== Examples of template === &lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
==== Video tutorial ====&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21771</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21771"/>
		<updated>2015-08-13T10:16:19Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: temporal profile&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014 is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of three modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
== Requirements and installation ==&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
pip install -e . &amp;amp;&amp;amp; pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* owslib package - development version (OGC CSW client implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja2 (one of the most used template engines for Python)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles(Basic and Inspire). Editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are two build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile'''  profile fulfills the criteria of INSPIRE profile. In case if is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
* '''The temporal profile''' Temporary profile is based on the Grass basic profile and includes additional specific attributes for Temporal framework.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
Tooltip function helps to fill in the form correctly.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
==== Video  ====&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
==== Video ====&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Video ====&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
=== Examples of template === &lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
==== Video tutorial ====&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21770</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=21770"/>
		<updated>2015-08-13T10:09:06Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* Requirements and installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014 is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of three modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
== Requirements and installation ==&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* pycsw package - development version(OGC CSW server implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone https://github.com/geopython/pycsw.git &amp;amp;&amp;amp; cd pycsw&lt;br /&gt;
pip install -e . &amp;amp;&amp;amp; pip install -r requirements-standalone.txt&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* owslib package - development version (OGC CSW client implementation written in Python):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja2 (one of the most used template engines for Python)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles(Basic and Inspire). Editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are two build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile'''  profile fulfills the criteria of INSPIRE profile. In case it is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
Tooltip function helps to fill in the form correctly.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
==== Video  ====&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
==== Video ====&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Video ====&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
=== Examples of template === &lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
==== Video tutorial ====&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20840</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20840"/>
		<updated>2014-10-05T17:06:47Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014 is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of three modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
== Requirements and installation ==&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package  has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* OWSLib development version ()&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja templates&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installation of metadata management ===&lt;br /&gt;
Currently the wx.metadata package is available in GRASS Add-ons.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GRASS&amp;gt; g.extension wx.metadata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles(Basic and Inspire). Editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are two build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile'''  profile fulfills the criteria of INSPIRE profile. In case it is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
Tooltip function helps to fill in the form correctly.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
==== Video  ====&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
==== Video ====&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Video ====&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
=== Examples of template === &lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
==== Video tutorial ====&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20702</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20702"/>
		<updated>2014-08-23T16:57:01Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{toModify}}&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014 is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of three modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
== Requirements and installation ==&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package  has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* OWSLib development version ()&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja templates&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installation of metadata management ===&lt;br /&gt;
Currently the wx.metadata package is available in GRASS Add-ons.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GRASS&amp;gt; g.extension wx.metadata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles(Basic and Inspire). Editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are two build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile'''  profile fulfills the criteria of INSPIRE profile. In case it is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
Tooltip function helps to fill in the form correctly.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
==== Video  ====&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
==== Video ====&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Video ====&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
=== Examples of template === &lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
==== Video tutorial ====&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20701</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20701"/>
		<updated>2014-08-23T16:55:23Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{toModify}}&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014 is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of three modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
== Requirements and installation ==&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package  has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* OWSLib development version ()&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja templates&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installation of metadata management ===&lt;br /&gt;
Currently the wx.metadata package is available in GRASS Add-ons.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GRASS&amp;gt; g.extension wx.metadata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor. The editor offers the already mentioned two profiles(Basic and Inspire). Editor also supports loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently there are two build-in ISO profiles available: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile'''  profile fulfills the criteria of INSPIRE profile. In case it is not possible to get the values from native GRASS metadata, these are filled with text string '$NULL'. This rule is applied for both profiles.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
For correct filling out form by values can help tooltip function.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
==== Video  ====&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
==== Video ====&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Video ====&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
=== Examples of template === &lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
==== Video tutorial ====&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20700</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20700"/>
		<updated>2014-08-23T16:50:16Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{toModify}}&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014 is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of three modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
== Requirements and installation ==&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package  has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* OWSLib development version ()&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja templates&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installation of metadata management ===&lt;br /&gt;
Currently the wx.metadata package is available in GRASS Add-ons.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GRASS&amp;gt; g.extension wx.metadata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml suffix.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor.  The editor offers the already mentioned two profiles(Basic and Inspire). Editor also support loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently are available two build-in ISO profile: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile'''  profile fulfills the criteria of INSPIRE profile. Values which are not able to get from native GRASS metadata are filled by text string '$NULL'. This rule applies for both profiles.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
For correct filling out form by values can help tooltip function.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
==== Video  ====&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
==== Video ====&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Video ====&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
=== Examples of template === &lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
==== Video tutorial ====&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20699</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20699"/>
		<updated>2014-08-23T16:48:56Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{toModify}}&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014 is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of three modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
== Requirements and installation ==&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package  has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* OWSLib development version ()&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja templates&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installation of metadata management ===&lt;br /&gt;
Currently the wx.metadata package is available in GRASS Add-ons.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GRASS&amp;gt; g.extension wx.metadata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is ''cell'', for vector maps ''vector''. File ends with .xml extension.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor.  The editor offers the already mentioned two profiles(Basic and Inspire). Editor also support loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently are available two build-in ISO profile: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile'''  profile fulfills the criteria of INSPIRE profile. Values which are not able to get from native GRASS metadata are filled by text string '$NULL'. This rule applies for both profiles.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
For correct filling out form by values can help tooltip function.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
==== Video  ====&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
==== Video ====&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Video ====&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
=== Examples of template === &lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
==== Video tutorial ====&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20671</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20671"/>
		<updated>2014-08-19T07:17:10Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* About wx.metadata */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{toModify}}&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 ISO 19115:2003] defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
Wx.metadata which was developed during Google Summer of Code 2014 is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of three modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
== Requirements and installation ==&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package  has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* OWSLib development version ()&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja templates&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installation of metadata management ===&lt;br /&gt;
Currently the wx.metadata package is available in GRASS Add-ons.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GRASS&amp;gt; g.extension wx.metadata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is '''cell''', for vector maps ''vector''. File ends with .xml extension.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor.  The editor offers the already mentioned two profiles(Basic and Inspire). Editor also support loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently are available two build-in ISO profile: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile'''  profile fulfills the criteria of INSPIRE profile. Values which are not able to get from native GRASS metadata are filled by text string '$NULL'. This rule applies for both profiles.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
For correct filling out form by values can help tooltip function.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
==== Video  ====&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
==== Video ====&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Video ====&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
=== Examples of template === &lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
==== Video tutorial ====&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20669</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20669"/>
		<updated>2014-08-18T16:22:22Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{toModify}}&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
ISO 19115:2003(ISO) defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 more]&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
New metadata management is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of three modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
== Requirements and installation ==&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package  has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* OWSLib development version ()&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja templates&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installation of metadata management ===&lt;br /&gt;
Currently the wx.metadata package is available in GRASS Add-ons.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GRASS&amp;gt; g.extension wx.metadata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is '''cell''', for vector maps ''vector''. File ends with .xml extension.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor.  The editor offers the already mentioned two profiles(Basic and Inspire). Editor also support loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently are available two build-in ISO profile: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile'''  profile fulfills the criteria of INSPIRE profile. Values which are not able to get from native GRASS metadata are filled by text string '$NULL'. This rule applies for both profiles.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
For correct filling out form by values can help tooltip function.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
==== Video  ====&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
==== Video ====&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Video ====&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
=== Examples of template === &lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
==== Video tutorial ====&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20666</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20666"/>
		<updated>2014-08-17T13:43:32Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{toModify}}&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
ISO 19115:2003(ISO) defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 more]&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
New metadata management is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of tree modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
== Requirements and installation ==&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package  has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* OWSLib development version ()&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja templates&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installation of metadata management ===&lt;br /&gt;
Currently the wx.metadata package is available in GRASS Add-ons.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GRASS&amp;gt; g.extension wx.metadata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is '''cell''', for vector maps ''vector''. File ends with .xml extension.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor.  The editor offers the already mentioned two profiles(Basic and Inspire). Editor also support loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently are available two build-in ISO profile: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile'''  profile fulfills the criteria of INSPIRE profile. Values which are not able to get from native GRASS metadata are filled by text string '$NULL'. This rule applies for both profiles.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
For correct filling out form by values can help tooltip function.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
==== Video  ====&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
==== Video ====&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Video ====&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
=== Examples of template === &lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
==== Video tutorial ====&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20665</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20665"/>
		<updated>2014-08-17T13:38:10Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* Creation of custom ISO based profile */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{toModify}}&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
ISO 19115:2003(ISO) defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 more]&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
New metadata management is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of tree modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
== Requirements and installation ==&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package  has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* OWSLib development version ()&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja templates&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installation of metadata management ===&lt;br /&gt;
Currently the wx.metadata package is available in GRASS Add-ons.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GRASS&amp;gt; g.extension wx.metadata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is '''cell''', for vector maps ''vector''. File ends with .xml extension.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor.  The editor offers the already mentioned two profiles(Basic and Inspire). Editor also support loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently are available two build-in ISO profile: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile'''  profile fulfills the criteria of INSPIRE profile. Values which are not able to get from native GRASS metadata are filled by text string '$NULL'. This rule applies for both profiles.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
For correct filling out form by values can help tooltip function.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
=== Examples of template === &lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
&lt;br /&gt;
=== Video tutorial ===&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20664</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20664"/>
		<updated>2014-08-17T13:35:32Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* Creation of custom ISO based profile */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{toModify}}&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
ISO 19115:2003(ISO) defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 more]&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
New metadata management is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of tree modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
== Requirements and installation ==&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package  has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* OWSLib development version ()&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja templates&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installation of metadata management ===&lt;br /&gt;
Currently the wx.metadata package is available in GRASS Add-ons.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GRASS&amp;gt; g.extension wx.metadata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is '''cell''', for vector maps ''vector''. File ends with .xml extension.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor.  The editor offers the already mentioned two profiles(Basic and Inspire). Editor also support loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently are available two build-in ISO profile: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile'''  profile fulfills the criteria of INSPIRE profile. Values which are not able to get from native GRASS metadata are filled by text string '$NULL'. This rule applies for both profiles.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
For correct filling out form by values can help tooltip function.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Example of template === &lt;br /&gt;
[http://trac.osgeo.org/grass/browser/grass-addons/grass7/gui/wxpython/wx.metadata/templates?order=date&amp;amp;desc=1 INSPIRE and Basic]&lt;br /&gt;
=== Video tutorial ===&lt;br /&gt;
Video tutorial shows practice of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20663</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20663"/>
		<updated>2014-08-16T15:11:43Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* Information about metadata item */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{toModify}}&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
ISO 19115:2003(ISO) defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 more]&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
New metadata management is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of tree modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
== Requirements and installation ==&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package  has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* OWSLib development version ()&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja templates&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installation of metadata management ===&lt;br /&gt;
Currently the wx.metadata package is available in GRASS Add-ons.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GRASS&amp;gt; g.extension wx.metadata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is '''cell''', for vector maps ''vector''. File ends with .xml extension.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor.  The editor offers the already mentioned two profiles(Basic and Inspire). Editor also support loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently are available two build-in ISO profile: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile'''  profile fulfills the criteria of INSPIRE profile. Values which are not able to get from native GRASS metadata are filled by text string '$NULL'. This rule applies for both profiles.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
For correct filling out form by values can help tooltip function.&lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Video tutorial shows practise of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20662</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20662"/>
		<updated>2014-08-16T14:46:37Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{toModify}}&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
ISO 19115:2003(ISO) defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 more]&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
New metadata management is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of tree modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
== Requirements and installation ==&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
* [http://grass.osgeo.org/download/software/#g71x GRASS GIS 7.1 ]&lt;br /&gt;
wx.metadata package  has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* OWSLib development version ()&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja templates&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installation of metadata management ===&lt;br /&gt;
Currently the wx.metadata package is available in GRASS Add-ons.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GRASS&amp;gt; g.extension wx.metadata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
Default location for exported metadata files is ''metadata'' directory in the map's mapset. For raster maps, the prefix derived from the current nomenclature is '''cell''', for vector maps ''vector''. File ends with .xml extension.&lt;br /&gt;
&lt;br /&gt;
For example default metadata file name for vector map &amp;quot;roads&amp;quot; is ''vector_roads.xml''.&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor.  The editor offers the already mentioned two profiles(Basic and Inspire). Editor also support loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;big&amp;gt;Currently are available two build-in ISO profile: &amp;lt;/big&amp;gt;&lt;br /&gt;
* '''The basic profile''' is substituted from intersection between items stored in GRASS native metadata format and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be assigned to ISO based attributes are stored in metadata attribute sabstractact. &lt;br /&gt;
&lt;br /&gt;
* '''The Inspire profile'''  profile fulfills the criteria of INSPIRE profile. Values which are not able to get from native GRASS metadata are filled by text string '$NULL'. This rule applies for both profiles.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Information about metadata item ===&lt;br /&gt;
For proper filling values of each metadata attribute can help tooltip function of texts inputs. &lt;br /&gt;
[[Image:Wxmetadata-tooltip.png|center|350]]&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file. &lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom –  allows to load metadata profile from file. For example in case of using predefined template. The intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile will proced with this selection.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
This editor mode allows to load own template and xml file for editing. This option does not support any connection with GRASS maps metadata.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created template, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser in editor. Direct link on this function is multiple editing mode (see below).&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible get from GRASS map information.&lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is checked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Template result of attribute which is unchecked &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Video shows record of simple practice of defining custom template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate two build-in profiles. For selection of profile “Load custom” is set by default the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows updating native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Video tutorial shows practise of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=File:Wxmetadata-tooltip.png&amp;diff=20661</id>
		<title>File:Wxmetadata-tooltip.png</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=File:Wxmetadata-tooltip.png&amp;diff=20661"/>
		<updated>2014-08-16T14:31:28Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20660</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20660"/>
		<updated>2014-08-15T15:07:29Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* Updating GRASS native metadata */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{toModify}}&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
ISO 19115:2003(ISO) defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 more]&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
New metadata management is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of tree modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
== Dependencies and installation ==&lt;br /&gt;
=== Dependencies ===&lt;br /&gt;
Current development of metadata management has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* OWSLib development version ()&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja templates&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installation of metadata management ===&lt;br /&gt;
Currently the wx.metadata package is available in GRASS Add-ons.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GRASS&amp;gt; g.extension wx.metadata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
The metadata product fully supports XML Default location of exported metadata uses  folder “metadata” in  GRASS Location. In case the metadata file name is not changed, the name is build from prefix according to characteristic of maps. For raster maps prefix is derived from current nomenclature - 'cell' and for vector map – 'vector' by the same way. File name is derived from the  the name of the map. Postfix-extension is '.xml'. &lt;br /&gt;
&lt;br /&gt;
example: vector map - roads&lt;br /&gt;
vector_roads.xml&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor.  The editor offers the already mentioned two profiles(Basic and Inspire). Editor also support loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
* Currently are available two build-in ISO profile: &lt;br /&gt;
'''The Basic profile''' is substituted from intersection between GRASS native metadata and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be  assigned to ISO based attributes are stored in metadata attribute - abstract. &lt;br /&gt;
'''The Inspire profile''' fulfills the criteria of [http://inspire.ec.europa.eu/documents/Metadata/INSPIRE_MD_IR_and_ISO_v1_2_20100616.pdf INSPIRE] profile.  Values which are not able to get from native GRASS metadata are filled by text string '$NULL'. This rule applies for both profiles. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file.&lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom – this option allows to load metadata profile from file. For example in case of use of predefined template. With this selection the editor make intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
In this case to load metadata profile file and metadata file is necessary for editing. This option does not support any connection with GRASS maps metadata. Of course, it is possible to load exported metadata from the past.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created templates, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser. Direct link on this function is multiple editing mode (see below). &lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
example: Result of checked attribute&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Result of unchecked attribute&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible parsed from GRASS map information. &lt;br /&gt;
Video shows record of simple practice of defining own template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate  two build-in profiles. For selection of profile “Load custom” is set by default in the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows to update native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Video tutorial shows practise of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20659</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20659"/>
		<updated>2014-08-15T15:00:31Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{toModify}}&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
ISO 19115:2003(ISO) defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 more]&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
New metadata management is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of tree modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
== Dependencies and installation ==&lt;br /&gt;
=== Dependencies ===&lt;br /&gt;
Current development of metadata management has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* OWSLib development version ()&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja templates&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installation of metadata management ===&lt;br /&gt;
Currently the wx.metadata package is available in GRASS Add-ons.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GRASS&amp;gt; g.extension wx.metadata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
The metadata product fully supports XML Default location of exported metadata uses  folder “metadata” in  GRASS Location. In case the metadata file name is not changed, the name is build from prefix according to characteristic of maps. For raster maps prefix is derived from current nomenclature - 'cell' and for vector map – 'vector' by the same way. File name is derived from the  the name of the map. Postfix-extension is '.xml'. &lt;br /&gt;
&lt;br /&gt;
example: vector map - roads&lt;br /&gt;
vector_roads.xml&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor.  The editor offers the already mentioned two profiles(Basic and Inspire). Editor also support loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
* Currently are available two build-in ISO profile: &lt;br /&gt;
'''The Basic profile''' is substituted from intersection between GRASS native metadata and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be  assigned to ISO based attributes are stored in metadata attribute - abstract. &lt;br /&gt;
'''The Inspire profile''' fulfills the criteria of [http://inspire.ec.europa.eu/documents/Metadata/INSPIRE_MD_IR_and_ISO_v1_2_20100616.pdf INSPIRE] profile.  Values which are not able to get from native GRASS metadata are filled by text string '$NULL'. This rule applies for both profiles. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file.&lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom – this option allows to load metadata profile from file. For example in case of use of predefined template. With this selection the editor make intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
In this case to load metadata profile file and metadata file is necessary for editing. This option does not support any connection with GRASS maps metadata. Of course, it is possible to load exported metadata from the past.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created templates, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser. Direct link on this function is multiple editing mode (see below). &lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
example: Result of checked attribute&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Result of unchecked attribute&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible parsed from GRASS map information. &lt;br /&gt;
Video shows record of simple practice of defining own template&lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate  two build-in profiles. For selection of profile “Load custom” is set by default in the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows to update native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
 for vector maps(v.support):&lt;br /&gt;
* organization =&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Video tutorial shows practise of creation custom ISO profile.&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20658</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20658"/>
		<updated>2014-08-15T14:54:35Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* The second braces */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{toModify}}&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
ISO 19115:2003(ISO) defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 more]&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
New metadata management is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of tree modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
== Dependencies and installation ==&lt;br /&gt;
=== Dependencies ===&lt;br /&gt;
Current development of metadata management has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* OWSLib development version ()&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja templates&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installation of metadata management ===&lt;br /&gt;
Currently the wx.metadata package is available in GRASS Add-ons.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GRASS&amp;gt; g.extension wx.metadata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
The metadata product fully supports XML Default location of exported metadata uses  folder “metadata” in  GRASS Location. In case the metadata file name is not changed, the name is build from prefix according to characteristic of maps. For raster maps prefix is derived from current nomenclature - 'cell' and for vector map – 'vector' by the same way. File name is derived from the  the name of the map. Postfix-extension is '.xml'. &lt;br /&gt;
&lt;br /&gt;
example: vector map - roads&lt;br /&gt;
vector_roads.xml&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor.  The editor offers the already mentioned two profiles(Basic and Inspire). Editor also support loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
* Currently are available two build-in ISO profile: &lt;br /&gt;
'''The Basic profile''' is substituted from intersection between GRASS native metadata and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be  assigned to ISO based attributes are stored in metadata attribute - abstract. &lt;br /&gt;
'''The Inspire profile''' fulfills the criteria of [http://inspire.ec.europa.eu/documents/Metadata/INSPIRE_MD_IR_and_ISO_v1_2_20100616.pdf INSPIRE] profile.  Values which are not able to get from native GRASS metadata are filled by text string '$NULL'. This rule applies for both profiles. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file.&lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom – this option allows to load metadata profile from file. For example in case of use of predefined template. With this selection the editor make intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
In this case to load metadata profile file and metadata file is necessary for editing. This option does not support any connection with GRASS maps metadata. Of course, it is possible to load exported metadata from the past.&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created templates, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser. Direct link on this function is multiple editing mode (see below). &lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
example: Result of checked attribute&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Result of unchecked attribute&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible parsed from GRASS map information. &lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate  two build-in profiles. For selection of profile “Load custom” is set by default in the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows to update native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
 for vector maps(v.support):&lt;br /&gt;
* organization =&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
&lt;br /&gt;
Most of object are initialized by configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this(object) parameter. Best example is the metadata contact object(organization,email)  which can be initialized for many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20657</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20657"/>
		<updated>2014-08-15T14:52:37Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* The second braces */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{toModify}}&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
ISO 19115:2003(ISO) defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 more]&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
New metadata management is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of tree modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
== Dependencies and installation ==&lt;br /&gt;
=== Dependencies ===&lt;br /&gt;
Current development of metadata management has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* OWSLib development version ()&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja templates&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installation of metadata management ===&lt;br /&gt;
Currently the wx.metadata package is available in GRASS Add-ons.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GRASS&amp;gt; g.extension wx.metadata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
The metadata product fully supports XML Default location of exported metadata uses  folder “metadata” in  GRASS Location. In case the metadata file name is not changed, the name is build from prefix according to characteristic of maps. For raster maps prefix is derived from current nomenclature - 'cell' and for vector map – 'vector' by the same way. File name is derived from the  the name of the map. Postfix-extension is '.xml'. &lt;br /&gt;
&lt;br /&gt;
example: vector map - roads&lt;br /&gt;
vector_roads.xml&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor.  The editor offers the already mentioned two profiles(Basic and Inspire). Editor also support loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
* Currently are available two build-in ISO profile: &lt;br /&gt;
'''The Basic profile''' is substituted from intersection between GRASS native metadata and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be  assigned to ISO based attributes are stored in metadata attribute - abstract. &lt;br /&gt;
'''The Inspire profile''' fulfills the criteria of [http://inspire.ec.europa.eu/documents/Metadata/INSPIRE_MD_IR_and_ISO_v1_2_20100616.pdf INSPIRE] profile.  Values which are not able to get from native GRASS metadata are filled by text string '$NULL'. This rule applies for both profiles. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file.&lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom – this option allows to load metadata profile from file. For example in case of use of predefined template. With this selection the editor make intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
In this case to load metadata profile file and metadata file is necessary for editing. This option does not support any connection with GRASS maps metadata. Of course, it is possible to load exported metadata from the past.&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created templates, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser. Direct link on this function is multiple editing mode (see below). &lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
example: Result of checked attribute&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Result of unchecked attribute&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible parsed from GRASS map information. &lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate  two build-in profiles. For selection of profile “Load custom” is set by default in the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows to update native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
 for vector maps(v.support):&lt;br /&gt;
* organization =&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
* tag - just copy of string from first braces&lt;br /&gt;
* object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
* Most of object are initialized in configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary * initialized directly in this parameter. Best example is the metadata contact object(organization,email)  which can be  many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20656</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20656"/>
		<updated>2014-08-15T14:51:34Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* Update native metadata */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{toModify}}&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
ISO 19115:2003(ISO) defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 more]&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
New metadata management is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of tree modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
== Dependencies and installation ==&lt;br /&gt;
=== Dependencies ===&lt;br /&gt;
Current development of metadata management has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* OWSLib development version ()&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja templates&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installation of metadata management ===&lt;br /&gt;
Currently the wx.metadata package is available in GRASS Add-ons.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GRASS&amp;gt; g.extension wx.metadata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
The metadata product fully supports XML Default location of exported metadata uses  folder “metadata” in  GRASS Location. In case the metadata file name is not changed, the name is build from prefix according to characteristic of maps. For raster maps prefix is derived from current nomenclature - 'cell' and for vector map – 'vector' by the same way. File name is derived from the  the name of the map. Postfix-extension is '.xml'. &lt;br /&gt;
&lt;br /&gt;
example: vector map - roads&lt;br /&gt;
vector_roads.xml&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor.  The editor offers the already mentioned two profiles(Basic and Inspire). Editor also support loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
* Currently are available two build-in ISO profile: &lt;br /&gt;
'''The Basic profile''' is substituted from intersection between GRASS native metadata and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be  assigned to ISO based attributes are stored in metadata attribute - abstract. &lt;br /&gt;
'''The Inspire profile''' fulfills the criteria of [http://inspire.ec.europa.eu/documents/Metadata/INSPIRE_MD_IR_and_ISO_v1_2_20100616.pdf INSPIRE] profile.  Values which are not able to get from native GRASS metadata are filled by text string '$NULL'. This rule applies for both profiles. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file.&lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom – this option allows to load metadata profile from file. For example in case of use of predefined template. With this selection the editor make intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
In this case to load metadata profile file and metadata file is necessary for editing. This option does not support any connection with GRASS maps metadata. Of course, it is possible to load exported metadata from the past.&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created templates, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser. Direct link on this function is multiple editing mode (see below). &lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
example: Result of checked attribute&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Result of unchecked attribute&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible parsed from GRASS map information. &lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate  two build-in profiles. For selection of profile “Load custom” is set by default in the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Updating GRASS native metadata ===&lt;br /&gt;
The g.gui.metadata module allows to update native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
 for vector maps(v.support):&lt;br /&gt;
* organization =&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
tag - just copy of string from first braces&lt;br /&gt;
object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
Most of object are initialized in configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this parameter. Best example is the metadata contact object(organization,email)  which can be  many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20655</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20655"/>
		<updated>2014-08-15T14:50:20Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: /* Defining templates */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{toModify}}&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
ISO 19115:2003(ISO) defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 more]&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
New metadata management is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of tree modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
== Dependencies and installation ==&lt;br /&gt;
=== Dependencies ===&lt;br /&gt;
Current development of metadata management has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* OWSLib development version ()&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja templates&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installation of metadata management ===&lt;br /&gt;
Currently the wx.metadata package is available in GRASS Add-ons.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GRASS&amp;gt; g.extension wx.metadata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
The metadata product fully supports XML Default location of exported metadata uses  folder “metadata” in  GRASS Location. In case the metadata file name is not changed, the name is build from prefix according to characteristic of maps. For raster maps prefix is derived from current nomenclature - 'cell' and for vector map – 'vector' by the same way. File name is derived from the  the name of the map. Postfix-extension is '.xml'. &lt;br /&gt;
&lt;br /&gt;
example: vector map - roads&lt;br /&gt;
vector_roads.xml&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor.  The editor offers the already mentioned two profiles(Basic and Inspire). Editor also support loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
* Currently are available two build-in ISO profile: &lt;br /&gt;
'''The Basic profile''' is substituted from intersection between GRASS native metadata and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be  assigned to ISO based attributes are stored in metadata attribute - abstract. &lt;br /&gt;
'''The Inspire profile''' fulfills the criteria of [http://inspire.ec.europa.eu/documents/Metadata/INSPIRE_MD_IR_and_ISO_v1_2_20100616.pdf INSPIRE] profile.  Values which are not able to get from native GRASS metadata are filled by text string '$NULL'. This rule applies for both profiles. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file.&lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom – this option allows to load metadata profile from file. For example in case of use of predefined template. With this selection the editor make intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
In this case to load metadata profile file and metadata file is necessary for editing. This option does not support any connection with GRASS maps metadata. Of course, it is possible to load exported metadata from the past.&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining fixed values to template. With using created templates, the editor does not initialize texts inputs of defined values. These attributes is able to see only in Tree Browser. Direct link on this function is multiple editing mode (see below). &lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
example: Result of checked attribute&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Result of unchecked attribute&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The yellow background of text fields indicates metadata attributes, which are not possible parsed from GRASS map information. &lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate  two build-in profiles. For selection of profile “Load custom” is set by default in the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Update native metadata ===&lt;br /&gt;
The g.gui.metadata module allows to update native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
 for vector maps(v.support):&lt;br /&gt;
* organization =&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
tag - just copy of string from first braces&lt;br /&gt;
object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
Most of object are initialized in configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this parameter. Best example is the metadata contact object(organization,email)  which can be  many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20650</id>
		<title>ISO/INSPIRE Metadata Support</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=ISO/INSPIRE_Metadata_Support&amp;diff=20650"/>
		<updated>2014-08-15T10:21:45Z</updated>

		<summary type="html">&lt;p&gt;⚠️Krejcmat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{toModify}}&lt;br /&gt;
&lt;br /&gt;
== ISO 19115:2003- Geographic information -- Metadata ==&lt;br /&gt;
ISO 19115:2003(ISO) defines the scheme required for description of geographic information and services. It provides information about the identification, the extent, the quality, the spatial and temporal scheme, spatial reference, and distribution of digital geographic data.[http://www.iso.org/iso/catalogue_detail.htm?csnumber=26020 more]&lt;br /&gt;
&lt;br /&gt;
== About wx.metadata ==&lt;br /&gt;
New metadata management is currently available in GRASS add-ons. Package for creating and editing metadata according to EN ISO 19115, described here, consists of tree modules. Modules r.info.iso and v.info.iso are command line based and support conversion  from current native metadata management (r.info, v.info) into ISO based metadata. GUI based module - g.gui.metadata offers advanced tools for management of metadata.&lt;br /&gt;
[[Image:Wxmetadata-editing.png|center|600px]]&lt;br /&gt;
== Dependencies and installation ==&lt;br /&gt;
=== Dependencies ===&lt;br /&gt;
Current development of metadata management has dependence on external libraries:&lt;br /&gt;
&lt;br /&gt;
* OWSLib development version ()&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/geopython/OWSLib.git&lt;br /&gt;
cd OWSLib &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jinja templates&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://github.com/mitsuhiko/jinja2.git&lt;br /&gt;
cd jinja2 &amp;amp;&amp;amp; sudo python setup.py install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installation of metadata management ===&lt;br /&gt;
Currently the wx.metadata package is available in GRASS Add-ons.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GRASS&amp;gt; g.extension wx.metadata&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modules and usage ==&lt;br /&gt;
=== Naming of metadata files and storage ===&lt;br /&gt;
The metadata product fully supports XML Default location of exported metadata uses  folder “metadata” in  GRASS Location. In case the metadata file name is not changed, the name is build from prefix according to characteristic of maps. For raster maps prefix is derived from current nomenclature - 'cell' and for vector map – 'vector' by the same way. File name is derived from the  the name of the map. Postfix-extension is '.xml'. &lt;br /&gt;
&lt;br /&gt;
example: vector map - roads&lt;br /&gt;
vector_roads.xml&lt;br /&gt;
&lt;br /&gt;
=== Metadata profile ===&lt;br /&gt;
The metadata profile defines attributes, which can be edited in this editor.  The editor offers the already mentioned two profiles(Basic and Inspire). Editor also support loading of customized profiles. See Creation of custom ISO based profile.&lt;br /&gt;
&lt;br /&gt;
== Modules r.info.iso and v.info.iso== &lt;br /&gt;
Command line based modules implements  conversion of native GRASS metadata to ISO based XML metadata files. Identical configuration applies for both modules. Products of these modules differ partly in certain metadata attributes related  to differences between  raster (r.info) and vector (v.info) maps metadata. &lt;br /&gt;
&lt;br /&gt;
* Currently are available two build-in ISO profile: &lt;br /&gt;
'''The Basic profile''' is substituted from intersection between GRASS native metadata and INSPIRE profile. The intersect (subset) includes all available GRASS metadata. Metadata which cannot be  assigned to ISO based attributes are stored in metadata attribute - abstract. &lt;br /&gt;
'''The Inspire profile''' fulfills the criteria of [http://inspire.ec.europa.eu/documents/Metadata/INSPIRE_MD_IR_and_ISO_v1_2_20100616.pdf INSPIRE] profile.  Values which are not able to get from native GRASS metadata are filled by text string '$NULL'. This rule applies for both profiles. &lt;br /&gt;
&lt;br /&gt;
'''Parameters of modules:'''&lt;br /&gt;
* map - selection of map for metadata creation&lt;br /&gt;
* profile - selection of metadata profile (basic or inspire)&lt;br /&gt;
* output - path to output XML metadata file.  Default = according to naming&amp;amp;storage rules&lt;br /&gt;
	&lt;br /&gt;
== Module g.gui.metadata  ==&lt;br /&gt;
Metadata editor (editor) includes graphical interface for conversion metadata from r.info and v.info to ISO based metadata, editing metadata files and creating metadata templates. In addition, the graphical module allows validating of  INSPIRE and Basic profile.&lt;br /&gt;
&lt;br /&gt;
=== Creation of metadata ===&lt;br /&gt;
Editor offers two editing modes. The first one allows to create metadata from selected GRASS maps from an active location. The second one allows editing of external metadata file.&lt;br /&gt;
&lt;br /&gt;
==== GRASS metadata map editor ====&lt;br /&gt;
[[Image:Wxmetadata-mapEdit.png|center|150px]]&lt;br /&gt;
&lt;br /&gt;
Combo box for selection of ISO profile:&lt;br /&gt;
* basic&lt;br /&gt;
* inspire&lt;br /&gt;
* load custom – this option allows to load metadata profile from file. For example in case of use of predefined template. With this selection the editor make intersection of GRASS Basic profile(all available metadata for selected map) and loaded custom profile.&lt;br /&gt;
&lt;br /&gt;
{{YouTube|7V5NyVdO05o}}&lt;br /&gt;
&lt;br /&gt;
==== External metadata editor ====&lt;br /&gt;
[[Image:Wxmetadata-externalEdit.png|center|150]]&lt;br /&gt;
In this case to load metadata profile file and metadata file is necessary for editing. This option does not support any connection with GRASS maps metadata. Of course, it is possible to load exported metadata from the past.&lt;br /&gt;
{{YouTube|npMAavbwfi0}}&lt;br /&gt;
&lt;br /&gt;
=== Defining templates ===&lt;br /&gt;
This function allows to create pattern of metadata profile. In other words it support defining values of attributes which will be same for selected maps. Direct link on this function is multiple editing mode (see below). &lt;br /&gt;
[[Image:Wxmetadata-template.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
* If check-box of metadata attribute is checked, the OWSLib object in template will be replaced by value. Unchecked attributes will not change this 'part' of the template.&lt;br /&gt;
example: Result of checked attribute in template&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;2013-01-01&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Result of unchecked attribute in template&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    &amp;lt;gmd:dateStamp&amp;gt;&lt;br /&gt;
        &amp;lt;gco:Date&amp;gt;{{ md.datestamp }}{# tag=&amp;quot;md.datestamp&amp;quot; , name=&amp;quot;Metadata date&amp;quot; ,\&lt;br /&gt;
 ref= &amp;quot;Part B 10.2&amp;quot; , desc= &amp;quot;Date that the metadata was created.&amp;quot;,type = &amp;quot;date&amp;quot; ,&lt;br /&gt;
 example = &amp;quot;2005-03-27&amp;quot; , multi= 0 , group= &amp;quot;Metadata&amp;quot; , multiline= False #}&amp;lt;/gco:Date&amp;gt;&lt;br /&gt;
    &amp;lt;/gmd:dateStamp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The yellow background of text fields  indicates metadata attributes, which are not possible parsed from GRASS map information. &lt;br /&gt;
{{YouTube|Pu2sQoAJXfo}}&lt;br /&gt;
=== Editing metadata of multiple map selection ===&lt;br /&gt;
Advantages of this editing mode is in work using of defined template. This option can be used by selection of multiple maps in data catalog.  &lt;br /&gt;
&lt;br /&gt;
=== Validation of metadata profile ===&lt;br /&gt;
On the right side of editor there is a validator of metadata. Currently, validator is able to validate  two build-in profiles. For selection of profile “Load custom” is set by default in the inspire profile.&lt;br /&gt;
&lt;br /&gt;
=== Update native metadata ===&lt;br /&gt;
The g.gui.metadata module allows to update native GRASS metadata with using modules r.support and v.support. The intersection between ISO based metadata and r|v.support is limited by available parameters for these modules.&lt;br /&gt;
&lt;br /&gt;
 for vector maps(v.support):&lt;br /&gt;
* organization =&lt;br /&gt;
&lt;br /&gt;
== Creation of custom ISO based profile ==&lt;br /&gt;
Creation of own custom ISO based profile is with using  Jinja template syntax and some addition rules.&lt;br /&gt;
The main item of template is composite from two braces.&lt;br /&gt;
Both of them are fully according to syntax of Jinja template. First holds information about statements of loop or condition and also simple Python object.  Second braces according to Jinja template syntax is represented by comment {# #}. In this braces additional information for generating graphical interface of editor are stored. In addition also  information about individual metadata attributes (name, example, description, multiplicity, etc) is included.&lt;br /&gt;
&lt;br /&gt;
=== The first braces ===&lt;br /&gt;
Contain object of OWSLib which holds the metadata value. This values can be object which is  describing  single variable or list of variables.  Value of some attribute can be defined￹￹ many times(according to ISO). This attributes must be defined in block of template with starting statements and ending mark of block. Only allowed loop statement is FOR(see jinja2 manual). The XML based text of block will by duplicated according to number of items in the list.&lt;br /&gt;
&lt;br /&gt;
==== Initialize of OWSLib objects ====&lt;br /&gt;
Most object are initialized in configuration of file which is stored in wx.metadat/config/init_md.txt&lt;br /&gt;
example: Default configuration file for the build-in Basic and Inspire profile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
self.md.identification = MD_DataIdentification() &lt;br /&gt;
self.md.dataquality = DQ_DataQuality() &lt;br /&gt;
self.md.distribution = MD_Distribution() &lt;br /&gt;
self.md.identification.extent = EX_Extent() &lt;br /&gt;
self.md.identification.extent.boundingBox = EX_GeographicBoundingBox()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
# on the left side of equation is obligatory prefix 'self.md'. Postfix(name of variable) is open. On right side is  OWSLib object&lt;br /&gt;
&lt;br /&gt;
==== Single element ====&lt;br /&gt;
In case if the value of metadata element is  declared only once: &lt;br /&gt;
example: Identifier&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.identifier }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: Lineage&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{ md.dataquality.lineage }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Loop or Condition statements ====&lt;br /&gt;
Loops and condition are defined in by starting braces  and ending braces '{%  -%}' .&lt;br /&gt;
Start of block:&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Editor allows to use Python 'zip' function and 'len' function. Note- in Jinja syntax is Python len(length) function defined specifically.&lt;br /&gt;
&lt;br /&gt;
example: zip&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: len&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% if md.identification.denominators|length &amp;gt; 0 -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End of block is defined by:&lt;br /&gt;
&lt;br /&gt;
example: if statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endif -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
example: for statement&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
=== The second braces ===&lt;br /&gt;
The second braces(by Jinja syntax comment) contains these parameters:&lt;br /&gt;
tag - just copy of string from first braces&lt;br /&gt;
object – for reading and holding metadata in python objects is used OWSLib library.&lt;br /&gt;
Most of object are initialized in configuration file wx.metadata/config/init_md.txt. Some metadata attributes are necessary initialized directly in this parameter. Best example is the metadata contact object(organization,email)  which can be  many times.&lt;br /&gt;
&lt;br /&gt;
example: responsible party&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{% for co in md.contact -%}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.organization }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.email }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{{ co.role }}{# object=&amp;quot;CI_ResponsibleParty()&amp;quot; #}&lt;br /&gt;
{% endfor -%}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* name – free text string describing the name of metadata item&lt;br /&gt;
* ref – free additional information. By default should be reference of ISO attributes&lt;br /&gt;
* type – data type characteristic. Input text field validator for 'email' and 'date' is implemented. &lt;br /&gt;
* desc – free text which should describe or define the characteristic of metadata item&lt;br /&gt;
* example – free text with example of the value for metadata item&lt;br /&gt;
* group- label of the notebook list(tab) in editor.&lt;br /&gt;
* inbox- label of the box which includes attributes from the block of Jinja template. All items from one block of Jinja template must be in same box(same name).&lt;br /&gt;
* multi- 0 or 1. In case 0, the item cannot be duplicated= text field widget does not contain  button for duplicating itself. Note that only OWSLib list based variables can be used with duplication button.&lt;br /&gt;
* inboxmulti- 0 or 1. In case 0, the items in box cannot be duplicated = box with items  not dispose with button for cloning self.   &lt;br /&gt;
* multiline – True = initialize text field with multilines editing. Suitable for longer texts input&lt;br /&gt;
&lt;br /&gt;
example of second braces:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{# tag=&amp;quot;md.dataquality.lineage&amp;quot; , name=&amp;quot;Lineage&amp;quot; , ref= &amp;quot;Part B 6.1&amp;quot; ,/&lt;br /&gt;
 desc= &amp;quot;General explanation of the data producers knowledge about the lineage of a dataset.&amp;quot;/&lt;br /&gt;
 ,example = &amp;quot;Product 1 scenes correspond to the path/row of the Landsat orbit..&amp;quot; ,/&lt;br /&gt;
 type =&amp;quot;string&amp;quot; , group= &amp;quot;Quality and Validity&amp;quot; ,  multiline= True #}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntax of Jinja template system and editor custom parser ==&lt;br /&gt;
* both of braces of one metadata element must be on same line&lt;br /&gt;
* after '{# ','{%' must be white space. Also before '#}' '-%}'&lt;br /&gt;
{{YouTube|ahl41mFD5w0}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[GRASS Metadata Management]]&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/GSoC/2014/MetadataForGRASS Development page]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Metadata]]&lt;br /&gt;
[[Category:INSPIRE]]&lt;/div&gt;</summary>
		<author><name>⚠️Krejcmat</name></author>
	</entry>
</feed>