[GRASS-SVN] r65349 - in grass-addons/grass7/gui/wxpython/wx.metadata: . g.gui.metadata mdlib pdf profiles r.info.iso v.info.iso

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jun 1 13:48:37 PDT 2015


Author: krejcmat
Date: 2015-06-01 13:48:36 -0700 (Mon, 01 Jun 2015)
New Revision: 65349

Added:
   grass-addons/grass7/gui/wxpython/wx.metadata/pdf/
   grass-addons/grass7/gui/wxpython/wx.metadata/pdf/Makefile
   grass-addons/grass7/gui/wxpython/wx.metadata/pdf/mdpdffactory.py
   grass-addons/grass7/gui/wxpython/wx.metadata/pdf/mdpdftheme.py
   grass-addons/grass7/gui/wxpython/wx.metadata/profiles/
   grass-addons/grass7/gui/wxpython/wx.metadata/profiles/basicProfile.xml
   grass-addons/grass7/gui/wxpython/wx.metadata/profiles/inspireProfile.xml
Removed:
   grass-addons/grass7/gui/wxpython/wx.metadata/profiles/basicTemplate.xml
   grass-addons/grass7/gui/wxpython/wx.metadata/profiles/inspireTemplate.xml
   grass-addons/grass7/gui/wxpython/wx.metadata/templates/
Modified:
   grass-addons/grass7/gui/wxpython/wx.metadata/Makefile
   grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/Makefile
   grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/editor.py
   grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/g.gui.metadata.html
   grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/g.gui.metadata.py
   grass-addons/grass7/gui/wxpython/wx.metadata/mdlib/mdgrass.py
   grass-addons/grass7/gui/wxpython/wx.metadata/r.info.iso/r.info.iso.html
   grass-addons/grass7/gui/wxpython/wx.metadata/r.info.iso/r.info.iso.py
   grass-addons/grass7/gui/wxpython/wx.metadata/v.info.iso/v.info.iso.html
Log:
pdf report support

Modified: grass-addons/grass7/gui/wxpython/wx.metadata/Makefile
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/Makefile	2015-06-01 14:57:03 UTC (rev 65348)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/Makefile	2015-06-01 20:48:36 UTC (rev 65349)
@@ -4,18 +4,20 @@
 	mdlib \
 	r.info.iso \
 	v.info.iso \
+	pdf\
 	g.gui.metadata
 
 include $(MODULE_TOPDIR)/include/Make/Dir.make
 
 default:
 	$(MAKE) parsubdirs
-	@cp -r templates $(ETC)
+	@cp -r profiles $(ETC)
 	@cp -r config $(ETC)
 
 install:
 	@cd mdlib ; $(MAKE) install
 	@cd r.info.iso ; $(MAKE) install
 	@cd v.info.iso ; $(MAKE) install
