pycoast 1.7.0__tar.gz → 1.8.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. pycoast-1.8.0/LICENSE.txt +201 -0
  2. {pycoast-1.7.0 → pycoast-1.8.0}/MANIFEST.in +0 -1
  3. {pycoast-1.7.0/pycoast.egg-info → pycoast-1.8.0}/PKG-INFO +46 -8
  4. {pycoast-1.7.0 → pycoast-1.8.0}/README +17 -0
  5. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/conf.py +1 -0
  6. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/__init__.py +1 -0
  7. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/cw_agg.py +8 -26
  8. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/cw_base.py +46 -46
  9. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/cw_pil.py +8 -26
  10. pycoast-1.8.0/pycoast/tests/__init__.py +1 -0
  11. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_pycoast.py +20 -28
  12. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/version.py +4 -4
  13. {pycoast-1.7.0 → pycoast-1.8.0/pycoast.egg-info}/PKG-INFO +46 -8
  14. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast.egg-info/SOURCES.txt +0 -1
  15. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast.egg-info/requires.txt +7 -7
  16. {pycoast-1.7.0 → pycoast-1.8.0}/pyproject.toml +6 -0
  17. {pycoast-1.7.0 → pycoast-1.8.0}/setup.py +6 -21
  18. pycoast-1.7.0/AUTHORS.md +0 -20
  19. pycoast-1.7.0/LICENSE.txt +0 -674
  20. pycoast-1.7.0/pycoast/tests/__init__.py +0 -19
  21. {pycoast-1.7.0 → pycoast-1.8.0}/docs/Makefile +0 -0
  22. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/api/.gitkeep +0 -0
  23. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/config.rst +0 -0
  24. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/graticule.rst +0 -0
  25. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/high_quality_contours.rst +0 -0
  26. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/images/BMNG_clouds_201109181715_areaT2.png +0 -0
  27. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/images/brazil_shapefiles_agg.png +0 -0
  28. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/images/euro_coast.png +0 -0
  29. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/images/euro_coast_agg.png +0 -0
  30. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/images/euro_coast_grid_agg.png +0 -0
  31. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/images/euro_grid.png +0 -0
  32. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/images/euro_grid_agg.png +0 -0
  33. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/images/geos_coast.png +0 -0
  34. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/images/geos_coast_agg.png +0 -0
  35. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/images/grid_geos_agg.png +0 -0
  36. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/images/nh_grid_coarse_agg.png +0 -0
  37. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/images/nh_points_agg.png +0 -0
  38. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/images/nh_polygons_agg.png +0 -0
  39. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/images/nh_polygons_lines_agg.png +0 -0
  40. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/index.rst +0 -0
  41. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/installation.rst +0 -0
  42. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/points.rst +0 -0
  43. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/polygons_and_lines.rst +0 -0
  44. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/shapefiles.rst +0 -0
  45. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/test.rst +0 -0
  46. {pycoast-1.7.0 → pycoast-1.8.0}/docs/source/usage.rst +0 -0
  47. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/conftest.py +0 -0
  48. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/brazil_shapefiles.png +0 -0
  49. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/brazil_shapefiles_agg.png +0 -0
  50. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/coasts_and_grid.ini +0 -0
  51. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/coasts_and_grid_agg.ini +0 -0
  52. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/contours_europe.png +0 -0
  53. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/contours_europe_agg.png +0 -0
  54. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/contours_europe_alpha.png +0 -0
  55. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/contours_geos.png +0 -0
  56. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/contours_geos_agg.png +0 -0
  57. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/dateline_boundary_cross.png +0 -0
  58. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/dateline_cross.png +0 -0
  59. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/eastern_shapes_agg.png +0 -0
  60. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/eastern_shapes_pil.png +0 -0
  61. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/grid_europe.png +0 -0
  62. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/grid_europe_agg.png +0 -0
  63. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/grid_europe_agg_txt.png +0 -0
  64. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/grid_from_dict_agg.png +0 -0
  65. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/grid_from_dict_pil.png +0 -0
  66. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/grid_geos.png +0 -0
  67. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/grid_geos_agg.png +0 -0
  68. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/grid_germ.png +0 -0
  69. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/grid_nh.png +0 -0
  70. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/grid_nh_agg.png +0 -0
  71. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/grid_nh_cfg_agg.png +0 -0
  72. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/lonlat_boundary_cross.png +0 -0
  73. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/nh_cities_agg.ini +0 -0
  74. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/nh_cities_agg.png +0 -0
  75. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/nh_cities_from_dict_agg.png +0 -0
  76. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/nh_cities_from_dict_pil.png +0 -0
  77. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/nh_cities_pil.ini +0 -0
  78. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/nh_cities_pil.png +0 -0
  79. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/nh_one_shapefile.ini +0 -0
  80. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/nh_points_agg.ini +0 -0
  81. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/nh_points_agg.png +0 -0
  82. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/nh_points_cfg_pil.png +0 -0
  83. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/nh_points_pil.ini +0 -0
  84. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/nh_points_pil.png +0 -0
  85. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/nh_polygons.png +0 -0
  86. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/nh_polygons_agg.png +0 -0
  87. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/no_h_scratch_agg.png +0 -0
  88. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/no_h_scratch_pil.png +0 -0
  89. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/no_v_scratch_agg.png +0 -0
  90. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/no_v_scratch_pil.png +0 -0
  91. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/one_shapefile_from_cfg_agg.png +0 -0
  92. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/one_shapefile_from_cfg_pil.png +0 -0
  93. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/DejaVuSerif.ttf +0 -0
  94. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/CITIES/cities.txt +0 -0
  95. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/GSHHS_shp/l/GSHHS_l_L1.dbf +0 -0
  96. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/GSHHS_shp/l/GSHHS_l_L1.prj +0 -0
  97. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/GSHHS_shp/l/GSHHS_l_L1.shp +0 -0
  98. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/GSHHS_shp/l/GSHHS_l_L1.shx +0 -0
  99. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/GSHHS_shp/l/GSHHS_l_L2.dbf +0 -0
  100. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/GSHHS_shp/l/GSHHS_l_L2.prj +0 -0
  101. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/GSHHS_shp/l/GSHHS_l_L2.shp +0 -0
  102. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/GSHHS_shp/l/GSHHS_l_L2.shx +0 -0
  103. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/GSHHS_shp/l/GSHHS_l_L3.dbf +0 -0
  104. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/GSHHS_shp/l/GSHHS_l_L3.prj +0 -0
  105. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/GSHHS_shp/l/GSHHS_l_L3.shp +0 -0
  106. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/GSHHS_shp/l/GSHHS_l_L3.shx +0 -0
  107. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/GSHHS_shp/l/GSHHS_l_L4.dbf +0 -0
  108. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/GSHHS_shp/l/GSHHS_l_L4.prj +0 -0
  109. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/GSHHS_shp/l/GSHHS_l_L4.shp +0 -0
  110. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/GSHHS_shp/l/GSHHS_l_L4.shx +0 -0
  111. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_border_c_L1.dbf +0 -0
  112. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_border_c_L1.prj +0 -0
  113. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_border_c_L1.shp +0 -0
  114. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_border_c_L1.shx +0 -0
  115. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_border_c_L2.dbf +0 -0
  116. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_border_c_L2.prj +0 -0
  117. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_border_c_L2.shp +0 -0
  118. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_border_c_L2.shx +0 -0
  119. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_border_c_L3.dbf +0 -0
  120. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_border_c_L3.prj +0 -0
  121. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_border_c_L3.shp +0 -0
  122. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_border_c_L3.shx +0 -0
  123. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L01.dbf +0 -0
  124. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L01.prj +0 -0
  125. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L01.shp +0 -0
  126. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L01.shx +0 -0
  127. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L02.dbf +0 -0
  128. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L02.prj +0 -0
  129. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L02.shp +0 -0
  130. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L02.shx +0 -0
  131. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L03.dbf +0 -0
  132. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L03.prj +0 -0
  133. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L03.shp +0 -0
  134. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L03.shx +0 -0
  135. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L04.dbf +0 -0
  136. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L04.prj +0 -0
  137. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L04.shp +0 -0
  138. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L04.shx +0 -0
  139. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L05.dbf +0 -0
  140. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L05.prj +0 -0
  141. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L05.shp +0 -0
  142. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L05.shx +0 -0
  143. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L06.dbf +0 -0
  144. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L06.prj +0 -0
  145. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L06.shp +0 -0
  146. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L06.shx +0 -0
  147. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L07.dbf +0 -0
  148. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L07.prj +0 -0
  149. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L07.shp +0 -0
  150. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L07.shx +0 -0
  151. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L08.dbf +0 -0
  152. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L08.prj +0 -0
  153. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L08.shp +0 -0
  154. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L08.shx +0 -0
  155. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L09.dbf +0 -0
  156. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L09.prj +0 -0
  157. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L09.shp +0 -0
  158. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L09.shx +0 -0
  159. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L1.dbf +0 -0
  160. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L1.shp +0 -0
  161. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L1.shx +0 -0
  162. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L10.dbf +0 -0
  163. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L10.prj +0 -0
  164. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L10.shp +0 -0
  165. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L10.shx +0 -0
  166. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L11.dbf +0 -0
  167. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L11.prj +0 -0
  168. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L11.shp +0 -0
  169. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L11.shx +0 -0
  170. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L2.dbf +0 -0
  171. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L2.shp +0 -0
  172. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L2.shx +0 -0
  173. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L3.dbf +0 -0
  174. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L3.shp +0 -0
  175. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/gshhs/WDBII_shp/c/WDBII_river_c_L3.shx +0 -0
  176. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/Metareas.dbf +0 -0
  177. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/Metareas.mxd +0 -0
  178. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/Metareas.prj +0 -0
  179. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/Metareas.sbn +0 -0
  180. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/Metareas.sbx +0 -0
  181. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/Metareas.shp +0 -0
  182. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/Metareas.shx +0 -0
  183. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/README +0 -0
  184. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/divisao_politica/BRASIL.dbf +0 -0
  185. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/divisao_politica/BRASIL.shp +0 -0
  186. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/divisao_politica/BRASIL.shx +0 -0
  187. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/divisao_politica/BR_Capitais.dbf +0 -0
  188. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/divisao_politica/BR_Capitais.shp +0 -0
  189. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/divisao_politica/BR_Capitais.shx +0 -0
  190. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/divisao_politica/BR_Contorno.dbf +0 -0
  191. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/divisao_politica/BR_Contorno.shp +0 -0
  192. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/divisao_politica/BR_Contorno.shx +0 -0
  193. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/divisao_politica/BR_Regioes.dbf +0 -0
  194. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/divisao_politica/BR_Regioes.shp +0 -0
  195. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/divisao_politica/BR_Regioes.shx +0 -0
  196. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/divisao_politica/divisao_politica.txt +0 -0
  197. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/divisao_politica/leia.txt +0 -0
  198. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/metarea5.gsf +0 -0
  199. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/metarea5.tbl +0 -0
  200. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/shapes/metarea5.tbl.info +0 -0
  201. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/test_data/test_config.ini +0 -0
  202. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/two_shapefiles_agg.png +0 -0
  203. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/two_shapefiles_pil.png +0 -0
  204. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/western_shapes_agg.png +0 -0
  205. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast/tests/western_shapes_pil.png +0 -0
  206. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast.egg-info/dependency_links.txt +0 -0
  207. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast.egg-info/not-zip-safe +0 -0
  208. {pycoast-1.7.0 → pycoast-1.8.0}/pycoast.egg-info/top_level.txt +0 -0
  209. {pycoast-1.7.0 → pycoast-1.8.0}/setup.cfg +0 -0
  210. {pycoast-1.7.0 → pycoast-1.8.0}/versioneer.py +0 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -3,7 +3,6 @@ recursive-include docs/source *
