Hi Ivan getDescribeCoverage gets an ElementTree object, not the actual XML.
However you shouldn't need to do that actually - that method is just there as
an 'extra'.
the way to do it is:
from owslib.wcs import WebCoverageService
wcs =
WebCoverageService('http://geoserver.irpi.cnr.it/geoserver/wcs',version='1.0.0')
wcs.contents #prints available coverages
cvg=wcs['irpi:collazzone_2004'] #this gives you a coverage metadata object to
interrogate
#look at the coverage properties:
cvg.boundingBoxWGS84
cvg.timepositions
cvg.supportedCRS
cvg.supportedFormats
make get coverage request:
u=wcs.getCoverage(identifier='irpi:collazzone_2004', bbox=
(12.7, 42.5, 13, 43) , crs='EPSG:32633', format='PNG', width=100, height=100)
u.read()
Then you get a geoserver exception:
'<?xml version="1.0" encoding="UTF-8"?><ServiceExceptionReport version="1.2.0"
xmlns="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/ogc
http://schemas.opengis.net/wcs/1.0.0/OGC-exception.xsd"> <ServiceException
code="problem with CoverageResults">\n
org.vfny.geoserver.wcs.WcsException: The Intersection is null. Check the
requested BBOX!\nThe Intersection is null. Check the requested
BBOX!\n</ServiceException></ServiceExceptionReport>'
This error response seems odd as the bounding box I requested is within your
bounds...
Anyway, hope that helps.
Cheers,
Dom
-----Original Message-----
From: [email protected] on behalf of ivan marchesini
Sent: Mon 23/11/2009 22:16
To: [email protected]
Cc: gispython.org community projects
Subject: Re: [Community] describeCoverage
I Henning...
many thanks for your answer...
> I tried to get the capabilities with
>
> http://geoserver.irpi.cnr.it/geoserver/wcs?request=GetCapabilties&service=WCS
>
> but it seems that the server has no capabilities set, yet.
I think adding the version parameter the getCapabilities works:
http://geoserver.irpi.cnr.it/geoserver/wcs?version=1.0.0&service=WCS&REQUEST=getcapabilities
but the problem is still:
___________
from owslib.wcs import WebCoverageService
wcs = WebCoverageService('http://geoserver.irpi.cnr.it/geoserver/wcs',
version='1.0.0')
description=wcs.getDescribeCoverage('irpi:collazzone_2004')
______________
from which I can't see anything inside "description".. :-(
many thanks...
ivan
> However,
> your request
>
> http://geoserver.irpi.cnr.it/geoserver/wcs?version=1.0.0&service=WCS&REQUEST=DescribeCoverage&COVERAGE=irpi:collazzone_2004
>
> works. I think, s/o has forgotten to set the (required) capabilities
> of the service. This should get fixed.
>
> Best
>
> Henning
>
>
--
Ti prego di cercare di non inviarmi files .dwg, .doc, .xls, .ppt.
Preferisco formati liberi.
Please try to avoid to send me .dwg, .doc, .xls, .ppt files.
I prefer free formats.
http://it.wikipedia.org/wiki/Formato_aperto
http://en.wikipedia.org/wiki/Open_format
Ivan Marchesini
Perugia (Italy)
Socio fondatore GFOSS "Geospatial Free and Open Source Software"
http://www.gfoss.it
e-mail: [email protected]
[email protected]
fax (home): +39(0)5782830887
jabber: [email protected]
skype: geoivan73
--
Scanned by iCritical.
<<winmail.dat>>
_______________________________________________ Community mailing list [email protected] http://lists.gispython.org/mailman/listinfo/community
