adapter pour python3

This commit is contained in:
francois 2017-06-24 16:23:55 -04:00
parent f0a536bb6b
commit 603db3c94c
3 changed files with 1950 additions and 1392 deletions

2
.gitignore vendored
View file

@ -1,2 +1,2 @@
.ipynb_checkpoints/
.png

File diff suppressed because it is too large Load diff

View file

@ -2,10 +2,8 @@
"cells": [
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"from owslib.wms import WebMapService"
@ -13,7 +11,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 3,
"metadata": {
"collapsed": true
},
@ -31,10 +29,8 @@
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
@ -42,7 +38,7 @@
"'WMS'"
]
},
"execution_count": 5,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
@ -53,10 +49,8 @@
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
@ -64,7 +58,7 @@
"'1.3.0'"
]
},
"execution_count": 6,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
@ -75,18 +69,16 @@
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"u\"Service de cartographie Web (WMS) pour les donn\\xe9es d'\\xe9l\\xe9vation\""
"\"Service de cartographie Web (WMS) pour les données d'élévation\""
]
},
"execution_count": 7,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
@ -97,18 +89,16 @@
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"u\"Ressources naturelles Canada offre un acc\\xe8s aux donn\\xe9es d'\\xe9l\\xe9vation par le biais d'un service de cartographie Web commun\\xe9ment appel\\xe9 Web Mapping Service (WMS) dont les sp\\xe9cifications sont d\\xe9finies par l'Open Geospatial Consortium (OGC).\""
"\"Ressources naturelles Canada offre un accès aux données d'élévation par le biais d'un service de cartographie Web communément appelé Web Mapping Service (WMS) dont les spécifications sont définies par l'Open Geospatial Consortium (OGC).\""
]
},
"execution_count": 8,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
@ -119,10 +109,8 @@
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
@ -134,7 +122,7 @@
" 'cdem.color-shaded-relief.legend']"
]
},
"execution_count": 9,
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
@ -152,18 +140,16 @@
},
{
"cell_type": "code",
"execution_count": 72,
"metadata": {
"collapsed": false
},
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"u\"Service de cartographie Web (WMS) pour les donn\\xe9es d'\\xe9l\\xe9vation\""
"\"Service de cartographie Web (WMS) pour les données d'élévation\""
]
},
"execution_count": 72,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
@ -174,10 +160,8 @@
},
{
"cell_type": "code",
"execution_count": 73,
"metadata": {
"collapsed": false
},
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
@ -185,7 +169,7 @@
"(-180.0, -90.0, 180.0, 90.0)"
]
},
"execution_count": 73,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
@ -196,111 +180,110 @@
},
{
"cell_type": "code",
"execution_count": 74,
"execution_count": 11,
"metadata": {
"collapsed": false,
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"['EPSG:3857',\n",
" 'EPSG:53016',\n",
"['EPSG:26708',\n",
" 'EPSG:102018',\n",
" 'EPSG:32182',\n",
" 'EPSG:26718',\n",
" 'EPSG:3575',\n",
" 'EPSG:26922',\n",
" 'EPSG:26919',\n",
" 'EPSG:54030',\n",
" 'EPSG:32186',\n",
" 'EPSG:26707',\n",
" 'EPSG:102008',\n",
" 'EPSG:26714',\n",
" 'EPSG:41001',\n",
" 'EPSG:26709',\n",
" 'EPSG:32184',\n",
" 'EPSG:26909',\n",
" 'EPSG:54016',\n",
" 'EPSG:26712',\n",
" 'EPSG:54004',\n",
" 'EPSG:32189',\n",
" 'EPSG:3857',\n",
" 'EPSG:26716',\n",
" 'EPSG:3579',\n",
" 'EPSG:32185',\n",
" 'EPSG:26711',\n",
" 'EPSG:2952',\n",
" 'EPSG:3574',\n",
" 'EPSG:32193',\n",
" 'EPSG:26713',\n",
" 'EPSG:32187',\n",
" 'EPSG:2295',\n",
" 'EPSG:2294',\n",
" 'EPSG:26708',\n",
" 'EPSG:26709',\n",
" 'EPSG:26908',\n",
" 'EPSG:26909',\n",
" 'EPSG:26907',\n",
" 'EPSG:32192',\n",
" 'EPSG:32193',\n",
" 'EPSG:32190',\n",
" 'EPSG:32191',\n",
" 'EPSG:32196',\n",
" 'EPSG:32197',\n",
" 'EPSG:32194',\n",
" 'EPSG:32195',\n",
" 'EPSG:32198',\n",
" 'EPSG:104306',\n",
" 'EPSG:26715',\n",
" 'EPSG:26714',\n",
" 'EPSG:26717',\n",
" 'EPSG:26716',\n",
" 'EPSG:26711',\n",
" 'EPSG:26710',\n",
" 'EPSG:26713',\n",
" 'EPSG:26712',\n",
" 'EPSG:26719',\n",
" 'EPSG:26718',\n",
" 'EPSG:4269',\n",
" 'EPSG:26919',\n",
" 'EPSG:26918',\n",
" 'EPSG:32188',\n",
" 'EPSG:3578',\n",
" 'EPSG:3573',\n",
" 'EPSG:42304',\n",
" 'EPSG:102002',\n",
" 'EPSG:3400',\n",
" 'EPSG:3395',\n",
" 'EPSG:32183',\n",
" 'EPSG:26917',\n",
" 'EPSG:26916',\n",
" 'EPSG:26915',\n",
" 'EPSG:26914',\n",
" 'EPSG:26913',\n",
" 'EPSG:26912',\n",
" 'EPSG:26911',\n",
" 'EPSG:26910',\n",
" 'EPSG:104306',\n",
" 'EPSG:53016',\n",
" 'EPSG:102017',\n",
" 'EPSG:26707',\n",
" 'EPSG:102016',\n",
" 'EPSG:2019',\n",
" 'EPSG:32181',\n",
" 'EPSG:3979',\n",
" 'EPSG:32183',\n",
" 'EPSG:32182',\n",
" 'EPSG:32185',\n",
" 'EPSG:32184',\n",
" 'EPSG:32187',\n",
" 'EPSG:3978',\n",
" 'EPSG:32189',\n",
" 'EPSG:32188',\n",
" 'EPSG:26720',\n",
" 'EPSG:26721',\n",
" 'EPSG:26722',\n",
" 'EPSG:900913',\n",
" 'EPSG:41001',\n",
" 'EPSG:4617',\n",
" 'EPSG:102184',\n",
" 'EPSG:26907',\n",
" 'EPSG:102185',\n",
" 'EPSG:3579',\n",
" 'EPSG:3578',\n",
" 'EPSG:3575',\n",
" 'EPSG:3574',\n",
" 'EPSG:3576',\n",
" 'EPSG:3571',\n",
" 'EPSG:3573',\n",
" 'EPSG:3572',\n",
" 'EPSG:54030',\n",
" 'EPSG:102100',\n",
" 'EPSG:102002',\n",
" 'EPSG:102009',\n",
" 'EPSG:102008',\n",
" 'EPSG:4326',\n",
" 'EPSG:3401',\n",
" 'EPSG:3799',\n",
" 'EPSG:3395',\n",
" 'EPSG:3400',\n",
" 'EPSG:54008',\n",
" 'EPSG:26911',\n",
" 'EPSG:26912',\n",
" 'EPSG:54009',\n",
" 'EPSG:54004',\n",
" 'EPSG:26721',\n",
" 'EPSG:26908',\n",
" 'EPSG:102100',\n",
" 'EPSG:26717',\n",
" 'EPSG:3978',\n",
" 'EPSG:32191',\n",
" 'EPSG:26914',\n",
" 'EPSG:32194',\n",
" 'EPSG:32197',\n",
" 'EPSG:26710',\n",
" 'EPSG:32198',\n",
" 'EPSG:3576',\n",
" 'EPSG:54003',\n",
" 'EPSG:102016',\n",
" 'EPSG:102017',\n",
" 'EPSG:102018',\n",
" 'EPSG:2019',\n",
" 'EPSG:4326',\n",
" 'EPSG:54016',\n",
" 'EPSG:102009',\n",
" 'EPSG:26918',\n",
" 'EPSG:42101',\n",
" 'EPSG:2952',\n",
" 'EPSG:42304',\n",
" 'EPSG:26922',\n",
" 'EPSG:26916',\n",
" 'EPSG:4269',\n",
" 'EPSG:26722',\n",
" 'EPSG:3571',\n",
" 'EPSG:26719',\n",
" 'EPSG:54008',\n",
" 'EPSG:4617',\n",
" 'EPSG:26910',\n",
" 'EPSG:26715',\n",
" 'EPSG:900913',\n",
" 'EPSG:32196',\n",
" 'EPSG:26920',\n",
" 'EPSG:32195',\n",
" 'EPSG:32190',\n",
" 'EPSG:32192',\n",
" 'EPSG:3572',\n",
" 'EPSG:102184',\n",
" 'EPSG:26915',\n",
" 'EPSG:26720',\n",
" 'EPSG:26913',\n",
" 'EPSG:26921']"
]
},
"execution_count": 74,
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
@ -311,10 +294,8 @@
},
{
"cell_type": "code",
"execution_count": 75,
"metadata": {
"collapsed": false
},
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
@ -322,7 +303,7 @@
"{}"
]
},
"execution_count": 75,
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
@ -333,10 +314,8 @@
},
{
"cell_type": "code",
"execution_count": 76,
"metadata": {
"collapsed": false
},
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
@ -344,7 +323,7 @@
"['GetCapabilities', 'GetMap', 'GetFeatureInfo', 'GetLegendGraphic']"
]
},
"execution_count": 76,
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
@ -355,10 +334,8 @@
},
{
"cell_type": "code",
"execution_count": 79,
"metadata": {
"collapsed": false
},
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
@ -366,7 +343,7 @@
"['image/png', 'image/gif', 'image/jpeg', 'image/png; mode=8bit', 'image/tiff']"
]
},
"execution_count": 79,
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
@ -384,10 +361,8 @@
},
{
"cell_type": "code",
"execution_count": 80,
"metadata": {
"collapsed": false
},
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
"img = wms.getmap(layers=['WMS-Elevation'],\n",
@ -400,10 +375,8 @@
},
{
"cell_type": "code",
"execution_count": 81,
"metadata": {
"collapsed": false
},
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
"out = open('canada-wms.png', 'wb')\n",
@ -431,21 +404,21 @@
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python [default]",
"display_name": "Python 3",
"language": "python",
"name": "python2"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.12"
"pygments_lexer": "ipython3",
"version": "3.6.1"
},
"widgets": {
"state": {