Skip to content

Commit

Permalink
create-geojson-network.py - use feature.id instead of feature.propert…
Browse files Browse the repository at this point in the history
…ies.id

GeoJSON spec says the common ID of a feature "should" be in feature.id,
not as a property of the feature.
  • Loading branch information
billyc committed Feb 7, 2022
1 parent 825546a commit 1e26a5b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/create-geojson-network.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,14 @@
points = converted_links[link_id]
geojson["features"].append({
"type": "Feature",
"id": link_id,
"geometry": {
"type": "LineString",
"coordinates": [ [points[0],points[1]], [points[2],points[3]]]
},
"properties": {
"id": link_id
}
# -- for now, no properties. Saves space
# "properties": {
# }
})

# write it out
Expand Down

0 comments on commit 1e26a5b

Please sign in to comment.