Commit graph

13 commits

Author SHA1 Message Date
Thomas Kolb 8ee4f9d2a0 Added requirements.txt 2021-06-23 20:58:43 +02:00
Thomas Kolb 492395840d Improve the country labeling
- Set a maximum font size
- Try to label polygons that are too small for the full name with the
  2-letter contry code
2021-06-22 22:40:21 +02:00
Thomas Kolb bc3e6a1436 Align country name at the polygon’s centroid 2021-06-22 21:51:09 +02:00
Thomas Kolb e965ec9032 Render country labels
The positions are still a bit off, because they are simply calculated as
the average of all polygon coordinates. That causes a bias towards
detailed borderlines. A better way would be to calculate the center of
mass for each polygon, but that is not implemented yet.
2021-06-10 22:52:49 +02:00
Thomas Kolb 60f59379e5 Refactoring: move processing steps to separate functions 2021-06-10 21:32:49 +02:00
Thomas Kolb 67caf16b14 Draw azimuth/distance lines above Maidenhead grid
Also, the azimuth/distance lines and their labels are now put in their
own group.
2021-06-02 23:06:29 +02:00
Thomas Kolb 1261e682b5 Add Maidenhead grid labels 2021-06-02 22:54:49 +02:00
Thomas Kolb 7af8680e28 Fixed text display in Inkscape 2021-06-02 22:54:23 +02:00
Thomas Kolb 85b3742c43 Code formatting; minor fixes 2021-06-01 23:18:03 +02:00
Thomas Kolb a9f987c079 Fix rendering with land at the antipodal point
If the antipodal point (the point opposite of the map center) is on land,
the corresponding land mass was stretched across the whole map, breaking
the rendering. This was fixed by a couple of changes:

1. A check is done for each polygon whether it contains the antipodal
   point.
2. If it does not, render it as a simple polygon as it was previously.
3. If it does contain the antipodal point, create a path that contains:
   a) A circle covering the whole map.
   b) The polygon with the points in reverse order.

This leads to filled circle with the polygon “cut out”, which is the
correct display in this case.
2021-06-01 23:05:49 +02:00
Thomas Kolb a766274d79 Support for command line arguments 2021-05-30 22:20:40 +02:00
Thomas Kolb af794b0598 Generate azimuth lines and basic Maidenhead locator grid
No text in the grid „squares“ yet.
2021-05-29 21:26:59 +02:00
Thomas Kolb f676af2fde Initial version: loads GeoJSON and generates SVG map 2021-05-29 15:22:29 +02:00