+	@cd pdf ; $(MAKE) install
 	@cd g.gui.metadata ; $(MAKE) install
 	@cp -r etc/* $(INST_DIR)/etc

Modified: grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/Makefile
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/Makefile	2015-06-01 14:57:03 UTC (rev 65348)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/Makefile	2015-06-01 20:48:36 UTC (rev 65349)
@@ -19,3 +19,5 @@
 
 $(DSTDIR)/%: % | $(DSTDIR)
 	$(INSTALL_DATA) $< $@
+
+

Modified: grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/editor.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/editor.py	2015-06-01 14:57:03 UTC (rev 65348)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/editor.py	2015-06-01 20:48:36 UTC (rev 65349)
@@ -137,7 +137,7 @@
             xml_file.close()
 
             if msg:
-                GMessage('File exported to: %s' % outPath)
+                GMessage('File is exported to: %s' % outPath)
 
             if rmTeplate:
                 os.remove(jinjaPath)
@@ -655,9 +655,9 @@
                      self.defineTemplate(): creator of predefined templates in template editor mode
     '''
 
-    def __init__(self, parent, templatePath, xmlMdPath, templateEditor=False):
+    def __init__(self, parent, profilePath, xmlMdPath, templateEditor=False):
         '''
-        @param templatePath: path to jinja template for generating GUI of editor
+        @param profilePath: path to jinja template for generating GUI of editor
         @param xmlMdPath: path of xml for init Editor
         @param templateEditor: mode-creator of template
         '''
@@ -665,9 +665,9 @@
         self.mdo = MdFileWork()
         self.md = self.mdo.initMD(xmlMdPath)
         self.templateEditor = templateEditor
-        self.templatePath = templatePath
+        self.profilePath = profilePath
 
-        self.jinj = JinjaTemplateParser(self.templatePath)
+        self.jinj = JinjaTemplateParser(self.profilePath)
         # list of object MdDescription
         self.mdDescription = self.jinj.mdDescription
         # string of tags from jinja template (loops and OWSLib objects)
@@ -677,7 +677,7 @@
         self.generateGUI()
         self._layout()
 
-#----------------------------------------------------------- GUI GENERATOR START
+ #----------------------------------------------------------- GUI GENERATOR START
     def executeStr(self, stri, mdDescrObj):
         '''note- exec cannot be in sub function
         for easy understanding to product of self.generateGUI()- print stri
@@ -873,7 +873,7 @@
 
             self.executeStr(str1, mdDescrObj)
 
-#--------------------------------------------------------------------- INIT VARS
+    #--------------------------------------------------------------------- INIT VARS
         self.notebook = wx.Notebook(self)
         markgroup = []  # notebook panel marker
         tagStringLst = self.mdOWSTagStrList
@@ -883,7 +883,7 @@
         self.max = len(mdDescrObj)
         prepareStatements()
         self.notebokDict = {}
-# --------------------------------------------- #START of the loop of generator
+    # --------------------------------------------- #START of the loop of generator
         while self.stop is False:  # self.stop is managed by def plusC(self):
             group = mdDescrObj[self.c].group
 
@@ -926,7 +926,7 @@
                     i.onChangeChckBox(None)
                 except:
                     pass
-#----------------------------------------------------------- GUI GENERATOR END
+    #----------------------------------------------------------- GUI GENERATOR END
 
     def defineTemplate(self):
         '''Main function for generating jinja template in mode "template editor"
@@ -936,7 +936,7 @@
         @var finalTemplate:    string included final jinja template
         '''
         try:
-            template = open(self.templatePath, 'r')
+            template = open(self.profilePath, 'r')
         except Exception, e:
             GError('Error loading template:\n' + str(e))
 
@@ -1020,15 +1020,15 @@
                     finalTemplate += line
             chcked = True
 
-        head, tail = os.path.split(self.templatePath)
+        head, tail = os.path.split(self.profilePath)
         tail = 'EXPT' + tail
-        self.templatePath = os.path.join(head, tail)
-        templateOut = open(self.templatePath, 'w')
+        self.profilePath = os.path.join(head, tail)
+        templateOut = open(self.profilePath, 'w')
         templateOut.write(finalTemplate)
         templateOut.close()
 
         return owsTagList
-#----------------------------------------- FILL OWSLib BY EDITED METADATA IN GUI
+    #----------------------------------------- FILL OWSLib BY EDITED METADATA IN GUI
 
     def executeStr1(self, stri, item):
         '''note- exec cannot be in sub function
@@ -1037,7 +1037,7 @@
         # print stri
         exec stri
 
-    def createNewMD(self, evt=None):
+    def saveMDfromGUI(self, evt=None):
         '''Main function for exporting metadata from filled widgets.
            Initializing owslib object by metadata from gui(export of metadata)
         '''
@@ -1290,7 +1290,10 @@
         self.md = self.mdo.initMD()
         # most of objects from OWSLib is initialized in configure file
         dirpath = os.path.dirname(os.path.realpath(__file__))
-        path = os.path.join(dirpath, 'config', 'init_md')
+        #print dirpath
+        path = os.path.join(os.path.join(sys.path[0],'..'), 'config', 'init_md')
+        #print path
+
         mdInitData = open(path, 'r')
         mdExec = mdInitData.read()
         self.executeStr1(mdExec, None)
@@ -1319,15 +1322,15 @@
 #------------------------------------ END- FILL OWSLib BY EDITED METADATA IN GUI
 
     def exportToXml(self, jinjaPath, outPath, xmlOutName, msg):
-        self.createNewMD()
+        self.saveMDfromGUI()
         self.mdo.saveToXML(self.md, None, jinjaPath, outPath, xmlOutName, msg)
 
     def exportTemplate(self, jinjaPath, outPath, xmlOutName):
-        self.templatePath = jinjaPath
+        self.profilePath = jinjaPath
         owsTagList = self.defineTemplate()
-        self.createNewMD()
+        self.saveMDfromGUI()
         self.mdo.saveToXML(self.md, owsTagList,
-                           self.templatePath,
+                           self.profilePath,
                            outPath,
                            xmlOutName,
                            msg=True,

Modified: grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/g.gui.metadata.html
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/g.gui.metadata.html	2015-06-01 14:57:03 UTC (rev 65348)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/g.gui.metadata.html	2015-06-01 20:48:36 UTC (rev 65349)
@@ -16,7 +16,7 @@
 
 Default location for exported metadata files is
 <i>metadata</i> directory in the map's mapset.  For raster maps, the prefix
-derived from the current nomenclature is <em>cell</em>, for vector
+derived from the current nomenclature is <em>raster</em>, for vector
 maps <em>vector</em>. File ends with <em>.xml</em> extension.
 
 <p>

Modified: grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/g.gui.metadata.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/g.gui.metadata.py	2015-06-01 14:57:03 UTC (rev 65348)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/g.gui.metadata/g.gui.metadata.py	2015-06-01 20:48:36 UTC (rev 65349)
@@ -34,7 +34,7 @@
 from lxml import etree
 
 sys.path.insert(1, os.path.join(os.path.dirname(sys.path[0]), 'etc', 'mdlib'))
-
+sys.path.insert(1, os.path.join(os.path.dirname(sys.path[0]), 'etc', 'pdf'))
 import wx
 from wx.lib.buttons import ThemedGenBitmapTextButton as BitmapBtnTxt
 from wx import SplitterWindow, EVT_BUTTON
@@ -42,9 +42,12 @@
 
 import grass.script as grass
 import grass.script.setup as gsetup
+import webbrowser
 
+
 import mdgrass
 import mdutil
+from mdpdffactory import PdfCreator
 
 from core.utils import _
 from editor import MdMainEditor
@@ -54,8 +57,6 @@
 #===============================================================================
 # MAIN FRAME
 #===============================================================================
-
-
 class MdMainFrame(wx.Frame):
 
     '''Main frame of metadata editor
@@ -63,12 +64,11 @@
 
     def __init__(self, jinjaPath=None, xmlPath=None, init=False):
         '''
-        @param jinjaPath: path to jinja template
+        @param jinjaPath: path to jinja profile
         @param xmlPath: path to xml with will be read by editor
         @var first,firstAfterChoice,second,secondAfterChoice,secondMultiEdit: initMultipleEditor() and onInitEditor() handler
         @var self. initMultipleEditor() and onInitEditor() handler
         @var self.templateEditor: true= Editor is in mode 'Template creator(widgets with chkbox)'
-        @var nameTMPtemplate: in case if 'template editor is on' this var holds name oof temporaly jinja template
         @var batch: if true multiple editing metadata of maps is ON
         '''
         wx.Frame.__init__(self, None, title="Metadata Editor", size=(650, 500))
@@ -81,20 +81,23 @@
         self.second = False
         self.secondAfterChoice = False
         self.secondMultiEdit = False
-
+        self.md=None
         self.templateEditor = False
         self.sb = self.CreateStatusBar()
 
         self.cres = 0  # resizeFrame
         self.nameTMPteplate = None
         self.batch = False
-
+        self.mdCreator=None
+        self.editStatus=None
         self.onInitEditor()
 
         pub.subscribe(self.initNewMD, 'NEW_MD.create')
         pub.subscribe(self.onEditingMode, 'EDITING_MODE.update')
         pub.subscribe(self.setStatusbarText, 'STATUS_BAR_TEXT.update')
         pub.subscribe(self.onExportTemplate, 'EXPORT_TEMPLATE.create')
+        pub.subscribe(self.onExportPDF, 'EXPORT_PDF.create')
+
         pub.subscribe(self.onExportXML, 'EXPORT_XML.create')
         pub.subscribe(self.onEditMapMetadata, 'EDIT_MAP_METADATA.create')
         pub.subscribe(self.onInitEditor, 'INIT_EDITOR.create')
@@ -107,7 +110,7 @@
         pub.subscribe(self.onSetJaX, 'SET_JINJA_AND_XML.update')
 
     def onSetJaX(self, jinja, xml):
-        '''Set template ad xml paths
+        '''Set profile ad xml paths
         '''
         self.jinjaPath = jinja
         self.xmlPath = xml
@@ -127,15 +130,15 @@
     def onUpdateGrassMetadata(self):
         '''Update r.support and v.support
         '''
-        md = self.editor.createNewMD()
+        md = self.editor.saveMDfromGUI()
         self.mdCreator.updateGrassMd(md)
-        GMessage('GRASS GIS metadata haved been updated')
+        GMessage('GRASS GIS metadata has been updated')
 
     def onChangeEditMapProfile(self):
         '''Update vars
         '''
-        self.templateChoice = self.configPanelLeft.comboBoxProfile.GetValue()
-        self.ntbRight.profile = self.templateChoice
+        self.profileChoice = self.configPanelLeft.comboBoxProfile.GetValue()
+        self.ntbRight.profile = self.profileChoice
 
     def onExportTemplate(self, outPath, outFileName):
         '''Export defined(pre-filled) template
@@ -144,6 +147,24 @@
                                    outPath=outPath,
                                    xmlOutName=outFileName)
 
+    def onExportPDF(self, outPath, outFileName):
+        self.initNewMD()
+        pdfFile=os.path.join(outPath,outFileName)
+
+        if self.mdCreator is None and self.toolbar.extendEdit: #if editing map from grass database
+            profileName=os.path.basename(self.jinjaPath)
+            xmlFile=os.path.basename(self.xmlPath)
+            doc = PdfCreator(self.md, pdfFile, map=None, type=None,filename=xmlFile,profile=profileName)
+        else: #if editing map from external editor
+            filename,type,map,profile=self.mdCreator.getMapInfo()
+            doc = PdfCreator(self.md, pdfFile, map, type,filename,profile)
+        try:
+            path=doc.createPDF()
+            GMessage('Metadata report has been exported to < %s >'%path)
+        except:
+            GError('Export pdf error %s'% sys.exc_info()[0])
+
+
     def onExportXML(self, outPath, outFileName):
         '''Save metadta xml file
         '''
@@ -190,9 +211,10 @@
     def initNewMD(self):
         '''Init new md OWSLib  object
         '''
-        self.editor.createNewMD()
+        self.md=self.editor.saveMDfromGUI()
         self.ntbRight.md = self.editor.md
 
+
     def resizeFrame(self, x1=1, y1=0):
         '''Some widgets need refresh frame for proper working
         '''
@@ -212,6 +234,7 @@
 
     def onEditingMode(self, editStatus):
         self.resizeFrame()
+        self.editStatus=editStatus
         self.Layout()
 
         if editStatus:
@@ -236,7 +259,7 @@
         if not multipleEditing:
             self.ListOfMapTypeDict = self.MdDataCatalogPanelLeft.ListOfMapTypeDict
 
-        self.templateChoice = self.configPanelLeft.comboBoxProfile.GetValue()
+        self.profileChoice = self.configPanelLeft.comboBoxProfile.GetValue()
         self.numOfMap = len(self.ListOfMapTypeDict)
 
         if self.numOfMap == 0 and multipleEditing is False:
@@ -247,23 +270,20 @@
         if self.numOfMap == 1 and multipleEditing is False:
             self.mdCreator = mdgrass.GrassMD(self.ListOfMapTypeDict[-1][self.ListOfMapTypeDict[-1].keys()[0]],
                                              self.ListOfMapTypeDict[-1].keys()[0])
-            if self.templateChoice == 'INSPIRE':
+            if self.profileChoice == 'INSPIRE':
                 self.mdCreator.createGrassInspireISO()
-                self.jinjaPath = self.mdCreator.templatePathAbs
-                self.xmlPath = self.mdCreator.saveXML(self.mdDestination, self.nameTMPteplate, self)
-                self.onInitEditor()
+            elif self.profileChoice == 'GRASS BASIC':
 
-            elif self.templateChoice == 'GRASS BASIC':
                 self.mdCreator.createGrassBasicISO()
-                self.jinjaPath = self.mdCreator.templatePathAbs
-                self.xmlPath = self.mdCreator.saveXML(self.mdDestination, self.nameTMPteplate, self)
-                self.onInitEditor()
+            self.jinjaPath = self.mdCreator.profilePathAbs
+            self.xmlPath = self.mdCreator.saveXML(self.mdDestination, self.nameTMPteplate, self)
+            self.onInitEditor()
 
-        # if editing multiple maps or just one but with loading own custom template
-        if self.templateChoice == 'Load Custom' and self.numOfMap != 0:
-        # load template. IF for just one map ELSE for multiple editing
+        # if editing multiple maps or just one but with loading own custom profile
+        if self.profileChoice == 'Load Custom' and self.numOfMap != 0:
+        # load profile. IF for just one map ELSE for multiple editing
             if multipleEditing is False:
-                dlg = wx.FileDialog(self, "Select template", os.getcwd(), "", "*.xml", wx.OPEN)
+                dlg = wx.FileDialog(self, "Select profile", os.getcwd(), "", "*.xml", wx.OPEN)
                 if dlg.ShowModal() == wx.ID_OK:
                     self.mdCreator = mdgrass.GrassMD(self.ListOfMapTypeDict[-1][self.ListOfMapTypeDict[-1].keys()[0]],
                                                      self.ListOfMapTypeDict[-1].keys()[0])
@@ -327,7 +347,7 @@
             self.editor = MdMainEditor(self.splitter,
                                        self.jinjaPath,
                                        self.xmlPath,
-                                       self.templateEditor)
+                                       self.profileEditor)
             self.ntbRight = NotebookRight(self.splitter, self.xmlPath)
             self.splitter.SplitVertically(self.editor, self.ntbRight, sashPosition=0.65)
             self.splitter.SetSashGravity(0.65)
@@ -372,7 +392,7 @@
             self.second = True
 
             self.editor = MdMainEditor(parent=self.splitter,
-                                       templatePath=self.jinjaPath,
+                                       profilePath=self.jinjaPath,
                                        xmlMdPath=self.xmlPath,
                                        templateEditor=self.templateEditor)
 
@@ -408,7 +428,7 @@
 
             editorTMP = self.editor
             self.editor = MdMainEditor(parent=self.splitter,
-                                       templatePath=self.jinjaPath,
+                                       profilePath=self.jinjaPath,
                                        xmlMdPath=self.xmlPath,
                                        templateEditor=self.templateEditor)
 
@@ -449,8 +469,6 @@
 #===============================================================================
 # DATA CATALOG
 #===============================================================================
-
-
 class MdDataCatalog(datacatalog.LocationMapTree):
 
     '''Data catalog for selecting GRASS maps for editing
@@ -470,6 +488,7 @@
         gisenv = grass.gisenv()
         location = gisenv['LOCATION_NAME']
         self.mapset = gisenv['MAPSET']
+        #TODO remove auto add permanent to catalogue
 
         self._initTreeItems(locations=[location], mapsets=[self.mapset])
         self.ExpandAll()
@@ -487,14 +506,14 @@
             for item in self.GetSelections():
                 MapTypeDict = {}
                 maps.append(self.GetItemText(item))
-                map = self.GetItemText(item) + '@' + self.mapset
+                map = self.GetItemText(item) #+ '@' + self.mapset @TODO to test
                 mapType = self.GetItemParent(item)
                 mapType = self.GetItemText(mapType)
 
                 if mapType == 'vect':
                     mapType = 'vector'
                 elif mapType == 'rast':
-                    mapType = 'cell'
+                    mapType = 'raster'
                 MapTypeDict[mapType] = map
 
                 self.ListOfMapTypeDict.append(MapTypeDict)
@@ -508,10 +527,10 @@
         if len(maps) == 0:
             pub.sendMessage('bttEdit.disable')
             pub.sendMessage('bttCreateTemplate.disable')
-        str1 = ''
 
+        status = ''
         for map in maps:
-            str1 += map + '  '
+            status += map + '  '
 
         if len(maps) > 1:
             pub.sendMessage('SET_PROFILE.update', profile='Load Custom')
@@ -522,7 +541,7 @@
             pub.sendMessage('comboBoxProfile.enable')
             pub.sendMessage('bttCreateTemplate.enable')
 
-        pub.sendMessage('STATUS_BAR_TEXT.update', text=str1)
+        pub.sendMessage('STATUS_BAR_TEXT.update', text=status)
 
 #===============================================================================
 # NOTEBOOK ON THE RIGHT SIDE-xml browser+validator
@@ -754,7 +773,7 @@
 class MdEditConfigPanel(wx.Panel):
 
     '''Configuration pane for selection editing mode.
-    @var mapGrassEdit: True = editing metadata of GRASS maps, false= editing externally loaded xml and template
+    @var mapGrassEdit: True = editing metadata of GRASS maps, false= editing externally loaded xml and profile
     '''
 
     def __init__(self, parent):
@@ -798,7 +817,7 @@
 
     def onSetRadioType(self, evt=None):
         self.mapGrassEdit = self.rbGrass.GetValue()
-        if self.mapGrassEdit == False:
+        if self.mapGrassEdit is False:
             self.comboBoxProfile.Hide()
         else:
             self.comboBoxProfile.Show()
@@ -842,50 +861,58 @@
         bitmaSettings = wx.Image(
             os.path.join(os.environ['GISBASE'], 'gui', 'icons', 'grass', 'settings.png'),
             wx.BITMAP_TYPE_PNG).ConvertToBitmap()
-#-------------------------------------------------------------------- EDIT
+    #-------------------------------------------------------------------- EDIT
         self.toolbar.AddSeparator()
         bitmapEdit = wx.Image(
             os.path.join(os.environ['GISBASE'], 'gui', 'icons', 'grass', 'edit.png'),
             wx.BITMAP_TYPE_PNG).ConvertToBitmap()
-        self.bttEdit = BitmapBtnTxt(
-            self.toolbar, -1, bitmapEdit, 'edit')
+
+    #-------------------------------------------------------------------- EDIT
+
+        self.bttEdit = BitmapBtnTxt(self.toolbar, -1, bitmapEdit,size=(40, -1))
         self.toolbar.AddControl(control=self.bttEdit)
         self.bttEdit.Disable()
-#-------------------------------------------------------------------- NEW SESION
-        self.toolbar.AddSeparator()
-        self.bttNew = BitmapBtnTxt(self.toolbar, -1, bitmapNew, 'session')
+    #-------------------------------------------------------------------- NEW SESION
+        #self.toolbar.AddSeparator()
+        self.bttNew = BitmapBtnTxt(self.toolbar, -1, bitmapNew, '', size=(40, -1))
         self.toolbar.AddControl(control=self.bttNew)
         self.bttNew.Disable()
-#-------------------------------------------------------------------------- SAVE
-        self.bttsave = BitmapBtnTxt(self.toolbar, -1, bitmapSave, "XML")
-        self.bttsave.Disable()
-        self.toolbar.AddControl(control=self.bttsave)
+    #-------------------------------------------------------------------- NEW TEMPLATE
+        self.bttCreateTemplate = BitmapBtnTxt(self.toolbar, -1, bitmapNew, "template", size=(100, -1))
+        self.toolbar.AddControl(control=self.bttCreateTemplate)
+        self.bttCreateTemplate.Disable()
         self.toolbar.AddSeparator()
-#----------------------------------------------------------------- OPEN TEMPLATE
-        self.bttLoad = BitmapBtnTxt(self.toolbar, -1, bitmapLoad, "template", size=(100, -1))
+
+    #----------------------------------------------------------------- OPEN TEMPLATE
+        self.bttLoad = BitmapBtnTxt(self.toolbar, -1, bitmapLoad, "profile", size=(100, -1))
         self.toolbar.AddControl(control=self.bttLoad)
         self.bttLoad.Disable()
-#---------------------------------------------------------------------- OPEN XML
-        self.bttLoadXml = BitmapBtnTxt(self.toolbar, -1, bitmapLoad, "XML")
+    #---------------------------------------------------------------------- OPEN XML
+        self.bttLoadXml = BitmapBtnTxt(self.toolbar, -1, bitmapLoad, "xml")
         self.toolbar.AddControl(control=self.bttLoadXml)
         self.bttLoadXml.Disable()
         self.toolbar.AddSeparator()
-#-------------------------------------------------------------------- NEW TEMPLATE
-        self.bttCreateTemplate = BitmapBtnTxt(self.toolbar, -1, bitmapNew, "template", size=(100, -1))
-        self.toolbar.AddControl(control=self.bttCreateTemplate)
-        self.bttCreateTemplate.Disable()
-#-------------------------------------------------------------------------- SAVE
+
+
+    #-------------------------------------------------------------------------- export xml
+        self.bttsave = BitmapBtnTxt(self.toolbar, -1, bitmapSave, "xml")
+        self.bttsave.Disable()
+        self.toolbar.AddControl(control=self.bttsave)
+    #-------------------------------------------------------------------------- export template
         self.bttSaveTemplate = BitmapBtnTxt(self.toolbar, -1, bitmapSave, "template", size=(100, -1))
         self.bttSaveTemplate.Disable()
         self.toolbar.AddControl(control=self.bttSaveTemplate)
-        self.toolbar.AddSeparator()
-#-------------------------------------------------------------------------- SAVE
+    #-------------------------------------------------------------------------- update grass
         self.bttUpdateGRASS = BitmapBtnTxt(self.toolbar, -1, bitmapSave, "GRASS", size=(100, -1))
         self.bttUpdateGRASS.Disable()
         self.toolbar.AddControl(control=self.bttUpdateGRASS)
+    #-------------------------------------------------------------------------- export pdf
+        self.bttExportPdf = BitmapBtnTxt(self.toolbar, -1, bitmapSave, "pdf", size=(100, -1))
+        self.bttExportPdf.Disable()
+        self.toolbar.AddControl(control=self.bttExportPdf)
         self.toolbar.AddSeparator()
-#-------------------------------------------------------------------------- Config
-        self.bttConfig = BitmapBtnTxt(self.toolbar, -1, bitmaSettings, "workdir", size=(100, -1))
+    #-------------------------------------------------------------------------- Config
+        self.bttConfig = BitmapBtnTxt(self.toolbar, -1, bitmaSettings, "", size=(40, -1))
         self.toolbar.AddControl(control=self.bttConfig)
         self.toolbar.AddSeparator()
 
@@ -924,6 +951,9 @@
         pub.subscribe(self.onBttUpdateGRASSEnable, "bttSaveTemplate.enable")
         pub.subscribe(self.onBttUpdateGRASSDisable, "bttSaveTemplate.disable")
 
+        self.bttExportPdf.Bind(wx.EVT_BUTTON, self.onExportPdf)
+        pub.subscribe(self.onBttExportPdfEnable, "bttExportPdf.enable")
+        pub.subscribe(self.onBttExportPdfDisable, "bttExportPdf.disable")
         self.bttConfig.Bind(wx.EVT_BUTTON, self.onSettings)
 
     def onBttSaveDisable(self):
@@ -974,9 +1004,35 @@
     def onBttUpdateGRASSEnable(self):
         self.bttUpdateGRASS.Enable()
 
+    def onBttExportPdfDisable(self):
+        self.bttExportPdf.Disable()
+
+    def onBttExportPdfEnable(self):
+        self.bttExportPdf.Enable()
+
     def onUpdateGRASS(self, evt):
         pub.sendMessage('GRASS_METADATA.update')
 
+    def onExportPdf(self,evt):
+        self.xmlPath=self.GetParent().xmlPath
+        XMLhead, XMLtail = os.path.split(self.xmlPath)
+        dlg = wx.FileDialog(self,
+                            message="Set output file",
+                            defaultDir=self.mdDestination,
+                            defaultFile=XMLtail.split('.')[0]+'.pdf',
+                            wildcard="*.pdf",
+                            style=wx.SAVE | wx.FD_OVERWRITE_PROMPT)
+
+        if dlg.ShowModal() == wx.ID_OK:
+            outPath=dlg.GetDirectory()
+            outFileName=dlg.GetFilename()
+            pub.sendMessage('EXPORT_PDF.create',
+                            outPath=outPath,
+                            outFileName=outFileName)
+            if mdutil.yesNo(self,'Do you want to open report?'):
+                webbrowser.open(os.path.join(outPath,outFileName))
+
+
     def onSettings(self, evt):
         dlg = wx.DirDialog(self,
                            message="Select metadata working directory",
@@ -1001,6 +1057,7 @@
         self.bttCreateTemplate.Hide()
         self.bttSaveTemplate.Hide()
         self.bttUpdateGRASS.Hide()
+        self.bttExportPdf.Hide()
 
     def showMultipleEdit(self):
         '''Multiple editor is on
@@ -1012,6 +1069,7 @@
         self.bttCreateTemplate.Show()
         self.bttSaveTemplate.Show()
         self.bttUpdateGRASS.Show()
+        self.bttExportPdf.Show()
 
     def onCreateTemplate(self, evt):
         pub.sendMessage('TEMPLATE_EDITOR_STATUS.update', value=True)
@@ -1037,6 +1095,7 @@
         self.bttCreateTemplate.Disable()
         self.bttEdit.Disable()
         self.bttsave.Enable()
+        self.bttExportPdf.Enable()
         if not self.extendEdit:
             self.bttUpdateGRASS.Enable()
 
@@ -1058,10 +1117,11 @@
             self.bttLoadXml.Enable()
         self.statusBar.SetStatusText('')
         self.bttsave.Disable()
+        self.bttExportPdf.Disable()
         self.bttUpdateGRASS.Disable()
         self.jinjaPath = None
         self.xmlPath = None
-        self.bttsave.SetLabel('XML')
+        self.bttsave.SetLabel('xml')
         self.showMultipleEdit()
 
         self.bttSaveTemplate.Disable()
@@ -1071,6 +1131,7 @@
         '''
         if self.jinjaPath is not None and self.xmlPath is not None:
             pub.sendMessage('HIDE_LEFT_PANEL.update')
+
             self.bttEdit.Enable()
             self.bttCreateTemplate.Enable()
             self.bttLoad.Disable()
@@ -1109,7 +1170,7 @@
 
     def OnLoadTemplate(self, evt):
         dlg = wx.FileDialog(self,
-                            "Select template of ISO profile",
+                            "Select metadata ISO profile",
                             self.mdDestination,
                             "",
                             "*.xml",
@@ -1118,7 +1179,7 @@
         if dlg.ShowModal() == wx.ID_OK:
             self.jinjaPath = dlg.GetPath()
             tx = self.statusBar.GetStatusText()
-            self.statusBar.SetStatusText(tx + ' Selected template: ' + self.jinjaPath)
+            self.statusBar.SetStatusText(tx + ' Selected profile: ' + self.jinjaPath)
             self.onChangeXmlorTemplate()
 
         dlg.Destroy()
@@ -1163,7 +1224,7 @@
 #----------------------------------------------------------------------
 def main():
     app = wx.App(False)
-    frame = MdMainFrame()
+    MdMainFrame()
     app.MainLoop()
 
 if __name__ == '__main__':

Modified: grass-addons/grass7/gui/wxpython/wx.metadata/mdlib/mdgrass.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/mdlib/mdgrass.py	2015-06-01 14:57:03 UTC (rev 65348)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/mdlib/mdgrass.py	2015-06-01 20:48:36 UTC (rev 65349)
@@ -20,22 +20,15 @@
 
 from lxml import etree
 import os
-import sys
-import re
+
 import StringIO
-import subprocess as sub
 import uuid
 import mdutil  # metadata lib
-import getpass  # whoami for linux and  ms-win
 
-from grass.pygrass.modules.shortcuts import general as g
-from grass.pygrass.gis import Mapset
-from grass.pygrass import raster
 from grass.pygrass.modules import Module
 from grass.script import parse_key_val
 from subprocess import PIPE
 from datetime import date, datetime
-from grass.script import parser
 from grass.script import core as grass
 
 
@@ -58,12 +51,14 @@
         self.gisenv_grass = grass.gisenv()  # dict with gisenv information
         # suffix of output xml file (variables)
         self.schema_type = '_basic.xml'
+        self.profileName='GRASS BASIC'
         self.dirpath = os.path.join(os.getenv('GRASS_ADDON_BASE'), 'etc')
         # metadata object from OWSLIB ( for define md values)
         self.md = MD_Metadata(md=None)
-        self.template = None  # path to file with xml templates
+        self.profilePath = None  # path to file with xml templates
 
-        if self.type == "cell":
+
+        if self.type == "raster":
             self.parseRast()
         elif self.type == "vector":
             self.parseVect()
@@ -152,7 +147,7 @@
             self.md_grass['min'] + '  max: ' + self.md_grass['max']
         self.md_abstract.translate(None, """&<>"'""")
 
-    def createGrassBasicISO(self, template=None):
+    def createGrassBasicISO(self, profile=None):
         '''Create basic/essential profile based on ISO
         - unknown values are filling by n = '$NULL'
         '''
@@ -163,10 +158,10 @@
 
         n = '$NULL'
         # jinja templates
-        if template is None:
-            self.template = os.path.join(self.dirpath, 'templates', 'basicTemplate.xml')
+        if profile is None:
+            self.profilePath = os.path.join('profiles', 'basicProfile.xml')
         else:
-            self.template = template
+            self.profilePath = profile
 
         # OWSLib md object
         self.md.identification = MD_DataIdentification()
@@ -217,7 +212,7 @@
         self.md.identification.uom.append('m')  # TODO
 
         # different metadata sources for vector and raster
-        if self.type == 'cell':
+        if self.type == 'raster':
             # Identification/Resource Abstract
             self.md.identification.abstract = mdutil.replaceXMLReservedChar(self.md_abstract)
             # Geographic/resolution
@@ -253,22 +248,23 @@
             val.role = n
             self.md.identification.contact.append(val)
 
-        self.templatePathAbs = os.path.join(self.dirpath, self.template)
+        self.profilePathAbs = os.path.join(self.dirpath, self.profilePath)
 
-    def createGrassInspireISO(self, template=None):
+    def createGrassInspireISO(self, profile=None):
         '''Create valid INSPIRE profile and fill it as much as possible by GRASS metadata. Missing values is $NULL
         -create basic md profile and add INSPIRE mandatory attributes
         '''
 
         self.schema_type = '_inspire.xml'
+        self.profileName='INSPIRE'
 
         # create basic profile
         self.createGrassBasicISO()
 
-        if template is None:
-            self.template = os.path.join('templates',  'inspireTemplate.xml')
+        if profile is None:
+            self.profilePath = os.path.join('profiles',  'inspireProfile.xml')
         else:
-            self.template = template
+            self.profilePath = profile
 
         n = '$NULL'
 
@@ -318,13 +314,19 @@
         self.md.identification.temporalextent_start = n
         self.md.identification.temporalextent_end = n
 
-        self.templatePathAbs = os.path.join(self.dirpath, self.template)
-        # print self.templatePathAbs
+        self.profilePathAbs = os.path.join(self.dirpath, self.profilePath)
 
     def readXML(self, xml_file):
         '''create instance of metadata(owslib) from xml file'''
         self.md = MD_Metadata(etree.parse(xml_file))
 
+
+    def getMapInfo(self):
+        xml_out_name = self.type + '_' + str(self.map).partition('@')[0]  # + self.schema_type
+        if not xml_out_name.lower().endswith('.xml'):
+            xml_out_name += '.xml'
+        return xml_out_name, self.type,self.map,self.profileName
+
     def saveXML(self, path=None, xml_out_name=None, wxparent=None, overwrite=False):
         ''' Save init. record  of OWSLib objects to ISO XML file'''
 
@@ -340,16 +342,16 @@
                 print os.makedirs(path)
         path = os.path.join(path, xml_out_name)
 
-        # generate xml using jinja templates
+        # generate xml using jinja profiles
         env = Environment(loader=FileSystemLoader(self.dirpath))
         env.globals.update(zip=zip)
-        template = env.get_template(self.template)
-        iso_xml = template.render(md=self.md)
+        profile = env.get_template(self.profilePath)
+        iso_xml = profile.render(md=self.md)
 
         # write xml to flat file
         if wxparent != None:
             if os.path.isfile(path):
-                if mdutil.yesNo(wxparent, 'Metadata file exists. Do you want to overwrite file: %s?' % path, 'Overwrite dialog'):
+                if mdutil.yesNo(wxparent, 'Metadata file exists. Do you want to overwrite metadata file: %s?' % path, 'Overwrite dialog'):
                     try:
                         xml_file = open(path, "w")
                         xml_file.write(iso_xml)
@@ -440,13 +442,13 @@
 
             if md.identification.contact is not None:
                 if len(md.identification.contact) > 0:
-                    _person = md.identification.contact.organization.pop()
+                    _person = md.identification.contact.pop()
+                    if _person is str:
+                        Module('v.support',
+                               map=self.map,
+                               person=_person,
+                               flags='r')
 
-                    Module('v.support',
-                           map=self.map,
-                           person=_person,
-                           flags='r')
-
             if md.identification.title is not (None or ''):
                 _name = md.identification.title
                 Module('v.support',
@@ -484,7 +486,7 @@
                        flags='r')
 
 #------------------------------------------------------------------------ RASTER
-        if self.type == "cell":
+        if self.type == "raster":
 
             if md.identification.title is not (None or ''):
                 _title = md.identification.title

Added: grass-addons/grass7/gui/wxpython/wx.metadata/pdf/Makefile
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/pdf/Makefile	                        (rev 0)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/pdf/Makefile	2015-06-01 20:48:36 UTC (rev 65349)
@@ -0,0 +1,22 @@
+MODULE_TOPDIR = ../..
+
+include $(MODULE_TOPDIR)/include/Make/Other.make
+include $(MODULE_TOPDIR)/include/Make/Python.make
+
+DSTDIR = $(ETC)/pdf
+
+MODULES = $(wildcard *.py)
+
+PYFILES := $(patsubst %,$(DSTDIR)/%,$(MODULES))
+PYCFILES := $(patsubst %.py,$(DSTDIR)/%.pyc,$(filter %.py,$(MODULES)))
+
+default: $(PYFILES) $(PYCFILES)
+
+install:
+	@cp -rL $(DSTDIR) $(INST_DIR)
+
+$(DSTDIR):
+	$(MKDIR) $@
+
+$(DSTDIR)/%: % | $(DSTDIR)
+	$(INSTALL_DATA) $< $@

Added: grass-addons/grass7/gui/wxpython/wx.metadata/pdf/mdpdffactory.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/pdf/mdpdffactory.py	                        (rev 0)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/pdf/mdpdffactory.py	2015-06-01 20:48:36 UTC (rev 65349)
@@ -0,0 +1,635 @@
+from owslib.iso import *
+from reportlab.platypus import PageBreak
+import tempfile, sys, os
+import math
+from reportlab.platypus import Paragraph, Image, Table
+from mdpdftheme import *
+
+from grass.script import core as grass
+
+sys.path.insert(1, os.path.join(os.path.dirname(sys.path[0]), 'etc', 'pdf'))
+
+
+class MyTheme(DefaultTheme):
+    doc = {
+        'leftMargin': 25,
+        'rightMargin': 25,
+        'bottomMargin': 25,
+        'allowSplitting': False
+    }
+
+
+class PdfCreator(object):
+    def __init__(self, MD_metadata, pdf_file, map, type, filename, profile):
+
+        '''@:param MD_metadata- instance of metadata(owslib)
+           @:param pdf_file- path and name of generated report
+        '''
+
+        self.md = MD_metadata
+        self.pdf_file = pdf_file
+        self.TABLE_WIDTH = 540
+        self.map = map
+        self.type = type
+        self.profile = profile
+        if self.profile is None:
+            self.profile = 'custom iso profile'
+        self.filename = filename
+
+    def getMapPic(self):
+        f = os.path.join(tempfile.gettempdir(), 'tmpPic.png')
+
+        grass.run_command('g.region', save='tmpPdf', overwrite=True)
+        grass.run_command('g.region', flags='d')
+
+        grass.run_command('d.mon', start='cairo', output=f, width=200, height=200, overwrite=True)
+        grass.run_command('d.erase')
+        if self.type == 'raster':
+            grass.run_command('d.rast', map=self.map)
+        if self.type == 'vector':
+            grass.run_command('d.vect', map=self.map)
+        grass.run_command('d.mon', stop='cairo')
+        grass.run_command('g.region', region='tmpPdf')
+        return f
+
+
+    def findItem(self, items, name2, idx=-1):
+        values = []
+        for i in items:
+            if i.name2 == name2:
+                values.append(i.value[0])
+
+        if idx == -1:
+            if len(values) == 0:
+                values.append('$NULL')
+            return values
+
+        if len(values) <= idx:
+            return '$NULL'
+
+        if values[idx] is not None:
+            return values[idx]
+
+        return '$NULL'
+
+    # def chckTextValidity(self):
+    def tableFactory(self, title, headers, key):
+        '''
+        @:param headers - list of header
+        '''
+        self.doc.add_header(title, H4)
+        head = []
+        head.append(headers)
+        tmp = []
+        for i in range(len(self.findItem(self.story[key], headers[0]))):
+            for header in headers:
+                value = self.findItem(self.story[key], header, i)
+                # value=self.chckTextValidity(value)
+                text = Paragraph("""
+                %s<br/>
+                """ % value, MyTheme.paragraph)
+                tmp.append(text)
+            head.append(tmp)
+            tmp = []
+
+        self.doc.add_table(head, self.TABLE_WIDTH)
+
+    def textFactory(self, title, tag, name, multiple=0):
+        self.doc.add_header(title, H4)
+        val = self.findItem(self.story[tag], name, multiple)
+        lines = ''
+        if len(val) > 1 and multiple == -1:
+            tmp = []
+            for v in val:
+                tmp.append(v)
+            lines = ', '.join(tmp)
+            text = Paragraph("""
+            %s<br/>
+            """ % lines, MyTheme.paragraph)
+            self.doc.add_fparagraph(text)
+            return
+
+        if len(val) > 400:
+            for line in val.splitlines():
+                lines += line + '\n'
+                if len(lines) > 400:
+                    text = Paragraph("""
+                                    %s<br/>
+                                    """ % lines, MyTheme.paragraph)
+                    self.doc.add_fparagraph(text)
+                    lines = ''
+        else:
+            text = Paragraph("""
+                            %s<br/>
+                            """ % val, MyTheme.paragraph)
+            self.doc.add_fparagraph(text)
+
+    def createPDF(self, save=True):
+        self.story = self._parseMDOWS()
+        self.doc = Pdf('Metadata file', 'GRASS GIS')
+
+        self.doc.set_theme(MyTheme)
+
+        logo_path = '/home/matt/Dropbox/GSOC2015/pdfExp/logo.png'
+        self.doc.add_image(logo_path, 50, 50, LEFT)
+
+        if self.map is None:
+            self.doc.add_header(self.filename, T1)
+        else:
+            self.doc.add_header(self.map, T1)
+            self.doc.add_header(self.filename, T2)
+
+        if self.type == 'vector':
+            name = 'vector map'
+            self.doc.add_header(name, T2)
+        else:
+            name = 'raster map'
+            self.doc.add_header(name, T2)
+
+        self.doc.add_header("%s metadata profile" % self.profile, T3)
+
+        self.doc.add_spacer(2)
+
+        if map is not None:
+            mapPic = self.getMapPic()
+            self.doc.add_image(mapPic, 200, 200, CENTER)
+
+        self.textFactory(title="Keywords", name='Keywords', tag='identification', multiple=-1)
+        self.textFactory(title="Abstract", name='Abstract', tag='identification')
+        # #################### metadata #################################
+        self.doc.add_spacer(25)
+        self.doc.add_header("Metadata on metadata", H1)
+        head = ['Organization name', 'E-mail', 'Role']  # this is the header row
+        self.tableFactory("Metadata point of contact", head, 'contact')
+        self.textFactory(title="Metadata date", name='Datestamp', tag='datestamp')
+        self.textFactory(title="Metadata language", name='Language', tag='languagecode')
+        # #################### identification #################################
+        self.doc.add(PageBreak())
+        self.doc.add_header("Identification", H1)
+        self.textFactory(title="Restource title", name='Title', tag='identification')
+        self.textFactory(title="Identifier", name='Identifier', tag='identifier')
+        # self.textFactory(title="Resource locator", name='Identifier',tag='identifier')#TODO linkage is missing
+
+        self.tableFactory("Resource language", ['Language'], 'identification')
+        # head = ['Organization name', 'E-mail','Role']
+        # .tableFactory("identifier",head,'contact')
+
+        ##################### Keywords ################################## TODO
+
+
+
+
+        ##################### Geographic ##################################
+        self.doc.add_spacer(25)
+        self.doc.add_header('Geographic Location', H1)
+
+        maxy = float(self.findItem(self.story['identification'], 'maxy', 0))
+        maxx = float(self.findItem(self.story['identification'], 'maxx', 0))
+        miny = float(self.findItem(self.story['identification'], 'miny', 0))
+        minx = float(self.findItem(self.story['identification'], 'minx', 0))
+
+        head = [['North Bound Latitude', 'East Bound Longitude', 'South Bound Latitude', 'West Bound Longitude']]
+        head.append([maxx, maxy, minx, miny])
+        self.doc.add_table(head, self.TABLE_WIDTH)
+        self.doc.add_spacer(25)
+        mapPath = MapBBFactory([[maxx, minx], [maxy, miny]], )
+
+        gmap = Image(mapPath.link1, 200, 200)
+        gmap1 = Image(mapPath.link2, 200, 200)
+        self.doc.add(Table([[gmap1, gmap]]))
+        self.doc.add(PageBreak())
+        ##################### Temporal ##################################
+        self.doc.add_spacer(25)
+        self.doc.add_header('Temporal reference', H1)
+        self.textFactory(title="Temporal extend start", name='Temporal extend start', tag='identification')
+        self.textFactory(title="Temporal extend end", name='Temporal extend end', tag='identification')
+
+        ##################### Quality ##################################
+        self.doc.add_spacer(25)
+        self.doc.add_header('Quality a validity', H1)
+        self.textFactory(title="Lineage", name='Lineage', tag='dataquality')
+
+        #self.textFactory(title="Temporal extend start", name='Temporal extend start',tag='identification')
+        # TODO md.identification.denominators
+
+        ######################Conformity ########################
+        self.doc.add_spacer(25)
+        self.doc.add_header('Conformity', H1)
+        head = ['Conformance date', "Conformance date type", 'Specification']
+        self.tableFactory("Conformity", head, 'dataquality')
+        ###################### Constraints ########################
+        self.doc.add_spacer(25)
+        self.doc.add_header('Constraints', H1)
+        self.tableFactory("Condition applying to use", ["Use constraints"], 'identification')
+        self.tableFactory("Condition applying to access", ["Access constraints"], 'identification')
+        self.tableFactory("Limitation on public access", ["Other constraintrs"], 'identification')
+        ###################### Responsible party ########################
+        self.doc.add_spacer(25)
+        self.doc.add_header('Responsible party', H1)
+        header = ["Organization name", "E-mail", "Role"]
+        self.tableFactory(
+            "Organisations responsible for the establishment, management, maintenance and distribution of spatial data sets and services",
+            header, 'identification')
+
+        text = self.doc.render()
+        # http://www.reportlab.com/docs/reportlab-userguide.pdf
+        if save and self.pdf_file is not None:
+            path = self.savePDF(text)
+            return path
+
+        return text
+
+    def _parseMDOWS(self, md=None):
+
+        if md is None:
+            md = self.md
+        metadata = {}
+        metadata["identification"] = []
+        metadata["languagecode"] = []
+        metadata["datestamp"] = []
+        metadata["identifier"] = []
+        metadata["dataquality"] = []
+        metadata["contact"] = []
+        metadata['distance'] = []
+        # #########################################################
+        # ##############  identification  #########################
+        if md.identification is not None:
+            if md.identification.contact is not None:
+                for contact in md.identification.contact:
+                    if contact.organization is not (None or ''):
+                        metadata["identification"].append(
+                            MD_ITEM(contact.organization, "gmd:CI_ResponsibleParty", "Organization name"))
+                    if contact.email is not (None or ''):
+                        metadata["identification"].append(MD_ITEM(contact.email, "gmd:CI_ResponsibleParty", "E-mail"))
+                    if contact.role is not (None or ''):
+                        metadata["identification"].append(MD_ITEM(contact.role, "gmd:CI_ResponsibleParty", "Role"))
+
+            if md.identification.title is not (None or ''):
+                metadata["identification"].append(
+                    MD_ITEM(md.identification.title, "gmd:md_DataIdentification", "Title"))
+
+            if md.identification.abstract is not (None or ''):
+                metadata["identification"].append(
+                    MD_ITEM(md.identification.abstract, "gmd:md_DataIdentification", "Abstract"))
+
+            if md.identification.identtype is not (None or ''):
+                metadata["identification"].append(
+                    MD_ITEM(md.identification.identtype, "gmd:md_ScopeCode", "Resource type"))
+
+            if md.identification.resourcelanguage is not None:
+                for language in md.identification.resourcelanguage:
+                    if language != '':
+                        metadata["identification"].append(MD_ITEM(language, "gmd:language", "Language"))
+
+            if md.identification.uricode is not None:
+                for uri in md.identification.uricode:
+                    if uri != '':
+                        metadata["identification"].append(
+                            MD_ITEM(uri, "gmd:RS_Identifier", "Unique Resource Identifier"))
+
+            if md.identification.topiccategory is not None:
+                for topic in md.identification.topiccategory:
+                    if topic != '':
+                        metadata["identification"].append(MD_ITEM(topic, "gmd:topicCategory", "Topic Category"))
+
+            # #########################################################
+            # ########################  keywords  #########################
+            if md.identification.keywords is not None:
+                for key in md.identification.keywords:
+                    for k in key['keywords']:
+                        if k is not (None or ''):
+                            metadata["identification"].append(MD_ITEM(k, "gmd:MD_Keywords", "Keywords"))
+
+                    if key['thesaurus'] is not (None or ''):
+                        if key['thesaurus']['title'] is not (None or ''):
+                            metadata["identification"].append(
+                                MD_ITEM(key['thesaurus']['title'], "gmd:thesaurusName", "Thesaurus title"))
+                        if key['thesaurus']['date'] is not (None or ''):
+                            metadata["identification"].append(
+                                MD_ITEM(key['thesaurus']['date'], "gmd:thesaurusName", "Thesaurus date"))
+                        if key['thesaurus']['datetype'] is not (None or ''):
+                            metadata["identification"].append(
+                                MD_ITEM(key['thesaurus']['datetype'], "gmd:thesaurusName", "Thesaurus date type "))
+
+            if md.identification.extent is not None:
+                if md.identification.extent.boundingBox is not None:
+                    if md.identification.extent.boundingBox.minx is not (None or ''):
+                        metadata["identification"].append(
+                            MD_ITEM(md.identification.extent.boundingBox.minx, "gmd:westBoundLongitude", "minx"))
+                    if md.identification.extent.boundingBox.maxx is not (None or ''):
+                        metadata["identification"].append(
+                            MD_ITEM(md.identification.extent.boundingBox.maxx, "gmd:eastBoundLongitude", "maxx"))
+                    if md.identification.extent.boundingBox.miny is not (None or ''):
+                        metadata["identification"].append(
+                            MD_ITEM(md.identification.extent.boundingBox.miny, "gmd:southBoundLatitude", "miny"))
+                    if md.identification.extent.boundingBox.maxy is not (None or ''):
+                        metadata["identification"].append(
+                            MD_ITEM(md.identification.extent.boundingBox.maxy, "gmd:northBoundLatitude", "maxy"))
+
+            if md.identification.date is not None:
+                for date in md.identification.date:
+                    if date is not (None or ''):
+                        metadata["identification"].append(MD_ITEM(date, "gmd:CI_Date", "Date"))
+
+            if md.identification.temporalextent_start is not (None or ''):
+                metadata["identification"].append(
+                    MD_ITEM(md.identification.temporalextent_start, "gmd:EX_TemporalExtent", "Temporal extend start"))
+            if md.identification.temporalextent_end is not (None or ''):
+                metadata["identification"].append(
+                    MD_ITEM(md.identification.temporalextent_end, "gmd:EX_TemporalExtent", "Temporal extend end"))
+
+            if md.identification.uselimitation is not None:
+                for limitation in md.identification.uselimitation:
+                    if limitation is not (None or ''):
+                        metadata["identification"].append(MD_ITEM(limitation, "gmd:useLimitation", "Use limitation"))
+
+            if md.identification.accessconstraints is not None:
+                for accessconstraints in md.identification.accessconstraints:
+                    if accessconstraints is not (None or ''):
+                        metadata["identification"].append(
+                            MD_ITEM(accessconstraints, "gmd:accessConstraints", "Access constraints"))
+
+            if md.identification.otherconstraints is not None:
+                for otherconstraints in md.identification.otherconstraints:
+                    if otherconstraints is not (None or ''):
+                        metadata["identification"].append(
+                            MD_ITEM(otherconstraints, "gmd:otherConstraints", "Other constraintrs"))
+
+
+        # #########################################################
+        # ########################  date  #########################
+        if md.languagecode is not (None or ''):
+            metadata["languagecode"].append(MD_ITEM(md.languagecode, "gmd:LanguageCode", "Language"))
+
+        if md.datestamp is not (None or ''):
+            metadata["datestamp"].append(MD_ITEM(md.datestamp, "gmd:dateStamp", "Datestamp"))
+
+        if md.identifier is not (None or ''):
+            metadata["identifier"].append(MD_ITEM(md.identifier, "gmd:identifier", "Identifier"))
+
+        if md.dataquality is not (None or ''):
+            if md.dataquality.lineage is not (None or ''):
+                metadata["dataquality"].append(MD_ITEM(md.dataquality.lineage, "gmd:LI_Lineage", "Lineage"))
+
+            if md.dataquality.conformancedate is not None:
+                for conformancedate in md.dataquality.conformancedate:
+                    if conformancedate is not (None or ''):
+                        metadata["dataquality"].append(
+                            MD_ITEM(conformancedate, "gmd:DQ_ConformanceResult", "Conformance date"))
+
+            if md.dataquality.conformancedatetype is not None:
+                for conformancedatetype in md.dataquality.conformancedatetype:
+                    if conformancedate is not (None or ''):
+                        metadata["dataquality"].append(
+                            MD_ITEM(conformancedatetype, "gmd:DQ_ConformanceResult", "Conformance date type"))
+
+            if md.dataquality.conformancetitle is not None:
+                for conformancetitle in md.dataquality.conformancetitle:
+                    if conformancedate is not (None or ''):
+                        metadata["dataquality"].append(
+                            MD_ITEM(conformancetitle, "gmd:DQ_ConformanceResult", "Specification"))
+
+        if md.contact is not None:
+            for contact in md.contact:
+                if contact.organization is not (None or ''):
+                    metadata["contact"].append(MD_ITEM(contact.organization, "gmd:contact", "Organization name"))
+
+                if contact.email is not (None or ''):
+                    metadata["contact"].append(
+                        MD_ITEM(contact.email, "gmd:contact", "E-mail"))  # TODO more email can be
+
+                if contact.role is not (None or ''):
+                    metadata["contact"].append(MD_ITEM(contact.role, "gmd:role", "Role"))
+
+        # #### quality validity
+        if self.md.identification.distance is not (None or ''):
+            metadata['distance'].append(MD_ITEM(self.md.identification.distance, 'gmd:distance', 'Distance'))
+        return metadata
+
+    def savePDF(self, doc, pathToPdf=None):
+        if pathToPdf is None:
+            pathToPdf = self.pdf_file
+        out = open(pathToPdf, 'w+')
+        out.writelines(doc)
+        out.close()
+        return pathToPdf
+
+
+class MD_ITEM():
+    def __init__(self, value, name1, name2=None):
+        self.value = []
+        self.name1 = name1
+        self.name2 = name2
+        self.addValue(value)
+
+    def addValue(self, value):
+        self.value.append(value)
+
+
+class Point():
+    """Stores a simple (x,y) point.  It is used for storing x/y pixels.
+
+    Attributes:
+      x: An int for a x value.
+      y: An int for a y value.
+    """
+
+    def __init__(self, x, y):
+        self.x = x
+        self.y = y
+
+    def ToString(self):
+        return '(%s, %s)' % (self.x, self.y)
+
+    def Equals(self, other):
+        if other is None:
+            return False
+        else:
+            return (other.x == self.x and other.y == self.y)
+
+
+class MapBBFactory():
+    '''Class for compute bounding box for static map with using google maps API
+    '''
+
+    def __init__(self, coords, size=[200, 200]):
+        self.pixels_per_lon_degree = []
+        self.pixels_per_lon_radian = []
+        self.pixel_origo = []
+        self.pixel_range = []
+        self.pixels = 256
+        self.size = size
+        zoom_levels = range(0, 18)
+        for z in zoom_levels:
+            origin = self.pixels / 2
+            self.pixels_per_lon_degree.append(self.pixels / 360)
+            self.pixels_per_lon_radian.append(self.pixels / (2 * math.pi))
+            self.pixel_origo.append(Point(origin, origin))
+            self.pixel_range.append(self.pixels)
+            self.pixels = self.pixels * 2
+
+        bounds = self.CalcBoundsFromPoints(coords[0], coords[1])
+        corners = self.calcCornersFromBounds(bounds)
+        center = self.CalcCenterFromBounds(bounds)
+        zoom = self.CalculateBoundsZoomLevel(bounds, size)
+        self.link1, self.link2 = self.buildLink(center, zoom, corners)
+
+    def calcCornersFromBounds(self, bounds):
+        """
+        :param bounds: An int that is either the value passed in or the min or the max.
+        :return: polygon defined by 5 points represented by string (format for generating
+        """
+        YmaxXmin = str(bounds[0][0]) + ',' + str(bounds[0][1])
+        YminXmin = str(bounds[0][0]) + ',' + str(bounds[1][1])
+        YminXmax = str(bounds[1][0]) + ',' + str(bounds[1][1])
+        YmaxXmax = str(bounds[1][0]) + ',' + str(bounds[0][1])
+
+        corners = YmaxXmin + "|" + YminXmin + "|" + YminXmax + "|" + YmaxXmax + "|" + YmaxXmin
+        return corners
+
+    def buildLink(self, center, zoom, corners):
+        size = str(self.size[0]) + 'x' + str(self.size[1])
+
+        pic = ("http://maps.googleapis.com/maps/api/staticmap?center=" +
+               str(center['lat']) + ',' + str(center['lng']) + "&zoom=" + str(zoom) +
+               "&size=" + size + "&sensor=false&path=color:red|weight:3|" + corners)
+        pic1 = ("http://maps.googleapis.com/maps/api/staticmap?center=" +
+                str(center['lat']) + ',' + str(center['lng']) + "&zoom=" + str(zoom - 4) +
+                "&size=" + size + "&sensor=false&path=color:red|weight:3|" + corners)
+        return pic, pic1
+
+    def CalcCenterFromBounds(self, bounds):
+        """Calculates the center point given southwest/northeast lat/lng pairs.
+
+        Given southwest and northeast bounds, this method will return the center
+        point.  We use this method when we have done a search for points on the map,
+        and we get multiple results.  In the results we don't get anything to
+        calculate the center point of the map so this method calculates it for us.
+
+        Args:
+          bounds: A list of length 2, each holding a list of length 2. It holds
+            the southwest and northeast lat/lng bounds of a map.  It should look
+            like this: [[southwestLat, southwestLat], [northeastLat, northeastLng]]
+
+        Returns:
+          An dict containing keys lat and lng for the center point.
+        """
+        north = bounds[1][0]
+        south = bounds[0][0]
+        east = bounds[1][1]
+        west = bounds[0][1]
+        center = {}
+        center['lat'] = north - float((north - south) / 2)
+        center['lng'] = east - float((east - west) / 2)
+        return center
+
+    def Bound(self, value, opt_min, opt_max):
+        """Returns value if in min/max, otherwise returns the min/max.
+
+        Args:
+          value: The value in question.
+          opt_min: The minimum the value can be.
+          opt_max: The maximum the value can be.
+
+        Returns:
+          An int that is either the value passed in or the min or the max.
+        """
+        if opt_min is not None:
+            value = max(value, opt_min)
+        if opt_max is not None:
+            value = min(value, opt_max)
+        return value
+
+
+    def DegreesToRadians(self, deg):
+        return deg * (math.pi / 180)
+
+
+    def FromLatLngToPixel(self, lat_lng, zoom):
+        """Given lat/lng and a zoom level, returns a Point instance.
+
+        This method takes in a lat/lng and a _test_ zoom level and based on that it
+        calculates at what pixel this lat/lng would be on the map given the zoom
+        level.  This method is used by CalculateBoundsZoomLevel to see if this
+        _test_ zoom level will allow us to fit these bounds in our given map size.
+
+        Args:
+          lat_lng: A list of a lat/lng point [lat, lng]
+          zoom: A list containing the width/height in pixels of the map.
+
+        Returns:
+          A Point instance in pixels.
+        """
+        o = self.pixel_origo[zoom]
+        x = round(o.x + lat_lng[1] * self.pixels_per_lon_degree[zoom])
+        siny = self.Bound(math.sin(self.DegreesToRadians(lat_lng[0])),
+                          -0.9999, 0.9999)
+        y = round(o.y + 0.5 * math.log((1 + siny) /
+                                       (1 - siny)) * -self.pixels_per_lon_radian[zoom])
+        return Point(x, y)
+
+
+    def CalculateBoundsZoomLevel(self, bounds, view_size):
+        """Given lat/lng bounds, returns map zoom level.
+
+        This method is used to take in a bounding box (southwest and northeast
+        bounds of the map view we want) and a map size and it will return us a zoom
+        level for our map.  We use this because if we take the bottom left and
+        upper right on the map we want to show, and calculate what pixels they
+        would be on the map for a given zoom level, then we can see how many pixels
+        it will take to display the map at this zoom level.  If our map size is
+        within this many pixels, then we have the right zoom level.
+
+        Args:
+          bounds: A list of length 2, each holding a list of length 2. It holds
+            the southwest and northeast lat/lng bounds of a map.  It should look
+            like this: [[southwestLat, southwestLat], [northeastLat, northeastLng]]
+          view_size: A list containing the width/height in pixels of the map.
+
+        Returns:
+          An int zoom level.
+        """
+        zmax = 18
+        zmin = 0
+        bottom_left = bounds[0]
+        top_right = bounds[1]
+        backwards_range = range(zmin, zmax)
+        backwards_range.reverse()
+        for z in backwards_range:
+            bottom_left_pixel = self.FromLatLngToPixel(bottom_left, z)
+            top_right_pixel = self.FromLatLngToPixel(top_right, z)
+            if bottom_left_pixel.x > top_right_pixel.x:
+                bottom_left_pixel.x -= self.CalcWrapWidth(z)
+            if abs(top_right_pixel.x - bottom_left_pixel.x) <= view_size[0] \
+                    and abs(top_right_pixel.y - bottom_left_pixel.y) <= view_size[1]:
+                return z
+        return 0
+
+
+    def CalcBoundsFromPoints(self, lats, lngs):
+        """Calculates the max/min lat/lng in the lists.
+
+        This method takes in a list of lats and a list of lngs, and outputs the
+        southwest and northeast bounds for these points.  We use this method when we
+        have done a search for points on the map, and we get multiple results.  In
+        the results we don't get a bounding box so this method calculates it for us.
+
+        Args:
+          lats: List of latitudes
+          lngs: List of longitudes
+
+        Returns:
+          A list of length 2, each holding a list of length 2.  It holds
+          the southwest and northeast lat/lng bounds of a map.  It should look
+          like this: [[southwestLat, southwestLat], [northeastLat, northeastLng]]
+        """
+        lats = [float(x) for x in lats]
+        lngs = [float(x) for x in lngs]
+        flats = map(float, lats)
+        flngs = map(float, lngs)
+        west = min(flngs)
+        east = max(flngs)
+        north = max(flats)
+        south = min(flats)
+        return [[south, west], [north, east]]
+


Property changes on: grass-addons/grass7/gui/wxpython/wx.metadata/pdf/mdpdffactory.py
___________________________________________________________________
Added: svn:executable
   + *

Added: grass-addons/grass7/gui/wxpython/wx.metadata/pdf/mdpdftheme.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/pdf/mdpdftheme.py	                        (rev 0)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/pdf/mdpdftheme.py	2015-06-01 20:48:36 UTC (rev 65349)
@@ -0,0 +1,336 @@
+from reportlab.lib.styles import ParagraphStyle, _baseFontNameB, _baseFontNameI, _baseFontNameBI
+from reportlab.lib.units import inch
+from reportlab.lib import colors
+from reportlab.rl_config import canvas_basefontname as _baseFontName
+from reportlab.lib.enums import TA_LEFT, TA_CENTER
+import cStringIO
+import urllib
+from reportlab.platypus.doctemplate import SimpleDocTemplate
+from reportlab.platypus.flowables import Image
+from reportlab.platypus import Paragraph, Spacer, KeepTogether
+from reportlab.platypus.tables import Table, TableStyle, LongTable
+
+
+# Header levels
+H1, H2, H3, H4, H5, H6, T1, T2, T3, T4 = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
+
+# List styles
+UL, OL = 0, 1
+
+# Titles
+
+# Alignment
+CENTER, LEFT, RIGHT = 'CENTER', 'LEFT', 'RIGHT'
+
+
+class MySheet:
+    _stylesheet1_undefined = object()
+
+    def __init__(self):
+        self.byName = {}
+        self.byAlias = {}
+
+    def __getitem__(self, key):
+        try:
+            return self.byAlias[key]
+        except KeyError:
+            try:
+                return self.byName[key]
+            except KeyError:
+                raise KeyError("Style '%s' not found in stylesheet" % key)
+
+    def get(self, key, default=_stylesheet1_undefined):
+        try:
+            return self[key]
+        except KeyError:
+            if default != _stylesheet1_undefined: return default
+            raise
+
+    def __contains__(self, key):
+        return key in self.byAlias or key in self.byName
+
+    def has_key(self, key):
+        return key in self
+
+    def add(self, style, alias=None):
+        key = style.name
+        if key in self.byName:
+            raise KeyError("Style '%s' already defined in stylesheet" % key)
+        if key in self.byAlias:
+            raise KeyError("Style name '%s' is already an alias in stylesheet" % key)
+
+        if alias:
+            if alias in self.byName:
+                raise KeyError("Style '%s' already defined in stylesheet" % alias)
+            if alias in self.byAlias:
+                raise KeyError("Alias name '%s' is already an alias in stylesheet" % alias)
+        #passed all tests?  OK, add it
+        self.byName[key] = style
+        if alias:
+            self.byAlias[alias] = style
+
+    def list(self):
+        styles = list(self.byName.items())
+        styles.sort()
+        alii = {}
+        for (alias, style) in list(self.byAlias.items()):
+            alii[style] = alias
+        for (name, style) in styles:
+            alias = alii.get(style, None)
+            style.listAttrs('    ')
+
+
+    def getSampleStyleSheet(self):
+        """Returns a stylesheet object"""
+        stylesheet = MySheet()
+
+        stylesheet.add(ParagraphStyle(name='Normal',
+                                      fontName=_baseFontName,
+                                      fontSize=10,
+                                      leading=12)
+        )
+        stylesheet.add(ParagraphStyle(name='Title',
+                                      parent=stylesheet['Normal'],
+                                      fontName=_baseFontNameB,
+                                      fontSize=18,
+                                      leading=22,
+                                      alignment=TA_CENTER,
+                                      spaceAfter=6),
+                       alias='title')
+
+        stylesheet.add(ParagraphStyle(name='Title2',
+                                      parent=stylesheet['Normal'],
+                                      fontName=_baseFontName,
+                                      fontSize=13,
+                                      leading=22,
+                                      alignment=TA_CENTER,
+                                      spaceAfter=0),
+                       alias='title2')
+
+        stylesheet.add(ParagraphStyle(name='Title3',
+                                      parent=stylesheet['Normal'],
+                                      fontName=_baseFontName,
+                                      fontSize=10,
+                                      leading=5,
+                                      alignment=TA_CENTER,
+                                      spaceAfter=10),
+                       alias='title3')
+
+        stylesheet.add(ParagraphStyle(name='Title4',
+                                      parent=stylesheet['Normal'],
+                                      fontName=_baseFontName,
+                                      fontSize=8,
+                                      leading=10,
+                                      alignment=TA_CENTER,
+                                      spaceAfter=5),
+                       alias='title4')
+
+        stylesheet.add(ParagraphStyle(name='BodyText',
+                                      parent=stylesheet['Normal'],
+                                      spaceBefore=6)
+        )
+        stylesheet.add(ParagraphStyle(name='Italic',
+                                      parent=stylesheet['BodyText'],
+                                      fontName=_baseFontNameI)
+        )
+
+        stylesheet.add(ParagraphStyle(name='Heading1',
+                                      parent=stylesheet['Normal'],
+                                      fontName=_baseFontNameB,
+                                      fontSize=18,
+                                      leading=22,
+                                      spaceAfter=6),
+                       alias='h1')
+
+        stylesheet.add(ParagraphStyle(name='Heading2',
+                                      parent=stylesheet['Normal'],
+                                      fontName=_baseFontNameB,
+                                      fontSize=14,
+                                      leading=18,
+                                      spaceBefore=12,
+                                      spaceAfter=6),
+                       alias='h2')
+
+        stylesheet.add(ParagraphStyle(name='Heading3',
+                                      parent=stylesheet['Normal'],
+                                      fontName=_baseFontNameBI,
+                                      fontSize=12,
+                                      leading=14,
+                                      spaceBefore=12,
+                                      spaceAfter=6),
+                       alias='h3')
+
+        stylesheet.add(ParagraphStyle(name='Heading4',
+                                      parent=stylesheet['Normal'],
+                                      fontName=_baseFontNameBI,
+                                      fontSize=10,
+                                      leading=12,
+                                      spaceBefore=10,
+                                      spaceAfter=4),
+                       alias='h4')
+
+        stylesheet.add(ParagraphStyle(name='Heading5',
+                                      parent=stylesheet['Normal'],
+                                      fontName=_baseFontNameB,
+                                      fontSize=9,
+                                      leading=10.8,
+                                      spaceBefore=8,
+                                      spaceAfter=4),
+                       alias='h5')
+
+        stylesheet.add(ParagraphStyle(name='Heading6',
+                                      parent=stylesheet['Normal'],
+                                      fontName=_baseFontNameB,
+                                      fontSize=7,
+                                      leading=8.4,
+                                      spaceBefore=6,
+                                      spaceAfter=2),
+                       alias='h6')
+
+        stylesheet.add(ParagraphStyle(name='Bullet',
+                                      parent=stylesheet['Normal'],
+                                      firstLineIndent=0,
+                                      spaceBefore=3),
+                       alias='bu')
+
+        stylesheet.add(ParagraphStyle(name='Definition',
+                                      parent=stylesheet['Normal'],
+                                      firstLineIndent=0,
+                                      leftIndent=36,
+                                      bulletIndent=0,
+                                      spaceBefore=6,
+                                      bulletFontName=_baseFontNameBI),
+                       alias='df')
+
+        stylesheet.add(ParagraphStyle(name='Code',
+                                      parent=stylesheet['Normal'],
+                                      fontName='Courier',
+                                      fontSize=8,
+                                      leading=8.8,
+                                      firstLineIndent=0,
+                                      leftIndent=36))
+
+        return stylesheet
+
+
+class DefaultTheme(object):
+    s = MySheet()
+    _s = s.getSampleStyleSheet()
+
+    doc = {
+        'leftMargin': None,
+        'rightMargin': None,
+        'topMargin': None,
+        'bottomMargin': None
+    }
+    headers = {
+        H1: _s['Heading1'],
+        H2: _s['Heading2'],
+        H3: _s['Heading3'],
+        H4: _s['Heading4'],
+        H5: _s['Heading5'],
+        H6: _s['Heading6'],
+        T1: _s['Title'],
+        T2: _s['Title2'],
+        T3: _s['Title3'],
+        T4: _s['Title4']
+    }
+
+    paragraph = _s['Normal']
+
+    spacer_height = 0.25 * inch
+    table_style = [
+        ('ALIGN', (0, 0), (-1, -1), 'LEFT'),
+        ('VALIGN', (0, 0), (-1, -1), 'TOP'),
+        ('FONT', (0, 0), (-1, 0), 'Helvetica-Bold'),
+        ('LINEBELOW', (0, 0), (-1, 0), 1, colors.black),
+        ('BACKGROUND', (0, 0), (-1, 0), colors.HexColor('#C0C0C0')),
+        ('ROWBACKGROUNDS', (0, 1), (-1, -1), [colors.white, colors.HexColor('#E0E0E0')])
+    ]
+
+    @classmethod
+    def doc_template_args(cls):
+        return dict([(k, v) for k, v in cls.doc.items() if v is not None])
+
+    @classmethod
+    def header_for_level(cls, level):
+        return cls.headers[level]
+
+    def __new__(cls, *args, **kwargs):
+        raise TypeError("Theme classes may not be instantiated.")
+
+
+def calc_table_col_widths(rows, table_width):
+    max_chars_per_col = [0] * len(rows[0])
+    for row in rows:
+        for idx, col in enumerate(row):
+            for line in str(col).split('\n'):
+                max_chars_per_col[idx] = max(len(line),
+                                             max_chars_per_col[idx])
+    sum_chars = sum(max_chars_per_col)
+    return [(x * table_width / sum_chars) for x in max_chars_per_col]
+
+
+_stylesheet1_undefined = object()
+
+
+class Pdf(object):
+    story = []
+    theme = DefaultTheme
+
+    def __init__(self, title, author):
+        self.title = title
+        self.author = author
+
+    def set_theme(self, theme):
+        self.theme = theme
+
+    def add(self, flowable):
+        self.story.append(flowable)
+
+    def add_header(self, text, level=H1):
+        p = Paragraph(text, self.theme.header_for_level(level))
+        self.add(p)
+
+    def add_fparagraph(self, text, style=None):
+        if style is not None:
+            self.add(Table([[text]], style=style))
+        else:
+            self.add(Table([[text]]))
+
+    def add_spacer(self, height_inch=None):
+        height_inch = height_inch or self.theme.spacer_height
+        self.add(Spacer(1, height_inch))  # magic 1? no, first param not yet implemented by rLab guys
+
+    def add_paragraph(self, text, style=None):
+        style = style or self.theme.paragraph
+        p = Paragraph(text, style)
+        self.add(p)
+
+    def add_list(self, items, list_style=UL):
+        raise NotImplementedError
+
+    def add_table(self, rows, width=None, col_widths=None, align=CENTER,
+                  extra_style=[]):
+        style = self.theme.table_style + extra_style
+        if width and col_widths is None:  # one cannot spec table width in rLab only col widths
+            col_widths = calc_table_col_widths(rows, width)  # this helper calcs it for us
+        table = LongTable(rows, col_widths, style=style, hAlign=align)
+        self.add(table)
+
+    def add_image(self, src, width, height, align=CENTER):
+        img = Image(src, width, height)
+        img.hAlign = align
+        self.add(img)
+
+    def render(self):
+        buffer = cStringIO.StringIO()
+        doc_template_args = self.theme.doc_template_args()
+        doc = SimpleDocTemplate(buffer, title=self.title, author=self.author,
+                                **doc_template_args)
+        doc.build(self.story)
+        pdf = buffer.getvalue()
+        buffer.close()
+        return pdf
+
+

Copied: grass-addons/grass7/gui/wxpython/wx.metadata/profiles/basicProfile.xml (from rev 65205, grass-addons/grass7/gui/wxpython/wx.metadata/templates/basicTemplate.xml)
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/profiles/basicProfile.xml	                        (rev 0)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/profiles/basicProfile.xml	2015-06-01 20:48:36 UTC (rev 65349)
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gmd:MD_Metadata xsi:schemaLocation="http://www.isotc211.org/2005/gmd http://schemas.opengis.net/iso/19139/20060504/gmd/gmd.xsd" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <gmd:fileIdentifier>
+        <gco:CharacterString>{{ md.identifier }}{# tag="md.identifier",ref="Part B 1.5",  name ="Resource Identifier", desc ="Unique Resource Identifier", example ="286c0725-046e-4533-b0bf-d6e367f6c342", type = "CharacterString", multi = 0, group = "Identification", multiline=False #}</gco:CharacterString>
+    </gmd:fileIdentifier>
+    <gmd:hierarchyLevel>
+        <gmd:MD_ScopeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_ScopeCode" codeListValue="dataset" codeSpace="ISOTC211/19115">{{ md.identification.identtype }}{# tag="md.identification.identtype", name ="Resource Type", desc ="Scope to which metadata applies", example ="dataset", type = "MD_ScopeCode", multi = 0, group = "Identification",multiline=False #}</gmd:MD_ScopeCode>
+    </gmd:hierarchyLevel>
+  {% for co in md.contact -%}{# tag="for co in md.contact",  inboxmulti = 1, group = "Metadata",inbox="Metadata point of contact",object="CI_ResponsibleParty()" #}
+    <gmd:contact>
+        <gmd:CI_ResponsibleParty>
+            <gmd:organisationName>
+                <gco:CharacterString>{{ co.organization }}{# tag="co.organization",ref="Part B 9.1",  inboxmulti = 1,multi = 0,type = "string",group = "Metadata",object="CI_ResponsibleParty()", inbox="Metadata point of contact",name="Organisation name",example="SDI Unit, Institute for Environment and Sustainability, Joint ResearchCentre",desc="identification of, and means of communication with, person(s) and organization(s) associated with theresource(s)" #}</gco:CharacterString>
+            </gmd:organisationName>
+            <gmd:contactInfo>
+                <gmd:CI_Contact>
+                    <gmd:address>
+                        <gmd:CI_Address>
+                            <gmd:electronicMailAddress>
+                                <gco:CharacterString>{{ co.email }}{# tag="co.email",name="E-mail",ref="Part B 10.1",  multi = 0,object="CI_ResponsibleParty()", inboxmulti = 1,group = "Metadata", inbox="Metadata point of contact",type = "email",example="image2000 at jrc.it", desc="Party responsible for the metadata information." #}</gco:CharacterString>
+                            </gmd:electronicMailAddress>
+                        </gmd:CI_Address>
+                    </gmd:address>
+                </gmd:CI_Contact>
+            </gmd:contactInfo>
+            <gmd:role>
+                <gmd:CI_RoleCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode" codeListValue="{{ co.role }}{# tag="co.role",name="Responsible party role",ref="Part B 9.2" , multi = 0,type = "CI_RoleCode", inboxmulti = 1,group = "Responsible party",object="CI_ResponsibleParty()", inbox="Metadata pointt of contact",example="custodian", desc="function performed by the responsible party" #}" codeSpace="ISOTC211/19115">{{ co.role }}</gmd:CI_RoleCode>
+            </gmd:role>
+        </gmd:CI_ResponsibleParty>
+    </gmd:contact>
+  {% endfor -%}
+    <gmd:dateStamp>
+        <gco:Date>{{ md.datestamp }}{# tag="md.datestamp" , name="Metadata date" , ref= "Part B 10.2" , desc= "Date that the metadata was created.",type = "date" , example = "2005-03-27" , multi= 0 , group= "Metadata" , multiline= False #}</gco:Date>
+    </gmd:dateStamp>
+    <gmd:metadataStandardName>
+        <gco:CharacterString>ISO 19115</gco:CharacterString>
+    </gmd:metadataStandardName>
+    <gmd:metadataStandardVersion>
+        <gco:CharacterString>2003/Cor.1:2006</gco:CharacterString>
+    </gmd:metadataStandardVersion>
+    <gmd:identificationInfo>
+        <gmd:MD_DataIdentification>
+            <gmd:citation>
+                <gmd:CI_Citation>
+                    <gmd:title>
+                        <gco:CharacterString>{{ md.identification.title }}{# tag="md.identification.title", ref="Part B 1.1", name ="Resource title", desc ="Name by which the cited resource is known.", example ="Image2000 Product 1 (nl2) MultispectB 10.1" , multi = 0, group ="Identification", type = "string", multiline=True #}</gco:CharacterString>
+                    </gmd:title>
+          {% for d in md.identification.date -%}{# tag="for d in md.identification.date" ,name="",object="CI_Date()",group= "Temporal" , inbox= "Date of creation/publication/revision",  inboxmulti=1, multiline= False #}
+                    <gmd:date>
+                        <gmd:CI_Date>
+                            <gmd:date>
+                                <gco:DateTime>{{ d.date }}{# tag="d.date" , group= "Temporal" ,object="CI_Date()", inbox= "Date of creation/publication/revision",  inboxmulti=1, multiline= False, name="Date of: type(below)",type = "date",desc="reference date for the cited resource - publication/creation/revision",example="2007-09-15" #}</gco:DateTime>
+                            </gmd:date>
+                            <gmd:dateType>
+                                <gmd:CI_DateTypeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue="{{ d.type }}{# tag="d.type" , group= "Temporal" ,type = "CI_DateTypeCode",object="CI_Date()", inbox= "Date of creation/publication/revision",  inboxmulti=1, multiline= False, name="type: creation/publication/revision",desc="reference date for the cited resource - publication/creation/revision",example="creation" #}" codeSpace="ISOTC211/19115">{{ d.type }}</gmd:CI_DateTypeCode>
+                            </gmd:dateType>
+                        </gmd:CI_Date>
+                    </gmd:date>
+                </gmd:CI_Citation>
+            </gmd:citation>
+      {% endfor -%}
+            <gmd:abstract>
+                <gco:CharacterString>{{ md.identification.abstract }}{# tag="md.identification.abstract ",ref="Part B 1.2",  name ="Resource Abstract", desc ="Brief narrative summary of the content of the resource(s).", example ="IMAGE2000 product 1 individual orthorectified scenes. IMAGE2000 was produced from ETM+ Landsat 7 satellite data and provides a consistent European coverage of individual orthorectified scenes in national map projection systems. The year 2000 was targeted as reference year, but a deviation of maximum 1-year was allowed to obtain a full coverage of Europe, which involves approximately 450 Landsat TM Frames. Where Landsat 7 data were not available, Landsat 5 data have been used instead. The spatial resolution is 25 metres for multispectral and 12.5 metres for panchromatic imagery", type = "string", multi = 0, group = "Identification", multiline=True #}</gco:CharacterString>
+            </gmd:abstract>
+      {% for co in md.identification.contact -%}{# tag="for co in md.identification.contact",object="CI_ResponsibleParty()", inboxmulti=1, group = "Responsible party",inbox="Point of contact" #}
+            <gmd:pointOfContact>
+                <gmd:CI_ResponsibleParty>
+                    <gmd:organisationName>
+                        <gco:CharacterString>{{ co.organization }}{# tag="co.organization",ref="Part B 9.1",  multi = 0, group = "Responsible party",inboxmulti=1 ,inbox="Point of contact",object="CI_ResponsibleParty()",name="Organisation name",example="SDI Unit, Institute for Environment and Sustainability, Joint ResearchCentre",type = "string",desc="identification of, and means of communication with, person(s) and organization(s) associated with theresource(s)" #}</gco:CharacterString>
+                    </gmd:organisationName>
+                    <gmd:contactInfo>
+                        <gmd:CI_Contact>
+                            <gmd:address>
+                                <gmd:CI_Address>
+                                    <gmd:electronicMailAddress>
+                                        <gco:CharacterString>{{ co.email }}{# tag="co.email",name="E-mail",ref="Part B 10.1" , group = "Metadata",inboxmulti=1, inbox="Responsible party",multi=0,type ="email",example="image2000 at jrc.it",object="CI_ResponsibleParty()", desc="Party responsible for the metadata information." #}</gco:CharacterString>
+                                    </gmd:electronicMailAddress>
+                                </gmd:CI_Address>
+                            </gmd:address>
+                        </gmd:CI_Contact>
+                    </gmd:contactInfo>
+                    <gmd:role>
+                        <gmd:CI_RoleCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode" codeListValue="{{ co.role }}{# tag="co.role",inboxmulti=1,name="Responsible party role",object="CI_ResponsibleParty()",ref="Part B 9.2", type = "CI_RoleCode", multi = 0, group = "Responsible party", inbox="Responsible party",example="custodian", desc="function performed by the responsible party" #}" codeSpace="ISOTC211/19115">{{ co.role }}</gmd:CI_RoleCode>
+                    </gmd:role>
+                </gmd:CI_ResponsibleParty>
+            </gmd:pointOfContact>
+      {% endfor -%}
+      {% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}{# tag="for (u,d) in zip(md.identification.uom,md.identification.distance)", group = "Quality and Validity", inbox="Spatial resolution-distance",inboxmulti= 1 #}
+                     <gmd:spatialResolution>
+                        <gmd:MD_Resolution>
+                            <gmd:distance>
+                                <gco:Distance uom="{{ u }}{# tag="u" , name="Units" , ref= "Part B 6.2" , desc= "Ground sample distance" , example = "m" , type ="string" , group = "Quality and Validity" ,inbox="Spatial resolution-distance", multi=0 , inboxmulti=1, multiline= False #}"
+>{{ d }}{# tag="d" , name="Resolution" , ref= "Part B 6.2" , desc= "Ground sample distance" , example = "25" , type ="integer" , group = "Quality and Validity" ,inbox="Spatial resolution-distance", multi=0 , inboxmulti=1, multiline= False #}</gco:Distance>
+                            </gmd:distance>
+                        </gmd:MD_Resolution>
+                    </gmd:spatialResolution>
+      {% endfor -%}
+            <gmd:extent>
+                <gmd:EX_Extent>
+                    <gmd:geographicElement>
+                        <gmd:EX_GeographicBoundingBox>
+                            <gmd:westBoundLongitude>
+                                <gco:Decimal>{{ md.identification.extent.boundingBox.minx }}{# tag="md.identification.extent.boundingBox.minx" , name="West Bound Longitude" , ref= "Part B 4.1" , desc= "Western-most coordinate of the limit of the dataset extent, expressed in longitude in decimal degrees (positive east)." , example = "3.93" , type ="decimal" , group= "Geographic" ,  multi=0 ,  multiline= False #}</gco:Decimal>
+                            </gmd:westBoundLongitude>
+                            <gmd:eastBoundLongitude>
+                                <gco:Decimal>{{ md.identification.extent.boundingBox.maxx }}{# tag="md.identification.extent.boundingBox.maxx" , name="East Bound Longitude" , ref= "Part B 4.1" , desc= "Eastern-most coordinate of the limit of the dataset extent, expressed in longitude in decimal degrees (positive east)." , example = "7.57" , type ="decimal" , group= "Geographic" ,  multi=0 ,  multiline= False #}</gco:Decimal>
+                            </gmd:eastBoundLongitude>
+                            <gmd:southBoundLatitude>
+                                <gco:Decimal>{{ md.identification.extent.boundingBox.miny }}{# tag="md.identification.extent.boundingBox.miny" , name="South Bound Latitude" , ref= "Part B 4.1" , desc= "Southern-most coordinate of the limit of the dataset extent, expressed in latitude in decimal degrees (positive north)." , example = "52.10" , type ="decimal" , group= "Geographic" ,multi=0 , multiline= False #}</gco:Decimal>
+                            </gmd:southBoundLatitude>
+                            <gmd:northBoundLatitude>
+                                <gco:Decimal>{{ md.identification.extent.boundingBox.maxy }}{# tag="md.identification.extent.boundingBox.maxy" , name="North Bound Latitude" , ref= "Part B 4.1" , desc= "Northern-most coordinate of the limit of the dataset extent, expressed in latitude in decimal degrees (positive north)." , example = "54.10" , type ="decimal" , group= "Geographic" , multi=0 ,  multiline= False #}</gco:Decimal>
+                            </gmd:northBoundLatitude>
+                        </gmd:EX_GeographicBoundingBox>
+                    </gmd:geographicElement>
+                </gmd:EX_Extent>
+            </gmd:extent>
+            </gmd:MD_DataIdentification>
+            </gmd:identificationInfo>
+            <gmd:distributionInfo>
+                <gmd:MD_Distribution>
+                    <gmd:distributionFormat>
+                        <gmd:MD_Format>
+                            <gmd:name gco:nilReason="inapplicable"/>
+                            <gmd:version gco:nilReason="inapplicable"/>
+                        </gmd:MD_Format>
+                    </gmd:distributionFormat>
+                </gmd:MD_Distribution>
+            </gmd:distributionInfo>
+    <gmd:dataQualityInfo>
+        <gmd:DQ_DataQuality>
+      <gmd:lineage>
+        <gmd:LI_Lineage>
+          <gmd:statement>
+            <gco:CharacterString>{{ md.dataquality.lineage }}{# tag="md.dataquality.lineage" , name="Lineage" , ref= "Part B 6.1" , desc= "General explanation of the data producers knowledge about the lineage of a dataset." , example = "Product 1 scenes correspond to the path/row of the Landsat orbit.." , type ="string" , group= "Quality and Validity" ,  multiline= True #}</gco:CharacterString>
+          </gmd:statement>
+        </gmd:LI_Lineage>
+      </gmd:lineage>
+    </gmd:DQ_DataQuality>
+  </gmd:dataQualityInfo>
+        </gmd:MD_Metadata>

Deleted: grass-addons/grass7/gui/wxpython/wx.metadata/profiles/basicTemplate.xml
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/templates/basicTemplate.xml	2015-05-10 09:01:38 UTC (rev 65205)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/profiles/basicTemplate.xml	2015-06-01 20:48:36 UTC (rev 65349)
@@ -1,141 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<gmd:MD_Metadata xsi:schemaLocation="http://www.isotc211.org/2005/gmd http://schemas.opengis.net/iso/19139/20060504/gmd/gmd.xsd" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink">
-    <gmd:fileIdentifier>
-        <gco:CharacterString>{{ md.identifier }}{# tag="md.identifier",ref="Part B 1.5",  name ="Resource Identifier", desc ="Unique Resource Identifier", example ="286c0725-046e-4533-b0bf-d6e367f6c342", type = "CharacterString", multi = 0, group = "Identification", multiline=False #}</gco:CharacterString>
-    </gmd:fileIdentifier>
-    <gmd:hierarchyLevel>
-        <gmd:MD_ScopeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_ScopeCode" codeListValue="dataset" codeSpace="ISOTC211/19115">{{ md.identification.identtype }}{# tag="md.identification.identtype", name ="Resource Type", desc ="Scope to which metadata applies", example ="dataset", type = "MD_ScopeCode", multi = 0, group = "Identification",multiline=False #}</gmd:MD_ScopeCode>
-    </gmd:hierarchyLevel>
-  {% for co in md.contact -%}{# tag="for co in md.contact",  inboxmulti = 1, group = "Metadata",inbox="Metadata point of contact",object="CI_ResponsibleParty()" #}
-    <gmd:contact>
-        <gmd:CI_ResponsibleParty>
-            <gmd:organisationName>
-                <gco:CharacterString>{{ co.organization }}{# tag="co.organization",ref="Part B 9.1",  inboxmulti = 1,multi = 0,type = "string",group = "Metadata",object="CI_ResponsibleParty()", inbox="Metadata point of contact",name="Organisation name",example="SDI Unit, Institute for Environment and Sustainability, Joint ResearchCentre",desc="identification of, and means of communication with, person(s) and organization(s) associated with theresource(s)" #}</gco:CharacterString>
-            </gmd:organisationName>
-            <gmd:contactInfo>
-                <gmd:CI_Contact>
-                    <gmd:address>
-                        <gmd:CI_Address>
-                            <gmd:electronicMailAddress>
-                                <gco:CharacterString>{{ co.email }}{# tag="co.email",name="E-mail",ref="Part B 10.1",  multi = 0,object="CI_ResponsibleParty()", inboxmulti = 1,group = "Metadata", inbox="Metadata point of contact",type = "email",example="image2000 at jrc.it", desc="Party responsible for the metadata information." #}</gco:CharacterString>
-                            </gmd:electronicMailAddress>
-                        </gmd:CI_Address>
-                    </gmd:address>
-                </gmd:CI_Contact>
-            </gmd:contactInfo>
-            <gmd:role>
-                <gmd:CI_RoleCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode" codeListValue="{{ co.role }}{# tag="co.role",name="Responsible party role",ref="Part B 9.2" , multi = 0,type = "CI_RoleCode", inboxmulti = 1,group = "Responsible party",object="CI_ResponsibleParty()", inbox="Metadata pointt of contact",example="custodian", desc="function performed by the responsible party" #}" codeSpace="ISOTC211/19115">{{ co.role }}</gmd:CI_RoleCode>
-            </gmd:role>
-        </gmd:CI_ResponsibleParty>
-    </gmd:contact>
-  {% endfor -%}
-    <gmd:dateStamp>
-        <gco:Date>{{ md.datestamp }}{# tag="md.datestamp" , name="Metadata date" , ref= "Part B 10.2" , desc= "Date that the metadata was created.",type = "date" , example = "2005-03-27" , multi= 0 , group= "Metadata" , multiline= False #}</gco:Date>
-    </gmd:dateStamp>
-    <gmd:metadataStandardName>
-        <gco:CharacterString>ISO 19115</gco:CharacterString>
-    </gmd:metadataStandardName>
-    <gmd:metadataStandardVersion>
-        <gco:CharacterString>2003/Cor.1:2006</gco:CharacterString>
-    </gmd:metadataStandardVersion>
-    <gmd:identificationInfo>
-        <gmd:MD_DataIdentification>
-            <gmd:citation>
-                <gmd:CI_Citation>
-                    <gmd:title>
-                        <gco:CharacterString>{{ md.identification.title }}{# tag="md.identification.title", ref="Part B 1.1", name ="Resource title", desc ="Name by which the cited resource is known.", example ="Image2000 Product 1 (nl2) MultispectB 10.1" , multi = 0, group ="Identification", type = "string", multiline=True #}</gco:CharacterString>
-                    </gmd:title>
-          {% for d in md.identification.date -%}{# tag="for d in md.identification.date" ,name="",object="CI_Date()",group= "Temporal" , inbox= "Date of creation/publication/revision",  inboxmulti=1, multiline= False #}
-                    <gmd:date>
-                        <gmd:CI_Date>
-                            <gmd:date>
-                                <gco:DateTime>{{ d.date }}{# tag="d.date" , group= "Temporal" ,object="CI_Date()", inbox= "Date of creation/publication/revision",  inboxmulti=1, multiline= False, name="Date of: type(below)",type = "date",desc="reference date for the cited resource - publication/creation/revision",example="2007-09-15" #}</gco:DateTime>
-                            </gmd:date>
-                            <gmd:dateType>
-                                <gmd:CI_DateTypeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue="{{ d.type }}{# tag="d.type" , group= "Temporal" ,type = "CI_DateTypeCode",object="CI_Date()", inbox= "Date of creation/publication/revision",  inboxmulti=1, multiline= False, name="type: creation/publication/revision",desc="reference date for the cited resource - publication/creation/revision",example="creation" #}" codeSpace="ISOTC211/19115">{{ d.type }}</gmd:CI_DateTypeCode>
-                            </gmd:dateType>
-                        </gmd:CI_Date>
-                    </gmd:date>
-                </gmd:CI_Citation>
-            </gmd:citation>
-      {% endfor -%}
-            <gmd:abstract>
-                <gco:CharacterString>{{ md.identification.abstract }}{# tag="md.identification.abstract ",ref="Part B 1.2",  name ="Resource Abstract", desc ="Brief narrative summary of the content of the resource(s).", example ="IMAGE2000 product 1 individual orthorectified scenes. IMAGE2000 was produced from ETM+ Landsat 7 satellite data and provides a consistent European coverage of individual orthorectified scenes in national map projection systems. The year 2000 was targeted as reference year, but a deviation of maximum 1-year was allowed to obtain a full coverage of Europe, which involves approximately 450 Landsat TM Frames. Where Landsat 7 data were not available, Landsat 5 data have been used instead. The spatial resolution is 25 metres for multispectral and 12.5 metres for panchromatic imagery", type = "string", multi = 0, group = "Identification", multiline=True #}</gco:CharacterString>
-            </gmd:abstract>
-      {% for co in md.identification.contact -%}{# tag="for co in md.identification.contact",object="CI_ResponsibleParty()", inboxmulti=1, group = "Responsible party",inbox="Point of contact" #}
-            <gmd:pointOfContact>
-                <gmd:CI_ResponsibleParty>
-                    <gmd:organisationName>
-                        <gco:CharacterString>{{ co.organization }}{# tag="co.organization",ref="Part B 9.1",  multi = 0, group = "Responsible party",inboxmulti=1 ,inbox="Point of contact",object="CI_ResponsibleParty()",name="Organisation name",example="SDI Unit, Institute for Environment and Sustainability, Joint ResearchCentre",type = "string",desc="identification of, and means of communication with, person(s) and organization(s) associated with theresource(s)" #}</gco:CharacterString>
-                    </gmd:organisationName>
-                    <gmd:contactInfo>
-                        <gmd:CI_Contact>
-                            <gmd:address>
-                                <gmd:CI_Address>
-                                    <gmd:electronicMailAddress>
-                                        <gco:CharacterString>{{ co.email }}{# tag="co.email",name="E-mail",ref="Part B 10.1" , group = "Metadata",inboxmulti=1, inbox="Responsible party",multi=0,type ="email",example="image2000 at jrc.it",object="CI_ResponsibleParty()", desc="Party responsible for the metadata information." #}</gco:CharacterString>
-                                    </gmd:electronicMailAddress>
-                                </gmd:CI_Address>
-                            </gmd:address>
-                        </gmd:CI_Contact>
-                    </gmd:contactInfo>
-                    <gmd:role>
-                        <gmd:CI_RoleCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode" codeListValue="{{ co.role }}{# tag="co.role",inboxmulti=1,name="Responsible party role",object="CI_ResponsibleParty()",ref="Part B 9.2", type = "CI_RoleCode", multi = 0, group = "Responsible party", inbox="Responsible party",example="custodian", desc="function performed by the responsible party" #}" codeSpace="ISOTC211/19115">{{ co.role }}</gmd:CI_RoleCode>
-                    </gmd:role>
-                </gmd:CI_ResponsibleParty>
-            </gmd:pointOfContact>
-      {% endfor -%}
-      {% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}{# tag="for (u,d) in zip(md.identification.uom,md.identification.distance)", group = "Quality and Validity", inbox="Spatial resolution-distance",inboxmulti= 1 #}
-                     <gmd:spatialResolution>
-                        <gmd:MD_Resolution>
-                            <gmd:distance>
-                                <gco:Distance uom="{{ u }}{# tag="u" , name="Units" , ref= "Part B 6.2" , desc= "Ground sample distance" , example = "m" , type ="string" , group = "Quality and Validity" ,inbox="Spatial resolution-distance", multi=0 , inboxmulti=1, multiline= False #}"
->{{ d }}{# tag="d" , name="Resolution" , ref= "Part B 6.2" , desc= "Ground sample distance" , example = "25" , type ="integer" , group = "Quality and Validity" ,inbox="Spatial resolution-distance", multi=0 , inboxmulti=1, multiline= False #}</gco:Distance>
-                            </gmd:distance>
-                        </gmd:MD_Resolution>
-                    </gmd:spatialResolution>
-      {% endfor -%}
-            <gmd:extent>
-                <gmd:EX_Extent>
-                    <gmd:geographicElement>
-                        <gmd:EX_GeographicBoundingBox>
-                            <gmd:westBoundLongitude>
-                                <gco:Decimal>{{ md.identification.extent.boundingBox.minx }}{# tag="md.identification.extent.boundingBox.minx" , name="West Bound Longitude" , ref= "Part B 4.1" , desc= "Western-most coordinate of the limit of the dataset extent, expressed in longitude in decimal degrees (positive east)." , example = "3.93" , type ="decimal" , group= "Geographic" ,  multi=0 ,  multiline= False #}</gco:Decimal>
-                            </gmd:westBoundLongitude>
-                            <gmd:eastBoundLongitude>
-                                <gco:Decimal>{{ md.identification.extent.boundingBox.maxx }}{# tag="md.identification.extent.boundingBox.maxx" , name="East Bound Longitude" , ref= "Part B 4.1" , desc= "Eastern-most coordinate of the limit of the dataset extent, expressed in longitude in decimal degrees (positive east)." , example = "7.57" , type ="decimal" , group= "Geographic" ,  multi=0 ,  multiline= False #}</gco:Decimal>
-                            </gmd:eastBoundLongitude>
-                            <gmd:southBoundLatitude>
-                                <gco:Decimal>{{ md.identification.extent.boundingBox.miny }}{# tag="md.identification.extent.boundingBox.miny" , name="South Bound Latitude" , ref= "Part B 4.1" , desc= "Southern-most coordinate of the limit of the dataset extent, expressed in latitude in decimal degrees (positive north)." , example = "52.10" , type ="decimal" , group= "Geographic" ,multi=0 , multiline= False #}</gco:Decimal>
-                            </gmd:southBoundLatitude>
-                            <gmd:northBoundLatitude>
-                                <gco:Decimal>{{ md.identification.extent.boundingBox.maxy }}{# tag="md.identification.extent.boundingBox.maxy" , name="North Bound Latitude" , ref= "Part B 4.1" , desc= "Northern-most coordinate of the limit of the dataset extent, expressed in latitude in decimal degrees (positive north)." , example = "54.10" , type ="decimal" , group= "Geographic" , multi=0 ,  multiline= False #}</gco:Decimal>
-                            </gmd:northBoundLatitude>
-                        </gmd:EX_GeographicBoundingBox>
-                    </gmd:geographicElement>
-                </gmd:EX_Extent>
-            </gmd:extent>
-            </gmd:MD_DataIdentification>
-            </gmd:identificationInfo>
-            <gmd:distributionInfo>
-                <gmd:MD_Distribution>
-                    <gmd:distributionFormat>
-                        <gmd:MD_Format>
-                            <gmd:name gco:nilReason="inapplicable"/>
-                            <gmd:version gco:nilReason="inapplicable"/>
-                        </gmd:MD_Format>
-                    </gmd:distributionFormat>
-                </gmd:MD_Distribution>
-            </gmd:distributionInfo>
-    <gmd:dataQualityInfo>
-        <gmd:DQ_DataQuality>
-      <gmd:lineage>
-        <gmd:LI_Lineage>
-          <gmd:statement>
-            <gco:CharacterString>{{ md.dataquality.lineage }}{# tag="md.dataquality.lineage" , name="Lineage" , ref= "Part B 6.1" , desc= "General explanation of the data producers knowledge about the lineage of a dataset." , example = "Product 1 scenes correspond to the path/row of the Landsat orbit.." , type ="string" , group= "Quality and Validity" ,  multiline= True #}</gco:CharacterString>
-          </gmd:statement>
-        </gmd:LI_Lineage>
-      </gmd:lineage>
-    </gmd:DQ_DataQuality>
-  </gmd:dataQualityInfo>
-        </gmd:MD_Metadata>

Copied: grass-addons/grass7/gui/wxpython/wx.metadata/profiles/inspireProfile.xml (from rev 65205, grass-addons/grass7/gui/wxpython/wx.metadata/templates/inspireTemplate.xml)
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/profiles/inspireProfile.xml	                        (rev 0)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/profiles/inspireProfile.xml	2015-06-01 20:48:36 UTC (rev 65349)
@@ -0,0 +1,318 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gmd:MD_Metadata xsi:schemaLocation="http://www.isotc211.org/2005/gmd http://schemas.opengis.net/iso/19139/20060504/gmd/gmd.xsd"
+    xmlns:gmd="http://www.isotc211.org/2005/gmd"
+    xmlns:gco="http://www.isotc211.org/2005/gco"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:gml="http://www.opengis.net/gml"
+    xmlns:xlink="http://www.w3.org/1999/xlink">
+    <gmd:fileIdentifier>
+        <gco:CharacterString>{{ md.identifier }}{# tag="md.identifier",ref="Part B 1.5",  name ="Resource Identifier", desc ="Unique Resource Identifier", example ="286c0725-046e-4533-b0bf-d6e367f6c342", type = "string", multi = 0, group = "Identification", multiline=False #}</gco:CharacterString>
+    </gmd:fileIdentifier>
+    <gmd:language>
+        <gmd:LanguageCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/Codelist/ML_gmxCodelists.xml#LanguageCode" codeListValue="{{ md.languagecode }}{# tag="md.languagecode", name ="Metadata language", desc ="Language(s) used within the datasets", example ="eng", type = "string", multi = 0, group = "Metadata",multiline=False #}">{{ md.languagecode }}</gmd:LanguageCode>
+    </gmd:language>
+    <gmd:hierarchyLevel>
+        <gmd:MD_ScopeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_ScopeCode" codeListValue="dataset" codeSpace="ISOTC211/19115">{{ md.identification.identtype }}{# tag="md.identification.identtype", name ="Resource Type", desc ="Scope to which metadata applies", example ="dataset", type = "string", multi = 0, group = "Identification",multiline=False #}</gmd:MD_ScopeCode>
+    </gmd:hierarchyLevel>
+  {% for co in md.contact -%}{# tag="for co in md.contact",  inboxmulti = 1, group = "Metadata",inbox="Metadata point of contact",object="CI_ResponsibleParty()" #}
+    <gmd:contact>
+        <gmd:CI_ResponsibleParty>
+            <gmd:organisationName>
+                <gco:CharacterString>{{ co.organization }}{# tag="co.organization",ref="Part B 9.1",  inboxmulti = 1,multi = 0,type = "string",group = "Metadata",object="CI_ResponsibleParty()", inbox="Metadata point of contact",name="Organisation name",example="SDI Unit, Institute for Environment and Sustainability, Joint ResearchCentre",desc="identification of, and means of communication with, person(s) and organization(s) associated with theresource(s)" #}</gco:CharacterString>
+            </gmd:organisationName>
+            <gmd:contactInfo>
+                <gmd:CI_Contact>
+                    <gmd:address>
+                        <gmd:CI_Address>
+                            <gmd:electronicMailAddress>
+                                <gco:CharacterString>{{ co.email }}{# tag="co.email",name="E-mail",ref="Part B 10.1",  multi = 0,object="CI_ResponsibleParty()", inboxmulti = 1,group = "Metadata", inbox="Metadata point of contact",type = "email",example="image2000 at jrc.it", desc="Party responsible for the metadata information." #}</gco:CharacterString>
+                            </gmd:electronicMailAddress>
+                        </gmd:CI_Address>
+                    </gmd:address>
+                </gmd:CI_Contact>
+            </gmd:contactInfo>
+            <gmd:role>
+                <gmd:CI_RoleCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode" codeListValue="{{ co.role }}{# tag="co.role",name="Responsible party role",ref="Part B 9.2" , multi = 0,type = "CI_RoleCode", inboxmulti = 1,group = "Responsible party",object="CI_ResponsibleParty()", inbox="Metadata pointt of contact",example="custodian", desc="function performed by the responsible party" #}" codeSpace="ISOTC211/19115">{{ co.role }}</gmd:CI_RoleCode>
+            </gmd:role>
+        </gmd:CI_ResponsibleParty>
+    </gmd:contact>
+  {% endfor -%}
+    <gmd:dateStamp>
+        <gco:Date>{{ md.datestamp }}{# tag="md.datestamp" , name="Metadata date" , ref= "Part B 10.2" , desc= "Date that the metadata was created." , example = "2005-03-27" , type ="date" , multi= 0 , group= "Metadata" , multiline= False #}</gco:Date>
+    </gmd:dateStamp>
+    <gmd:metadataStandardName>
+        <gco:CharacterString>ISO 19115</gco:CharacterString>
+    </gmd:metadataStandardName>
+    <gmd:metadataStandardVersion>
+        <gco:CharacterString>2003/Cor.1:2006</gco:CharacterString>
+    </gmd:metadataStandardVersion>
+    <gmd:identificationInfo>
+        <gmd:MD_DataIdentification>
+            <gmd:citation>
+                <gmd:CI_Citation>
+                    <gmd:title>
+                        <gco:CharacterString>{{ md.identification.title }}{# tag="md.identification.title", ref="Part B 1.1", name ="Resource title", desc ="Name by which the cited resource is known.", example ="Image2000 Product 1 (nl2) MultispectB 10.1" , multi = 0, group ="Identification", type = "string", multiline=True #}</gco:CharacterString>
+                    </gmd:title>
+          {% for d in md.identification.date -%}{# tag="for d in md.identification.date" ,name="",object="CI_Date()",group= "Temporal" , inbox= "Date of creation/publication/revision",  inboxmulti=1, multiline= False #}
+                    <gmd:date>
+                        <gmd:CI_Date>
+                            <gmd:date>
+                                <gco:DateTime>{{ d.date }}{# tag="d.date" , group= "Temporal" ,object="CI_Date()",type = "date", inbox= "Date of creation/publication/revision",  inboxmulti=1, multiline= False, name="Date of: type(below)",desc="reference date for the cited resource - publication/creation/revision",example="2007-09-15" #}</gco:DateTime>
+                            </gmd:date>
+                            <gmd:dateType>
+                                <gmd:CI_DateTypeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue= "{{ d.type }}{# tag="d.type" , group= "Temporal" ,object="CI_Date()",type = "CI_DateTypeCode", inbox= "Date of creation/publication/revision",  inboxmulti=1, multiline= False, name="type: creation/publication/revision",desc="reference date for the cited resource - publication/creation/revision",example="creation" #}" codeSpace="ISOTC211/19115">{{ d.type }}</gmd:CI_DateTypeCode>
+                            </gmd:dateType>
+                        </gmd:CI_Date>
+                    </gmd:date>
+          {% endfor -%}
+{% for (cod,code) in zip(md.identification.uricode,md.identification.uricodespace) -%}{# tag="for (cod,code) in zip(md.identification.uricode,md.identification.uricodespace)", inboxmulti=1, group = "Identification",inbox="Unique resource identifier" #}
+                                     <gmd:identifier>
+                                        <gmd:RS_Identifier>
+                                            <gmd:code>
+                                                <gco:CharacterString>{{ cod }}{# tag="cod", inboxmulti=1, group = "Identification",inbox="Unique resource identifier" ,ref="Part B 1.5",  name ="Idetifier- code", desc ="A value uniquely identifying the resource.The value domain of this metadata element is a mandatory character string code, generally assigned by the data owner, and a character string namespace uniquely identifying the context of the identifier code (for example, the data owner).", example ="http://image2000.jrc.it # image2000_1_nl2_multi", type = "string", multi = 0  #}</gco:CharacterString>
+                                            </gmd:code>
+                                            <gmd:codeSpace>
+                                                <gco:CharacterString>{{ code }}{# tag="code", inboxmulti=1, group = "Identification",inbox="Unique resource identifier" ,ref="Part B 1.5",  name ="Idetifier- code space", desc ="A value uniquely identifying the resource.The value domain of this metadata element is a mandatory character string code, generally assigned by the data owner, and a character string namespace uniquely identifying the context of the identifier code (for example, the data owner).", example ="http://image2000.jrc.it", type = "string", multi = 0 #}</gco:CharacterString>
+                                            </gmd:codeSpace>
+                                        </gmd:RS_Identifier>
+                                  </gmd:identifier>
+                      {% endfor -%}
+                </gmd:CI_Citation>
+            </gmd:citation>
+            <gmd:abstract>
+                <gco:CharacterString>{{ md.identification.abstract }}{# tag="md.identification.abstract ",ref="Part B 1.2",  name ="Resource Abstract", desc ="Brief narrative summary of the content of the resource(s).", example ="IMAGE2000 product 1 individual orthorectified scenes. IMAGE2000 was produced from ETM+ Landsat 7 satellite data and provides a consistent European coverage of individual orthorectified scenes in national map projection systems. The year 2000 was targeted as reference year, but a deviation of maximum 1-year was allowed to obtain a full coverage of Europe, which involves approximately 450 Landsat TM Frames. Where Landsat 7 data were not available, Landsat 5 data have been used instead. The spatial resolution is 25 metres for multispectral and 12.5 metres for panchromatic imagery", type = "string", multi = 0, group = "Identification", multiline=True #}</gco:CharacterString>
+            </gmd:abstract>
+      {% for co in md.identification.contact -%}{# tag="for co in md.identification.contact",object="CI_ResponsibleParty()", inboxmulti=1, group = "Responsible party",inbox="Point of contact" #}
+            <gmd:pointOfContact>
+                <gmd:CI_ResponsibleParty>
+                    <gmd:organisationName>
+                        <gco:CharacterString>{{ co.organization }}{# tag="co.organization",ref="Part B 9.1", type = "string", multi = 0, group = "Responsible party",inboxmulti=1 ,inbox="Point of contact",object="CI_ResponsibleParty()",name="Organisation name",example="SDI Unit, Institute for Environment and Sustainability, Joint ResearchCentre",desc="identification of, and means of communication with, person(s) and organization(s) associated with theresource(s)" #}</gco:CharacterString>
+                    </gmd:organisationName>
+                    <gmd:contactInfo>
+                        <gmd:CI_Contact>
+                            <gmd:address>
+                                <gmd:CI_Address>
+                                    <gmd:electronicMailAddress>
+                                        <gco:CharacterString>{{ co.email }}{# tag="co.email",name="E-mail",ref="Part B 10.1" , group = "Metadata",inboxmulti=1, inbox="Responsible party",multi=0,example="image2000 at jrc.it",object="CI_ResponsibleParty()", type = "email",desc="Party responsible for the metadata information." #}</gco:CharacterString>
+                                    </gmd:electronicMailAddress>
+                                </gmd:CI_Address>
+                            </gmd:address>
+                        </gmd:CI_Contact>
+                    </gmd:contactInfo>
+                    <gmd:role>
+                        <gmd:CI_RoleCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode" codeListValue="{{ co.role }}{# tag="co.role",inboxmulti=1,name="Responsible party role",type = "CI_RoleCode",object="CI_ResponsibleParty()",ref="Part B 9.2",  multi = 0, group = "Responsible party", inbox="Responsible party",example="custodian", desc="function performed by the responsible party" #}" codeSpace="ISOTC211/19115">{{ co.role }}</gmd:CI_RoleCode>
+                    </gmd:role>
+                </gmd:CI_ResponsibleParty>
+            </gmd:pointOfContact>
+      {% endfor -%}
+{% for k in md.identification.keywords -%}{# tag="for k in md.identification.keywords" ,group = "Keywords",inbox="Free keywords",inboxmulti=1 #}
+            <gmd:descriptiveKeywords>
+                <gmd:MD_Keywords>
+          {% for kw in k["keywords"] -%}{# tag='for kw in k["keywords"]',group = "Keywords",inbox="Free keywords",inboxmulti=1 #}
+                    
+                    <gmd:keyword>
+                        <gco:CharacterString>{{ kw }}{# tag="kw",ref="Part B 3.1", name ="Keyword",example="Land cover (INSPIRE Spatial Data Theme),humanCatalogueViewer (spatial data service,subcategory), water springs (AGROVOC), freshwater (GEMET Concepts)", desc ="Commonly used word(s) or formalised word(s) or phrase(s) used to describe the subject." , type = "string",inboxmulti=1, multi = 1, group = "Keywords", multiline=False, inbox="Free keywords" #} </gco:CharacterString>
+                    </gmd:keyword>
+          {% endfor -%}
+                    <gmd:thesaurusName>
+                        <gmd:CI_Citation>
+                            <gmd:title>
+                                <gco:CharacterString>{{ k["thesaurus"]["title"] }}{# tag='k["thesaurus"]["title"]', name ="Title", desc ="This citation shall include title of keywords )" , type = "string", multi = 0,inboxmulti=1, group = "Keywords", multiline=False, inbox="Free keywords" #}</gco:CharacterString>
+                            </gmd:title>
+                            <gmd:date>
+                                <gmd:CI_Date>
+                                    <gmd:date>
+                                        <gco:Date>{{ k["thesaurus"]["date"] }}{# tag='k["thesaurus"]["date"]', name ="Reference date", desc ="This citation shall include at least the title a reference date(publication, revision, creation." , type = "date",inboxmulti=1, multi = 0, group = "Keywords", multiline=False, inbox="Free keywords" #}</gco:Date>
+                                    </gmd:date>
+                                    <gmd:dateType>
+                                        <gmd:CI_DateTypeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue= "{{ k["thesaurus"]["datetype"] }}{{ k["thesaurus"]["datetype"] }}{# tag='k["thesaurus"]["datetype"]', type = "CI_DateTypeCode",name ="Date type",inboxmulti=1, desc ="Options Date of creation, Date of last revision, date of publication" , multi = 0, group = "Keywords", multiline=False, inbox="Free keywords" #}" >{{ k["thesaurus"]["datetype"] }}</gmd:CI_DateTypeCode>
+                                    </gmd:dateType>
+                                </gmd:CI_Date>
+                            </gmd:date>
+                        </gmd:CI_Citation>
+                    </gmd:thesaurusName>
+                </gmd:MD_Keywords>
+            </gmd:descriptiveKeywords>
+      {% endfor -%}
+      {% for rc in md.identification.uselimitation -%}{# tag="for rc in md.identification.uselimitation" , group= "Constraints" ,inbox="Condition applying to access and use", inboxmulti=1 #}
+            <gmd:resourceConstraints>
+                <gmd:MD_Constraints>
+                    <gmd:useLimitation>
+                        <gco:CharacterString>{{ rc }}{# tag="rc" , name="Use limitation" , ref= "Part B 8.1" , desc= "restrictions on the access and use of a resource or metadata" , example = "no conditions apply" , type ="string" ,group= "Constraints" , multi= 0, multiline= False,inbox="Condition applying to access and use", inboxmulti=1  #}</gco:CharacterString>
+                    </gmd:useLimitation>
+                </gmd:MD_Constraints>
+            </gmd:resourceConstraints>
+      {% endfor -%}
+      {% for oc in md.identification.otherconstraints -%}{# tag="for oc in md.identification.otherconstraints" , group= "Constraints",inbox="Other restriction", inboxmulti=1  #}
+            <gmd:resourceConstraints>
+                <gmd:MD_LegalConstraints>
+                    <gmd:accessConstraints>
+                        <gmd:MD_RestrictionCode codeList="http://www.isotc211.org/2005/resources/Codelist/ML_gmxCodelists.xml#MD_RestrictionCode" codeListValue="{{ oc }}{# tag="oc" , name="Other constraints" , ref= "Part B 8.1" , desc= "Restrictions on the access and use of a resource or metadata" , example = "No conditions apply" , type ="MD_RestrictionCode" ,group= "Constraints" , multi= 0, multiline= False,inbox="Other restriction", inboxmulti=1  #}">{{ oc }}</gmd:MD_RestrictionCode>
+                    </gmd:accessConstraints>
+               {% endfor -%}
+      {% for ac in md.identification.accessconstraints -%}{# tag="for oc in md.identification.accessconstraints" , group= "Constraints",inbox="Limitation on public access", inboxmulti=1  #}
+                    <gmd:otherConstraints>
+                        <gco:CharacterString>{{ ac }} {# tag="ac" ,name="Access constraints", group= "Constraints",inbox="Limitations on public access", inboxmulti=1,ref= "Part B 8.2" , desc= "access constraints applied to assure the protection of privacy or intellectual property, and any special restrictionsor limitations on obtaining the resource." , example = "intellectualPropertyRights (rights to financial benefit from and control of distribution of non tangible property that is a result of creativity)." , type ="string", multi=0 ,  multiline= False #}</gco:CharacterString>
+                    </gmd:otherConstraints>
+                </gmd:MD_LegalConstraints>
+            </gmd:resourceConstraints>
+      {% endfor -%}
+      {% if md.identification.denominators|length > 0 -%}{# tag="if md.identification.denominators|length > 0", group = "Quality and Validity", inbox="Spatial resolution-scale",inboxmulti= 1 #}
+{% for den in md.identification.denominators -%}{# tag="for den in md.identification.denominators", group = "Quality and Validity", inbox="Spatial resolution-scale",inboxmulti= 1 #}
+            <gmd:spatialResolution>
+                <gmd:MD_Resolution>
+                    <gmd:equivalentScale>
+                        <gmd:MD_RepresentativeFraction>
+                            <gmd:denominator>
+                                <gco:Integer>{{ den }}{# tag="den" , name="Equivalent scale" , ref= "Part B 6.2" , desc= "level of detail expressed as the scale denominator of a comparable hardcopy map or chart" , example = "50000 (e.g. 1:50000 scale map)" , type ="integer" , group = "Quality and Validity" ,inbox="Spatial resolution-scale", multi=0 , inboxmulti=1, multiline= False #}</gco:Integer>
+                            </gmd:denominator>
+                        </gmd:MD_RepresentativeFraction>
+                    </gmd:equivalentScale>
+                </gmd:MD_Resolution>
+            </gmd:spatialResolution>
+      {% endfor -%}
+      {% endif -%}
+      
+      {% for lan in md.identification.resourcelanguage -%}{# tag="for lan in md.identification.resourcelanguage" , group= "Identification" ,inbox='Languages',inboxmulti=1, multiline= False #}
+            <gmd:language>
+                <gmd:LanguageCode codeList="http://www.isotc211.org/2005/resources/Codelist/ML_gmxCodelists.xml#LanguageCode" codeListValue="{{ lan }}{# tag="lan" , name="Metadata language" , ref= "Part B 10.3" , desc= "Language used for documenting metadata." , example = "eng" , type ="LanguageCode (ISO/TS 19139)" ,multi=0,inbox='Languages',inboxmulti=1, group= "Identification" , multiline= False #}">{{ lan }}</gmd:LanguageCode>
+            </gmd:language>
+      {% endfor -%}
+      {% for tc in md.identification.topiccategory -%}{# tag="for tc in md.identification.topiccategory", inbox='Topic category',group= "Classification", multiline= False #}
+            <gmd:topicCategory>
+                <gmd:MD_TopicCategoryCode>{{ tc }}{# tag="tc" , name="Topic" , ref= "Part B 2.1" , desc= "Main theme(s) of the dataset" ,inbox='Topic category', example = "imageryBaseMapsEarthCover" , type ="MD_TopicCategory" , group= "Classification" ,  multi=0 , multiline= False #}</gmd:MD_TopicCategoryCode>
+            </gmd:topicCategory>
+      {% endfor -%}
+{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}{# tag="for (u,d) in zip(md.identification.uom,md.identification.distance)", group = "Quality and Validity", inbox="Spatial resolution-distance",inboxmulti= 1 #}
+                     <gmd:spatialResolution>
+                        <gmd:MD_Resolution>
+                            <gmd:distance>
+                                <gco:Distance uom="{{ u }}{# tag="u" , name="Units" , ref= "Part B 6.2" , desc= "Ground sample distance" , example = "m" , type ="string" , group = "Quality and Validity" ,inbox="Spatial resolution-distance", multi=0 , inboxmulti=1, multiline= False #}">
+{{ d }}{# tag="d" , name="Resolution" , ref= "Part B 6.2" , desc= "Ground sample distance" , example = "25" , type ="integer" , group = "Quality and Validity" ,inbox="Spatial resolution-distance", multi=0 , inboxmulti=1, multiline= False #}</gco:Distance>
+                            </gmd:distance>
+                        </gmd:MD_Resolution>
+                    </gmd:spatialResolution>
+      {% endfor -%}
+            <gmd:extent>
+                <gmd:EX_Extent>
+                    <gmd:geographicElement>
+                        <gmd:EX_GeographicBoundingBox>
+                            <gmd:westBoundLongitude>
+                                <gco:Decimal>{{ md.identification.extent.boundingBox.minx }}{# tag="md.identification.extent.boundingBox.minx" , name="West Bound Longitude" , ref= "Part B 4.1" , desc= "Western-most coordinate of the limit of the dataset extent, expressed in longitude in decimal degrees (positive east)." , example = "3.93" , type ="decimal" , group= "Geographic" ,  multi=0 ,  multiline= False #}</gco:Decimal>
+                            </gmd:westBoundLongitude>
+                            <gmd:eastBoundLongitude>
+                                <gco:Decimal>{{ md.identification.extent.boundingBox.maxx }}{# tag="md.identification.extent.boundingBox.maxx" , name="East Bound Longitude" , ref= "Part B 4.1" , desc= "Eastern-most coordinate of the limit of the dataset extent, expressed in longitude in decimal degrees (positive east)." , example = "7.57" , type ="decimal" , group= "Geographic" ,  multi=0 ,  multiline= False #}</gco:Decimal>
+                            </gmd:eastBoundLongitude>
+                            <gmd:southBoundLatitude>
+                                <gco:Decimal>{{ md.identification.extent.boundingBox.miny }}{# tag="md.identification.extent.boundingBox.miny" , name="South Bound Latitude" , ref= "Part B 4.1" , desc= "Southern-most coordinate of the limit of the dataset extent, expressed in latitude in decimal degrees (positive north)." , example = "52.10" , type ="decimal" , group= "Geographic" ,multi=0 , multiline= False #}</gco:Decimal>
+                            </gmd:southBoundLatitude>
+                            <gmd:northBoundLatitude>
+                                <gco:Decimal>{{ md.identification.extent.boundingBox.maxy }}{# tag="md.identification.extent.boundingBox.maxy" , name="North Bound Latitude" , ref= "Part B 4.1" , desc= "Northern-most coordinate of the limit of the dataset extent, expressed in latitude in decimal degrees (positive north)." , example = "54.10" , type ="decimal" , group= "Geographic" , multi=0 ,  multiline= False #}</gco:Decimal>
+                            </gmd:northBoundLatitude>
+                        </gmd:EX_GeographicBoundingBox>
+                    </gmd:geographicElement>
+                </gmd:EX_Extent>
+            </gmd:extent>
+      {% if md.identification.temporalextent_start != None -%}{# tag="if md.identification.temporalextent_start != None", group = "Temporal", inbox="Temporal Extent",inboxmulti= 0 #}
+            <gmd:extent>
+                <gmd:EX_Extent>
+                    <gmd:temporalElement>
+                        <gmd:EX_TemporalExtent>
+                            <gmd:extent>
+                                <gml:TimePeriod xsi:type="gml:TimePeriodType">
+                                    <gml:beginPosition>{{ md.identification.temporalextent_start }}{# tag="md.identification.temporalextent_start" , name="Starting date" , ref= "Part B 5.1" , desc= "Time period covered by the content of the dataset." , example = "2000-11-30" , type ="date" , group= "Temporal" , inbox= "Temporal extent", multi=0 , inboxmulti= 0, multiline= False #}</gml:beginPosition>
+                                    <gml:endPosition>{{ md.identification.temporalextent_end }}{# tag="md.identification.temporalextent_end" , name="Ending date" , ref= "Part B 5.1" , desc= "Time period covered by the content of the dataset." , example = "2000-11-30" , type ="date" , group= "Temporal" , inbox= "Temporal extend", multi=0 , inboxmulti= 0, multiline= False #}</gml:endPosition>
+                                </gml:TimePeriod>
+                            </gmd:extent>
+                        </gmd:EX_TemporalExtent>
+                    </gmd:temporalElement>
+                </gmd:EX_Extent>
+            </gmd:extent>
+      {% endif -%}
+        </gmd:MD_DataIdentification>
+    </gmd:identificationInfo>
+    <gmd:distributionInfo>
+        <gmd:MD_Distribution>
+            <gmd:distributionFormat>
+                <gmd:MD_Format>
+                    <gmd:name gco:nilReason="inapplicable"/>
+                    <gmd:version gco:nilReason="inapplicable"/>
+                </gmd:MD_Format>
+            </gmd:distributionFormat>
+            <gmd:transferOptions>
+                <gmd:MD_DigitalTransferOptions>
+          {% for ln in md.distribution.online -%}{# tag="for ln in md.distribution.online" , group= "Identification",object='CI_OnlineResource()'  #}
+                    <gmd:onLine>
+                        <gmd:CI_OnlineResource>
+                            <gmd:linkage>
+                                <gmd:URL>{{ ln.url }}{# tag="ln.url" , name="Linkage" , ref= "Part B 1.4" ,object='CI_OnlineResource()', desc= "Location (address) for on-line access using a Uniform Resource Locator address or similar addressing scheme." , example = "http://image2000.jrc.it" , type ="url" , group= "Identification" ,multi=1, multiline= False #}</gmd:URL>
+                            </gmd:linkage>
+                        </gmd:CI_OnlineResource>
+                    </gmd:onLine>
+          {% endfor -%}
+                </gmd:MD_DigitalTransferOptions>
+            </gmd:transferOptions>
+        </gmd:MD_Distribution>
+    </gmd:distributionInfo>
+    <gmd:dataQualityInfo>
+        <gmd:DQ_DataQuality>
+            <gmd:scope>
+                <gmd:DQ_Scope>
+                    <gmd:level>
+                        <gmd:MD_ScopeCode codeListValue="{{ md.identification.identtype }}{# tag="md.identification.identtype", name ="Resource Type", desc ="Scope to which metadata applies", example ="dataset", type = "string", multi = 0, group = "Conformity",multiline=False #}" codeList="http://www.isotc211.org/2005/resources/Codelist/ML_gmxCodelists.xml#MD_ScopeCode">{{ md.identification.identtype }}</gmd:MD_ScopeCode>
+                    </gmd:level>
+                </gmd:DQ_Scope>
+            </gmd:scope>
+ {% for (t,d,dt,dg) in zip(md.dataquality.conformancetitle,md.dataquality.conformancedate,md.dataquality.conformancedatetype,md.dataquality.conformancedegree) -%}{# tag="for (t,d,dt,dg) in zip(md.dataquality.conformancetitle,md.dataquality.conformancedate,md.dataquality.conformancedatetype,md.dataquality.conformancedegree)", group = "Conformity", inbox="Conformity",inboxmulti= 1 #}
+            <gmd:report>
+                <gmd:DQ_DomainConsistency xsi:type="gmd:DQ_DomainConsistency_Type">
+                    <gmd:measureIdentification>
+                        <gmd:RS_Identifier>
+                            <gmd:code>
+                                <gco:CharacterString>Conformity</gco:CharacterString>
+                            </gmd:code>
+                            <gmd:codeSpace>
+                                <gco:CharacterString>INSPIRE</gco:CharacterString>
+                            </gmd:codeSpace>
+                        </gmd:RS_Identifier>,
+                    </gmd:measureIdentification>
+                    <gmd:result>
+                        <gmd:DQ_ConformanceResult xsi:type="gmd:DQ_ConformanceResult_Type">
+                            <gmd:specification>
+                                <gmd:CI_Citation>
+                                    <gmd:title>
+                                        <gco:CharacterString>{{ t }}{# tag="t" , name="Specification" , ref= "Part B 7.1" , desc= "citation of the product specification or user requirement against which data is being evaluated." , example = "INSPIRE Data Specification on orthoimagery - Guidelines" , type ="string" , group= "Conformity" , inbox= "Conformity", multi=0 , inboxmulti= 1, multiline= True #}</gco:CharacterString>
+                                    </gmd:title>
+                                    <gmd:date>
+                                        <gmd:CI_Date>
+                                            <gmd:date>
+                                                <gco:Date>{{ d }}{# tag="d" , name="Date" , ref= "Part B 7.1" , desc= "citation of the product specification or user requirement against which data is being evaluated." , example = "2010-04-26" , type ="date" , group= "Conformity" , inbox= "Conformity", multi=0 , inboxmulti= 1, multiline= False #}</gco:Date>
+                                            </gmd:date>
+                                            <gmd:dateType>
+                                                <gmd:CI_DateTypeCode codeList="http://www.isotc211.org/2005/resources/Codelist/ML_gmxCodelists.xml#CI_DateTypeCode" codeListValue={{ "\"%s\"" % dt }}>{{ dt }}{# tag="dt" , name="Date type" , ref= "Part B 7.1" , desc= "a date type: creation, revision or publication." , example = "publication" , type ="dateType" , group= "Conformity" , inbox= "Conformity", multi=0 , inboxmulti= 1, multiline= False #}</gmd:CI_DateTypeCode>
+                                            </gmd:dateType>
+                                        </gmd:CI_Date>
+                                    </gmd:date>
+                                </gmd:CI_Citation>
+                            </gmd:specification>
+                            <gmd:explanation>
+                                <gco:CharacterString>See the referenced specification</gco:CharacterString>
+                            </gmd:explanation>
+                            <gmd:pass>
+                                <gco:Boolean>{{ dg }}{# tag="dg" , name="Degree/Pass" , ref= "Part B 7.2" , desc= "indication of the conformance result" , example = "True." , type ="boolean" , group= "Conformity" , inbox= "Conformity", multi=0 , inboxmulti= 1, multiline= False #}</gco:Boolean>
+                            </gmd:pass>
+                        </gmd:DQ_ConformanceResult>
+                    </gmd:result>
+                </gmd:DQ_DomainConsistency>
+            </gmd:report>
+      {% endfor -%}
+      <gmd:lineage>
+        <gmd:LI_Lineage>
+          <gmd:statement>
+            <gco:CharacterString>{{ md.dataquality.lineage }}{# tag="md.dataquality.lineage" , name="Lineage" , ref= "Part B 6.1" , desc= "General explanation of the data producers knowledge about the lineage of a dataset." , example = "Product 1 scenes correspond to the path/row of the Landsat orbit.." , type ="string" , group= "Quality and Validity" ,  multiline= True #}</gco:CharacterString>
+          </gmd:statement>
+        </gmd:LI_Lineage>
+      </gmd:lineage>
+    </gmd:DQ_DataQuality>
+  </gmd:dataQualityInfo>
+</gmd:MD_Metadata>

Deleted: grass-addons/grass7/gui/wxpython/wx.metadata/profiles/inspireTemplate.xml
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/templates/inspireTemplate.xml	2015-05-10 09:01:38 UTC (rev 65205)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/profiles/inspireTemplate.xml	2015-06-01 20:48:36 UTC (rev 65349)
@@ -1,318 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<gmd:MD_Metadata xsi:schemaLocation="http://www.isotc211.org/2005/gmd http://schemas.opengis.net/iso/19139/20060504/gmd/gmd.xsd"
-    xmlns:gmd="http://www.isotc211.org/2005/gmd"
-    xmlns:gco="http://www.isotc211.org/2005/gco"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns:gml="http://www.opengis.net/gml"
-    xmlns:xlink="http://www.w3.org/1999/xlink">
-    <gmd:fileIdentifier>
-        <gco:CharacterString>{{ md.identifier }}{# tag="md.identifier",ref="Part B 1.5",  name ="Resource Identifier", desc ="Unique Resource Identifier", example ="286c0725-046e-4533-b0bf-d6e367f6c342", type = "string", multi = 0, group = "Identification", multiline=False #}</gco:CharacterString>
-    </gmd:fileIdentifier>
-    <gmd:language>
-        <gmd:LanguageCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/Codelist/ML_gmxCodelists.xml#LanguageCode" codeListValue="{{ md.languagecode }}{# tag="md.languagecode", name ="Metadata language", desc ="Language(s) used within the datasets", example ="eng", type = "string", multi = 0, group = "Metadata",multiline=False #}">{{ md.languagecode }}</gmd:LanguageCode>
-    </gmd:language>
-    <gmd:hierarchyLevel>
-        <gmd:MD_ScopeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_ScopeCode" codeListValue="dataset" codeSpace="ISOTC211/19115">{{ md.identification.identtype }}{# tag="md.identification.identtype", name ="Resource Type", desc ="Scope to which metadata applies", example ="dataset", type = "string", multi = 0, group = "Identification",multiline=False #}</gmd:MD_ScopeCode>
-    </gmd:hierarchyLevel>
-  {% for co in md.contact -%}{# tag="for co in md.contact",  inboxmulti = 1, group = "Metadata",inbox="Metadata point of contact",object="CI_ResponsibleParty()" #}
-    <gmd:contact>
-        <gmd:CI_ResponsibleParty>
-            <gmd:organisationName>
-                <gco:CharacterString>{{ co.organization }}{# tag="co.organization",ref="Part B 9.1",  inboxmulti = 1,multi = 0,type = "string",group = "Metadata",object="CI_ResponsibleParty()", inbox="Metadata point of contact",name="Organisation name",example="SDI Unit, Institute for Environment and Sustainability, Joint ResearchCentre",desc="identification of, and means of communication with, person(s) and organization(s) associated with theresource(s)" #}</gco:CharacterString>
-            </gmd:organisationName>
-            <gmd:contactInfo>
-                <gmd:CI_Contact>
-                    <gmd:address>
-                        <gmd:CI_Address>
-                            <gmd:electronicMailAddress>
-                                <gco:CharacterString>{{ co.email }}{# tag="co.email",name="E-mail",ref="Part B 10.1",  multi = 0,object="CI_ResponsibleParty()", inboxmulti = 1,group = "Metadata", inbox="Metadata point of contact",type = "email",example="image2000 at jrc.it", desc="Party responsible for the metadata information." #}</gco:CharacterString>
-                            </gmd:electronicMailAddress>
-                        </gmd:CI_Address>
-                    </gmd:address>
-                </gmd:CI_Contact>
-            </gmd:contactInfo>
-            <gmd:role>
-                <gmd:CI_RoleCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode" codeListValue="{{ co.role }}{# tag="co.role",name="Responsible party role",ref="Part B 9.2" , multi = 0,type = "CI_RoleCode", inboxmulti = 1,group = "Responsible party",object="CI_ResponsibleParty()", inbox="Metadata pointt of contact",example="custodian", desc="function performed by the responsible party" #}" codeSpace="ISOTC211/19115">{{ co.role }}</gmd:CI_RoleCode>
-            </gmd:role>
-        </gmd:CI_ResponsibleParty>
-    </gmd:contact>
-  {% endfor -%}
-    <gmd:dateStamp>
-        <gco:Date>{{ md.datestamp }}{# tag="md.datestamp" , name="Metadata date" , ref= "Part B 10.2" , desc= "Date that the metadata was created." , example = "2005-03-27" , type ="date" , multi= 0 , group= "Metadata" , multiline= False #}</gco:Date>
-    </gmd:dateStamp>
-    <gmd:metadataStandardName>
-        <gco:CharacterString>ISO 19115</gco:CharacterString>
-    </gmd:metadataStandardName>
-    <gmd:metadataStandardVersion>
-        <gco:CharacterString>2003/Cor.1:2006</gco:CharacterString>
-    </gmd:metadataStandardVersion>
-    <gmd:identificationInfo>
-        <gmd:MD_DataIdentification>
-            <gmd:citation>
-                <gmd:CI_Citation>
-                    <gmd:title>
-                        <gco:CharacterString>{{ md.identification.title }}{# tag="md.identification.title", ref="Part B 1.1", name ="Resource title", desc ="Name by which the cited resource is known.", example ="Image2000 Product 1 (nl2) MultispectB 10.1" , multi = 0, group ="Identification", type = "string", multiline=True #}</gco:CharacterString>
-                    </gmd:title>
-          {% for d in md.identification.date -%}{# tag="for d in md.identification.date" ,name="",object="CI_Date()",group= "Temporal" , inbox= "Date of creation/publication/revision",  inboxmulti=1, multiline= False #}
-                    <gmd:date>
-                        <gmd:CI_Date>
-                            <gmd:date>
-                                <gco:DateTime>{{ d.date }}{# tag="d.date" , group= "Temporal" ,object="CI_Date()",type = "date", inbox= "Date of creation/publication/revision",  inboxmulti=1, multiline= False, name="Date of: type(below)",desc="reference date for the cited resource - publication/creation/revision",example="2007-09-15" #}</gco:DateTime>
-                            </gmd:date>
-                            <gmd:dateType>
-                                <gmd:CI_DateTypeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue= "{{ d.type }}{# tag="d.type" , group= "Temporal" ,object="CI_Date()",type = "CI_DateTypeCode", inbox= "Date of creation/publication/revision",  inboxmulti=1, multiline= False, name="type: creation/publication/revision",desc="reference date for the cited resource - publication/creation/revision",example="creation" #}" codeSpace="ISOTC211/19115">{{ d.type }}</gmd:CI_DateTypeCode>
-                            </gmd:dateType>
-                        </gmd:CI_Date>
-                    </gmd:date>
-          {% endfor -%}
-{% for (cod,code) in zip(md.identification.uricode,md.identification.uricodespace) -%}{# tag="for (cod,code) in zip(md.identification.uricode,md.identification.uricodespace)", inboxmulti=1, group = "Identification",inbox="Unique resource identifier" #}
-                                     <gmd:identifier>
-                                        <gmd:RS_Identifier>
-                                            <gmd:code>
-                                                <gco:CharacterString>{{ cod }}{# tag="cod", inboxmulti=1, group = "Identification",inbox="Unique resource identifier" ,ref="Part B 1.5",  name ="Idetifier- code", desc ="A value uniquely identifying the resource.The value domain of this metadata element is a mandatory character string code, generally assigned by the data owner, and a character string namespace uniquely identifying the context of the identifier code (for example, the data owner).", example ="http://image2000.jrc.it # image2000_1_nl2_multi", type = "string", multi = 0  #}</gco:CharacterString>
-                                            </gmd:code>
-                                            <gmd:codeSpace>
-                                                <gco:CharacterString>{{ code }}{# tag="code", inboxmulti=1, group = "Identification",inbox="Unique resource identifier" ,ref="Part B 1.5",  name ="Idetifier- code space", desc ="A value uniquely identifying the resource.The value domain of this metadata element is a mandatory character string code, generally assigned by the data owner, and a character string namespace uniquely identifying the context of the identifier code (for example, the data owner).", example ="http://image2000.jrc.it", type = "string", multi = 0 #}</gco:CharacterString>
-                                            </gmd:codeSpace>
-                                        </gmd:RS_Identifier>
-                                  </gmd:identifier>
-                      {% endfor -%}
-                </gmd:CI_Citation>
-            </gmd:citation>
-            <gmd:abstract>
-                <gco:CharacterString>{{ md.identification.abstract }}{# tag="md.identification.abstract ",ref="Part B 1.2",  name ="Resource Abstract", desc ="Brief narrative summary of the content of the resource(s).", example ="IMAGE2000 product 1 individual orthorectified scenes. IMAGE2000 was produced from ETM+ Landsat 7 satellite data and provides a consistent European coverage of individual orthorectified scenes in national map projection systems. The year 2000 was targeted as reference year, but a deviation of maximum 1-year was allowed to obtain a full coverage of Europe, which involves approximately 450 Landsat TM Frames. Where Landsat 7 data were not available, Landsat 5 data have been used instead. The spatial resolution is 25 metres for multispectral and 12.5 metres for panchromatic imagery", type = "string", multi = 0, group = "Identification", multiline=True #}</gco:CharacterString>
-            </gmd:abstract>
-      {% for co in md.identification.contact -%}{# tag="for co in md.identification.contact",object="CI_ResponsibleParty()", inboxmulti=1, group = "Responsible party",inbox="Point of contact" #}
-            <gmd:pointOfContact>
-                <gmd:CI_ResponsibleParty>
-                    <gmd:organisationName>
-                        <gco:CharacterString>{{ co.organization }}{# tag="co.organization",ref="Part B 9.1", type = "string", multi = 0, group = "Responsible party",inboxmulti=1 ,inbox="Point of contact",object="CI_ResponsibleParty()",name="Organisation name",example="SDI Unit, Institute for Environment and Sustainability, Joint ResearchCentre",desc="identification of, and means of communication with, person(s) and organization(s) associated with theresource(s)" #}</gco:CharacterString>
-                    </gmd:organisationName>
-                    <gmd:contactInfo>
-                        <gmd:CI_Contact>
-                            <gmd:address>
-                                <gmd:CI_Address>
-                                    <gmd:electronicMailAddress>
-                                        <gco:CharacterString>{{ co.email }}{# tag="co.email",name="E-mail",ref="Part B 10.1" , group = "Metadata",inboxmulti=1, inbox="Responsible party",multi=0,example="image2000 at jrc.it",object="CI_ResponsibleParty()", type = "email",desc="Party responsible for the metadata information." #}</gco:CharacterString>
-                                    </gmd:electronicMailAddress>
-                                </gmd:CI_Address>
-                            </gmd:address>
-                        </gmd:CI_Contact>
-                    </gmd:contactInfo>
-                    <gmd:role>
-                        <gmd:CI_RoleCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode" codeListValue="{{ co.role }}{# tag="co.role",inboxmulti=1,name="Responsible party role",type = "CI_RoleCode",object="CI_ResponsibleParty()",ref="Part B 9.2",  multi = 0, group = "Responsible party", inbox="Responsible party",example="custodian", desc="function performed by the responsible party" #}" codeSpace="ISOTC211/19115">{{ co.role }}</gmd:CI_RoleCode>
-                    </gmd:role>
-                </gmd:CI_ResponsibleParty>
-            </gmd:pointOfContact>
-      {% endfor -%}
-{% for k in md.identification.keywords -%}{# tag="for k in md.identification.keywords" ,group = "Keywords",inbox="Free keywords",inboxmulti=1 #}
-            <gmd:descriptiveKeywords>
-                <gmd:MD_Keywords>
-          {% for kw in k["keywords"] -%}{# tag='for kw in k["keywords"]',group = "Keywords",inbox="Free keywords",inboxmulti=1 #}
-                    
-                    <gmd:keyword>
-                        <gco:CharacterString>{{ kw }}{# tag="kw",ref="Part B 3.1", name ="Keyword",example="Land cover (INSPIRE Spatial Data Theme),humanCatalogueViewer (spatial data service,subcategory), water springs (AGROVOC), freshwater (GEMET Concepts)", desc ="Commonly used word(s) or formalised word(s) or phrase(s) used to describe the subject." , type = "string",inboxmulti=1, multi = 1, group = "Keywords", multiline=False, inbox="Free keywords" #} </gco:CharacterString>
-                    </gmd:keyword>
-          {% endfor -%}
-                    <gmd:thesaurusName>
-                        <gmd:CI_Citation>
-                            <gmd:title>
-                                <gco:CharacterString>{{ k["thesaurus"]["title"] }}{# tag='k["thesaurus"]["title"]', name ="Title", desc ="This citation shall include title of keywords )" , type = "string", multi = 0,inboxmulti=1, group = "Keywords", multiline=False, inbox="Free keywords" #}</gco:CharacterString>
-                            </gmd:title>
-                            <gmd:date>
-                                <gmd:CI_Date>
-                                    <gmd:date>
-                                        <gco:Date>{{ k["thesaurus"]["date"] }}{# tag='k["thesaurus"]["date"]', name ="Reference date", desc ="This citation shall include at least the title a reference date(publication, revision, creation." , type = "date",inboxmulti=1, multi = 0, group = "Keywords", multiline=False, inbox="Free keywords" #}</gco:Date>
-                                    </gmd:date>
-                                    <gmd:dateType>
-                                        <gmd:CI_DateTypeCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode" codeListValue= "{{ k["thesaurus"]["datetype"] }}{{ k["thesaurus"]["datetype"] }}{# tag='k["thesaurus"]["datetype"]', type = "CI_DateTypeCode",name ="Date type",inboxmulti=1, desc ="Options Date of creation, Date of last revision, date of publication" , multi = 0, group = "Keywords", multiline=False, inbox="Free keywords" #}" >{{ k["thesaurus"]["datetype"] }}</gmd:CI_DateTypeCode>
-                                    </gmd:dateType>
-                                </gmd:CI_Date>
-                            </gmd:date>
-                        </gmd:CI_Citation>
-                    </gmd:thesaurusName>
-                </gmd:MD_Keywords>
-            </gmd:descriptiveKeywords>
-      {% endfor -%}
-      {% for rc in md.identification.uselimitation -%}{# tag="for rc in md.identification.uselimitation" , group= "Constraints" ,inbox="Condition applying to access and use", inboxmulti=1 #}
-            <gmd:resourceConstraints>
-                <gmd:MD_Constraints>
-                    <gmd:useLimitation>
-                        <gco:CharacterString>{{ rc }}{# tag="rc" , name="Use limitation" , ref= "Part B 8.1" , desc= "restrictions on the access and use of a resource or metadata" , example = "no conditions apply" , type ="string" ,group= "Constraints" , multi= 0, multiline= False,inbox="Condition applying to access and use", inboxmulti=1  #}</gco:CharacterString>
-                    </gmd:useLimitation>
-                </gmd:MD_Constraints>
-            </gmd:resourceConstraints>
-      {% endfor -%}
-      {% for oc in md.identification.otherconstraints -%}{# tag="for oc in md.identification.otherconstraints" , group= "Constraints",inbox="Other restriction", inboxmulti=1  #}
-            <gmd:resourceConstraints>
-                <gmd:MD_LegalConstraints>
-                    <gmd:accessConstraints>
-                        <gmd:MD_RestrictionCode codeList="http://www.isotc211.org/2005/resources/Codelist/ML_gmxCodelists.xml#MD_RestrictionCode" codeListValue="{{ oc }}{# tag="oc" , name="Other constraints" , ref= "Part B 8.1" , desc= "Restrictions on the access and use of a resource or metadata" , example = "No conditions apply" , type ="MD_RestrictionCode" ,group= "Constraints" , multi= 0, multiline= False,inbox="Other restriction", inboxmulti=1  #}">{{ oc }}</gmd:MD_RestrictionCode>
-                    </gmd:accessConstraints>
-               {% endfor -%}
-      {% for ac in md.identification.accessconstraints -%}{# tag="for oc in md.identification.accessconstraints" , group= "Constraints",inbox="Limitation on public access", inboxmulti=1  #}
-                    <gmd:otherConstraints>
-                        <gco:CharacterString>{{ ac }} {# tag="ac" ,name="Access constraints", group= "Constraints",inbox="Limitations on public access", inboxmulti=1,ref= "Part B 8.2" , desc= "access constraints applied to assure the protection of privacy or intellectual property, and any special restrictionsor limitations on obtaining the resource." , example = "intellectualPropertyRights (rights to financial benefit from and control of distribution of non tangible property that is a result of creativity)." , type ="string", multi=0 ,  multiline= False #}</gco:CharacterString>
-                    </gmd:otherConstraints>
-                </gmd:MD_LegalConstraints>
-            </gmd:resourceConstraints>
-      {% endfor -%}
-      {% if md.identification.denominators|length > 0 -%}{# tag="if md.identification.denominators|length > 0", group = "Quality and Validity", inbox="Spatial resolution-scale",inboxmulti= 1 #}
-{% for den in md.identification.denominators -%}{# tag="for den in md.identification.denominators", group = "Quality and Validity", inbox="Spatial resolution-scale",inboxmulti= 1 #}
-            <gmd:spatialResolution>
-                <gmd:MD_Resolution>
-                    <gmd:equivalentScale>
-                        <gmd:MD_RepresentativeFraction>
-                            <gmd:denominator>
-                                <gco:Integer>{{ den }}{# tag="den" , name="Equivalent scale" , ref= "Part B 6.2" , desc= "level of detail expressed as the scale denominator of a comparable hardcopy map or chart" , example = "50000 (e.g. 1:50000 scale map)" , type ="integer" , group = "Quality and Validity" ,inbox="Spatial resolution-scale", multi=0 , inboxmulti=1, multiline= False #}</gco:Integer>
-                            </gmd:denominator>
-                        </gmd:MD_RepresentativeFraction>
-                    </gmd:equivalentScale>
-                </gmd:MD_Resolution>
-            </gmd:spatialResolution>
-      {% endfor -%}
-      {% endif -%}
-      
-      {% for lan in md.identification.resourcelanguage -%}{# tag="for lan in md.identification.resourcelanguage" , group= "Identification" ,inbox='Languages',inboxmulti=1, multiline= False #}
-            <gmd:language>
-                <gmd:LanguageCode codeList="http://www.isotc211.org/2005/resources/Codelist/ML_gmxCodelists.xml#LanguageCode" codeListValue="{{ lan }}{# tag="lan" , name="Metadata language" , ref= "Part B 10.3" , desc= "Language used for documenting metadata." , example = "eng" , type ="LanguageCode (ISO/TS 19139)" ,multi=0,inbox='Languages',inboxmulti=1, group= "Identification" , multiline= False #}">{{ lan }}</gmd:LanguageCode>
-            </gmd:language>
-      {% endfor -%}
-      {% for tc in md.identification.topiccategory -%}{# tag="for tc in md.identification.topiccategory", inbox='Topic category',group= "Classification", multiline= False #}
-            <gmd:topicCategory>
-                <gmd:MD_TopicCategoryCode>{{ tc }}{# tag="tc" , name="Topic" , ref= "Part B 2.1" , desc= "Main theme(s) of the dataset" ,inbox='Topic category', example = "imageryBaseMapsEarthCover" , type ="MD_TopicCategory" , group= "Classification" ,  multi=0 , multiline= False #}</gmd:MD_TopicCategoryCode>
-            </gmd:topicCategory>
-      {% endfor -%}
-{% for (u,d) in zip(md.identification.uom,md.identification.distance) -%}{# tag="for (u,d) in zip(md.identification.uom,md.identification.distance)", group = "Quality and Validity", inbox="Spatial resolution-distance",inboxmulti= 1 #}
-                     <gmd:spatialResolution>
-                        <gmd:MD_Resolution>
-                            <gmd:distance>
-                                <gco:Distance uom="{{ u }}{# tag="u" , name="Units" , ref= "Part B 6.2" , desc= "Ground sample distance" , example = "m" , type ="string" , group = "Quality and Validity" ,inbox="Spatial resolution-distance", multi=0 , inboxmulti=1, multiline= False #}">
-{{ d }}{# tag="d" , name="Resolution" , ref= "Part B 6.2" , desc= "Ground sample distance" , example = "25" , type ="integer" , group = "Quality and Validity" ,inbox="Spatial resolution-distance", multi=0 , inboxmulti=1, multiline= False #}</gco:Distance>
-                            </gmd:distance>
-                        </gmd:MD_Resolution>
-                    </gmd:spatialResolution>
-      {% endfor -%}
-            <gmd:extent>
-                <gmd:EX_Extent>
-                    <gmd:geographicElement>
-                        <gmd:EX_GeographicBoundingBox>
-                            <gmd:westBoundLongitude>
-                                <gco:Decimal>{{ md.identification.extent.boundingBox.minx }}{# tag="md.identification.extent.boundingBox.minx" , name="West Bound Longitude" , ref= "Part B 4.1" , desc= "Western-most coordinate of the limit of the dataset extent, expressed in longitude in decimal degrees (positive east)." , example = "3.93" , type ="decimal" , group= "Geographic" ,  multi=0 ,  multiline= False #}</gco:Decimal>
-                            </gmd:westBoundLongitude>
-                            <gmd:eastBoundLongitude>
-                                <gco:Decimal>{{ md.identification.extent.boundingBox.maxx }}{# tag="md.identification.extent.boundingBox.maxx" , name="East Bound Longitude" , ref= "Part B 4.1" , desc= "Eastern-most coordinate of the limit of the dataset extent, expressed in longitude in decimal degrees (positive east)." , example = "7.57" , type ="decimal" , group= "Geographic" ,  multi=0 ,  multiline= False #}</gco:Decimal>
-                            </gmd:eastBoundLongitude>
-                            <gmd:southBoundLatitude>
-                                <gco:Decimal>{{ md.identification.extent.boundingBox.miny }}{# tag="md.identification.extent.boundingBox.miny" , name="South Bound Latitude" , ref= "Part B 4.1" , desc= "Southern-most coordinate of the limit of the dataset extent, expressed in latitude in decimal degrees (positive north)." , example = "52.10" , type ="decimal" , group= "Geographic" ,multi=0 , multiline= False #}</gco:Decimal>
-                            </gmd:southBoundLatitude>
-                            <gmd:northBoundLatitude>
-                                <gco:Decimal>{{ md.identification.extent.boundingBox.maxy }}{# tag="md.identification.extent.boundingBox.maxy" , name="North Bound Latitude" , ref= "Part B 4.1" , desc= "Northern-most coordinate of the limit of the dataset extent, expressed in latitude in decimal degrees (positive north)." , example = "54.10" , type ="decimal" , group= "Geographic" , multi=0 ,  multiline= False #}</gco:Decimal>
-                            </gmd:northBoundLatitude>
-                        </gmd:EX_GeographicBoundingBox>
-                    </gmd:geographicElement>
-                </gmd:EX_Extent>
-            </gmd:extent>
-      {% if md.identification.temporalextent_start != None -%}{# tag="if md.identification.temporalextent_start != None", group = "Temporal", inbox="Temporal Extent",inboxmulti= 0 #}
-            <gmd:extent>
-                <gmd:EX_Extent>
-                    <gmd:temporalElement>
-                        <gmd:EX_TemporalExtent>
-                            <gmd:extent>
-                                <gml:TimePeriod xsi:type="gml:TimePeriodType">
-                                    <gml:beginPosition>{{ md.identification.temporalextent_start }}{# tag="md.identification.temporalextent_start" , name="Starting date" , ref= "Part B 5.1" , desc= "Time period covered by the content of the dataset." , example = "2000-11-30" , type ="date" , group= "Temporal" , inbox= "Temporal extent", multi=0 , inboxmulti= 0, multiline= False #}</gml:beginPosition>
-                                    <gml:endPosition>{{ md.identification.temporalextent_end }}{# tag="md.identification.temporalextent_end" , name="Ending date" , ref= "Part B 5.1" , desc= "Time period covered by the content of the dataset." , example = "2000-11-30" , type ="date" , group= "Temporal" , inbox= "Temporal extend", multi=0 , inboxmulti= 0, multiline= False #}</gml:endPosition>
-                                </gml:TimePeriod>
-                            </gmd:extent>
-                        </gmd:EX_TemporalExtent>
-                    </gmd:temporalElement>
-                </gmd:EX_Extent>
-            </gmd:extent>
-      {% endif -%}
-        </gmd:MD_DataIdentification>
-    </gmd:identificationInfo>
-    <gmd:distributionInfo>
-        <gmd:MD_Distribution>
-            <gmd:distributionFormat>
-                <gmd:MD_Format>
-                    <gmd:name gco:nilReason="inapplicable"/>
-                    <gmd:version gco:nilReason="inapplicable"/>
-                </gmd:MD_Format>
-            </gmd:distributionFormat>
-            <gmd:transferOptions>
-                <gmd:MD_DigitalTransferOptions>
-          {% for ln in md.distribution.online -%}{# tag="for ln in md.distribution.online" , group= "Identification",object='CI_OnlineResource()'  #}
-                    <gmd:onLine>
-                        <gmd:CI_OnlineResource>
-                            <gmd:linkage>
-                                <gmd:URL>{{ ln.url }}{# tag="ln.url" , name="Linkage" , ref= "Part B 1.4" ,object='CI_OnlineResource()', desc= "Location (address) for on-line access using a Uniform Resource Locator address or similar addressing scheme." , example = "http://image2000.jrc.it" , type ="url" , group= "Identification" ,multi=1, multiline= False #}</gmd:URL>
-                            </gmd:linkage>
-                        </gmd:CI_OnlineResource>
-                    </gmd:onLine>
-          {% endfor -%}
-                </gmd:MD_DigitalTransferOptions>
-            </gmd:transferOptions>
-        </gmd:MD_Distribution>
-    </gmd:distributionInfo>
-    <gmd:dataQualityInfo>
-        <gmd:DQ_DataQuality>
-            <gmd:scope>
-                <gmd:DQ_Scope>
-                    <gmd:level>
-                        <gmd:MD_ScopeCode codeListValue="{{ md.identification.identtype }}{# tag="md.identification.identtype", name ="Resource Type", desc ="Scope to which metadata applies", example ="dataset", type = "string", multi = 0, group = "Conformity",multiline=False #}" codeList="http://www.isotc211.org/2005/resources/Codelist/ML_gmxCodelists.xml#MD_ScopeCode">{{ md.identification.identtype }}</gmd:MD_ScopeCode>
-                    </gmd:level>
-                </gmd:DQ_Scope>
-            </gmd:scope>
- {% for (t,d,dt,dg) in zip(md.dataquality.conformancetitle,md.dataquality.conformancedate,md.dataquality.conformancedatetype,md.dataquality.conformancedegree) -%}{# tag="for (t,d,dt,dg) in zip(md.dataquality.conformancetitle,md.dataquality.conformancedate,md.dataquality.conformancedatetype,md.dataquality.conformancedegree)", group = "Conformity", inbox="Conformity",inboxmulti= 1 #}
-            <gmd:report>
-                <gmd:DQ_DomainConsistency xsi:type="gmd:DQ_DomainConsistency_Type">
-                    <gmd:measureIdentification>
-                        <gmd:RS_Identifier>
-                            <gmd:code>
-                                <gco:CharacterString>Conformity</gco:CharacterString>
-                            </gmd:code>
-                            <gmd:codeSpace>
-                                <gco:CharacterString>INSPIRE</gco:CharacterString>
-                            </gmd:codeSpace>
-                        </gmd:RS_Identifier>,
-                    </gmd:measureIdentification>
-                    <gmd:result>
-                        <gmd:DQ_ConformanceResult xsi:type="gmd:DQ_ConformanceResult_Type">
-                            <gmd:specification>
-                                <gmd:CI_Citation>
-                                    <gmd:title>
-                                        <gco:CharacterString>{{ t }}{# tag="t" , name="Specification" , ref= "Part B 7.1" , desc= "citation of the product specification or user requirement against which data is being evaluated." , example = "INSPIRE Data Specification on orthoimagery - Guidelines" , type ="string" , group= "Conformity" , inbox= "Conformity", multi=0 , inboxmulti= 1, multiline= True #}</gco:CharacterString>
-                                    </gmd:title>
-                                    <gmd:date>
-                                        <gmd:CI_Date>
-                                            <gmd:date>
-                                                <gco:Date>{{ d }}{# tag="d" , name="Date" , ref= "Part B 7.1" , desc= "citation of the product specification or user requirement against which data is being evaluated." , example = "2010-04-26" , type ="date" , group= "Conformity" , inbox= "Conformity", multi=0 , inboxmulti= 1, multiline= False #}</gco:Date>
-                                            </gmd:date>
-                                            <gmd:dateType>
-                                                <gmd:CI_DateTypeCode codeList="http://www.isotc211.org/2005/resources/Codelist/ML_gmxCodelists.xml#CI_DateTypeCode" codeListValue={{ "\"%s\"" % dt }}>{{ dt }}{# tag="dt" , name="Date type" , ref= "Part B 7.1" , desc= "a date type: creation, revision or publication." , example = "publication" , type ="dateType" , group= "Conformity" , inbox= "Conformity", multi=0 , inboxmulti= 1, multiline= False #}</gmd:CI_DateTypeCode>
-                                            </gmd:dateType>
-                                        </gmd:CI_Date>
-                                    </gmd:date>
-                                </gmd:CI_Citation>
-                            </gmd:specification>
-                            <gmd:explanation>
-                                <gco:CharacterString>See the referenced specification</gco:CharacterString>
-                            </gmd:explanation>
-                            <gmd:pass>
-                                <gco:Boolean>{{ dg }}{# tag="dg" , name="Degree/Pass" , ref= "Part B 7.2" , desc= "indication of the conformance result" , example = "True." , type ="boolean" , group= "Conformity" , inbox= "Conformity", multi=0 , inboxmulti= 1, multiline= False #}</gco:Boolean>
-                            </gmd:pass>
-                        </gmd:DQ_ConformanceResult>
-                    </gmd:result>
-                </gmd:DQ_DomainConsistency>
-            </gmd:report>
-      {% endfor -%}
-      <gmd:lineage>
-        <gmd:LI_Lineage>
-          <gmd:statement>
-            <gco:CharacterString>{{ md.dataquality.lineage }}{# tag="md.dataquality.lineage" , name="Lineage" , ref= "Part B 6.1" , desc= "General explanation of the data producers knowledge about the lineage of a dataset." , example = "Product 1 scenes correspond to the path/row of the Landsat orbit.." , type ="string" , group= "Quality and Validity" ,  multiline= True #}</gco:CharacterString>
-          </gmd:statement>
-        </gmd:LI_Lineage>
-      </gmd:lineage>
-    </gmd:DQ_DataQuality>
-  </gmd:dataQualityInfo>
-</gmd:MD_Metadata>

Modified: grass-addons/grass7/gui/wxpython/wx.metadata/r.info.iso/r.info.iso.html
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/r.info.iso/r.info.iso.html	2015-06-01 14:57:03 UTC (rev 65348)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/r.info.iso/r.info.iso.html	2015-06-01 20:48:36 UTC (rev 65349)
@@ -20,7 +20,7 @@
 <i>metadata</i> directory in the map's mapset. If the name for output
 metadata file is not specified by <b>output</b> option than the name
 is built from map's type and its name. For raster maps, the prefix
-derived from the current nomenclature is <em>cell</em>, for vector
+derived from the current nomenclature is <em>raster</em>, for vector
 maps <em>vector</em>. File ends with <em>.xml</em> extension.
 
 <p>

Modified: grass-addons/grass7/gui/wxpython/wx.metadata/r.info.iso/r.info.iso.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/r.info.iso/r.info.iso.py	2015-06-01 14:57:03 UTC (rev 65348)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/r.info.iso/r.info.iso.py	2015-06-01 20:48:36 UTC (rev 65349)
@@ -57,7 +57,7 @@
     else:
         destination, name = os.path.split(options['output'])
 
-    md = GrassMD(options['map'], 'cell')
+    md = GrassMD(options['map'], 'raster')
     if options['profile'] == 'inspire':
         md.createGrassInspireISO()
         xml_file = md.saveXML(path=destination,

Modified: grass-addons/grass7/gui/wxpython/wx.metadata/v.info.iso/v.info.iso.html
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.metadata/v.info.iso/v.info.iso.html	2015-06-01 14:57:03 UTC (rev 65348)
+++ grass-addons/grass7/gui/wxpython/wx.metadata/v.info.iso/v.info.iso.html	2015-06-01 20:48:36 UTC (rev 65349)
@@ -20,7 +20,7 @@
 <i>metadata</i> directory in the map's mapset. If the name for output
 metadata file is not specified by <b>output</b> option than the name
 is built from map's type and its name. For raster maps, the prefix
-derived from the current nomenclature is <em>cell</em>, for vector
+derived from the current nomenclature is <em>raster</em>, for vector
 maps <em>vector</em>. File ends with <em>.xml</em> extension.
 
 <p>



More information about the grass-commit mailing list