Closed yazeed44 closed 2 years ago
Hi @yazeed44,
Thanks for the PR. As far as I know GeoJSON supports multiple layers, so it's possible to import different files into one map. It's counter productive to repeat same data again.
I would love to hear back from you if I'm missing something. Otherwise, seems like a special case to me.
Thanks for the hard work, I appreciate the time and effort you put to contribute to this project.
Cheers
I think it's better to have a single geojson that contains all the geometries just in case the user is using a viewer that does not support multiple layers. But as you said, this is rather a special case and most users will not encounter it.
Maybe we can delete embedded_regions.geojson
, and if the user for some special case needed to have it, they can generate it using generate_geojson.py
from embedded_regions.json
?
Thanks for the hard work, I appreciate the time and effort you put to contribute to this project.
Glad to help :+1:
Hello @homaily
As of now, regions, cities and districts are separated into their own files. This is great when integrating with relational databases since we can import those files into their own tables, and have them reference each other when needed. But with non-relational databases, it is encouraged to embed instead of reference.
This pull request is for generating a json and geojson that holds regions, and within each region an array of cities are held, and within each city an array of districts. A json file of this structure should integrate with a non-relational DB easily.
I have also made a number of other changes
README.md
to mention coordination format of geojson (Lon, Lat)generate_geojson/
directory togenerators/
, in case we needed to have more in the futuregenerate_geojson.py
README.md
to includegenerate_embedded_regions.py