Skip to content

Skycultures: Add country outline polygons#4919

Merged
gzotti merged 6 commits into
masterfrom
SC/geojson
Jun 14, 2026
Merged

Skycultures: Add country outline polygons#4919
gzotti merged 6 commits into
masterfrom
SC/geojson

Conversation

@gzotti

@gzotti gzotti commented May 15, 2026

Copy link
Copy Markdown
Member

Description

Skycultures 2.0 include polygonal descriptions for cultural regions in form of GeoJSON polygons. These can be created in the SCM plugin or in GIS applications like QGIS. The Stellarium-specific data are described in the User Guide.

Free data file for country borders are available, e.g. https://r2.datahub.io/clvyjaryy0000la0cxieg4o8o/main/raw/data/countries.geojson, from which borders of single countries can be extracted.

21st century country borders are generally not ideal as cultural borders often differ from national borders. Still, it's better than nothing.

Reading the big file we can see the Multipolygon geometry type. It would be great if this can be added to the acceptable JSON types. (EDIT: DONE)

Fixes # (issue)

Screenshots (if appropriate):

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • This change requires a documentation update
  • Housekeeping

How Has This Been Tested?

Test Configuration:

  • Operating system: Windows 11
  • Graphics Card: Any

Checklist:

  • My code follows the code style of this project.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (header file)
  • I have updated the respective chapter in the Stellarium User Guide
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@gzotti gzotti added this to the 26.2 milestone May 15, 2026
@gzotti gzotti added importance: medium A bit annoying, minor miscalculation, but no crash data Missing/bad/outdated data, but no code error subsystem: skycultures The issue is related to skycultures of planetarium... purpose: cultural astronomy Issues, pull requests and proposals with cultural astronomy purposes labels May 15, 2026
@github-actions github-actions Bot requested review from alex-w and sushoff May 15, 2026 19:34
@github-actions

github-actions Bot commented May 15, 2026

Copy link
Copy Markdown

Great PR! Please pay attention to the following items before merging:

Files matching src/**/*.cpp:

  • Are possibly unused includes removed?

Files matching skycultures/**:

  • Did you remember to update skycultures/CMakeLists.txt file respectively to changes in sky cultures?
  • Did you remember to define classification parameter in sky cultures (see index.json file)?
  • Did you remember to define license parameter in sky cultures (see description.md file)?
  • Did you remember to define region parameter in sky culture (see index.json file)?

This is an automatically generated QA checklist based on modified files.

@gzotti

This comment was marked as resolved.

@alex-w

This comment was marked as resolved.

@gzotti

This comment was marked as resolved.

@gzotti

This comment was marked as resolved.

@gzotti

gzotti commented May 31, 2026

Copy link
Copy Markdown
Member Author

@sushoff I have added the MultiPolygon GeoJSON datatype and several country border polygons from existing free geodata as indicated. Greek/Almagest is obviously incomplete, would require "the Hellenistic world": either add all modern countries or define own polygon. Also for the other Greek/* (Leiden etc.). For various islands I have added the countries to which the islands belong today. This may be OK or not. Bali must be extracted from the Indonesia MultiPolygon (EDIT: Done).

@gzotti

gzotti commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

It seems @sushoff has no time to add a few polygons before 26.2. In 26.2 we can still have the functionality (Multipolygon in GeoJSON) and outlines for many Asian countries and islands. It would bring life to the map, and maybe first feedback for 26.3.

@gzotti gzotti marked this pull request as ready for review June 11, 2026 18:52
@github-actions github-actions Bot requested a review from 10110111 June 11, 2026 18:52
gzotti added 5 commits June 11, 2026 23:27
21st century country borders are generally not ideal as cultural borders often differ from national borders.
Still, it's a start.
Only using today's borders!
In many cases years are wrong.
@gzotti gzotti moved this from Backlog to In review in Skycultures 2.0 Jun 14, 2026
@gzotti

gzotti commented Jun 14, 2026

Copy link
Copy Markdown
Member Author

@alex-w @10110111 any comments? IMO this state can go into 26.2, more territory files hopefully coming later this year.

@10110111

Copy link
Copy Markdown
Contributor

Why are different parts of the same SC's region prelit separately? E.g. Honshu is prelit separately from Hokkaido while representing the same Japanese Yasui Map SC. Or North and South Koreas are prelit separately while representing the same Korean SC.

@gzotti

gzotti commented Jun 14, 2026

Copy link
Copy Markdown
Member Author

The highlight is triggered by defined polygon, and I just copied N and S Korea Multipolygons from the file given above. For both areas I defined years 1500 to "today" (special code), and I expect some SC expert to fix the years. Same is true for some regional inner-China SCs. Also, all Multipolygons are split into series of Polygons which highlight separately by mouse-over. The tooltip shows the name of the skyculture, though, so this should not hurt too much.

@alex-w alex-w left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acceptable for public testing, but it has mistakes in the data (modern vs. old borders)

@10110111

10110111 commented Jun 14, 2026 via email

Copy link
Copy Markdown
Contributor

@gzotti

gzotti commented Jun 14, 2026

Copy link
Copy Markdown
Member Author

I am pretty sure Chinese regional borders can be amended from the present copies of modern borders, by our Chinese experts who will hopefully provide cultural polygons with correct date range. Also: Does "Indian" SC also include other territories? I leave this fix to experts in Indian SC. But something has to be shown for discussion.

@gzotti

gzotti commented Jun 14, 2026

Copy link
Copy Markdown
Member Author

OK, I guess it's acceptable, though the separate highlighting should be fixed at some point, because it makes no sense from the user's PoV.

OK, I take this as issue request for future development.

@gzotti gzotti merged commit 404ccbf into master Jun 14, 2026
25 of 26 checks passed
@gzotti gzotti deleted the SC/geojson branch June 14, 2026 08:56
@github-project-automation github-project-automation Bot moved this from In review to Done in Skycultures 2.0 Jun 14, 2026
@sushoff

sushoff commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

I am pretty sure Chinese regional borders can be amended from the present copies of modern borders, by our Chinese experts who will hopefully provide cultural polygons with correct date range. Also: Does "Indian" SC also include other territories? I leave this fix to experts in Indian SC. But something has to be shown for discussion.

I am currently working on this - "Indian" is actually nakshatras and they started from the Indus Culture in the 2nd mill. BCE and extend to global use today (in new age philosophy)

I also did the two Babylonian geojsons and am currently working on the Greek / Greco-Egyptian ones - all this to be done today

@sushoff

sushoff commented Jun 14, 2026

Copy link
Copy Markdown
Contributor
  • Babylonian MUL.APIN (-1500 to -60)
  • Babylonian Seleucid (-320 to -30)
  • Indian Nakshatra
  • Egyptian Dendera (Ptolemean)
  • Greek Almagest (Roman)
  • Greek Alm-Farnese (Roman-Levante)
  • Greek Dante (IT 1300)
  • Greek Leiden (Roman-Medieval)

remark: reworked Seleucid, and then let "MUL.APIN" end in 321 to avoid temporal overlap and make polygons better clickable (one after the other appearing when timeslider moved)

sushoff added a commit that referenced this pull request Jun 20, 2026
sushoff added a commit that referenced this pull request Jun 20, 2026
sushoff added a commit that referenced this pull request Jun 20, 2026
sushoff added a commit that referenced this pull request Jun 20, 2026
sushoff added a commit that referenced this pull request Jun 20, 2026
sushoff added a commit that referenced this pull request Jun 20, 2026
sushoff added a commit that referenced this pull request Jun 20, 2026
sushoff added a commit that referenced this pull request Jun 20, 2026
sushoff added a commit that referenced this pull request Jun 20, 2026
sushoff added a commit that referenced this pull request Jun 20, 2026
a first attempt ... may be changed by SC expert later
sushoff added a commit that referenced this pull request Jun 20, 2026
@sushoff

sushoff commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

We (with the Chinese colleagues) consciously decided to postpone for Sept.

  • 12. chinese 
  • 13. chinese_chenzhuo 
  • 14. chinese_manchu 
  • 15. chinese_song_dynasty 
  • 16. chinese_xianglin 
  • 17. chinese_yuan_dynasty 

... and to skip those from Digitalis Education Solutions, Inc.

  • 18.  egyptian 
  • 45. navajo 
  • 25. inuit 

We now have

  • 1. anutan 
  • 2. arabic_al-sufi 
  • 3. arabic_arabian_peninsula 
  • 4. arabic_indigenous 
  • 5. armintxe 
  • 6. aztec 
  • 7.  babylonian_mulapin 
  • 8. babylonian_seleucid 
  • 9. balinese 
  • 10. belarusian 
  • 11. boorong 
  • 19. egyptian_dendera 
  • 20. greek_almagest 
  • 21. greek_dante 
  • 22. greek_farnese 
  • 23. greek_leidenAratea 
  • 24. hawaiian_starlines 
  • 26. indian 
  • 27. indian_nakshatras 
  • 28. japanese 
  • 29. kamilaroi 
  • 30. khoi-san 
  • 31. korean 
  • 32. lokono 
  • 33. macedonian 
  • 34. maori 
  • 35. maya 
  • 36. modern 
  • 37. modern_chinese 
  • 38. modern_rey 
  • 39. modern_iau 
  • 40. modern_hlad 
  • 41. modern_st 
  • 42. modern_journey_to_the_west 
  • 43. modern_sternenkarten 
  • 44. mongolian 
  • 46. norse 
  • 47. norse_edda 
  • 48. northern_andes 
  • 49. romanian 
  • 50. ruanui_sky_tahiti_and_society_islands 
  • 51. russian_siberian 
  • 52. sami 
  • 53. samoan 
  • 54. sardinian 
  • 55. seri 
  • 56. tibetan 
  • 57. tongan 
  • 58. tukano 
  • 59. tikuna 
  • 60. tupi 
  • 61. vanuatu_netwar 
  • 62. xhosa 
  • 63. zulu 

@10110111

Copy link
Copy Markdown
Contributor

We (with the Chinese colleagues) consciously decided to postpone for Sept.

And what about #4994?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data Missing/bad/outdated data, but no code error importance: medium A bit annoying, minor miscalculation, but no crash purpose: cultural astronomy Issues, pull requests and proposals with cultural astronomy purposes subsystem: skycultures The issue is related to skycultures of planetarium...

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants