[Qgis-user] Open Metadata and Show Specific Information
Alex Mandel
tech_dev at wildintellect.com
Tue Mar 11 21:02:56 PDT 2014
See the existing metadata plugins for ideas.
http://plugins.qgis.org/search/?q=metadata
Also this kind of question is better for the qgis-developer mailing list.
http://lists.osgeo.org/listinfo/qgis-developer
Enjoy,
Alex
On 03/11/2014 03:49 PM, Suryo Miles wrote:
> I try make plugin to open and read metadata (.xml) and show information
> inside metadata like map scale, map fiture and bounding box and auto fill
> it to QLineEdit
>
> This code i use to open metadata
>
>
> cariButton = self.ui.btnCari
> QtCore.QObject.connect(cariButton, QtCore.SIGNAL('clicked()'),self.cari)
>
> def cari(self, event=None):
>
> #open dialog
> filename = QtGui.QFileDialog.getOpenFileName(self, 'Open File', '*.xml')
>
> self.ui.lineFile.setText(filename)
>
> #panggil isi data
> self.isiDataFile(filename)
>
> def isiDataFile(self, nmfile):
> #buka dengan open mode baca
> teksFile = open(nmfile, 'r').read()
>
> self.ui.textFile.setText(teksFile)
>
> but metadata have a complicated structure, like the line that have
> information about scale
>
> <gmd:scaleDenominator><gmd:MD_RepresentativeFraction><gmd:denominator>**<gco:Integer>100000</gco:Interger>**</gmd:scaleDenominator></gmd:MD_RepresentativeFraction></gmd:denominator>
>
> it is possible to just take scale number (100000) and auto fill it in
> QLineEdit when metadata has opened?
>
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
More information about the Qgis-user
mailing list