-
-
Save frewsxcv/20b6522d8242ede00bb3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"coordinates": [[[3.75, 9.25], [-130.95, 1.52]], [[23.15, -34.25], [-1.35, -4.65], [3.45, 77.95]]], "type": "MultiLineString"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
import json
Criar um objeto GeoJSON com uma "linestring"
geojson = {
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[0, 0],
[1, 1],
[2, 2]
]
},
"properties": {
"color": "red" # Definir a cor como "red"
}
}
Converter o objeto GeoJSON em uma string JSON
geojson_str = json.dumps(geojson)
Exibir o GeoJSON resultante
print(geojson_str)