Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Ignore
.directory
*.pyc
*.zip
*.sh
# Not Ignore
!create_zip_plugin.sh

# Ignore
.directory
*.pyc
*.zip
*.sh
# Not Ignore
!create_zip_plugin.sh
680 changes: 340 additions & 340 deletions LICENSE

Large diffs are not rendered by default.

46 changes: 24 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
<!-- mapbiomas-->
[mapbiomas_logo]: https://k6f2r3a6.stackpathcdn.com/wp-content/uploads/2018/04/C%C3%B3pia-de-mapbiomas_IV%C6%92_a-01.png

![][mapbiomas_logo]
[MapBiomas](http://mapbiomas.org/)

# MapBiomas Collection Plugin QGIS

This plugin lets you get collection of mapping from MapBiomas Project.

## Author
Luiz Motta

## Changelog
- 2020-03-25
Changed Docwidget to WidgetProvider(legend)
- 2019-09-05
Add set for collection layer
- 2019-08-30
Update metadata and added collection number
- 2019-08-29
Start of plugin
<!-- mapbiomas-->
[mapbiomas_logo]: https://k6f2r3a6.stackpathcdn.com/wp-content/uploads/2018/04/C%C3%B3pia-de-mapbiomas_IV%C6%92_a-01.png

![][mapbiomas_logo]
[MapBiomas](http://mapbiomas.org/)

# MapBiomas Collection Plugin QGIS

This plugin lets you get collection of mapping from MapBiomas Project.

## Author
Luiz Motta, Luiz Cortinhas

## Changelog
- 2020-11-26
Updated to new Map Server and SLD style
- 2020-03-25
Changed Docwidget to WidgetProvider(legend)
- 2019-09-05
Add set for collection layer
- 2019-08-30
Update metadata and added collection number
- 2019-08-29
Start of plugin
137 changes: 68 additions & 69 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -1,70 +1,69 @@
# -*- coding: utf-8 -*-
"""
/***************************************************************************
Name : MapBiomas Collection
Description : This plugin lets you get collection of mapping from MapBiomas Project(http://mapbiomas.org/).
Date : August, 2019
copyright : (C) 2019 by Luiz Motta
email : motta.luiz@gmail.com

***************************************************************************/

/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
"""
__author__ = 'Luiz Motta'
__date__ = '2019-08-28'
__copyright__ = '(C) 2019, Luiz Motta'
__revision__ = '$Format:%H$'


import os

from qgis.PyQt.QtCore import QObject, pyqtSlot
from qgis.PyQt.QtGui import QIcon
from qgis.PyQt.QtWidgets import QAction

from .mapbiomascollection import MapBiomasCollection

def classFactory(iface):
return MapbiomasCollectionPlugin( iface )

class MapbiomasCollectionPlugin(QObject):
def __init__(self, iface=None):
super().__init__()
self.iface = iface
self.name = u"&MapbiomasCollection"
self.mbc = MapBiomasCollection( iface )

def initGui(self):
name = "Mapbiomas Collection"
about = 'Add a MapBiomas collection'
icon = QIcon( os.path.join( os.path.dirname(__file__), 'mapbiomas.svg' ) )
self.action = QAction( icon, name, self.iface.mainWindow() )
self.action.setObjectName( name.replace(' ', '') )
self.action.setWhatsThis( about )
self.action.setStatusTip( about )
self.action.triggered.connect( self.run )

self.iface.addToolBarIcon( self.action )
self.iface.addPluginToMenu( self.name, self.action )

self.mbc.register()

def unload(self):
self.iface.removeToolBarIcon( self.action )
self.iface.removePluginMenu( self.name, self.action )
del self.action
if not self.mbc:
del self.mbc

@pyqtSlot()
def run(self):
self.mbc.run()
# -*- coding: utf-8 -*-
"""
/***************************************************************************
Name : MapBiomas Collection
Description : This plugin lets you get collection of mapping from MapBiomas Project(http://mapbiomas.org/).
Date : August, 2020
copyright : (C) 2019 by Luiz Motta, Updated by Luiz Cortinhas (2020)
email : motta.luiz@gmail.com, luiz.cortinhas@solved.eco.br

***************************************************************************/

/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
"""
__author__ = 'Luiz Cortinhas, Luiz Motta'
__date__ = '2021-02-11'
__copyright__ = '(C) 2021, Luiz Cortinhas (Fork: 2019, Luiz Motta)'
__revision__ = '$Format:%H$'

import os

from qgis.PyQt.QtCore import QObject, pyqtSlot
from qgis.PyQt.QtGui import QIcon
from qgis.PyQt.QtWidgets import QAction

from .mapbiomascollection import MapBiomasCollection

def classFactory(iface):
return MapbiomasCollectionPlugin( iface )

class MapbiomasCollectionPlugin(QObject):
def __init__(self, iface=None):
super().__init__()
self.iface = iface
self.name = u"&MapbiomasCollection"
self.mbc = MapBiomasCollection( iface )

def initGui(self):
name = "Mapbiomas Collection"
about = 'Add a MapBiomas collection'
icon = QIcon( os.path.join( os.path.dirname(__file__), 'mapbiomas.svg' ) )
self.action = QAction( icon, name, self.iface.mainWindow() )
self.action.setObjectName( name.replace(' ', '') )
self.action.setWhatsThis( about )
self.action.setStatusTip( about )
self.action.triggered.connect( self.run )

self.iface.addToolBarIcon( self.action )
self.iface.addPluginToMenu( self.name, self.action )

self.mbc.register()

def unload(self):
self.iface.removeToolBarIcon( self.action )
self.iface.removePluginMenu( self.name, self.action )
del self.action
if not self.mbc:
del self.mbc

@pyqtSlot()
def run(self):
self.mbc.run()

22 changes: 10 additions & 12 deletions create_zip_plugin.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#!/bin/bash
plugin_dir=$( basename $( pwd ) )
if [ -f "./$plugin_dir.zip" ]; then
rm "./$plugin_dir.zip"
fi
mkdir "./$plugin_dir"
cp *.py "./$plugin_dir"
for item in metadata.txt LICENSE mapbiomas.svg *.json; do cp "./$item" "./$plugin_dir"; done
zip -r $plugin_dir $plugin_dir
rm -r $plugin_dir
#
kdialog --msgbox "Zip file created: "$plugin_dir".zip"
#/bin/bash
plugin_dir=$( basename $( pwd ) )
if [ -f "./$plugin_dir.zip" ]; then
rm "./$plugin_dir.zip"
fi
mkdir "./$plugin_dir"
cp *.py "./$plugin_dir"
for item in metadata.txt LICENSE mapbiomas.svg *.json; do cp "./$item" "./$plugin_dir"; done
zip -r $plugin_dir $plugin_dir
rm -r $plugin_dir
118 changes: 59 additions & 59 deletions mapbiomas.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading