[OWSLib-users] problem in owslib-wcs

Passmore, James H. jpass at bgs.ac.uk
Tue Sep 11 04:50:12 PDT 2018


The URL for your service should be: http://localhost:8080/?map=/maps/wcs1.map&

So something like below should give you results:

import owslib.wcs as wcs


my_service = "http://localhost:8080/?map=/maps/wcs1.map&"
w = wcs.WebCoverageService(my_service, version='1.0.0')

# Get a list of all the coverages in the service
print(list(w.contents))

James

From: OWSLib-users <owslib-users-bounces at lists.osgeo.org> On Behalf Of Ahmet Temiz
Sent: 11 September 2018 09:53
To: OWSLib-users at lists.osgeo.org
Subject: [OWSLib-users] problem in owslib-wcs

Hi,

I am very new for owslib.
I try owslib - wcs . I followed this procedure.

url ='http://localhost:8080/?map=/maps/wcs1.map&SERVICE=WCS&VERSION=1.0.0&REQUEST=GetCoverage&coverage=ivm&CRS=EPSG:3857&BBOX=4557613.741389,4574927.875099,4989786.191152,5176940.449967&WIDTH=319&HEIGHT=283&FORMAT=GTiff'

wcs = w(url=url)
ivm = wcs['ivm']

print (ivm)

print (wcs.identification.type)
print (wcs.identification.title)
print (wcs.contents)

bbox='4557613.741389,4574927.875099,4989786.191152,5176940.449967'
gc = wcs.getCoverage(identifier='GMap WCS Demo Server',bbox=bbox,crs='EPSG:3857',format='GeoTIFF' , WIDTH=319, HEIGHT=283 ,   resx=100.0, resy=100.0)

it gives :
<owslib.coverage.wcs100.ContentMetadata object at 0x7f3f79640550>
OGC:WCS
GMap WCS Demo Server
{'ivm': <owslib.coverage.wcs100.ContentMetadata object at 0x7f3f79640550>}
 type(gc)  >>     <class 'owslib.util.ResponseWrapper'>
b'<HTML>\n<HEAD><TITLE>MapServer Message</TITLE></HEAD>\n<!-- MapServer version 7.1-dev OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=XMP SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=POINT_Z_M INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE -->\n<BODY BGCOLOR="#FFFFFF">\nmsCGILoadMap(): Web application error. CGI variable "map" is not set.\n</BODY></HTML>'

Can you tell me what I am doing wrong? This request works on QGIS.

regards

--
Ahmet Temiz
Jeoloji Müh.
Afet ve Acil Durum Yönetimi Başkanlığı
Bilgi İşlem  Dairesi Başkanlığı-CBS Grubu


________________________

Ahmet Temiz
Geological Eng.
Information Systems - GIS Group
Disaster and Emergency Management
of Presidency
________________________________
This message (and any attachments) is for the recipient only. NERC is subject to the Freedom of Information Act 2000 and the contents of this email and any reply you make may be disclosed by NERC unless it is exempt from release under the Act. Any material supplied to NERC may be stored in an electronic records management system.
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/owslib-users/attachments/20180911/16eed27e/attachment-0001.html>


More information about the OWSLib-users mailing list