3
3
  include pycoast/tests/*.png
4
4
  recursive-include pycoast/tests/ *
5
5
  include LICENSE.txt
6
- include MANIFEST.in
7
6
 
8
7
  include versioneer.py
9
8
  include pycoast/version.py
@@ -1,23 +1,46 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: pycoast
3
- Version: 1.7.0
3
+ Version: 1.8.0
4
4
  Summary: Writing of coastlines, borders and rivers to images in Python
5
- Home-page: UNKNOWN
6
5
  Author: Esben S. Nielsen
7
6
  Author-email: esn@dmi.dk
8
- License: UNKNOWN
9
- Platform: UNKNOWN
7
+ License: Apache-2.0
10
8
  Classifier: Development Status :: 5 - Production/Stable
11
- Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
12
9
  Classifier: Programming Language :: Python
13
10
  Classifier: Operating System :: OS Independent
14
11
  Classifier: Intended Audience :: Science/Research
15
12
  Classifier: Topic :: Scientific/Engineering
16
13
  Requires-Python: >3.9
14
+ License-File: LICENSE.txt
15
+ Requires-Dist: aggdraw
16
+ Requires-Dist: pyshp
17
+ Requires-Dist: numpy
18
+ Requires-Dist: pyproj
19
+ Requires-Dist: pillow
17
20
  Provides-Extra: docs
21
+ Requires-Dist: sphinx; extra == "docs"
22
+ Requires-Dist: pyresample; extra == "docs"
23
+ Requires-Dist: pytest; extra == "docs"
24
+ Requires-Dist: pytest-lazy-fixtures; extra == "docs"
25
+ Requires-Dist: sphinx_rtd_theme; extra == "docs"
26
+ Requires-Dist: sphinxcontrib-apidoc; extra == "docs"
18
27
  Provides-Extra: tests
19
- License-File: LICENSE.txt
20
- License-File: AUTHORS.md
28
+ Requires-Dist: pyresample; extra == "tests"
29
+ Requires-Dist: pytest; extra == "tests"
30
+ Requires-Dist: pytest-cov; extra == "tests"
31
+ Requires-Dist: coverage; extra == "tests"
32
+ Requires-Dist: coveralls; extra == "tests"
33
+ Requires-Dist: pytest-lazy-fixtures; extra == "tests"
34
+ Dynamic: author
35
+ Dynamic: author-email
36
+ Dynamic: classifier
37
+ Dynamic: description
38
+ Dynamic: license
39
+ Dynamic: license-file
40
+ Dynamic: provides-extra
41
+ Dynamic: requires-dist
42
+ Dynamic: requires-python
43
+ Dynamic: summary
21
44
 
22
45
  PyCoast
23
46
  =======
@@ -66,4 +89,19 @@ Example
66
89
  >>> cw.add_borders(img, area_def, outline=(255, 0, 0))
67
90
  >>> img.show()
68
91
 
92
+ License
93
+ -------
94
+
95
+ Copyright 2011 Pycoast developers
96
+
97
+ Licensed under the Apache License, Version 2.0 (the "License");
98
+ you may not use these files except in compliance with the License.
99
+ You may obtain a copy of the License at
100
+
101
+ http://www.apache.org/licenses/LICENSE-2.0
69
102
 
103
+ Unless required by applicable law or agreed to in writing, software
104
+ distributed under the License is distributed on an "AS IS" BASIS,
105
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
106
+ See the License for the specific language governing permissions and
107
+ limitations under the License.
@@ -44,3 +44,20 @@ Example
44
44
  >>> cw.add_rivers(img, area_def, level=5, outline='blue')
45
45
  >>> cw.add_borders(img, area_def, outline=(255, 0, 0))
46
46
  >>> img.show()
47
+
48
+ License
49
+ -------
50
+
51
+ Copyright 2011 Pycoast developers
52
+
53
+ Licensed under the Apache License, Version 2.0 (the "License");
54
+ you may not use these files except in compliance with the License.
55
+ You may obtain a copy of the License at
56
+
57
+ http://www.apache.org/licenses/LICENSE-2.0
58
+
59
+ Unless required by applicable law or agreed to in writing, software
60
+ distributed under the License is distributed on an "AS IS" BASIS,
61
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
62
+ See the License for the specific language governing permissions and
63
+ limitations under the License.
@@ -11,6 +11,7 @@
11
11
  # All configuration values have a default; values that are commented out
12
12
  # serve to show the default.
13
13
  """Sphinx configuration file for generating package documentation."""
14
+
14
15
  from __future__ import annotations
15
16
 
16
17
  import os
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding: utf-8 -*-
3
3
  """Pycoast package for adding geographic-based decorations to images."""
4
+
4
5
  from pycoast.cw_base import get_resolution_from_area # noqa
5
6
 
6
7
  from .cw_agg import ContourWriterAGG # noqa
@@ -1,21 +1,3 @@
1
- #!/usr/bin/env python
2
- # -*- coding: utf-8 -*-
3
- # pycoast, Writing of coastlines, borders and rivers to images in Python
4
- #
5
- # Copyright (C) 2011-2020 PyCoast Developers
6
- #
7
- # This program is free software: you can redistribute it and/or modify
8
- # it under the terms of the GNU General Public License as published by
9
- # the Free Software Foundation, either version 3 of the License, or
10
- # (at your option) any later version.
11
- #
12
- # This program is distributed in the hope that it will be useful,
13
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- # GNU General Public License for more details.
16
- #
17
- # You should have received a copy of the GNU General Public License
18
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
1
  """ContourWriter based on the aggdraw library."""
20
2
 
21
3
  import logging
@@ -133,8 +115,8 @@ class ContourWriterAGG(ContourWriterBase):
133
115
  outline_opacity = kwargs.get("outline_opacity", 255)
134
116
 
135
117
  # draw '|'
136
- (x_bm, y_bm) = (x, y - half_ptsize) # bottom middle point
137
- (x_tm, y_tm) = (x, y + half_ptsize) # top middle point
118
+ x_bm, y_bm = (x, y - half_ptsize) # bottom middle point
119
+ x_tm, y_tm = (x, y + half_ptsize) # top middle point
138
120
  self._draw_line(
139
121
  draw,
140
122
  [x_bm, y_bm, x_tm, y_tm],
@@ -143,8 +125,8 @@ class ContourWriterAGG(ContourWriterBase):
143
125
  outline_opacity=outline_opacity,
144
126
  )
145
127
  # draw '-'
146
- (x_lm, y_lm) = (x - half_ptsize, y) # left middle point
147
- (x_rm, y_rm) = (x + half_ptsize, y) # right middle point
128
+ x_lm, y_lm = (x - half_ptsize, y) # left middle point
129
+ x_rm, y_rm = (x + half_ptsize, y) # right middle point
148
130
  self._draw_line(
149
131
  draw,
150
132
  [x_lm, y_lm, x_rm, y_rm],
@@ -153,8 +135,8 @@ class ContourWriterAGG(ContourWriterBase):
153
135
  outline_opacity=outline_opacity,
154
136
  )
155
137
  # draw '/'
156
- (x_bl, y_bl) = (x - half_ptsize, y - half_ptsize) # bottom left point
157
- (x_tr, y_tr) = (x + half_ptsize, y + half_ptsize) # top right point
138
+ x_bl, y_bl = (x - half_ptsize, y - half_ptsize) # bottom left point
139
+ x_tr, y_tr = (x + half_ptsize, y + half_ptsize) # top right point
158
140
  self._draw_line(
159
141
  draw,
160
142
  [x_bl, y_bl, x_tr, y_tr],
@@ -163,8 +145,8 @@ class ContourWriterAGG(ContourWriterBase):
163
145
  outline_opacity=outline_opacity,
164
146
  )
165
147
  # draw '\'
166
- (x_tl, y_tl) = (x - half_ptsize, y + half_ptsize) # top left point
167
- (x_br, y_br) = (x + half_ptsize, y - half_ptsize) # bottom right point
148
+ x_tl, y_tl = (x - half_ptsize, y + half_ptsize) # top left point
149
+ x_br, y_br = (x + half_ptsize, y - half_ptsize) # bottom right point
168
150
  self._draw_line(
169
151
  draw,
170
152
  [x_tl, y_tl, x_br, y_br],
@@ -1,22 +1,5 @@
1
- #!/usr/bin/env python
2
- # -*- coding: utf-8 -*-
3
- # pycoast, Writing of coastlines, borders and rivers to images in Python
4
- #
5
- # Copyright (C) 2011-2022 PyCoast Developers
6
- #
7
- # This program is free software: you can redistribute it and/or modify
8
- # it under the terms of the GNU General Public License as published by
9
- # the Free Software Foundation, either version 3 of the License, or
10
- # (at your option) any later version.
11
- #
12
- # This program is distributed in the hope that it will be useful,
13
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- # GNU General Public License for more details.
16
- #
17
- # You should have received a copy of the GNU General Public License
18
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
1
  """Base class for contour writers."""
2
+
20
3
  from __future__ import annotations
21
4
 
22
5
  import ast
@@ -26,6 +9,7 @@ import json
26
9
  import logging
27
10
  import math
28
11
  import os
12
+ from pathlib import Path
29
13
  from typing import Generator
30
14
 
31
15
  import numpy as np
@@ -501,11 +485,11 @@ class ContourWriterBase(object):
501
485
  return overlays
502
486
 
503
487
  def add_overlay_from_dict(self, overlays, area_def, cache_epoch=None, background=None):
504
- """Create and return a transparent image adding all the overlays contained in the `overlays` dict.
488
+ """Create and return a transparent image adding all the overlays contained in the ``overlays`` dict.
505
489
 
506
490
  Optionally caches overlay results for faster rendering of images with
507
491
  the same provided AreaDefinition and parameters. Cached results are
508
- identified by hashing the AreaDefinition and the overlays dictionary.
492
+ identified by hashing the AreaDefinition and the ``overlays`` dictionary.
509
493
 
510
494
  Note that if ``background`` is provided and caching is not used, the
511
495
  result will be the final result of applying the overlays onto the
@@ -530,24 +514,33 @@ class ContourWriterBase(object):
530
514
  provided dictionary (see below).
531
515
  background: pillow image instance
532
516
  The image on which to write the overlays on. If it's None (default),
533
- a new image is created, otherwise the provide background is
517
+ a new image is created, otherwise the provided background is
534
518
  used and changed *in place*.
535
519
 
520
+ The keys in ``overlays`` that will be taken into account are:
521
+ cache, coasts, rivers, borders, shapefiles, grid, cities, points
522
+
523
+ For all of them except ``cache``, the items are the same as the
524
+ corresponding functions in pycoast, so refer to the docstrings of
525
+ these functions (add_coastlines, add_rivers, add_borders,
526
+ add_shapefile_shapes, add_grid, add_cities, add_points).
527
+ For cache, two parameters are configurable:
536
528
 
537
- The keys in `overlays` that will be taken into account are:
538
- cache, coasts, rivers, borders, shapefiles, grid, cities, points
529
+ - `file`:
530
+ specify the directory and the prefix
531
+ of the file to save the caches decoration to (for example
532
+ /var/run/black_coasts_red_borders)
533
+ - `regenerate`:
534
+ True or False (default) to force the overwriting
535
+ of an already cached file.
539
536
 
540
- For all of them except `cache`, the items are the same as the
541
- corresponding functions in pycoast, so refer to the docstrings of
542
- these functions (add_coastlines, add_rivers, add_borders,
543
- add_shapefile_shapes, add_grid, add_cities, add_points).
544
- For cache, two parameters are configurable:
537
+ :Returns: PIL.Image.Image
545
538
 
546
- - `file`: specify the directory and the prefix
547
- of the file to save the caches decoration to (for example
548
- /var/run/black_coasts_red_borders)
549
- - `regenerate`: True or False (default) to force the overwriting
550
- of an already cached file.
539
+ Resulting overlays as an Image object. If caching was used then
540
+ the Image wraps an open file and should be closed by the caller.
541
+ If caching was not used or the cached image was recreated then
542
+ this is an in-memory Image object. Regardless, it can be closed
543
+ by calling the ``.close()`` method of the Image.
551
544
 
552
545
  """
553
546
  overlay_helper = _OverlaysFromDict(self, overlays, area_def, cache_epoch, background)
@@ -556,12 +549,22 @@ class ContourWriterBase(object):
556
549
  def add_overlay_from_config(self, config_file, area_def, background=None):
557
550
  """Create and return a transparent image adding all the overlays contained in a configuration file.
558
551
 
552
+ See :meth:`add_overlay_from_dict` for more information.
553
+
559
554
  :Parameters:
560
555
  config_file : str
561
556
  Configuration file name
562
557
  area_def : object
563
558
  Area Definition of the creating image
564
559
 
560
+ :Returns: PIL.Image.Image
561
+
562
+ Resulting overlays as an Image object. If caching was used then
563
+ the Image wraps an open file and should be closed by the caller.
564
+ If caching was not used or the cached image was recreated then
565
+ this is an in-memory Image object. Regardless, it can be closed
566
+ by calling the ``.close()`` method of the Image.
567
+
565
568
  """
566
569
  overlays = self._config_to_dict(config_file)
567
570
  return self.add_overlay_from_dict(overlays, area_def, os.path.getmtime(config_file), background)
@@ -705,8 +708,7 @@ class ContourWriterBase(object):
705
708
  # cities.red is a reduced version of the files avalable at http://download.geonames.org
706
709
  # Fields: 0=name (UTF-8), 1=asciiname, 2=longitude [°E], 3=latitude [°N], 4=countrycode
707
710
  cities_filename = os.path.join(db_root_path, os.path.join("CITIES", "cities.txt"))
708
- cities_parser = GeoNamesCitiesParser(cities_filename)
709
- for city_name, lon, lat in cities_parser.iter_cities_names_lon_lat(cities_list):
711
+ for city_name, lon, lat in iter_cities_names_lon_lat(cities_filename, cities_list):
710
712
  try:
711
713
  x, y = area_def.get_array_indices_from_lonlat(lon, lat)
712
714
  except ValueError:
@@ -1132,14 +1134,12 @@ def _get_pixel_index(shape, area_extent, x_size, y_size, prj, x_offset=0, y_offs
1132
1134
  return index_arrays, is_reduced
1133
1135
 
1134
1136
 
1135
- class GeoNamesCitiesParser:
1136
- """Helper for parsing citiesN.txt files from GeoNames.org."""
1137
-
1138
- def __init__(self, cities_filename: str):
1139
- self._cities_file = open(cities_filename, mode="r", encoding="utf-8")
1140
-
1141
- def iter_cities_names_lon_lat(self, cities_list: list[str]) -> Generator[tuple[str, float, float], None, None]:
1142
- for city_row in self._cities_file:
1137
+ def iter_cities_names_lon_lat(
1138
+ cities_filename: str | Path, cities_list: list[str]
1139
+ ) -> Generator[tuple[str, float, float], None, None]:
1140
+ """Iterate over citiesN.txt files from GeoNames.org."""
1141
+ with open(cities_filename, mode="r", encoding="utf-8") as cities_file:
1142
+ for city_row in cities_file:
1143
1143
  city_info = city_row.split("\t")
1144
1144
  if not city_info or not (city_info[1] in cities_list or city_info[2] in cities_list):
1145
1145
  continue
@@ -1441,7 +1441,7 @@ class _OverlaysFromDict:
1441
1441
  def _apply_cached_foreground_on_background(background, foreground):
1442
1442
  premult_foreground = foreground.convert("RGBa")
1443
1443
  if background.mode == "RGBA":
1444
- # Cached foreground and background are both RGBA, not extra conversions needed
1444
+ # Cached foreground and background are both RGBA, no extra conversions needed
1445
1445
  background.paste(premult_foreground, mask=premult_foreground)
1446
1446
  return
1447
1447
  background_rgba = background.convert("RGBA")
@@ -1521,7 +1521,7 @@ class _GridDrawer:
1521
1521
  min_lons[min_lons > 180] = min_lons[min_lons > 180] - 360
1522
1522
 
1523
1523
  # Get min_lons not in maj_lons
1524
- min_lons = np.lib.arraysetops.setdiff1d(min_lons, maj_lons)
1524
+ min_lons = np.setdiff1d(min_lons, maj_lons)
1525
1525
 
1526
1526
  # lats along major lon lines
1527
1527
  lin_lats = np.arange(
@@ -1542,7 +1542,7 @@ class _GridDrawer:
1542
1542
  min_lats = np.arange(round_lat_min + increase_min_lat, lat_max - shorten_max_lat, dlat)
1543
1543
 
1544
1544
  # Get min_lats not in maj_lats
1545
- min_lats = np.lib.arraysetops.setdiff1d(min_lats, maj_lats)
1545
+ min_lats = np.setdiff1d(min_lats, maj_lats)
1546
1546
 
1547
1547
  # lons along major lat lines (extended slightly to avoid missing the end)
1548
1548
  lin_lons = np.linspace(lon_min, lon_max + Dlon / 5.0, max(self._x_size, self._y_size) // 5)
@@ -1,21 +1,3 @@
1
- #!/usr/bin/env python
2
- # -*- coding: utf-8 -*-
3
- # pycoast, Writing of coastlines, borders, and rivers to images in Python
4
- #
5
- # Copyright (C) 2011-2020 PyCoast Developers
6
- #
7
- # This program is free software: you can redistribute it and/or modify
8
- # it under the terms of the GNU General Public License as published by
9
- # the Free Software Foundation, either version 3 of the License, or
10
- # (at your option) any later version.
11
- #
12
- # This program is distributed in the hope that it will be useful,
13
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- # GNU General Public License for more details.
16
- #
17
- # You should have received a copy of the GNU General Public License
18
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
1
  """PIL-based ContourWriter."""
20
2
 
21
3
  import logging
@@ -89,23 +71,23 @@ class ContourWriterPIL(ContourWriterBase):
89
71
  outline = kwargs.get("outline", "white")
90
72
 
91
73
  # draw '|'
92
- (x_bm, y_bm) = (x, y - half_ptsize) # bottom middle point
93
- (x_tm, y_tm) = (x, y + half_ptsize) # top middle point
74
+ x_bm, y_bm = (x, y - half_ptsize) # bottom middle point
75
+ x_tm, y_tm = (x, y + half_ptsize) # top middle point
94
76
  self._draw_line(draw, [x_bm, y_bm, x_tm, y_tm], outline=outline)
95
77
 
96
78
  # draw '-'
97
- (x_lm, y_lm) = (x - half_ptsize, y) # left middle point
98
- (x_rm, y_rm) = (x + half_ptsize, y) # right middle point
79
+ x_lm, y_lm = (x - half_ptsize, y) # left middle point
80
+ x_rm, y_rm = (x + half_ptsize, y) # right middle point
99
81
  self._draw_line(draw, [x_lm, y_lm, x_rm, y_rm], outline=outline)
100
82
 
101
83
  # draw '/'
102
- (x_bl, y_bl) = (x - half_ptsize, y - half_ptsize) # bottom left point
103
- (x_tr, y_tr) = (x + half_ptsize, y + half_ptsize) # top right point
84
+ x_bl, y_bl = (x - half_ptsize, y - half_ptsize) # bottom left point
85
+ x_tr, y_tr = (x + half_ptsize, y + half_ptsize) # top right point
104
86
  self._draw_line(draw, [x_bl, y_bl, x_tr, y_tr], outline=outline)
105
87
 
106
88
  # draw '\'
107
- (x_tl, y_tl) = (x - half_ptsize, y + half_ptsize) # top left point
108
- (x_br, y_br) = (x + half_ptsize, y - half_ptsize) # bottom right point
89
+ x_tl, y_tl = (x - half_ptsize, y + half_ptsize) # top left point
90
+ x_br, y_br = (x + half_ptsize, y - half_ptsize) # bottom right point
109
91
  self._draw_line(draw, [x_tl, y_tl, x_br, y_br], outline=outline)
110
92
 
111
93
  def add_shapefile_shapes(
@@ -0,0 +1 @@
1
+ """Pycoast unit tests."""