We (mostly Tom Kralidis, Angelos Tzotsos with some additions by me) just released the MetaSearch Catalogue Client plugin for QGIS. The new plugin is an update of the CSWClient plugin from NextGIS. This new MetaSearch plugin makes searching metadata and using the services peanuts!
A Catalog Service for the Web (CSW), for example provided by the Dutch clearinghouse Nationaal Georegister, contains metadata about geographic data and services. The metadata not only provide descriptions, but can also contain hyperlinks to the services to directly view (e.g. WMS) or load (e.g. WFS and WCS) the geographic information.
First steps
Let’s do it:
- Open the Plugin Manager in QGIS (Plugins > Manage and Install Plugins)
- Click on the option ‘Get more’
- Enter ‘metasearch’ in the search box
- Select the ‘MetaSearch Catalogue Client’ from the results
- Press the button ‘Install plugin’
Once you have pressed the ‘OK’ button on the ‘Plugin installed successfully’ dialog and closed the Plugin Manager the main menu now has an additional item ‘Web’, where you find the ‘MetaSearch’ functionality. Opening the ‘MetaSearch’ plugin for the first time, there are no Catalog Service connections defined. To start right away: click the ‘Services’ tab and push the button ‘Add default services’. The connection dropdown will now contain a set of CSW services from around the world. Of course, you can also add the URLs to your local CSW service.
In a next step, go search for some geographic services! Click the tab ‘Search’ and select for example ‘Nationaal Georegister (Nederland)’ as a CSW service. Let’s start with a nice basemap (while also learning some Dutch…) and search using the keywords: ‘brt
‘ and ‘achtergrondkaart
‘. You will be presented with two results. Now double click on the second result which contains ‘… WMTS‘. Another window ‘Record metadata’ opens that contains the metadata record in the so-called Dublic Core profile. Most importantly, you’ll see that there is a link of the type OGC:WMTS. Close the ‘Record Metadata’ window and note that the ‘Add WMS/WMTS‘ button is now active: we can load this service into QGIS right away!
Push the button and you will be presented with the standard QGIS dialog for WMS and WMTS services where you see all layers that are advertised for this service. Now select the layer ‘brtachtergrondkaart’ in the ‘EPSG:28992′ coordinate reference system (CRS) and press the ‘Add’ button.
Add some more…
You may find yourself in need for some vector data containing the speed limits on the motorways in The Netherlands, right? Go to the tab ‘Search’ in the MetaSearch plugin, and search for the keyword ‘weggegevens’. In the list of results, click the service ‘Weggegevens WFS’. The button ‘Add WFS‘ button is now enabled! Click this button and load the WFS layer ‘maximumsnelheden’. You just loaded the vector data in QGiS and directly from the data source (you can of course save the data offline as a Shape file in QGIS: select the layer in the legend and select ‘Save as’ in the right click menu). The same data is also available as WMS: searching for ‘weggegevens WMS‘ you can load the same data as a WMS. There is also one WCS service available in the Dutch clearinghouse. Search for it!
Future work
Since the metadata of the geographic data and services available from the clearinghouse are now easily vieweable, you may notice a lot of omissions and errors. During the testing phase of the MetaSearch plugin development effort, we noticed that service URLs where not always up to date, or even pointed to unreachable servers like ‘http://localhost:8080’! That is exactly why the MetaSearch plugin is so important: facilitating the use of metadata, it will be used more. At the same time, this will also show us the omissions and errors in the metadata and data, giving the publishers more reasons to fix this.
Now I have to look into the Metatools plugin by NextGIS. This plugin allows users to generate and edit metadata from within QGIS by using some templates to ease the input of all the standard fields in the forms! And of course, we have always some more wishes hoping to come true:
- Have only one link per service: browsing some metadata will now give you a lot of connections in your list.
- Handle the other types of links: direct linking to downloadable data, or pages containing those links
- Better error handling. It sometimes happens, that an error in the metadata will actually result in a Python stacktrace error…
- Create a more tightly integrated search as part of the QGIS interface
For the Dutch readership, the URL of the the CSW service of the Nationaal Georegister is http://www.nationaalgeoregister.nl/geonetwork/srv/eng/csw. For the rest of the world: please send us the URL for your CSW!
For more information about the MetaSearch and the source code, check out the wiki.
Ha Jan Willem,
Dit ziet er erg interessant uit. Kun je mij op de hoogte halen van je vorderingen? Ik krijg nog een error bij het bekijken van metadata in Q Gis 2.2, de metadata is gemaakt met ArcCatalog.
Groet,
Dries
Er is een fout opgetreden bij het uitvoeren van Python code:
Traceback (most recent call last):
File “C:/Users/aomn00/.qgis2/python/plugins\metatools\metatools.py”, line 316, in doView
standard = MetaInfoStandard.tryDetermineStandard(self.metaProvider)
File “C:/Users/aomn00/.qgis2/python/plugins\metatools\standard.py”, line 35, in tryDetermineStandard
print “TryDetStd “, text, ” Text”
IOError: [Errno 9] Bad file descriptor
Python versie:
2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]
QGIS versie:
2.2.0-Valmiera Valmiera, c3a2817
Python pad: [‘C:/PROGRA~1/QGISVA~1/apps/qgis/./python/plugins\\processing’, ‘C:/PROGRA~1/QGISVA~1/apps/qgis/./python’, u’C:/Users/aomn00/.qgis2/python’, u’C:/Users/aomn00/.qgis2/python/plugins’, ‘C:/PROGRA~1/QGISVA~1/apps/qgis/./python/plugins’, ‘C:\\PROGRA~1\\QGISVA~1\\bin\\python27.zip’, ‘C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\DLLs’, ‘C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib’, ‘C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\plat-win’, ‘C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\lib-tk’, ‘C:\\PROGRA~1\\QGISVA~1\\bin’, ‘C:\\PROGRA~1\\QGISVA~1\\apps\\Python27’, ‘C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\site-packages’, ‘C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\site-packages\\PIL’, ‘C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\site-packages\\win32’, ‘C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\site-packages\\win32\\lib’, ‘C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\site-packages\\Pythonwin’, ‘C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\site-packages\\Shapely-1.2.18-py2.7-win-amd64.egg’, ‘C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\site-packages\\six-1.3.0-py2.7.egg’, ‘C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode’, ‘C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\site-packages\\xlrd-0.9.2-py2.7.egg’, ‘C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\site-packages\\xlwt-0.7.5-py2.7.egg’, ‘C:\\PROGRA~1\\QGISVA~1\\apps\\qgis\\python\\plugins\\fTools\\tools’]
Hi (Richard hier 🙂 ),
kun je de url posten? Of anders naar me mailen richard@zuidt.nl dan kijk ik er even naar.