libgd-gis 0.1.0 → 0.1.2
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.
- checksums.yaml +4 -4
- data/examples/a-world_peaks.rb +42 -0
- data/examples/fonts/DejaVu Fonts License.txt +97 -0
- data/examples/fonts/DejaVuSans-Bold.ttf +0 -0
- data/examples/fonts/DejaVuSans-BoldOblique.ttf +0 -0
- data/examples/fonts/DejaVuSans-ExtraLight.ttf +0 -0
- data/examples/fonts/DejaVuSans-Oblique.ttf +0 -0
- data/examples/fonts/DejaVuSans.ttf +0 -0
- data/examples/fonts/DejaVuSansCondensed-Bold.ttf +0 -0
- data/examples/fonts/DejaVuSansCondensed-BoldOblique.ttf +0 -0
- data/examples/fonts/DejaVuSansCondensed-Oblique.ttf +0 -0
- data/examples/fonts/DejaVuSansCondensed.ttf +0 -0
- data/examples/montanas.rb +118 -0
- data/examples/output/world_peaks-s.png +0 -0
- data/examples/output/world_peaks.png +0 -0
- data/examples/peak.png +0 -0
- data/examples/picks.json +50 -0
- data/examples/tmp/tiles/4_0_13.png +0 -0
- data/examples/tmp/tiles/4_0_14.png +0 -0
- data/examples/tmp/tiles/4_0_15.png +0 -0
- data/examples/tmp/tiles/4_0_3.png +0 -0
- data/examples/tmp/tiles/4_0_4.png +0 -0
- data/examples/tmp/tiles/4_0_5.png +0 -0
- data/examples/tmp/tiles/4_0_8.png +0 -0
- data/examples/tmp/tiles/4_10_1.png +0 -0
- data/examples/tmp/tiles/4_10_11.png +0 -0
- data/examples/tmp/tiles/4_10_12.png +0 -0
- data/examples/tmp/tiles/4_10_13.png +0 -0
- data/examples/tmp/tiles/4_10_14.png +0 -0
- data/examples/tmp/tiles/4_10_15.png +0 -0
- data/examples/tmp/tiles/4_10_2.png +0 -0
- data/examples/tmp/tiles/4_10_3.png +0 -0
- data/examples/tmp/tiles/4_10_4.png +0 -0
- data/examples/tmp/tiles/4_10_5.png +0 -0
- data/examples/tmp/tiles/4_10_6.png +0 -0
- data/examples/tmp/tiles/4_10_7.png +0 -0
- data/examples/tmp/tiles/4_10_8.png +0 -0
- data/examples/tmp/tiles/4_10_9.png +0 -0
- data/examples/tmp/tiles/4_11_1.png +0 -0
- data/examples/tmp/tiles/4_11_10.png +0 -0
- data/examples/tmp/tiles/4_11_12.png +0 -0
- data/examples/tmp/tiles/4_11_13.png +0 -0
- data/examples/tmp/tiles/4_11_14.png +0 -0
- data/examples/tmp/tiles/4_11_15.png +0 -0
- data/examples/tmp/tiles/4_11_2.png +0 -0
- data/examples/tmp/tiles/4_11_3.png +0 -0
- data/examples/tmp/tiles/4_11_4.png +0 -0
- data/examples/tmp/tiles/4_11_5.png +0 -0
- data/examples/tmp/tiles/4_11_6.png +0 -0
- data/examples/tmp/tiles/4_11_7.png +0 -0
- data/examples/tmp/tiles/4_12_1.png +0 -0
- data/examples/tmp/tiles/4_12_11.png +0 -0
- data/examples/tmp/tiles/4_12_12.png +0 -0
- data/examples/tmp/tiles/4_12_13.png +0 -0
- data/examples/tmp/tiles/4_12_14.png +0 -0
- data/examples/tmp/tiles/4_12_15.png +0 -0
- data/examples/tmp/tiles/4_12_2.png +0 -0
- data/examples/tmp/tiles/4_12_3.png +0 -0
- data/examples/tmp/tiles/4_12_4.png +0 -0
- data/examples/tmp/tiles/4_12_5.png +0 -0
- data/examples/tmp/tiles/4_12_6.png +0 -0
- data/examples/tmp/tiles/4_12_7.png +0 -0
- data/examples/tmp/tiles/4_12_8.png +0 -0
- data/examples/tmp/tiles/4_13_11.png +0 -0
- data/examples/tmp/tiles/4_13_12.png +0 -0
- data/examples/tmp/tiles/4_13_13.png +0 -0
- data/examples/tmp/tiles/4_13_14.png +0 -0
- data/examples/tmp/tiles/4_13_15.png +0 -0
- data/examples/tmp/tiles/4_13_2.png +0 -0
- data/examples/tmp/tiles/4_13_3.png +0 -0
- data/examples/tmp/tiles/4_13_4.png +0 -0
- data/examples/tmp/tiles/4_13_5.png +0 -0
- data/examples/tmp/tiles/4_13_6.png +0 -0
- data/examples/tmp/tiles/4_13_7.png +0 -0
- data/examples/tmp/tiles/4_13_8.png +0 -0
- data/examples/tmp/tiles/4_13_9.png +0 -0
- data/examples/tmp/tiles/4_14_10.png +0 -0
- data/examples/tmp/tiles/4_14_11.png +0 -0
- data/examples/tmp/tiles/4_14_12.png +0 -0
- data/examples/tmp/tiles/4_14_13.png +0 -0
- data/examples/tmp/tiles/4_14_14.png +0 -0
- data/examples/tmp/tiles/4_14_15.png +0 -0
- data/examples/tmp/tiles/4_14_2.png +0 -0
- data/examples/tmp/tiles/4_14_3.png +0 -0
- data/examples/tmp/tiles/4_14_4.png +0 -0
- data/examples/tmp/tiles/4_14_5.png +0 -0
- data/examples/tmp/tiles/4_14_6.png +0 -0
- data/examples/tmp/tiles/4_14_8.png +0 -0
- data/examples/tmp/tiles/4_14_9.png +0 -0
- data/examples/tmp/tiles/4_15_10.png +0 -0
- data/examples/tmp/tiles/4_15_12.png +0 -0
- data/examples/tmp/tiles/4_15_13.png +0 -0
- data/examples/tmp/tiles/4_15_14.png +0 -0
- data/examples/tmp/tiles/4_15_15.png +0 -0
- data/examples/tmp/tiles/4_15_3.png +0 -0
- data/examples/tmp/tiles/4_15_4.png +0 -0
- data/examples/tmp/tiles/4_15_5.png +0 -0
- data/examples/tmp/tiles/4_15_8.png +0 -0
- data/examples/tmp/tiles/4_15_9.png +0 -0
- data/examples/tmp/tiles/4_1_13.png +0 -0
- data/examples/tmp/tiles/4_1_14.png +0 -0
- data/examples/tmp/tiles/4_1_15.png +0 -0
- data/examples/tmp/tiles/4_1_3.png +0 -0
- data/examples/tmp/tiles/4_1_4.png +0 -0
- data/examples/tmp/tiles/4_1_7.png +0 -0
- data/examples/tmp/tiles/4_2_0.png +0 -0
- data/examples/tmp/tiles/4_2_1.png +0 -0
- data/examples/tmp/tiles/4_2_10.png +0 -0
- data/examples/tmp/tiles/4_2_11.png +0 -0
- data/examples/tmp/tiles/4_2_12.png +0 -0
- data/examples/tmp/tiles/4_2_13.png +0 -0
- data/examples/tmp/tiles/4_2_14.png +0 -0
- data/examples/tmp/tiles/4_2_15.png +0 -0
- data/examples/tmp/tiles/4_2_2.png +0 -0
- data/examples/tmp/tiles/4_2_3.png +0 -0
- data/examples/tmp/tiles/4_2_4.png +0 -0
- data/examples/tmp/tiles/4_2_5.png +0 -0
- data/examples/tmp/tiles/4_2_6.png +0 -0
- data/examples/tmp/tiles/4_2_7.png +0 -0
- data/examples/tmp/tiles/4_2_8.png +0 -0
- data/examples/tmp/tiles/4_2_9.png +0 -0
- data/examples/tmp/tiles/4_3_0.png +0 -0
- data/examples/tmp/tiles/4_3_1.png +0 -0
- data/examples/tmp/tiles/4_3_10.png +0 -0
- data/examples/tmp/tiles/4_3_11.png +0 -0
- data/examples/tmp/tiles/4_3_12.png +0 -0
- data/examples/tmp/tiles/4_3_13.png +0 -0
- data/examples/tmp/tiles/4_3_14.png +0 -0
- data/examples/tmp/tiles/4_3_15.png +0 -0
- data/examples/tmp/tiles/4_3_2.png +0 -0
- data/examples/tmp/tiles/4_3_3.png +0 -0
- data/examples/tmp/tiles/4_3_4.png +0 -0
- data/examples/tmp/tiles/4_3_5.png +0 -0
- data/examples/tmp/tiles/4_3_6.png +0 -0
- data/examples/tmp/tiles/4_3_7.png +0 -0
- data/examples/tmp/tiles/4_3_8.png +0 -0
- data/examples/tmp/tiles/4_3_9.png +0 -0
- data/examples/tmp/tiles/4_4_0.png +0 -0
- data/examples/tmp/tiles/4_4_1.png +0 -0
- data/examples/tmp/tiles/4_4_10.png +0 -0
- data/examples/tmp/tiles/4_4_11.png +0 -0
- data/examples/tmp/tiles/4_4_12.png +0 -0
- data/examples/tmp/tiles/4_4_13.png +0 -0
- data/examples/tmp/tiles/4_4_14.png +0 -0
- data/examples/tmp/tiles/4_4_15.png +0 -0
- data/examples/tmp/tiles/4_4_2.png +0 -0
- data/examples/tmp/tiles/4_4_3.png +0 -0
- data/examples/tmp/tiles/4_4_4.png +0 -0
- data/examples/tmp/tiles/4_4_5.png +0 -0
- data/examples/tmp/tiles/4_4_6.png +0 -0
- data/examples/tmp/tiles/4_4_7.png +0 -0
- data/examples/tmp/tiles/4_4_8.png +0 -0
- data/examples/tmp/tiles/4_4_9.png +0 -0
- data/examples/tmp/tiles/4_5_0.png +0 -0
- data/examples/tmp/tiles/4_5_1.png +0 -0
- data/examples/tmp/tiles/4_5_10.png +0 -0
- data/examples/tmp/tiles/4_5_11.png +0 -0
- data/examples/tmp/tiles/4_5_12.png +0 -0
- data/examples/tmp/tiles/4_5_13.png +0 -0
- data/examples/tmp/tiles/4_5_14.png +0 -0
- data/examples/tmp/tiles/4_5_15.png +0 -0
- data/examples/tmp/tiles/4_5_2.png +0 -0
- data/examples/tmp/tiles/4_5_3.png +0 -0
- data/examples/tmp/tiles/4_5_4.png +0 -0
- data/examples/tmp/tiles/4_5_5.png +0 -0
- data/examples/tmp/tiles/4_5_6.png +0 -0
- data/examples/tmp/tiles/4_5_7.png +0 -0
- data/examples/tmp/tiles/4_5_8.png +0 -0
- data/examples/tmp/tiles/4_5_9.png +0 -0
- data/examples/tmp/tiles/4_6_0.png +0 -0
- data/examples/tmp/tiles/4_6_1.png +0 -0
- data/examples/tmp/tiles/4_6_10.png +0 -0
- data/examples/tmp/tiles/4_6_11.png +0 -0
- data/examples/tmp/tiles/4_6_12.png +0 -0
- data/examples/tmp/tiles/4_6_13.png +0 -0
- data/examples/tmp/tiles/4_6_14.png +0 -0
- data/examples/tmp/tiles/4_6_15.png +0 -0
- data/examples/tmp/tiles/4_6_2.png +0 -0
- data/examples/tmp/tiles/4_6_3.png +0 -0
- data/examples/tmp/tiles/4_6_4.png +0 -0
- data/examples/tmp/tiles/4_6_5.png +0 -0
- data/examples/tmp/tiles/4_6_6.png +0 -0
- data/examples/tmp/tiles/4_6_7.png +0 -0
- data/examples/tmp/tiles/4_6_8.png +0 -0
- data/examples/tmp/tiles/4_6_9.png +0 -0
- data/examples/tmp/tiles/4_7_0.png +0 -0
- data/examples/tmp/tiles/4_7_1.png +0 -0
- data/examples/tmp/tiles/4_7_10.png +0 -0
- data/examples/tmp/tiles/4_7_11.png +0 -0
- data/examples/tmp/tiles/4_7_12.png +0 -0
- data/examples/tmp/tiles/4_7_13.png +0 -0
- data/examples/tmp/tiles/4_7_14.png +0 -0
- data/examples/tmp/tiles/4_7_15.png +0 -0
- data/examples/tmp/tiles/4_7_2.png +0 -0
- data/examples/tmp/tiles/4_7_3.png +0 -0
- data/examples/tmp/tiles/4_7_4.png +0 -0
- data/examples/tmp/tiles/4_7_5.png +0 -0
- data/examples/tmp/tiles/4_7_6.png +0 -0
- data/examples/tmp/tiles/4_7_7.png +0 -0
- data/examples/tmp/tiles/4_7_8.png +0 -0
- data/examples/tmp/tiles/4_7_9.png +0 -0
- data/examples/tmp/tiles/4_8_0.png +0 -0
- data/examples/tmp/tiles/4_8_1.png +0 -0
- data/examples/tmp/tiles/4_8_10.png +0 -0
- data/examples/tmp/tiles/4_8_11.png +0 -0
- data/examples/tmp/tiles/4_8_12.png +0 -0
- data/examples/tmp/tiles/4_8_13.png +0 -0
- data/examples/tmp/tiles/4_8_14.png +0 -0
- data/examples/tmp/tiles/4_8_15.png +0 -0
- data/examples/tmp/tiles/4_8_2.png +0 -0
- data/examples/tmp/tiles/4_8_3.png +0 -0
- data/examples/tmp/tiles/4_8_4.png +0 -0
- data/examples/tmp/tiles/4_8_5.png +0 -0
- data/examples/tmp/tiles/4_8_6.png +0 -0
- data/examples/tmp/tiles/4_8_7.png +0 -0
- data/examples/tmp/tiles/4_8_8.png +0 -0
- data/examples/tmp/tiles/4_8_9.png +0 -0
- data/examples/tmp/tiles/4_9_0.png +0 -0
- data/examples/tmp/tiles/4_9_1.png +0 -0
- data/examples/tmp/tiles/4_9_10.png +0 -0
- data/examples/tmp/tiles/4_9_11.png +0 -0
- data/examples/tmp/tiles/4_9_12.png +0 -0
- data/examples/tmp/tiles/4_9_13.png +0 -0
- data/examples/tmp/tiles/4_9_14.png +0 -0
- data/examples/tmp/tiles/4_9_15.png +0 -0
- data/examples/tmp/tiles/4_9_2.png +0 -0
- data/examples/tmp/tiles/4_9_3.png +0 -0
- data/examples/tmp/tiles/4_9_4.png +0 -0
- data/examples/tmp/tiles/4_9_5.png +0 -0
- data/examples/tmp/tiles/4_9_6.png +0 -0
- data/examples/tmp/tiles/4_9_7.png +0 -0
- data/examples/tmp/tiles/4_9_8.png +0 -0
- data/examples/tmp/tiles/4_9_9.png +0 -0
- data/lib/gd/gis/basemap.rb +12 -2
- data/lib/gd/gis/layer_points.rb +29 -3
- data/lib/gd/gis/map.rb +23 -3
- metadata +283 -204
- data/examples/tmp/tiles/7_27_43.png +0 -0
- data/examples/tmp/tiles/7_27_44.png +0 -0
- data/examples/tmp/tiles/7_27_45.png +0 -0
- data/examples/tmp/tiles/7_27_46.png +0 -0
- data/examples/tmp/tiles/7_27_47.png +0 -0
- data/examples/tmp/tiles/7_27_48.png +0 -0
- data/examples/tmp/tiles/7_27_49.png +0 -0
- data/examples/tmp/tiles/7_27_50.png +0 -0
- data/examples/tmp/tiles/7_28_43.png +0 -0
- data/examples/tmp/tiles/7_28_44.png +0 -0
- data/examples/tmp/tiles/7_28_45.png +0 -0
- data/examples/tmp/tiles/7_28_46.png +0 -0
- data/examples/tmp/tiles/7_28_47.png +0 -0
- data/examples/tmp/tiles/7_28_48.png +0 -0
- data/examples/tmp/tiles/7_28_49.png +0 -0
- data/examples/tmp/tiles/7_28_50.png +0 -0
- data/examples/tmp/tiles/7_29_43.png +0 -0
- data/examples/tmp/tiles/7_29_44.png +0 -0
- data/examples/tmp/tiles/7_29_45.png +0 -0
- data/examples/tmp/tiles/7_29_46.png +0 -0
- data/examples/tmp/tiles/7_29_47.png +0 -0
- data/examples/tmp/tiles/7_29_48.png +0 -0
- data/examples/tmp/tiles/7_29_49.png +0 -0
- data/examples/tmp/tiles/7_29_50.png +0 -0
- data/examples/tmp/tiles/7_30_43.png +0 -0
- data/examples/tmp/tiles/7_30_44.png +0 -0
- data/examples/tmp/tiles/7_30_45.png +0 -0
- data/examples/tmp/tiles/7_30_46.png +0 -0
- data/examples/tmp/tiles/7_30_47.png +0 -0
- data/examples/tmp/tiles/7_30_48.png +0 -0
- data/examples/tmp/tiles/7_30_49.png +0 -0
- data/examples/tmp/tiles/7_30_50.png +0 -0
- data/examples/tmp/tiles/7_31_43.png +0 -0
- data/examples/tmp/tiles/7_31_44.png +0 -0
- data/examples/tmp/tiles/7_31_45.png +0 -0
- data/examples/tmp/tiles/7_31_46.png +0 -0
- data/examples/tmp/tiles/7_31_47.png +0 -0
- data/examples/tmp/tiles/7_31_48.png +0 -0
- data/examples/tmp/tiles/7_31_49.png +0 -0
- data/examples/tmp/tiles/7_31_50.png +0 -0
- data/examples/tmp/tiles/7_32_43.png +0 -0
- data/examples/tmp/tiles/7_32_44.png +0 -0
- data/examples/tmp/tiles/7_32_45.png +0 -0
- data/examples/tmp/tiles/7_32_46.png +0 -0
- data/examples/tmp/tiles/7_32_47.png +0 -0
- data/examples/tmp/tiles/7_32_48.png +0 -0
- data/examples/tmp/tiles/7_32_49.png +0 -0
- data/examples/tmp/tiles/7_32_50.png +0 -0
- data/examples/tmp/tiles/7_37_78.png +0 -0
- data/examples/tmp/tiles/7_37_79.png +0 -0
- data/examples/tmp/tiles/7_37_80.png +0 -0
- data/examples/tmp/tiles/7_37_81.png +0 -0
- data/examples/tmp/tiles/7_37_82.png +0 -0
- data/examples/tmp/tiles/7_37_83.png +0 -0
- data/examples/tmp/tiles/7_37_84.png +0 -0
- data/examples/tmp/tiles/7_37_85.png +0 -0
- data/examples/tmp/tiles/7_37_86.png +0 -0
- data/examples/tmp/tiles/7_38_71.png +0 -0
- data/examples/tmp/tiles/7_38_72.png +0 -0
- data/examples/tmp/tiles/7_38_73.png +0 -0
- data/examples/tmp/tiles/7_38_74.png +0 -0
- data/examples/tmp/tiles/7_38_75.png +0 -0
- data/examples/tmp/tiles/7_38_76.png +0 -0
- data/examples/tmp/tiles/7_38_77.png +0 -0
- data/examples/tmp/tiles/7_38_78.png +0 -0
- data/examples/tmp/tiles/7_38_79.png +0 -0
- data/examples/tmp/tiles/7_38_80.png +0 -0
- data/examples/tmp/tiles/7_38_81.png +0 -0
- data/examples/tmp/tiles/7_38_82.png +0 -0
- data/examples/tmp/tiles/7_38_83.png +0 -0
- data/examples/tmp/tiles/7_38_84.png +0 -0
- data/examples/tmp/tiles/7_38_85.png +0 -0
- data/examples/tmp/tiles/7_38_86.png +0 -0
- data/examples/tmp/tiles/7_38_87.png +0 -0
- data/examples/tmp/tiles/7_39_71.png +0 -0
- data/examples/tmp/tiles/7_39_72.png +0 -0
- data/examples/tmp/tiles/7_39_73.png +0 -0
- data/examples/tmp/tiles/7_39_74.png +0 -0
- data/examples/tmp/tiles/7_39_75.png +0 -0
- data/examples/tmp/tiles/7_39_76.png +0 -0
- data/examples/tmp/tiles/7_39_77.png +0 -0
- data/examples/tmp/tiles/7_39_78.png +0 -0
- data/examples/tmp/tiles/7_39_79.png +0 -0
- data/examples/tmp/tiles/7_39_80.png +0 -0
- data/examples/tmp/tiles/7_39_81.png +0 -0
- data/examples/tmp/tiles/7_39_82.png +0 -0
- data/examples/tmp/tiles/7_39_83.png +0 -0
- data/examples/tmp/tiles/7_39_84.png +0 -0
- data/examples/tmp/tiles/7_39_85.png +0 -0
- data/examples/tmp/tiles/7_39_86.png +0 -0
- data/examples/tmp/tiles/7_39_87.png +0 -0
- data/examples/tmp/tiles/7_40_71.png +0 -0
- data/examples/tmp/tiles/7_40_72.png +0 -0
- data/examples/tmp/tiles/7_40_73.png +0 -0
- data/examples/tmp/tiles/7_40_74.png +0 -0
- data/examples/tmp/tiles/7_40_75.png +0 -0
- data/examples/tmp/tiles/7_40_76.png +0 -0
- data/examples/tmp/tiles/7_40_77.png +0 -0
- data/examples/tmp/tiles/7_40_78.png +0 -0
- data/examples/tmp/tiles/7_40_79.png +0 -0
- data/examples/tmp/tiles/7_40_80.png +0 -0
- data/examples/tmp/tiles/7_40_81.png +0 -0
- data/examples/tmp/tiles/7_40_82.png +0 -0
- data/examples/tmp/tiles/7_40_83.png +0 -0
- data/examples/tmp/tiles/7_40_86.png +0 -0
- data/examples/tmp/tiles/7_40_87.png +0 -0
- data/examples/tmp/tiles/7_41_71.png +0 -0
- data/examples/tmp/tiles/7_41_72.png +0 -0
- data/examples/tmp/tiles/7_41_73.png +0 -0
- data/examples/tmp/tiles/7_41_74.png +0 -0
- data/examples/tmp/tiles/7_41_75.png +0 -0
- data/examples/tmp/tiles/7_41_76.png +0 -0
- data/examples/tmp/tiles/7_41_77.png +0 -0
- data/examples/tmp/tiles/7_41_78.png +0 -0
- data/examples/tmp/tiles/7_41_79.png +0 -0
- data/examples/tmp/tiles/7_41_80.png +0 -0
- data/examples/tmp/tiles/7_41_81.png +0 -0
- data/examples/tmp/tiles/7_41_87.png +0 -0
- data/examples/tmp/tiles/7_42_71.png +0 -0
- data/examples/tmp/tiles/7_42_72.png +0 -0
- data/examples/tmp/tiles/7_42_73.png +0 -0
- data/examples/tmp/tiles/7_42_74.png +0 -0
- data/examples/tmp/tiles/7_42_75.png +0 -0
- data/examples/tmp/tiles/7_42_76.png +0 -0
- data/examples/tmp/tiles/7_42_77.png +0 -0
- data/examples/tmp/tiles/7_42_78.png +0 -0
- data/examples/tmp/tiles/7_42_79.png +0 -0
- data/examples/tmp/tiles/7_42_85.png +0 -0
- data/examples/tmp/tiles/7_43_71.png +0 -0
- data/examples/tmp/tiles/7_43_72.png +0 -0
- data/examples/tmp/tiles/7_43_73.png +0 -0
- data/examples/tmp/tiles/7_43_74.png +0 -0
- data/examples/tmp/tiles/7_43_75.png +0 -0
- data/examples/tmp/tiles/7_43_76.png +0 -0
- data/examples/tmp/tiles/7_43_77.png +0 -0
- data/examples/tmp/tiles/7_43_78.png +0 -0
- data/examples/tmp/tiles/7_43_85.png +0 -0
- data/examples/tmp/tiles/7_44_71.png +0 -0
- data/examples/tmp/tiles/7_44_72.png +0 -0
- data/examples/tmp/tiles/7_44_73.png +0 -0
- data/examples/tmp/tiles/7_44_74.png +0 -0
- data/examples/tmp/tiles/7_44_75.png +0 -0
- data/examples/tmp/tiles/7_44_76.png +0 -0
- data/examples/tmp/tiles/7_44_77.png +0 -0
- data/examples/tmp/tiles/7_75_64.png +0 -0
- data/examples/tmp/tiles/7_75_65.png +0 -0
- data/examples/tmp/tiles/7_75_66.png +0 -0
- data/examples/tmp/tiles/7_75_67.png +0 -0
- data/examples/tmp/tiles/7_75_68.png +0 -0
- data/examples/tmp/tiles/7_76_64.png +0 -0
- data/examples/tmp/tiles/7_76_65.png +0 -0
- data/examples/tmp/tiles/7_76_66.png +0 -0
- data/examples/tmp/tiles/7_76_67.png +0 -0
- data/examples/tmp/tiles/7_76_68.png +0 -0
- data/examples/tmp/tiles/7_77_64.png +0 -0
- data/examples/tmp/tiles/7_77_65.png +0 -0
- data/examples/tmp/tiles/7_77_66.png +0 -0
- data/examples/tmp/tiles/7_77_67.png +0 -0
- data/examples/tmp/tiles/7_77_68.png +0 -0
- /data/examples/tmp/tiles/{7_37_71.png → 4_0_0.png} +0 -0
- /data/examples/tmp/tiles/{7_37_72.png → 4_0_1.png} +0 -0
- /data/examples/tmp/tiles/{7_37_73.png → 4_0_10.png} +0 -0
- /data/examples/tmp/tiles/{7_37_74.png → 4_0_11.png} +0 -0
- /data/examples/tmp/tiles/{7_37_75.png → 4_0_12.png} +0 -0
- /data/examples/tmp/tiles/{7_37_76.png → 4_0_2.png} +0 -0
- /data/examples/tmp/tiles/{7_37_77.png → 4_0_6.png} +0 -0
- /data/examples/tmp/tiles/{7_37_87.png → 4_0_7.png} +0 -0
- /data/examples/tmp/tiles/{7_40_84.png → 4_0_9.png} +0 -0
- /data/examples/tmp/tiles/{7_40_85.png → 4_10_0.png} +0 -0
- /data/examples/tmp/tiles/{7_41_82.png → 4_10_10.png} +0 -0
- /data/examples/tmp/tiles/{7_41_83.png → 4_11_0.png} +0 -0
- /data/examples/tmp/tiles/{7_41_84.png → 4_11_11.png} +0 -0
- /data/examples/tmp/tiles/{7_41_85.png → 4_11_8.png} +0 -0
- /data/examples/tmp/tiles/{7_41_86.png → 4_11_9.png} +0 -0
- /data/examples/tmp/tiles/{7_42_80.png → 4_12_0.png} +0 -0
- /data/examples/tmp/tiles/{7_42_81.png → 4_12_10.png} +0 -0
- /data/examples/tmp/tiles/{7_42_82.png → 4_12_9.png} +0 -0
- /data/examples/tmp/tiles/{7_42_83.png → 4_13_0.png} +0 -0
- /data/examples/tmp/tiles/{7_42_84.png → 4_13_1.png} +0 -0
- /data/examples/tmp/tiles/{7_42_86.png → 4_13_10.png} +0 -0
- /data/examples/tmp/tiles/{7_42_87.png → 4_14_0.png} +0 -0
- /data/examples/tmp/tiles/{7_43_79.png → 4_14_1.png} +0 -0
- /data/examples/tmp/tiles/{7_43_80.png → 4_14_7.png} +0 -0
- /data/examples/tmp/tiles/{7_43_81.png → 4_15_0.png} +0 -0
- /data/examples/tmp/tiles/{7_43_82.png → 4_15_1.png} +0 -0
- /data/examples/tmp/tiles/{7_43_83.png → 4_15_11.png} +0 -0
- /data/examples/tmp/tiles/{7_43_84.png → 4_15_2.png} +0 -0
- /data/examples/tmp/tiles/{7_43_86.png → 4_15_6.png} +0 -0
- /data/examples/tmp/tiles/{7_43_87.png → 4_15_7.png} +0 -0
- /data/examples/tmp/tiles/{7_44_78.png → 4_1_0.png} +0 -0
- /data/examples/tmp/tiles/{7_44_79.png → 4_1_1.png} +0 -0
- /data/examples/tmp/tiles/{7_44_80.png → 4_1_10.png} +0 -0
- /data/examples/tmp/tiles/{7_44_81.png → 4_1_11.png} +0 -0
- /data/examples/tmp/tiles/{7_44_82.png → 4_1_12.png} +0 -0
- /data/examples/tmp/tiles/{7_44_83.png → 4_1_2.png} +0 -0
- /data/examples/tmp/tiles/{7_44_84.png → 4_1_5.png} +0 -0
- /data/examples/tmp/tiles/{7_44_85.png → 4_1_6.png} +0 -0
- /data/examples/tmp/tiles/{7_44_86.png → 4_1_8.png} +0 -0
- /data/examples/tmp/tiles/{7_44_87.png → 4_1_9.png} +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/gd/gis/basemap.rb
CHANGED
|
@@ -13,7 +13,7 @@ module GD
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def url(z,x,y)
|
|
16
|
-
"https://
|
|
16
|
+
"https://tile.openstreetmap.org/#{z}/#{x}/#{y}.png"
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
def lon2tile(lon)
|
|
@@ -45,10 +45,20 @@ module GD
|
|
|
45
45
|
path = "tmp/tiles/#{@zoom}_#{x}_#{y}.png"
|
|
46
46
|
unless File.exist?(path)
|
|
47
47
|
uri = URI(url(@zoom,x,y))
|
|
48
|
+
|
|
48
49
|
Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
|
|
49
|
-
|
|
50
|
+
req = Net::HTTP::Get.new(uri)
|
|
51
|
+
req["User-Agent"] = "libgd-gis/0.1 (Ruby)"
|
|
52
|
+
|
|
53
|
+
res = http.request(req)
|
|
54
|
+
|
|
55
|
+
unless res.code == "200"
|
|
56
|
+
raise "Tile fetch failed #{res.code}"
|
|
57
|
+
end
|
|
58
|
+
|
|
50
59
|
File.binwrite(path, res.body)
|
|
51
60
|
end
|
|
61
|
+
|
|
52
62
|
end
|
|
53
63
|
tiles << [x,y,path]
|
|
54
64
|
end
|
data/lib/gd/gis/layer_points.rb
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
module GD
|
|
2
2
|
module GIS
|
|
3
3
|
class PointsLayer
|
|
4
|
-
def initialize(data, lon:, lat:, icon:)
|
|
4
|
+
def initialize(data, lon:, lat:, icon:, label: nil, font: nil, size: 12, color: [0,0,0])
|
|
5
5
|
@data = data
|
|
6
6
|
@lon = lon
|
|
7
7
|
@lat = lat
|
|
8
8
|
@icon = GD::Image.open(icon)
|
|
9
|
+
|
|
10
|
+
@label = label
|
|
11
|
+
@font = font
|
|
12
|
+
@size = size
|
|
13
|
+
@color = color
|
|
14
|
+
|
|
15
|
+
@icon.alpha_blending = true
|
|
16
|
+
@icon.save_alpha = true
|
|
9
17
|
end
|
|
10
18
|
|
|
11
|
-
def render!(img,
|
|
19
|
+
def render!(img, projector)
|
|
12
20
|
w = @icon.width
|
|
13
21
|
h = @icon.height
|
|
14
22
|
|
|
@@ -16,8 +24,26 @@ module GD
|
|
|
16
24
|
lon = @lon.call(row)
|
|
17
25
|
lat = @lat.call(row)
|
|
18
26
|
|
|
19
|
-
x,y =
|
|
27
|
+
x,y = projector.call(lon,lat)
|
|
28
|
+
|
|
29
|
+
# icono
|
|
20
30
|
img.copy(@icon, x - w/2, y - h/2, 0,0,w,h)
|
|
31
|
+
|
|
32
|
+
# etiqueta opcional
|
|
33
|
+
if @label && @font
|
|
34
|
+
text = @label.call(row)
|
|
35
|
+
unless text.nil? || text.strip.empty?
|
|
36
|
+
font_h = @size * 1.1
|
|
37
|
+
|
|
38
|
+
img.text(text,
|
|
39
|
+
x: x + w/2 + 4,
|
|
40
|
+
y: y + font_h/2,
|
|
41
|
+
size: @size,
|
|
42
|
+
color: @color,
|
|
43
|
+
font: @font
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
21
47
|
end
|
|
22
48
|
end
|
|
23
49
|
end
|
data/lib/gd/gis/map.rb
CHANGED
|
@@ -13,13 +13,25 @@ module GD
|
|
|
13
13
|
@layers = []
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
def add_points(data, lon:, lat:, icon:)
|
|
17
|
-
@layers << PointsLayer.new(
|
|
16
|
+
def add_points(data, lon:, lat:, icon:, label: nil, font: nil, size: 12, color: [0,0,0])
|
|
17
|
+
@layers << PointsLayer.new(
|
|
18
|
+
data,
|
|
19
|
+
lon: lon,
|
|
20
|
+
lat: lat,
|
|
21
|
+
icon: icon,
|
|
22
|
+
label: label,
|
|
23
|
+
font: font,
|
|
24
|
+
size: size,
|
|
25
|
+
color: color
|
|
26
|
+
)
|
|
18
27
|
end
|
|
19
28
|
|
|
20
29
|
def render
|
|
21
30
|
tiles, x_min, y_min = @basemap.fetch_tiles
|
|
22
31
|
|
|
32
|
+
x0 = x_min * 256
|
|
33
|
+
y0 = y_min * 256
|
|
34
|
+
|
|
23
35
|
cols = tiles.map{|t| t[0]}.uniq.size
|
|
24
36
|
rows = tiles.map{|t| t[1]}.uniq.size
|
|
25
37
|
|
|
@@ -27,6 +39,8 @@ module GD
|
|
|
27
39
|
height = rows * 256
|
|
28
40
|
|
|
29
41
|
@img = GD::Image.new(width,height)
|
|
42
|
+
@img.alpha_blending = true
|
|
43
|
+
@img.save_alpha = true
|
|
30
44
|
|
|
31
45
|
tiles.each do |x,y,path|
|
|
32
46
|
tile = GD::Image.open(path)
|
|
@@ -42,7 +56,11 @@ module GD
|
|
|
42
56
|
max_y = Projection.mercator_y(@bbox[3])
|
|
43
57
|
|
|
44
58
|
projector = ->(lon,lat) {
|
|
45
|
-
|
|
59
|
+
px = ((lon + 180.0) / 360.0 * (2 ** @zoom) * 256)
|
|
60
|
+
rad = lat * Math::PI / 180.0
|
|
61
|
+
py = ((1 - Math.log(Math.tan(rad) + 1 / Math.cos(rad)) / Math::PI) / 2 * (2 ** @zoom) * 256)
|
|
62
|
+
|
|
63
|
+
[ (px - x0).to_i, (py - y0).to_i ]
|
|
46
64
|
}
|
|
47
65
|
|
|
48
66
|
@layers.each { |l| l.render!(@img, projector) }
|
|
@@ -96,6 +114,8 @@ module GD
|
|
|
96
114
|
|
|
97
115
|
# recortar al tamaño exacto del tile
|
|
98
116
|
img = GD::Image.new(256,256)
|
|
117
|
+
img.alpha_blending = true
|
|
118
|
+
img.save_alpha = true
|
|
99
119
|
img.copy(submap.instance_variable_get(:@img), 0,0,0,0,256,256)
|
|
100
120
|
img
|
|
101
121
|
end
|