Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitce07020

Browse files
committed
added geojson snippet
1 parentec26ab4 commitce07020

File tree

2 files changed

+21
-24
lines changed

2 files changed

+21
-24
lines changed

‎geo/geojson.ipynb

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
},
2424
{
2525
"cell_type":"code",
26-
"execution_count":1,
26+
"execution_count":65,
2727
"metadata": {
2828
"collapsed":false
2929
},
@@ -97,7 +97,7 @@
9797
"4 22.0 7.589551 47.547405 277.0 Basel SBB"
9898
]
9999
},
100-
"execution_count":1,
100+
"execution_count":65,
101101
"metadata": {},
102102
"output_type":"execute_result"
103103
}
@@ -112,7 +112,7 @@
112112
},
113113
{
114114
"cell_type":"code",
115-
"execution_count":44,
115+
"execution_count":66,
116116
"metadata": {
117117
"collapsed":false,
118118
"scrolled":true
@@ -130,7 +130,7 @@
130130
},
131131
{
132132
"cell_type":"code",
133-
"execution_count":39,
133+
"execution_count":67,
134134
"metadata": {
135135
"collapsed":false
136136
},
@@ -152,21 +152,21 @@
152152
},
153153
{
154154
"cell_type":"code",
155-
"execution_count":41,
155+
"execution_count":68,
156156
"metadata": {
157157
"collapsed":false
158158
},
159159
"outputs": [],
160160
"source": [
161161
"import geojson as geojson\n",
162162
"\n",
163-
"geo_collection = geojson.GeometryCollection(points)\n",
163+
"geo_collection = geojson.GeometryCollection(points[:100])\n",
164164
"\n"
165165
]
166166
},
167167
{
168168
"cell_type":"code",
169-
"execution_count":45,
169+
"execution_count":69,
170170
"metadata": {
171171
"collapsed":false
172172
},
@@ -178,29 +178,26 @@
178178
},
179179
{
180180
"cell_type":"code",
181-
"execution_count":47,
181+
"execution_count":74,
182182
"metadata": {
183183
"collapsed":false
184184
},
185-
"outputs": [
186-
{
187-
"data": {
188-
"text/plain": [
189-
"<function TextIOWrapper.close>"
190-
]
191-
},
192-
"execution_count":47,
193-
"metadata": {},
194-
"output_type":"execute_result"
195-
}
196-
],
185+
"outputs": [],
197186
"source": [
198187
"\n",
199-
"#file = open('stations.geojson', 'w')\n",
200-
"#file.write(dump)\n",
201-
"#file.close"
188+
"with open('stations.geojson', 'w') as file:\n",
189+
" file.write(dump)\n"
202190
]
203191
},
192+
{
193+
"cell_type":"code",
194+
"execution_count":null,
195+
"metadata": {
196+
"collapsed":false
197+
},
198+
"outputs": [],
199+
"source": []
200+
},
204201
{
205202
"cell_type":"code",
206203
"execution_count":null,

‎geo/stations.geojson

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp