libgd-gis 0.1.2 → 0.1.3
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/README.md +78 -31
- data/examples/{a-world_peaks.rb → america-peaks.rb} +4 -4
- data/examples/asia-peaks.rb +42 -0
- data/examples/av_ramirez.rb +34 -0
- data/examples/europe-peaks.rb +42 -0
- data/examples/heladerias.json +47 -0
- data/examples/heladerias.rb +40 -0
- data/examples/ice-cream.jpg +0 -0
- data/examples/ice-cream.png +0 -0
- data/examples/output/america.png +0 -0
- data/examples/output/asia.png +0 -0
- data/examples/output/europe.png +0 -0
- data/examples/output/heladerias_parana.png +0 -0
- data/examples/output/museos_parana.png +0 -0
- data/examples/output/world_peaks-s.png +0 -0
- data/examples/parana_museos.rb +49 -0
- data/examples/street/1.osm +207517 -0
- data/examples/street/av-ramirez.osm +207517 -0
- data/examples/street/av-ramirez.png +0 -0
- data/examples/street/av_ramirez-0.1346843780815251.png +0 -0
- data/examples/street/av_ramirez-3.png +0 -0
- data/examples/street/av_ramirez.png +0 -0
- data/examples/street/av_ramirez.rb +46 -0
- data/examples/street/avramirez.geojson +9 -0
- data/examples/street/dot.png +0 -0
- data/examples/street/download.sh +18 -0
- data/examples/street/draw.rb +46 -0
- data/examples/street/map.osm +9158 -0
- data/examples/street/mark.png +0 -0
- data/examples/street/parana.json +100 -0
- data/examples/street/parana.rb +30 -0
- data/examples/street/parana_areas.png +0 -0
- data/examples/street/query.overpass +8 -0
- data/examples/street/ramirez.geojson +355 -0
- data/examples/street/ramirez_big.geojson +9959 -0
- data/examples/street/ramirez_full.geojson +76 -0
- data/examples/street/ramirez_full.png +0 -0
- data/examples/street/ramirez_gis.png +0 -0
- data/examples/street/ramirez_osm.png +0 -0
- data/examples/street/ramirez_osm_full.png +0 -0
- data/examples/street/ramirez_polyline.png +0 -0
- data/examples/street/ramirez_road.png +0 -0
- data/examples/street/test_carto_dark.png +0 -0
- data/examples/street/test_osm_fr.png +0 -0
- data/examples/street/test_polygon.png +0 -0
- data/examples/street/tmp/tiles/carto_dark_15_10874_19433.png +0 -0
- data/examples/street/tmp/tiles/carto_dark_15_10874_19434.png +0 -0
- data/examples/street/tmp/tiles/carto_dark_15_10874_19435.png +0 -0
- data/examples/street/tmp/tiles/carto_dark_15_10874_19436.png +0 -0
- data/examples/street/tmp/tiles/carto_dark_15_10875_19433.png +0 -0
- data/examples/street/tmp/tiles/carto_dark_15_10875_19434.png +0 -0
- data/examples/street/tmp/tiles/carto_dark_15_10875_19435.png +0 -0
- data/examples/street/tmp/tiles/carto_dark_15_10875_19436.png +0 -0
- data/examples/street/tmp/tiles/carto_dark_15_10876_19433.png +0 -0
- data/examples/street/tmp/tiles/carto_dark_15_10876_19434.png +0 -0
- data/examples/street/tmp/tiles/carto_dark_15_10876_19435.png +0 -0
- data/examples/street/tmp/tiles/carto_dark_15_10876_19436.png +0 -0
- data/examples/street/tmp/tiles/esri_satellite_15_10874_19433.jpg +0 -0
- data/examples/street/tmp/tiles/esri_satellite_15_10874_19434.jpg +0 -0
- data/examples/street/tmp/tiles/esri_satellite_15_10874_19435.jpg +0 -0
- data/examples/street/tmp/tiles/esri_satellite_15_10874_19436.jpg +0 -0
- data/examples/street/tmp/tiles/esri_satellite_15_10875_19433.jpg +0 -0
- data/examples/street/tmp/tiles/esri_satellite_15_10875_19434.jpg +0 -0
- data/examples/street/tmp/tiles/esri_satellite_15_10875_19435.jpg +0 -0
- data/examples/street/tmp/tiles/esri_satellite_15_10875_19436.jpg +0 -0
- data/examples/street/tmp/tiles/esri_satellite_15_10876_19433.jpg +0 -0
- data/examples/street/tmp/tiles/esri_satellite_15_10876_19434.jpg +0 -0
- data/examples/street/tmp/tiles/esri_satellite_15_10876_19435.jpg +0 -0
- data/examples/street/tmp/tiles/esri_satellite_15_10876_19436.jpg +0 -0
- data/examples/street/tmp/tiles/osm_fr_15_10874_19433.png +0 -0
- data/examples/street/tmp/tiles/osm_fr_15_10874_19434.png +0 -0
- data/examples/street/tmp/tiles/osm_fr_15_10874_19435.png +0 -0
- data/examples/street/tmp/tiles/osm_fr_15_10874_19436.png +0 -0
- data/examples/street/tmp/tiles/osm_fr_15_10875_19433.png +0 -0
- data/examples/street/tmp/tiles/osm_fr_15_10875_19434.png +0 -0
- data/examples/street/tmp/tiles/osm_fr_15_10875_19435.png +0 -0
- data/examples/street/tmp/tiles/osm_fr_15_10875_19436.png +0 -0
- data/examples/street/tmp/tiles/osm_fr_15_10876_19433.png +0 -0
- data/examples/street/tmp/tiles/osm_fr_15_10876_19434.png +0 -0
- data/examples/street/tmp/tiles/osm_fr_15_10876_19435.png +0 -0
- data/examples/street/tmp/tiles/osm_fr_15_10876_19436.png +0 -0
- data/examples/tmp/tiles/15_10871_19430.png +0 -0
- data/examples/tmp/tiles/15_10871_19431.png +0 -0
- data/examples/tmp/tiles/15_10871_19432.png +0 -0
- data/examples/tmp/tiles/15_10871_19433.png +0 -0
- data/examples/tmp/tiles/15_10871_19434.png +0 -0
- data/examples/tmp/tiles/15_10871_19435.png +0 -0
- data/examples/tmp/tiles/15_10872_19430.png +0 -0
- data/examples/tmp/tiles/15_10872_19431.png +0 -0
- data/examples/tmp/tiles/15_10872_19432.png +0 -0
- data/examples/tmp/tiles/15_10872_19433.png +0 -0
- data/examples/tmp/tiles/15_10872_19434.png +0 -0
- data/examples/tmp/tiles/15_10872_19435.png +0 -0
- data/examples/tmp/tiles/15_10873_19430.png +0 -0
- data/examples/tmp/tiles/15_10873_19431.png +0 -0
- data/examples/tmp/tiles/15_10873_19432.png +0 -0
- data/examples/tmp/tiles/15_10873_19433.png +0 -0
- data/examples/tmp/tiles/15_10873_19434.png +0 -0
- data/examples/tmp/tiles/15_10873_19435.png +0 -0
- data/examples/tmp/tiles/15_10874_19430.png +0 -0
- data/examples/tmp/tiles/15_10874_19431.png +0 -0
- data/examples/tmp/tiles/15_10874_19432.png +0 -0
- data/examples/tmp/tiles/15_10874_19433.png +0 -0
- data/examples/tmp/tiles/15_10874_19434.png +0 -0
- data/examples/tmp/tiles/15_10874_19435.png +0 -0
- data/examples/tmp/tiles/15_10875_19430.png +0 -0
- data/examples/tmp/tiles/15_10875_19431.png +0 -0
- data/examples/tmp/tiles/15_10875_19432.png +0 -0
- data/examples/tmp/tiles/15_10875_19433.png +0 -0
- data/examples/tmp/tiles/15_10875_19434.png +0 -0
- data/examples/tmp/tiles/15_10875_19435.png +0 -0
- data/examples/tmp/tiles/15_10876_19430.png +0 -0
- data/examples/tmp/tiles/15_10876_19431.png +0 -0
- data/examples/tmp/tiles/15_10876_19432.png +0 -0
- data/examples/tmp/tiles/15_10876_19433.png +0 -0
- data/examples/tmp/tiles/15_10876_19434.png +0 -0
- data/examples/tmp/tiles/15_10876_19435.png +0 -0
- data/examples/tmp/tiles/15_10877_19430.png +0 -0
- data/examples/tmp/tiles/15_10877_19431.png +0 -0
- data/examples/tmp/tiles/15_10877_19432.png +0 -0
- data/examples/tmp/tiles/15_10877_19433.png +0 -0
- data/examples/tmp/tiles/15_10877_19434.png +0 -0
- data/examples/tmp/tiles/15_10877_19435.png +0 -0
- 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_71.png +0 -0
- data/examples/tmp/tiles/7_37_72.png +0 -0
- data/examples/tmp/tiles/7_37_73.png +0 -0
- data/examples/tmp/tiles/7_37_74.png +0 -0
- data/examples/tmp/tiles/7_37_75.png +0 -0
- data/examples/tmp/tiles/7_37_76.png +0 -0
- data/examples/tmp/tiles/7_37_77.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_37_87.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_84.png +0 -0
- data/examples/tmp/tiles/7_40_85.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_82.png +0 -0
- data/examples/tmp/tiles/7_41_83.png +0 -0
- data/examples/tmp/tiles/7_41_84.png +0 -0
- data/examples/tmp/tiles/7_41_85.png +0 -0
- data/examples/tmp/tiles/7_41_86.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_80.png +0 -0
- data/examples/tmp/tiles/7_42_81.png +0 -0
- data/examples/tmp/tiles/7_42_82.png +0 -0
- data/examples/tmp/tiles/7_42_83.png +0 -0
- data/examples/tmp/tiles/7_42_84.png +0 -0
- data/examples/tmp/tiles/7_42_85.png +0 -0
- data/examples/tmp/tiles/7_42_86.png +0 -0
- data/examples/tmp/tiles/7_42_87.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_79.png +0 -0
- data/examples/tmp/tiles/7_43_80.png +0 -0
- data/examples/tmp/tiles/7_43_81.png +0 -0
- data/examples/tmp/tiles/7_43_82.png +0 -0
- data/examples/tmp/tiles/7_43_83.png +0 -0
- data/examples/tmp/tiles/7_43_84.png +0 -0
- data/examples/tmp/tiles/7_43_85.png +0 -0
- data/examples/tmp/tiles/7_43_86.png +0 -0
- data/examples/tmp/tiles/7_43_87.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_44_78.png +0 -0
- data/examples/tmp/tiles/7_44_79.png +0 -0
- data/examples/tmp/tiles/7_44_80.png +0 -0
- data/examples/tmp/tiles/7_44_81.png +0 -0
- data/examples/tmp/tiles/7_44_82.png +0 -0
- data/examples/tmp/tiles/7_44_83.png +0 -0
- data/examples/tmp/tiles/7_44_84.png +0 -0
- data/examples/tmp/tiles/7_44_85.png +0 -0
- data/examples/tmp/tiles/7_44_86.png +0 -0
- data/examples/tmp/tiles/7_44_87.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/lib/gd/gis/basemap.rb +116 -9
- data/lib/gd/gis/geometry.rb +40 -0
- data/lib/gd/gis/layer_lines.rb +36 -0
- data/lib/gd/gis/layer_points.rb +31 -1
- data/lib/gd/gis/layer_polygons.rb +38 -0
- data/lib/gd/gis/map.rb +53 -33
- data/lib/gd/gis/projection.rb +14 -0
- metadata +339 -17
- /data/examples/{fonts → street/fonts}/DejaVu Fonts License.txt +0 -0
- /data/examples/{fonts → street/fonts}/DejaVuSans-Bold.ttf +0 -0
- /data/examples/{fonts → street/fonts}/DejaVuSans-BoldOblique.ttf +0 -0
- /data/examples/{fonts → street/fonts}/DejaVuSans-ExtraLight.ttf +0 -0
- /data/examples/{fonts → street/fonts}/DejaVuSans-Oblique.ttf +0 -0
- /data/examples/{fonts → street/fonts}/DejaVuSans.ttf +0 -0
- /data/examples/{fonts → street/fonts}/DejaVuSansCondensed-Bold.ttf +0 -0
- /data/examples/{fonts → street/fonts}/DejaVuSansCondensed-BoldOblique.ttf +0 -0
- /data/examples/{fonts → street/fonts}/DejaVuSansCondensed-Oblique.ttf +0 -0
- /data/examples/{fonts → street/fonts}/DejaVuSansCondensed.ttf +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dac7c14a782d59e332c74f826519a41213c5a4fea689006ae57b01d2d6f531db
|
|
4
|
+
data.tar.gz: 88d652bbcc7e56955f9cba7330a101759086e3561135b18a93b83254045a0c78
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c05ccb3f3f703229d999c6e2a0ce0d3f851a80ea5891ca3b6cb02b8b22d68a5ec38de5f10a9b1684ab92f1a5d71c4d9fd00a48101e578bac50cb91725c58e07e
|
|
7
|
+
data.tar.gz: 55e24d58d3ccf204de44fbf642ab7dcd377cd0a4ae9ce50e68d66766a70c1298d0f27c13d7ce503158c7e263ebaa6628d7f2d74e89bce7e97e24ef39806268fa
|
data/README.md
CHANGED
|
@@ -1,24 +1,54 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
the
|
|
1
|
+
# LibGD-GIS
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://rubystacknews.com/2026/01/07/ruby-can-now-draw-maps-and-i-started-with-ice-cream/">
|
|
5
|
+
<img src="https://img.shields.io/badge/RubyStackNews-CC342D?style=for-the-badge&logo=ruby&logoColor=white" />
|
|
6
|
+
</a>
|
|
7
|
+
<a href="https://x.com/ruby_stack_news">
|
|
8
|
+
<img src="https://img.shields.io/badge/Twitter%20@RubyStackNews-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white" />
|
|
9
|
+
</a>
|
|
10
|
+
<a href="https://www.linkedin.com/in/germ%C3%A1n-silva-56a12622/">
|
|
11
|
+
<img src="https://img.shields.io/badge/Germán%20Silva-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white" />
|
|
12
|
+
</a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
<a href="https://rubygems.org/gems/libgd-gis">
|
|
17
|
+
<img src="https://img.shields.io/badge/RubyGems-libgd--gis-CC342D?style=for-the-badge&logo=rubygems&logoColor=white" />
|
|
18
|
+
</a>
|
|
19
|
+
<a href="https://github.com/ggerman/libgd-gis">
|
|
20
|
+
<img src="https://img.shields.io/badge/GitHub-libgd--gis-181717?style=for-the-badge&logo=github&logoColor=white" />
|
|
21
|
+
</a>
|
|
22
|
+
<a href="https://github.com/ggerman/ruby-libgd">
|
|
23
|
+
<img src="https://img.shields.io/badge/Engine-ruby--libgd-CC342D?style=for-the-badge&logo=ruby&logoColor=white" />
|
|
24
|
+
</a>
|
|
25
|
+
</p>
|
|
26
|
+
|
|
27
|
+
<p align="right">
|
|
28
|
+
<img src="docs/images/logo-gis.png" width="160" />
|
|
29
|
+
</p>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
| Examples | Examples | Examples |
|
|
33
|
+
| :----: | :----: | :--: |
|
|
34
|
+
| <img src="docs/examples/america.png" height="250"> | <img src="docs/examples/argentina_museum.png" height="250"> | <img src="docs/examples/museos_parana.png" height="250"> |
|
|
35
|
+
| <img src="docs/examples/asia.png" height="250"> | <img src="docs/examples/europe.png" height="250"> | <img src="docs/examples/icecream_parana.png" height="250"> |
|
|
36
|
+
| <img src="docs/examples/argentina_cities.png" height="250"> | <img src="docs/examples/tanzania_hydro.png" height="250"> | |
|
|
9
37
|
|
|
10
38
|
---
|
|
11
39
|
|
|
12
|
-
##
|
|
40
|
+
## A geospatial raster engine for Ruby.
|
|
13
41
|
|
|
14
|
-
|
|
42
|
+
libgd-gis allows Ruby to render real maps, GeoJSON layers, vector features, and geospatial tiles using a native raster backend powered by **libgd**.
|
|
15
43
|
|
|
16
|
-
|
|
44
|
+
It restores something Ruby lost over time:
|
|
45
|
+
the ability to generate **maps, tiles, and GIS-grade visualizations natively**, without relying on external tools like QGIS, Mapnik, ImageMagick, or Mapbox.
|
|
17
46
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
No
|
|
21
|
-
|
|
47
|
+
Built on top of **ruby-libgd**, this project turns Ruby into a **map rendering engine**, capable of producing spatial graphics, tiled maps, and geospatial outputs directly inside Ruby processes.
|
|
48
|
+
|
|
49
|
+
- No external renderers.
|
|
50
|
+
- No shelling out.
|
|
51
|
+
- Just Ruby, raster, and GIS.
|
|
22
52
|
|
|
23
53
|
---
|
|
24
54
|
|
|
@@ -75,29 +105,46 @@ Render hydroelectric plants from a GeoJSON file:
|
|
|
75
105
|
require "json"
|
|
76
106
|
require "gd/gis"
|
|
77
107
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
lats = plants.map { |f| f["geometry"]["coordinates"][1] }
|
|
83
|
-
|
|
84
|
-
bbox = [lons.min, lats.min, lons.max, lats.max]
|
|
108
|
+
# ---------------------------
|
|
109
|
+
# Bounding box mundial
|
|
110
|
+
# ---------------------------
|
|
111
|
+
AMERICA = [-170, -60, -30, 75]
|
|
85
112
|
|
|
113
|
+
# ---------------------------
|
|
114
|
+
# Crear mapa
|
|
115
|
+
# ---------------------------
|
|
86
116
|
map = GD::GIS::Map.new(
|
|
87
|
-
bbox:
|
|
88
|
-
zoom:
|
|
117
|
+
bbox: AMERICA,
|
|
118
|
+
zoom: 4,
|
|
89
119
|
basemap: :carto_light
|
|
90
120
|
)
|
|
91
121
|
|
|
122
|
+
# Cargar datos
|
|
123
|
+
# ---------------------------
|
|
124
|
+
peaks = JSON.parse(File.read("picks.json"))
|
|
125
|
+
|
|
126
|
+
# ---------------------------
|
|
127
|
+
# Agregar capa de puntos
|
|
128
|
+
# ---------------------------
|
|
92
129
|
map.add_points(
|
|
93
|
-
|
|
94
|
-
lon: ->(
|
|
95
|
-
lat: ->(
|
|
96
|
-
icon: "
|
|
130
|
+
peaks,
|
|
131
|
+
lon: ->(p) { p["longitude"] },
|
|
132
|
+
lat: ->(p) { p["latitude"] },
|
|
133
|
+
icon: "peak.png",
|
|
134
|
+
label: ->(p) { p["name"] },
|
|
135
|
+
font: "./fonts/DejaVuSans.ttf",
|
|
136
|
+
size: 10,
|
|
137
|
+
color: [0,0,0]
|
|
97
138
|
)
|
|
98
139
|
|
|
140
|
+
# ---------------------------
|
|
141
|
+
# Renderizar y guardar
|
|
142
|
+
# ---------------------------
|
|
99
143
|
map.render
|
|
100
|
-
map.save("
|
|
144
|
+
map.save("output/america.png")
|
|
145
|
+
|
|
146
|
+
puts "Saved output/america.png"
|
|
147
|
+
|
|
101
148
|
```
|
|
102
149
|
|
|
103
150
|
---
|
|
@@ -122,6 +169,6 @@ MIT
|
|
|
122
169
|
|
|
123
170
|
## Author
|
|
124
171
|
|
|
125
|
-
Germán Silva
|
|
126
|
-
https://github.com/ggerman
|
|
172
|
+
Germán Silva
|
|
173
|
+
https://github.com/ggerman
|
|
127
174
|
https://rubystacknews.com
|
|
@@ -4,13 +4,13 @@ require "gd/gis"
|
|
|
4
4
|
# ---------------------------
|
|
5
5
|
# Bounding box mundial
|
|
6
6
|
# ---------------------------
|
|
7
|
-
|
|
7
|
+
AMERICA = [-170, -60, -30, 75]
|
|
8
8
|
|
|
9
9
|
# ---------------------------
|
|
10
10
|
# Crear mapa
|
|
11
11
|
# ---------------------------
|
|
12
12
|
map = GD::GIS::Map.new(
|
|
13
|
-
bbox:
|
|
13
|
+
bbox: AMERICA,
|
|
14
14
|
zoom: 4,
|
|
15
15
|
basemap: :carto_light
|
|
16
16
|
)
|
|
@@ -37,6 +37,6 @@ map.add_points(
|
|
|
37
37
|
# Renderizar y guardar
|
|
38
38
|
# ---------------------------
|
|
39
39
|
map.render
|
|
40
|
-
map.save("output/
|
|
40
|
+
map.save("output/america.png")
|
|
41
41
|
|
|
42
|
-
puts "Saved output/
|
|
42
|
+
puts "Saved output/america.png"
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
require "json"
|
|
2
|
+
require "gd/gis"
|
|
3
|
+
|
|
4
|
+
# ---------------------------
|
|
5
|
+
# Bounding box mundial
|
|
6
|
+
# ---------------------------
|
|
7
|
+
ASIA = [25.0, -10.0, 150.0, 60.0]
|
|
8
|
+
|
|
9
|
+
# ---------------------------
|
|
10
|
+
# Crear mapa
|
|
11
|
+
# ---------------------------
|
|
12
|
+
map = GD::GIS::Map.new(
|
|
13
|
+
bbox: ASIA,
|
|
14
|
+
zoom: 4,
|
|
15
|
+
basemap: :carto_light
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
# Cargar datos
|
|
19
|
+
# ---------------------------
|
|
20
|
+
peaks = JSON.parse(File.read("picks.json"))
|
|
21
|
+
|
|
22
|
+
# ---------------------------
|
|
23
|
+
# Agregar capa de puntos
|
|
24
|
+
# ---------------------------
|
|
25
|
+
map.add_points(
|
|
26
|
+
peaks,
|
|
27
|
+
lon: ->(p) { p["longitude"] },
|
|
28
|
+
lat: ->(p) { p["latitude"] },
|
|
29
|
+
icon: "peak.png",
|
|
30
|
+
label: ->(p) { p["name"] },
|
|
31
|
+
font: "./fonts/DejaVuSans.ttf",
|
|
32
|
+
size: 10,
|
|
33
|
+
color: [0,0,0]
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
# ---------------------------
|
|
37
|
+
# Renderizar y guardar
|
|
38
|
+
# ---------------------------
|
|
39
|
+
map.render
|
|
40
|
+
map.save("output/asia.png")
|
|
41
|
+
|
|
42
|
+
puts "Saved output/asia.png"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
require "json"
|
|
2
|
+
require "gd/gis"
|
|
3
|
+
|
|
4
|
+
BBOX = [-60.556640625, -31.8402326679, -60.46875, -31.6907818061]
|
|
5
|
+
|
|
6
|
+
map = GD::GIS::Map.new(
|
|
7
|
+
bbox: BBOX,
|
|
8
|
+
zoom: 14,
|
|
9
|
+
basemap: :carto_light
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
geo = JSON.parse(File.read("ramirez_full.geojson"))
|
|
13
|
+
features = geo["features"]
|
|
14
|
+
|
|
15
|
+
# Dibujar Av. Ramírez como polilínea
|
|
16
|
+
map.add_lines(
|
|
17
|
+
features,
|
|
18
|
+
stroke: [255, 0, 0, 140], # rojo semitransparente
|
|
19
|
+
width: 4
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
# Etiqueta
|
|
23
|
+
map.add_points(
|
|
24
|
+
[{lon: -60.5205, lat: -31.76, name: "Av. Ramírez"}],
|
|
25
|
+
lon: ->(p){p[:lon]},
|
|
26
|
+
lat: ->(p){p[:lat]},
|
|
27
|
+
label: ->(p){p[:name]},
|
|
28
|
+
font: "./fonts/DejaVuSans.ttf",
|
|
29
|
+
size: 18,
|
|
30
|
+
color: [0,0,0,160]
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
map.render
|
|
34
|
+
map.save("ramirez_polyline.png")
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
require "json"
|
|
2
|
+
require "gd/gis"
|
|
3
|
+
|
|
4
|
+
# ---------------------------
|
|
5
|
+
# Bounding box mundial
|
|
6
|
+
# ---------------------------
|
|
7
|
+
EUROPE = [-15.0, 34.0, 40.0, 72.0]
|
|
8
|
+
|
|
9
|
+
# ---------------------------
|
|
10
|
+
# Crear mapa
|
|
11
|
+
# ---------------------------
|
|
12
|
+
map = GD::GIS::Map.new(
|
|
13
|
+
bbox: EUROPE,
|
|
14
|
+
zoom: 4,
|
|
15
|
+
basemap: :carto_light
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
# Cargar datos
|
|
19
|
+
# ---------------------------
|
|
20
|
+
peaks = JSON.parse(File.read("picks.json"))
|
|
21
|
+
|
|
22
|
+
# ---------------------------
|
|
23
|
+
# Agregar capa de puntos
|
|
24
|
+
# ---------------------------
|
|
25
|
+
map.add_points(
|
|
26
|
+
peaks,
|
|
27
|
+
lon: ->(p) { p["longitude"] },
|
|
28
|
+
lat: ->(p) { p["latitude"] },
|
|
29
|
+
icon: "peak.png",
|
|
30
|
+
label: ->(p) { p["name"] },
|
|
31
|
+
font: "./fonts/DejaVuSans.ttf",
|
|
32
|
+
size: 10,
|
|
33
|
+
color: [0,0,0]
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
# ---------------------------
|
|
37
|
+
# Renderizar y guardar
|
|
38
|
+
# ---------------------------
|
|
39
|
+
map.render
|
|
40
|
+
map.save("output/europe.png")
|
|
41
|
+
|
|
42
|
+
puts "Saved output/europe.png"
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "Heladería Gallet",
|
|
4
|
+
"lat": -31.7332,
|
|
5
|
+
"lon": -60.5221
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"name": "Freddo",
|
|
9
|
+
"lat": -31.7401,
|
|
10
|
+
"lon": -60.5289
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "La Italiana Helados Artesanales",
|
|
14
|
+
"lat": -31.7365,
|
|
15
|
+
"lon": -60.5247
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "Heladería San Remo",
|
|
19
|
+
"lat": -31.7389,
|
|
20
|
+
"lon": -60.5263
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "Heladería del Puerto",
|
|
24
|
+
"lat": -31.7450,
|
|
25
|
+
"lon": -60.5310
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "Mamma Mia Helados",
|
|
29
|
+
"lat": -31.7310,
|
|
30
|
+
"lon": -60.5190
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "Grido Helado",
|
|
34
|
+
"lat": -31.7375,
|
|
35
|
+
"lon": -60.5235
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "Cremolati",
|
|
39
|
+
"lat": -31.7410,
|
|
40
|
+
"lon": -60.5270
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "Bahilo Helados Artesanales",
|
|
44
|
+
"lat": -31.7345,
|
|
45
|
+
"lon": -60.5230
|
|
46
|
+
}
|
|
47
|
+
]
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
require "json"
|
|
2
|
+
require "gd/gis"
|
|
3
|
+
|
|
4
|
+
# --------------------------------
|
|
5
|
+
# Paraná, Entre Ríos
|
|
6
|
+
# --------------------------------
|
|
7
|
+
CITY = [-60.56, -31.76, -60.50, -31.71]
|
|
8
|
+
|
|
9
|
+
map = GD::GIS::Map.new(
|
|
10
|
+
bbox: CITY,
|
|
11
|
+
zoom: 15,
|
|
12
|
+
basemap: :carto_light
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
# --------------------------------
|
|
16
|
+
# Cargar datos
|
|
17
|
+
# --------------------------------
|
|
18
|
+
shops = JSON.parse(File.read("heladerias.json"))
|
|
19
|
+
|
|
20
|
+
# --------------------------------
|
|
21
|
+
# Capa de heladerías
|
|
22
|
+
# --------------------------------
|
|
23
|
+
map.add_points(
|
|
24
|
+
shops,
|
|
25
|
+
lon: ->(s) { s["lon"] },
|
|
26
|
+
lat: ->(s) { s["lat"] },
|
|
27
|
+
icon: "ice-cream.png",
|
|
28
|
+
label: ->(s) { s["name"] },
|
|
29
|
+
font: "./fonts/DejaVuSans.ttf",
|
|
30
|
+
size: 11,
|
|
31
|
+
color: [40,40,40]
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
# --------------------------------
|
|
35
|
+
# Render
|
|
36
|
+
# --------------------------------
|
|
37
|
+
map.render
|
|
38
|
+
map.save("output/heladerias_parana.png")
|
|
39
|
+
|
|
40
|
+
puts "Saved output/heladerias_parana.png"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
require "csv"
|
|
2
|
+
require "gd/gis"
|
|
3
|
+
|
|
4
|
+
# --------------------------------
|
|
5
|
+
# Paraná, Entre Ríos
|
|
6
|
+
# --------------------------------
|
|
7
|
+
CITY = [-60.56, -31.76, -60.50, -31.71]
|
|
8
|
+
|
|
9
|
+
map = GD::GIS::Map.new(
|
|
10
|
+
bbox: CITY,
|
|
11
|
+
zoom: 15,
|
|
12
|
+
basemap: :carto_light
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
# --------------------------------
|
|
16
|
+
# Cargar CSV oficial
|
|
17
|
+
# --------------------------------
|
|
18
|
+
rows = CSV.read("museos_datosabiertos.csv", headers: true)
|
|
19
|
+
|
|
20
|
+
# Filtrar solo museos de Paraná
|
|
21
|
+
museos = rows.select do |r|
|
|
22
|
+
r["localidad"]&.downcase == "paraná" &&
|
|
23
|
+
r["Latitud"] &&
|
|
24
|
+
r["Longitud"]
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
puts "Museos cargados: #{museos.size}"
|
|
28
|
+
|
|
29
|
+
# --------------------------------
|
|
30
|
+
# Capa de museos
|
|
31
|
+
# --------------------------------
|
|
32
|
+
map.add_points(
|
|
33
|
+
museos,
|
|
34
|
+
lon: ->(m) { m["Longitud"].to_f },
|
|
35
|
+
lat: ->(m) { m["Latitud"].to_f },
|
|
36
|
+
icon: "museos.png", # tu icono
|
|
37
|
+
label: ->(m) { m["nombre"] },
|
|
38
|
+
font: "./fonts/DejaVuSans.ttf",
|
|
39
|
+
size: 11,
|
|
40
|
+
color: [40, 40, 40]
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
# --------------------------------
|
|
44
|
+
# Render
|
|
45
|
+
# --------------------------------
|
|
46
|
+
map.render
|
|
47
|
+
map.save("output/museos_parana.png")
|
|
48
|
+
|
|
49
|
+
puts "Saved output/museos_parana.png"
|