Skip to content

Commit 1125c2d

Browse files
committed
added geojson snippet
1 parent 526108f commit 1125c2d

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
@@ -147,29 +147,29 @@
147147
"source": [
148148
"\n",
149149
"\n",
150-
"coordinates = zip(df['Longitude'], df['Latitude'])\n",
151-
"points = [geojson.Feature(geometry=geojson.Point(c)) for c in coordinates]\n",
150+
"values = zip(df['Longitude'], df['Latitude'], df['Remark'])\n",
151+
"points = [geojson.Feature(geometry=geojson.Point(c), properties=) for v in values]\n",
152152
"\n",
153153
"print(points[0])"
154154
]
155155
},
156156
{
157157
"cell_type": "code",
158-
"execution_count": 8,
158+
"execution_count": 11,
159159
"metadata": {
160160
"collapsed": false
161161
},
162162
"outputs": [],
163163
"source": [
164164
"\n",
165165
"\n",
166-
"geo_collection = geojson.GeometryCollection(points[:100])\n",
166+
"geo_collection = geojson.FeatureCollection(points[:100])\n",
167167
"\n"
168168
]
169169
},
170170
{
171171
"cell_type": "code",
172-
"execution_count": 9,
172+
"execution_count": 12,
173173
"metadata": {
174174
"collapsed": false
175175
},
@@ -181,7 +181,7 @@
181181
},
182182
{
183183
"cell_type": "code",
184-
"execution_count": 10,
184+
"execution_count": 13,
185185
"metadata": {
186186
"collapsed": false
187187
},

0 commit comments

Comments
 (0)