Changeset 523
- Timestamp:
- 10/18/06 17:00:10
- Files:
-
- OWSLib/trunk/AUTHORS.txt (moved) (moved from OWSLib/trunk/COMMITTERS.txt)
- OWSLib/trunk/owslib/wfs.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
OWSLib/trunk/owslib/wfs.py
r521 r523 23 23 import cgi 24 24 from cStringIO import StringIO 25 import sys26 25 from urllib import urlencode 27 26 from urllib2 import urlopen … … 50 49 components.append(component) 51 50 return "/".join(components) 52 53 #return "/".join(['{%s}%s' % (ns, component)54 # for component55 # in path.split("/")])56 51 57 52 … … 83 78 84 79 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.""" 86 82 reader = WFSCapabilitiesReader(self.version) 87 83 return urlopen(reader.capabilities_url(self.url)) … … 90 86 featureversion=None, propertyname=['*'], maxfeatures=None, 91 87 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 """ 93 115 md = self.capabilities 94 116 base_url = md.getOperationByName('{http://www.opengis.net/wfs}GetFeature').methods[method]['url'] … … 139 161 """Initialize from an element tree.""" 140 162 self._root = infoset.getRoot() 141 #print >> sys.stderr, self._root142 163 # properties 143 164 self.service = self._root.find(nspath('Service/Name')).text … … 169 190 return item 170 191 raise KeyError, "No operation named %s" % name 171 172 #def toXML(self):173 # """x174 # """175 # top = etree.Element('a')176 # top.text = self.getName()177 # return etree.tostring(top)178 192 179 193
