Thursday, October 31, 2013

Searching the GA CSW catalogue using a spatial-temporal, protocol and keyword filter

A few posts ago I published some code to access the GA Landsat scene archive via python - Accessing the Geoscience Australia ARG25 OGC Services from Python.

My tool of choice that day was Python using OWSLib 0.7. Since then OWSLib has undergone some significant developments and is at version 0.8.2. The new library has good support for Filter queries, which means you can now construct a spatio-temporal and attribute query against the CSW service.

This only impacts the code for the first step so I'll just include an example which will search for "landsat-5" data in the time period between 1/1/2010 and 1/1/2011 touching the Australian Capital Territory bounding box. Don't forget to use your favorite python package manager to download the new OWSLib from pypi.

Step 1: Searching the catalogue using a spatial-temporal, protocol and keyword filter


2 comments :

  1. Hi Rob,
    Thanks for your blog I find it useful for learning both Python and how to query the GA Landsat archive.
    With the script here, I found an error:

    File "C:\Python27\search_GA_spatio-temporal.py", line 23, in
    bbox = fes.BBox(bounds)
    AttributeError: 'module' object has no attribute 'BBox'
    >>>

    it doesn't like
    bbox = fes.BBox(bounds)
    for some reason, any ideas?

    Ta

    ReplyDelete
    Replies
    1. Hi Juan,
      I've recheck the code in my environment and it works correctly. I think you might be using an older version of OWSLib which had partial support for FES. I am using version 0.8.2. You might try using pip to update your OWSLib locally?

      Delete

Post a comment