May-05-2020, 02:36 PM
1. load the json into json_data
2. iterate over features in json_data['features']
3. read the
4. convert coordinates by splitting at comma, then convert individual values to float
5. assign coordinates from 4 as list to
6. dump json data back to a file
2. iterate over features in json_data['features']
3. read the
feature['geometry']['coordinates'][0]
- this will give you a string, e.g."4.91667, 46.3833"
4. convert coordinates by splitting at comma, then convert individual values to float
5. assign coordinates from 4 as list to
feature['geometry']['coordinates']
6. dump json data back to a file
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs