You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an issue when instantiating the WebMapTileService object in some edge cases. Looping through operation metadata, it does not exclude metadata that lies under "OperationsMetadata" without a name field like "ExtendedCapabilities". I can see that you have handled that case in wfs200.py .
Since an early return is done in OperationsMetadata, the object is still created, but with invalid OperationMetadata object. This makes it so that you are not able to make the gettile request. It would maybe make more sence to have an error raised in OperationsMetadata constructor in this case as it is not valid anyways as the comment says. Then it might be easier to pinpoint the issue.
For the case in the wmts file, either check for the "ExtendedCapabilities" path or only include metadata starting with "Operation".
I do not fully understand the wmts standard so I do not know how often this will be the case or if there are other possible metadata that can be found inside OperationsMetadata.
# ows.py, line 201classOperationsMetadata(object):
"""Initialize an OWS OperationMetadata construct"""def__init__(self, elem, namespace=DEFAULT_OWS_NAMESPACE):
if'name'notinelem.attrib: # This is not a valid elementreturnself.name=elem.attrib['name']
self.formatOptions= ['text/xml']
parameters= []
self.methods= []
self.constraints= []
...
def__repr__(self):
return'<owslib.ows.OperationsMetadata {} at {}>'.format(self.name, hex(id(self)))
# wmts.py, line 217
...
self.operations= []
serviceop=self._capabilities.find(_OPERATIONS_METADATA_TAG)
# REST only WMTS does not have any OperationsifserviceopisnotNone:
foreleminserviceop[:]:
self.operations.append(OperationsMetadata(elem))
# features/wfs200.py, line 122foreleminself._capabilities.find(nspath("OperationsMetadata"))[:]:
ifelem.tag!=nspath("ExtendedCapabilities"):
self.operations.append(OperationsMetadata(elem))
The text was updated successfully, but these errors were encountered:
There is an issue when instantiating the
WebMapTileService
object in some edge cases. Looping through operation metadata, it does not exclude metadata that lies under "OperationsMetadata" without aname
field like "ExtendedCapabilities". I can see that you have handled that case inwfs200.py
.Here is an example with extended capabilities
Since an early return is done in
OperationsMetadata
, the object is still created, but with invalid OperationMetadata object. This makes it so that you are not able to make thegettile
request. It would maybe make more sence to have an error raised inOperationsMetadata
constructor in this case as it is not valid anyways as the comment says. Then it might be easier to pinpoint the issue.For the case in the
wmts
file, either check for the "ExtendedCapabilities" path or only include metadata starting with "Operation".I do not fully understand the wmts standard so I do not know how often this will be the case or if there are other possible metadata that can be found inside OperationsMetadata.
The text was updated successfully, but these errors were encountered: