Skip to content

Commit 526108f

Browse files
committed
added geojson snippet
1 parent 38cda73 commit 526108f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

geo/geojson.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
},
132132
{
133133
"cell_type": "code",
134-
"execution_count": 3,
134+
"execution_count": 7,
135135
"metadata": {
136136
"collapsed": false
137137
},
@@ -140,22 +140,22 @@
140140
"name": "stdout",
141141
"output_type": "stream",
142142
"text": [
143-
"{\"coordinates\": [7.549783000000001, 47.216111], \"type\": \"Point\"}\n"
143+
"{\"geometry\": {\"coordinates\": [7.549783000000001, 47.216111], \"type\": \"Point\"}, \"properties\": {}, \"type\": \"Feature\"}\n"
144144
]
145145
}
146146
],
147147
"source": [
148148
"\n",
149149
"\n",
150150
"coordinates = zip(df['Longitude'], df['Latitude'])\n",
151-
"points = [geojson.Point(c) for c in coordinates]\n",
151+
"points = [geojson.Feature(geometry=geojson.Point(c)) for c in coordinates]\n",
152152
"\n",
153153
"print(points[0])"
154154
]
155155
},
156156
{
157157
"cell_type": "code",
158-
"execution_count": 4,
158+
"execution_count": 8,
159159
"metadata": {
160160
"collapsed": false
161161
},
@@ -169,7 +169,7 @@
169169
},
170170
{
171171
"cell_type": "code",
172-
"execution_count": 5,
172+
"execution_count": 9,
173173
"metadata": {
174174
"collapsed": false
175175
},
@@ -181,7 +181,7 @@
181181
},
182182
{
183183
"cell_type": "code",
184-
"execution_count": 6,
184+
"execution_count": 10,
185185
"metadata": {
186186
"collapsed": false
187187
},

0 commit comments

Comments
 (0)