[owslib-devel] WMS stuff in feature/wfs100.py

Tom Kralidis tomkralidis at hotmail.com
Thu Oct 27 11:22:45 PDT 2011




----------------------------------------
> Date: Thu, 27 Oct 2011 17:48:22 +0300
> From: sredl at ccss.cz
> To: tomkralidis at hotmail.com
> CC: owslib-devel at lists.sourceforge.net; jachym.cepicky at gmail.com
> Subject: RE: [owslib-devel] WMS stuff in feature/wfs100.py
>
> On Thu, 27 Oct 2011 07:29:16 -0400, Tom Kralidis wrote:
> > ----------------------------------------
> >> Date: Tue, 25 Oct 2011 10:00:53 +0300
> >> From: sredl at ccss.cz
> >> To: owslib-devel at lists.sourceforge.net
> >> CC: tomkralidis at hotmail.com; jachym.cepicky at gmail.com
> >> Subject: Re: [owslib-devel] WMS stuff in feature/wfs100.py
> >>
> >> On Tue, 25 Oct 2011 09:49:08 +0300, sredl at ccss.cz wrote:
> >> > On Wed, 5 Oct 2011 14:30:27 -0400, Tom Kralidis wrote:
> >> >>> Hi,
> >> >>>
> >> >>> I am looking around the code and I found some WMS stuff in WFS
> >> >>> files.
> >> >>> Classes ServiceProvider and ContactMetadata in feature/wfs100.py
> >> >>> look
> >> >>> like they are trying to parse WMS 1.3.0 stuff, which is entirely
> >> >>> different from what in the WFS 1.0.0 is... May be there is some
> >> >>> more, I
> >> >>> haven't checked it entirely.
> >> >>>
> >> >>> Kind Regards,
> >> >>>
> >> >>> Michal
> >> >>>
> >> >>
> >> >> FYI owslib is trying (in it's objects) to follow the OWS Common
> >> >> approach to service metadata. So you might see some shoehorning
> >> of
> >> >> non OWS Common objects into OWS Common objects.
> >> >>
> >> >> Having said this, you are correct, owslib/feature/wfs100.py has
> >> >> constructs which are not a part of WFS 1.0.0. I will make these
> >> >> fixes
> >> >> and put forth owslib/feature/wfs110.py as well.
> >> >>
> >> >> ..Tom
> >> >
> >> > Hi Tom,
> >> >
> >> > currently I am working on the WFS 1.1.0 implementation and
> >> hopefully
> >> > will have something working soon.
> >> >
> >> > You mention "the OWS Common approach to service metadata" - I have
> >> > found some owslib interfaces in interfaces.py file and I am trying
> >> to
> >> > follow them. Is there any dedicated standard regarding the OWS
> >> common
> >> > approach to service metadata? If yes, could you please point me to
> >> > that?
> >> > If not, I wonder what do you mean, because reading through various
> >> > standards and their different versions I find that actually they
> >> have
> >> > very little in common :-) It's a pity thing though, it makes the
> >> > whole
> >> > stuff really messy.
> >> >
> >> > Kind Regards,
> >> >
> >> > Michal
> >> >
> >>
> >> Hey Tom,
> >>
> >> now I have found that you have already developed some WFS 1.1.0
> >> support. Is it already tested? Do you parse the whole capabilities
> >> document or just some parts? It was a dummy mistake that I hadn't
> >> grabed
> >> the ticket :(
> >>
> >> Cheers,
> >>
> >> Michal
> >
> > Michal: it's not tested beyond capabilities support at this point
> > (Caps XML is fully parsed).  Patches and doctests welcome!
> >
> > ..Tom
>
> Tom: Thanks.
>
> In OperationMetadata() at
>
> http://sourceforge.net/apps/trac/owslib/browser/trunk/owslib/feature/wfs110.py#L279
>
> there is
>
> nspath('DCPType/HTTP/*')
> ...
> attrib['onlineResource']
>
> At first glance, I would say that this is from 1.0.0 and that it should
> look like
>
> nspath('DCP/HTTP/*', ns=OWS_NAMESPACE)
> ...
> attrib.get('{http://www.w3.org/1999/xlink}href', '')
>
> in 1.1.0. 

FYI the OperationMetadata class in owslib/feature/wfs110.py, a copy from owslib/feature/wfs100.py, is not used; instead, owslib/ows.py:OperationsMetadata is used.  I've updated the code to this effect in svn trunk.


> I can fix it, but I need to adapt my code to the other
> changes first, e.g. I should use
>
> util.nspath_eval('ows:ServiceIdentification', namespaces)
>
> instead
>
> nspath('ServiceIdentification', ns=OWS_NAMESPACE)
>
> and so on.

I would use util.nspath_eval, as it allows for cross-namespace evaluation, supporting long xpaths.  owslib/csw.py is a suitable model to see what utility functions and how OWS/filter are used.

Cheers

..Tom


>
> Cheers,
>
> Michal
>
>
 		 	   		  



More information about the OWSLib-devel mailing list