Python Forum
Help regarding geoJSON
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help regarding geoJSON
#1
Hi! I have a geoJSON file with 160 restaurant location within a city. I have to arrange some specific data sets into columns, e.g. restaurant name, restaurant address and coordinates. Problem is I can't use any external modules except 'json', can't use dictionary operations and have to use string sequences to solve this. The json file can be found here: https://1drv.ms/u/s!ArZ5ln6zCpQugbUcBcNk...A?e=KeGRtE

Can anyone please help me how to approach this problem?
Reply
#2
(Feb-19-2021, 05:35 AM)vicegb009 Wrote: I can't use any external modules except 'json', can't use dictionary operations and have to use string sequences to solve this
If you use json module, you will end up having a nested dict of dicts. Then not using dict operations doesn't make sense. So if restrictions hold - you need to basically write parser yourself - read/process the file like regular text 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

Reply
#3
You can also look at the code from some geojson readers and see how they do it
see: https://pypi.org/search/?q=geojson+%2B+reader&o=

You can then load the data in QGIS see: https://gis.stackexchange.com/questions/...-into-qgis
to verify that your translation was correct.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020