Vanity package for geopython projects
pip install geopython
>>> import geopython
This project forked from nextgis/qgis_cswclient
*** We have moved! MetaSearch is now a core QGIS plugin! (2014-11-30). See QGIS repository
Home Page: https://hub.qgis.org/wiki/quantum-gis/MetaSearch
License: Other
Vanity package for geopython projects
pip install geopython
>>> import geopython
When you have several services registered (2 in my case), this button does not refresh when switching from one service to another. You need to first click on the “ Service info” button so that it refreshes.
As suggested by @alexbruy, since the latter is part of QGIS core, replace pygments syntax highlighting funcitonality (contained to MetaSearch.util.highlight_xml
) with something just as simple, and remove the pygments dependency and bundling for plugin.
Suggestion that the plugin be able to parse the BBox of a layer to use in its search query.
The suggestion comes handy when there's a reference Shapefile, KML... and there's a need to search the catalog for intersecting datasets
We were testing our services registry (based on GeoNetwork and ISO19119): http://services.grid.unep.ch:8080/geonetwork/srv/eng/csw?
We can add WMS/WMTS but WFS and WCS buttons never work. In metadata, standards are declared has OGC:WFS or OGC:WCS.
Hi,
I try to connect and "getrecords" from this service
http://geoportal.cuzk.cz/SDIProCSW/service.svc/get?REQUEST=GetCapabilities&SERVICE=CSW
I get the service connected, but when I try to "search" with no constrains, I get
Connection error: HTTP Error 400: Bad Request
Only thing, which seems strange is (in the capabilities document) that the URLs for POST and GET request types are different.
Any hint, how to test it? Any hint, what else could this be?
Adding a WMS from a metadata using CSW it's came out this error message( see below):
An example of metadata with this problem is:
http://www.geoportale.piemonte.it/geocatalogorp/geonetworkrp/srv/it/metadata.show?id=1358
Any clue? Thanks.
hi Tom,
strange error, while wanting to try metasearch in my own compiled QGIS2.6 (on Debian) on our 'nationaal georegister', I get the following error:
Connection error: HTTP Error 401: Unauthorized
thinking there was something wrong with our service, i tried to connect using owslib in python... all working fine there..
Then i tried QGIS master, and that one was working, also tested 2.4 still working?
Can you please see if 2.6 is working for you?
I've tried to up/downgrade in different version:
QGIS master: OK
Installed version: 0.3.1 (in /home/richard/apps/qgis/master/debug/share/qgis/python/plugins/MetaSearch)
Available version: 0.3.2 (in QGIS Official Plugin Repository)
QGIS master: OK
Installed version: 0.3.2 (in /home/richard/.qgis2/python/plugins/MetaSearch)
Available version: 0.3.2 (in QGIS Official Plugin Repository)
QGIS 2.6: NOT OK: Connection error: HTTP Error 401: Unauthorized
Installed version: 0.3.2 (in /home/richard/.qgis2/python/plugins/MetaSearch)
Available version: 0.3.2 (in QGIS Official Plugin Repository)
QGIS 2.6: NOT OK: Connection error: HTTP Error 401: Unauthorized
Installed version: 0.3.1 (in /home/richard/apps/qgis/2.6/debug/share/qgis/python/plugins/MetaSearch)
Available version: 0.3.2 (in QGIS Official Plugin Repository)
Also testing QGIS 2.4: OK
Installed version: 0.2.0 (in /home/richard/apps/qgis/2.4/debug/share/qgis/python/plugins/MetaSearch)
Available version: 0.3.2 (in QGIS Official Plugin Repository)
Then upgrading the plugin in QGIS 2.4: OK
Installed version: 0.3.2 (in /home/richard/.qgis2/python/plugins/MetaSearch)
Available version: 0.3.2 (in QGIS Official Plugin Repository)
Removing a connection in the Services tab does not update the connection dropdown in the Search tab. So removing a connection (in the Services tab) which in Search tab is the active one (or is still available) results in a Python error.
Editing the connection dropdown in the Services tab should sync immidiatly with the dropdown in the Search tab. Even better would be to reuse that widget...
We should harmonize the namespace for MetaSearch settings.
Looking at the QGIS registry (for Windows case), plugins use case-sensitive settings as per the plugin name, so we can use /MetaSearch/
as the top-level grouping, and s/CSWClient/MetaSearch/ thereafter.
if i set proxy option in qgis network preferences as httpcachingproxy , the plugin doesn't work and give error:
Impossibile caricare il plugin MetaSearch a causa di errore chiamando il metodo initGui() Traceback (most recent call last): File "C:/PROGRA~1/QGISVA~1/apps/qgis/./python\qgis\utils.py", line 213, in startPlugin plugins[packageName].initGui() File "C:/Documents and Settings/SALVO/.qgis2/python/plugins\MetaSearch\plugin.py", line 106, in initGui self.dialog = MetaSearchDialog(self.iface) File "C:/Documents and Settings/SALVO/.qgis2/python/plugins\MetaSearch\dialogs\maindialog.py", line 129, in __init__ self.manageGui() File "C:/Documents and Settings/SALVO/.qgis2/python/plugins\MetaSearch\dialogs\maindialog.py", line 158, in manageGui self.install_proxy() File "C:/Documents and Settings/SALVO/.qgis2/python/plugins\MetaSearch\dialogs\maindialog.py", line 883, in install_proxy conn = '%s://%s%s%s' % (ptype, proxy_up, host, proxy_port) UnboundLocalError: local variable 'ptype' referenced before assignment Versione Python: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)] Versione di QGIS: 2.2.0-Valmiera Valmiera, c3a2817
for to work i nee to set proxy option as:
httpProxy
is it possible solve the problem?
Cannot load metasearch in QGIS master, it give the error "cannot import name BBox"
I installed the MetaSearch Catalogue Client plugin for QGIS and was able to test it and use it to interact with our CSW (and start optimizing our metadata).
(out CSW is this: https://www.dov.vlaanderen.be/geonetwork/srv/nl/csw?Request=GetCapabilities&Service=CSW&Version=2.0.2 ).
However I am faced with the problem that it is not possible to use the plugin when I have to activate a proxy to allow access to the internet (which I always have to do when I'm working at my office - Belgium - Flemish government).
Is it possible to make sure that the plugin can be used when the proxy is on ?
after last update, all settings are changed, so I ended up as if I was a fresh user.
but because the other tabs were not working (only Services was active), I thought my plugin was frozen. Untill I thought about my settings and clicked 'Add default services'...
Should there not be a message somewhere, in case of showing of the plugin with zero connections, telling the user: "to start: either click default services, or create a new cws connection first". I know we do not like popups, but ...
WFS and WCS have different connection patterns in QGIS than WMS/WMTS.
If I'm write, I only see the data extent from a record when I'm in a project which has epsg:4326?
To reproduce:
Now do the same via:
I never see a bbox.
Seems not to difficult to check the crs of current mapcanvas and reproject the latlon extent from the record to the mapcanvas crs
An error message appears when I try to "Add WFS" resource (see the attached screenshot).
I've tested this functionality with the following metadata record:
http://metadata.grid.unep.ch:8080/geonetwork/srv/eng/main.home?uuid=2b5a8d12-2575-4371-be55-928c87a93e9b
Turning maindialog.ui into a QDockWidget will provide a better user experience in QGIS.
use Paver to support automation of developer tasks:
.qgis2/python/plugins
cc @geopython/metasearch
The team has decided to move this project into QGIS core. Given that MetaSearch is now a core QGIS plugin, it will be easier to maintain in the long run inline with QGIS, especially for mainline documentation, translation and issue tracking.
Plan:
Applied to both plugin and docs.
update plugin/MetaSearch/images/MetaSearch.png
We should make it clear that as of QGIS 2.4 MetaSearch is included by default. And one can still download/use a newer MetaSearch plugin in between QGIS releases if they wish.
It would be useful to have a settings tab, for MetaSearch configurables like:
in current version, if I enter a keyword to search for, and just press 'enter' (instead of clicking the 'search' button), the Xmax, Xmin, Ymax, Ymin is rewitten, to current bbox of the mapcanvas. Which when you start with an empty map is a bbox of zero meters/degrees, which makes a next search have zero results because of the (wrong) extent taken into account.
I've tried to look into the code what is triggering this, but only thing I could come up with is that the button 'Map extent' is silently activated/clicked because of the 'enter' action...
i added this http://www.sitr.regione.sicilia.it/geoportale/csw and it get capabilies and give record but it does'nt permit to add to wms/ wmf layer
button is gray
Some csw services (for example geonetwork based ones) provide a thumbnail for some layers, for example wms layers.
For example using this csw:
searching for 'rce' and getting record info for 'Rijksmonumenten' will show you a link '
image/png' which is a thumbnail link to:
http://services.rce.geovoorziening.nl/www/PreviewRijksmonumentenKlein200x150.png
it would be nice to show it it somewhere...
I get the following error when selecting at searched dataset in Search Tab
Traceback (most recent call last):
File "/usr/share/qgis/python/plugins/MetaSearch/dialogs/maindialog.py", line 548, in record_clicked
geom.transform(ctr)
Exception: unknown
I was using the LINZ Data Service service.
IF we have a python error (should not happen, but.... a lot of wrong metadata can do wrong...). the waiting cursor is active AND keeps active even after closing the MetaSearch dialog.
We could always put the default cursor back after closing our dialog?
cc @alexbruy @kalxas FYI our first effort in master should be updating to QGIS 2.0. A migration guide to help is at http://hub.qgis.org/wiki/quantum-gis/Python_plugin_API_changes_from_18_to_20
Hi,
I've installed MetaSearch on a QGIS 2.6.0 Brighton on Mac OS 10.9.5.
I've been able to display some results (not for all) from default catalog collection.
I've tried to include mine with the URL as follow:
http://geocatalog.webservice-energy.org/geonetwork/srv/eng/csw
Though I can get successfully get the Information on the Service as well as the GetCapabilities response when I try to search for resources with or without keywords I get a pop-up window with the error as listed in the title of the email (see screenshot).
I did not see any reference to this error message in the GitHub.
Thanks for your help.
Cheers,
Hi,
is it possible to connect protected services by access credentials (or services on server protected by user name & password) with MetaSearch?
I can load the same services with the "Add WMS button".
When I try to connect this kind of services, MetaSearch give me a connection errors.... ....401 - Unauthorized: Access is denied due to invalid credentials..... but I can not enter credentials.
To riproduce the problem you can try to load "Arpa Piemonte - Ortofoto AGEA 2009 - Provincia di Alessandria - (accesso riservato)" (search by keywords "AGEA (accesso riservato)") on our CSW catalog: http://webgis.arpa.piemonte.it/geoportalserver_arpa/csw?
How can solve this issue?
Many Thanks
Luca
When running debug-build QGIS from cli, you see the following deprecation message:
src/core/qgsmessagelog.cpp: 45: (logMessage) 2014-06-17T10:00:32 Python warning[1] warning:/usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py:876: PendingDeprecationWarning: This method will be removed in future versions. Use 'elem.iter()' or 'list(elem.iter())' instead.
for include in elem.getiterator("include"):
traceback: File "", line 1, in
File "/home/richard/apps/qgis/master/debug/share/qgis/python/qgis/utils.py", line 204, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "/home/richard/.qgis2/python/plugins/MetaSearch/init.py", line 35, in classFactory
from MetaSearch.plugin import MetaSearchPlugin
File "/home/richard/apps/qgis/master/debug/share/qgis/python/qgis/utils.py", line 454, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/richard/.qgis2/python/plugins/MetaSearch/plugin.py", line 33, in
from MetaSearch.dialogs.maindialog import MetaSearchDialog
File "/home/richard/apps/qgis/master/debug/share/qgis/python/qgis/utils.py", line 454, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/richard/.qgis2/python/plugins/MetaSearch/dialogs/maindialog.py", line 54, in
from MetaSearch.dialogs.manageconnectionsdialog import ManageConnectionsDialog
File "/home/richard/apps/qgis/master/debug/share/qgis/python/qgis/utils.py", line 454, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/richard/.qgis2/python/plugins/MetaSearch/dialogs/manageconnectionsdialog.py", line 40, in
BASE_CLASS = get_ui_class('manageconnectionsdialog.ui')
File "/home/richard/.qgis2/python/plugins/MetaSearch/util.py", line 60, in get_ui_class
return loadUiType(ui_file_full)[0]
File "/usr/lib/python2.7/dist-packages/PyQt4/uic/init.py", line 210, in loadUiType
winfo = compiler.UICompiler().compileUi(uifile, code_string, from_imports, resource_suffix)
File "/usr/lib/python2.7/dist-packages/PyQt4/uic/Compiler/compiler.py", line 139, in compileUi
w = self.parse(input_stream, resource_suffix)
File "/usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py", line 978, in parse
actor(elem)
File "/usr/lib/python2.7/dist-packages/PyQt4/uic/uiparser.py", line 876, in readResources
for include in elem.getiterator("include"):
Hi,
I try to connect and "getrecords" from this service
http://geoportal.cuzk.cz/SDIProCSW/service.svc/get?REQUEST=GetCapabilities&SERVICE=CSW
I get the service connected, but when I try to "search" with no constrains, I get
Connection error: HTTP Error 400: Bad Request
Only thing, which seems strange is (in the capabilities document) that the URLs for POST and GET request types are different.
Any hint, how to test it? Any hint, what else could this be?
Example:
From CSW:
http://www.geonorge.no/geonetwork/srv/no/csw?
The service "Nordatlas - WMS" can be added to WMS-Connections in QGIS, while the service: "Sjøpattedyr" (marine mamals) can not . Neither "art_prioriterte WMS".
The two latter have a Link:
OGC:WMS-1.1.1-http-get-map
While the first one had such a link:
OGC:WMS
Following the link of "Sjøpattedyr" in a webbrowser (http://maps.imr.no/geoserver/ows?) gives an error report. The same for "art_prioriterte WMS" (http://wms.dirnat.no/arcgis/services/art_prioriterte/mapserver/WMSServer?). However, at least the link for "Sjøpattedyr" works if entered manually to WMS in QGIS.
Following the link of "Nordatlas - WMS" leads to a blank page (http://www.nordatlas.no/wms.aspx?)...
(cc @astroimagine) Proposed by UNEP/GRID:
use pygments
for syntax highlighting of bare XML responses.
INSPIRE CSW geoportal [0] only returns ISO, not Dublin Core. While this might be a mistake, it would be important for MetaSearch to support (and perhaps add in the standard distribution) it.
[0] http://inspire-geoportal.ec.europa.eu/GeoportalProxyWebServices/resources/OGCCSW202/AT?service=CSW
When you choose to add the extent of your current map to the query, and you are currently in a non-epsg:4326 project. The bbox inputs are filled with the native values.
It would be better if those were transformed to normal epsg:4326 values
Allow the user to download data from the record (like a Shapefile, GeoTIFF, etc.) and load directly into the map canvas. See https://github.com/geopython/MetaSearch/wiki/Discovery-workflow for more info.
When browsing search results, klicking on the single arrow back throws a python error:
An error has occured while executing Python code:
Traceback (most recent call last):
File "C:\Users\ninsbl/.qgis2/python/plugins\MetaSearch\dialogs\maindialog.py", line 572, in navigate
if res == QMessageBox.Ok:
UnboundLocalError: local variable 'res' referenced before assignment
Python version:
2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]
QGIS version:
2.0.1-Dufour Dufour, ebebdf3
I hope this is a good place to leave this note.
Just started running QGIS 2.3 on Ubuntu 14.04. When searching the CSW of data.gov I received this error when clicking on records.
An error has occured while executing Python code:
Traceback (most recent call last):
File "/usr/share/qgis/python/plugins/MetaSearch/dialogs/maindialog.py", line 549, in record_clicked
geom.transform(ctr)
Exception: unknown
Python version:
2.7.6 (default, Mar 22 2014, 23:03:41)
[GCC 4.8.2]
QGIS version:
2.3.0-Master Master, exported
Python path: ['/usr/share/qgis/python/plugins/processing', '/usr/share/qgis/python', u'/home/rjhale/.qgis2/python', u'/home/rjhale/.qgis2/python/plugins', '/usr/share/qgis/python/plugins', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/home/rjhale/.qgis2/python/plugins/DigitizingTools/tools', '/usr/share/qgis/python/plugins/fTools/tools']
I was searching (in case you want to replicate): -87.81431 34.325558 -82.79549 36.373995 for Agriculture. Before that I searched for NAIP in the same area and received an error similar to the one above.
If I need to file this on hub.qgis I can.
Thanks for all the good work.
It seems that certain esri filled metadata is full of newlines, giving strange results in our result list.
For example search for 'Kunst' in the Nationaal Georegister. The first record then is several lines high.
If you look at the xml in a browser:
http://www.nationaalgeoregister.nl/geonetwork/srv/eng/csw?outputFormat=application%2Fxml&service=CSW&outputSchema=http%3A%2F%2Fwww.opengis.net%2Fcat%2Fcsw%2F2.0.2&request=GetRecordById&version=2.0.2&elementsetname=full&id=5687365c-b343-4820-b0df-02757ba9c85c
you see teh dc:type on one line, but if you look into the source, you see it has a lot of newlines in it:
dc:typeVector
Simple
Multipoint
FALSE
41
TRUE
FALSE
Composite object
41</dc:type>
So, isn't it best to remove newlines from this result items? Or at least from 'type' but I would think also from 'title'?
Just cloned the MetaSearch plugin into my .qgis2/python/plugins directory on Linux Mint running python 2.7 (QGIS 2.0.1) I get the following traceback when loading QGIS:
Couldn't load plugin MetaSearch due an error when calling its classFactory() method
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 204, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "/home/jo/.qgis2/python/plugins/MetaSearch/init.py", line 79, in classFactory
from cswclient import CSWClientPlugin
File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 453, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/jo/.qgis2/python/plugins/MetaSearch/cswclient.py", line 36, in
import cswclientdialog
File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 453, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/jo/.qgis2/python/plugins/MetaSearch/cswclientdialog.py", line 50, in
from cswresponsedialog import CSWResponseDialog
File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 453, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/jo/.qgis2/python/plugins/MetaSearch/cswresponsedialog.py", line 37, in
from ui.ui_cswresponsedialogbase import Ui_CSWResponseDialog
File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 453, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ImportError: No module named ui_cswresponsedialogbase
Python version:
2.7.3 (default, Sep 26 2013, 16:38:06)
[GCC 4.7.2]
QGIS version:
2.0.1-Dufour Dufour, exported
Python path: ['/home/jo/.qgis2/python/plugins/MetaSearch', '/home/jo/.qgis2/python/plugins/QGIS-Gazetteer-Plugin', '/usr/share/qgis/python', '/home/jo/.qgis2/python', '/home/jo/.qgis2/python/plugins', '/usr/share/qgis/python/plugins', '/usr/local/lib/python2.7/dist-packages/dulwich-0.8.7-py2.7-linux-x86_64.egg', '/usr/local/lib/python2.7/dist-packages/hg_git-0.4.0-py2.7.egg', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone-client', '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel', '/usr/lib/python2.7/dist-packages/ubuntuone-couch', '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol']
I guess that ImportError: No module named ui_cswresponsedialogbase is the important one.
Any thoughts?
Jo
implement template based display of server metadata and results metadata.
In the result list after a search you can click on a record/line.
But currently there is no visual cue for that.
One idea would be to add a tooltip on every record showing:
"double click to see full record information" or something like that
Hi,
I have tested MetaSearch on our catalog CSW:
http://webgis.arpa.piemonte.it/geoportalserver_arpa/csw?
When I try to connect WMS or WFS an error message appears (WMS url incorrect). After that if I chose OK and I modify the connection (without actually making any changes), and then try again, the connection works.
To riproduce the problem you can try to load "Topografica - Quadri d'unione" (search by keywords "Quadri").
How I can solve this kind of issues?
Is it a server side problem?
When I try to connect a WMTS services I get the following error and I cannot load the data:
Error connecting to OGC: WMS / OGC: WMTS: 'NoneType' object has no attribute 'find'
To riproduce the problem you can try to load "Arpa Piemonte - Sfumo_Europa_WM" (search by keywords "Sfumo_Europa_WM").
Could be the same problem discuss in this post??
#23
It's possible to try your solutions?
Many thanks
Luca
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.