Thomas Gratier
2011-03-26 16:26:33 UTC
Hello list,
I'm doing some test with OWSlib
http://gispython.org/owslib/docs/en/trunk/and I get some troubles.
In the doc, you can correct
['global_mosaic'].crsOptions with wms['global_mosaic'].crsOptions
The part below doesn't work.
It sends back "This server no longer provides full WMS services! " because
http://onearth.jpl.nasa.gov/ services have changed.
#####################################################################
img = wms.getmap( layers=['global_mosaic'],
styles=['visual_bright'],
srs='EPSG:4326',
bbox=(-112, 36, -106, 41),
size=(300, 250),
format='image/jpeg',
transparent=True
)
out = open('jpl_mosaic_visb.jpg', 'wb')
out.write(img.read())
out.close()
#####################################################################
My own sample doesn't work either e.g.
#####################################################################
wms = WebMapService('http://vmap0.tiles.osgeo.org/wms/vmap0',
version='1.1.1')
img = wms.getmap(layers=['basic'],
styles=[''],
srs='EPSG:4326',
bbox=(0, 45, 45, 90),
size=(256, 256),
format='image/jpeg'
)
#####################################################################
It's because in
http://vmap0.tiles.osgeo.org/wms/vmap0?REQUEST=getCapabilities&VERSION=1.1.1&SERVICE=WMSin
OnlineResource, the xlink:href value is
http://vmap0.tiles.osgeo.org/wms? when it has to be
http://vmap0.tiles.osgeo.org/wms/vmap0
Some ideas to add an option (already exist ?) that use
http://vmap0.tiles.osgeo.org/wms/vmap0 instead of the wrong url from
OnlineResource
Regards
ThomasG
GIS specialist
PS : I will give you more return about OWSlib docs in the next days.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gispython.org/pipermail/community/attachments/20110326/dc1a888c/attachment.htm>
I'm doing some test with OWSlib
http://gispython.org/owslib/docs/en/trunk/and I get some troubles.
In the doc, you can correct
['global_mosaic'].crsOptions with wms['global_mosaic'].crsOptions
The part below doesn't work.
It sends back "This server no longer provides full WMS services! " because
http://onearth.jpl.nasa.gov/ services have changed.
#####################################################################
img = wms.getmap( layers=['global_mosaic'],
styles=['visual_bright'],
srs='EPSG:4326',
bbox=(-112, 36, -106, 41),
size=(300, 250),
format='image/jpeg',
transparent=True
)
out = open('jpl_mosaic_visb.jpg', 'wb')
out.write(img.read())
out.close()
#####################################################################
My own sample doesn't work either e.g.
#####################################################################
wms = WebMapService('http://vmap0.tiles.osgeo.org/wms/vmap0',
version='1.1.1')
img = wms.getmap(layers=['basic'],
styles=[''],
srs='EPSG:4326',
bbox=(0, 45, 45, 90),
size=(256, 256),
format='image/jpeg'
)
#####################################################################
It's because in
http://vmap0.tiles.osgeo.org/wms/vmap0?REQUEST=getCapabilities&VERSION=1.1.1&SERVICE=WMSin
OnlineResource, the xlink:href value is
http://vmap0.tiles.osgeo.org/wms? when it has to be
http://vmap0.tiles.osgeo.org/wms/vmap0
Some ideas to add an option (already exist ?) that use
http://vmap0.tiles.osgeo.org/wms/vmap0 instead of the wrong url from
OnlineResource
Regards
ThomasG
GIS specialist
PS : I will give you more return about OWSlib docs in the next days.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gispython.org/pipermail/community/attachments/20110326/dc1a888c/attachment.htm>