Changeset 523

Show
Ignore:
Timestamp:
10/18/06 17:00:10
Author:
seang
Message:

improve WebFeatureService? docstrings, change name of the committers file

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • OWSLib/trunk/owslib/wfs.py

    r521 r523  
    2323import cgi 
    2424from cStringIO import StringIO 
    25 import sys 
    2625from urllib import urlencode 
    2726from urllib2 import urlopen 
     
    5049        components.append(component) 
    5150    return "/".join(components) 
    52  
    53     #return "/".join(['{%s}%s' % (ns, component) 
    54     #                 for component 
    55     #                 in path.split("/")]) 
    5651 
    5752 
     
    8378             
    8479    def getcapabilities(self): 
    85         """Request and return capabilities document from the WFS.""" 
     80        """Request and return capabilities document from the WFS as a  
     81        file-like object.""" 
    8682        reader = WFSCapabilitiesReader(self.version) 
    8783        return urlopen(reader.capabilities_url(self.url)) 
     
    9086                   featureversion=None, propertyname=['*'], maxfeatures=None, 
    9187                   method='{http://www.opengis.net/wfs}Get'): 
    92         """Request and return feature data.""" 
     88        """Request and return feature data as a file-like object. 
     89         
     90        Parameters 
     91        ---------- 
     92        typename : list 
     93            List of typenames (string) 
     94        filter : string  
     95            XML-encoded OGC filter expression. 
     96        bbox : tuple 
     97            (left, bottom, right, top) in the feature type's coordinates. 
     98        featureid : list 
     99            List of unique feature ids (string) 
     100        featureversion : string 
     101            Default is most recent feature version. 
     102        propertyname : list 
     103            List of feature property names. '*' matches all. 
     104        maxfeatures : int 
     105            Maximum number of features to be returned. 
     106        method : string 
     107            Qualified name of the HTTP DCP method to use. 
     108 
     109        There are 3 different modes of use 
     110 
     111        1) typename and bbox (simple spatial query) 
     112        2) typename and filter (more expressive) 
     113        3) featureid (direct access to known features) 
     114        """ 
    93115        md = self.capabilities 
    94116        base_url = md.getOperationByName('{http://www.opengis.net/wfs}GetFeature').methods[method]['url'] 
     
    139161        """Initialize from an element tree.""" 
    140162        self._root = infoset.getRoot() 
    141         #print >> sys.stderr, self._root 
    142163        # properties 
    143164        self.service = self._root.find(nspath('Service/Name')).text 
     
    169190                return item 
    170191        raise KeyError, "No operation named %s" % name 
    171  
    172     #def toXML(self): 
    173     #    """x 
    174     #    """ 
    175     #    top = etree.Element('a') 
    176     #    top.text = self.getName() 
    177     #    return etree.tostring(top) 
    178192 
    179193