mirror of
https://github.com/nspcc-dev/locode-db.git
synced 2026-03-01 04:28:42 +00:00
Reuse public continents DB #12
Labels
No labels
I2
I3
I4
S2
S3
S4
U2
U4
blocked
bug
bug
bug
enhancement
enhancement
feature
go
go
good first issue
help wanted
help wanted
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/locode-db#12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @roman-khimov on GitHub (Oct 4, 2023).
Originally assigned to: @End-rey on GitHub.
We've got
continents.geojson.gzof not-completely-known origin. Better have some known source of data and not store it in the repository.For example, there is https://github.com/rapomon/geojson-places/tree/master/data/continents
@End-rey commented on GitHub (Aug 15, 2024):
In this repository, a continents file is associated with a set of countries in the file. If you use it, you will first need to change the logic of the program, and secondly, it is not a fact that all countries are represented there. It is more reliable to determine the continent by points on the map as it is done now. Another way to use a separate files of continents, but it will be necessary to somehow compress them into one.
I suggest using this file: https://gist.github.com/hrbrmstr/91ea5cc9474286c72838
@cthulhu-rider commented on GitHub (Aug 19, 2024):
there was no nice src of continental polygons (in GeoJSON particularly) few yrs ago. Maybe smth appeared since then, idk still
if nothing exists, and since continental DB is only needed at the generative stage, we can try to use a public service like OSM. This requires network connection of generator and brings lts
@AliceInHunterland commented on GitHub (Aug 19, 2024):
we should look at https://www.naturalearthdata.com/ as well
@End-rey commented on GitHub (Aug 19, 2024):
In this repo https://github.com/gbif/continents boundaries are drawn carefully across land, but roughly across the sea. I think this format is suitable for our task.
Also, I found this https://hub.arcgis.com/maps/CESJ::world-continents, but it seems like there is no license.
@AliceInHunterland commented on GitHub (Aug 19, 2024):
can we regenerate
continents.geojson.gzby ourselves using https://www.naturalearthdata.com/ (even google earth uses it)?(with python dataframe also can be done). it will still be 8 polygons as we had. probably can be improved. (and they have https://github.com/nvkelso/natural-earth-vector/blob/master/geojson/ne_10m_geography_regions_polys.geojson if you don't want to store it)

continents based on the country also can be an option:

another option:

and this can be improved by joining the second and third maps I think.
@End-rey commented on GitHub (Aug 20, 2024):
@roman-khimov commented on GitHub (Aug 20, 2024):
DJDCT is certainly Africa, not Asia, so it's 2. And Enez is certainly Europe, so it's 1. https://gist.github.com/hrbrmstr/91ea5cc9474286c72838 doesn't seem to be very reliable then.
https://github.com/gbif/continents --- more details needed, maybe it fixes things, maybe it breaks something.
https://hub.arcgis.com/maps/CESJ::world-continents --- perfect fit, how hard to integrate?
https://www.naturalearthdata.com --- also needs to be reviewed, maybe it's for good, maybe not.
@End-rey commented on GitHub (Aug 21, 2024):
During the check, I found many errors in the location data.
For example:
,SV,SSO,Armenia,Armenia,SO,RL,1----6--,1201,,1344N 08929E,- point is in the Bay of Bengal, but it should be in El Salvador. I noticed that the point1344N 08929Wis correctly positioned.,ES,CUV,Cuevas del Campo,Cuevas del Campo,GR,RQ,--3-----,1001,,3736N 02550W,- in the middle of ocean, but if change location to3736N 00255W, then everything will be correct.,US,ZIU,Tarpon Spings,Tarpon Spings,FL,RL,-----6--,0901,,2808N 08245W,- it is correct, but next line,US,ZKL,Tarpon Springs,Tarpon Springs,FL,RQ,1----6--,0907,,2845N 02845W,- in middle of ocean, but need to be near.If I choose old geojson with continents and mark all points that are not on the earth (distance to earth > 0.2 in the units of geometry), I will have 840 points and this map:

So idea get continents from here https://github.com/rapomon/geojson-places/tree/master/data/continents is not so bad. I checked and made sure that all countries are represented in this json.
@End-rey commented on GitHub (Aug 22, 2024):
I have researched the interaction with this file
https://github.com/rapomon/geojson-places/blob/master/data/continents/continents.json:
so need to decide which ones to leave. Here I took the first mention:
@roman-khimov commented on GitHub (Aug 22, 2024):
Unacceptable.
@End-rey commented on GitHub (Aug 22, 2024):
Are there any other countries that are important to be in several continents? I think, we can combine approaches.
@roman-khimov commented on GitHub (Aug 22, 2024):
Turkey, obviously. Egypt. Panama. Others are more consistent, but Canary Islands (or Ceuta) are not exactly Europe geographically, for example. In general strict "country -> continent" mapping is flawed.
@End-rey commented on GitHub (Aug 22, 2024):
https://github.com/gbif/continents 313 difference:
@roman-khimov commented on GitHub (Aug 22, 2024):
What a bloody mess... Some changes are good, some are not.
@End-rey commented on GitHub (Aug 22, 2024):
https://www.naturalearthdata.com difference 313 lines:
@End-rey commented on GitHub (Aug 26, 2024):
For update 2024-1
In general, several records fell into place by correcting the original coordinates.
But otherwise the changes are the same as before.
@roman-khimov commented on GitHub (Aug 26, 2024):
Let's take https://gist.github.com/hrbrmstr/91ea5cc9474286c72838, but copy it to our repository with link to the original file. I fear it can disappear, doesn't look like a reliable source. But MIT allows for us to copy and at least we'd know where it comes from. It's also much smaller than the one we have now.