libgd-gis 0.1.0 → 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.
Files changed (402) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +78 -31
  3. data/examples/america-peaks.rb +42 -0
  4. data/examples/asia-peaks.rb +42 -0
  5. data/examples/av_ramirez.rb +34 -0
  6. data/examples/europe-peaks.rb +42 -0
  7. data/examples/heladerias.json +47 -0
  8. data/examples/heladerias.rb +40 -0
  9. data/examples/ice-cream.jpg +0 -0
  10. data/examples/ice-cream.png +0 -0
  11. data/examples/montanas.rb +118 -0
  12. data/examples/output/america.png +0 -0
  13. data/examples/output/asia.png +0 -0
  14. data/examples/output/europe.png +0 -0
  15. data/examples/output/heladerias_parana.png +0 -0
  16. data/examples/output/museos_parana.png +0 -0
  17. data/examples/output/world_peaks-s.png +0 -0
  18. data/examples/output/world_peaks.png +0 -0
  19. data/examples/parana_museos.rb +49 -0
  20. data/examples/peak.png +0 -0
  21. data/examples/picks.json +50 -0
  22. data/examples/street/1.osm +207517 -0
  23. data/examples/street/av-ramirez.osm +207517 -0
  24. data/examples/street/av-ramirez.png +0 -0
  25. data/examples/street/av_ramirez-0.1346843780815251.png +0 -0
  26. data/examples/street/av_ramirez-3.png +0 -0
  27. data/examples/street/av_ramirez.png +0 -0
  28. data/examples/street/av_ramirez.rb +46 -0
  29. data/examples/street/avramirez.geojson +9 -0
  30. data/examples/street/dot.png +0 -0
  31. data/examples/street/download.sh +18 -0
  32. data/examples/street/draw.rb +46 -0
  33. data/examples/street/fonts/DejaVu Fonts License.txt +97 -0
  34. data/examples/street/fonts/DejaVuSans-Bold.ttf +0 -0
  35. data/examples/street/fonts/DejaVuSans-BoldOblique.ttf +0 -0
  36. data/examples/street/fonts/DejaVuSans-ExtraLight.ttf +0 -0
  37. data/examples/street/fonts/DejaVuSans-Oblique.ttf +0 -0
  38. data/examples/street/fonts/DejaVuSans.ttf +0 -0
  39. data/examples/street/fonts/DejaVuSansCondensed-Bold.ttf +0 -0
  40. data/examples/street/fonts/DejaVuSansCondensed-BoldOblique.ttf +0 -0
  41. data/examples/street/fonts/DejaVuSansCondensed-Oblique.ttf +0 -0
  42. data/examples/street/fonts/DejaVuSansCondensed.ttf +0 -0
  43. data/examples/street/map.osm +9158 -0
  44. data/examples/street/mark.png +0 -0
  45. data/examples/street/parana.json +100 -0
  46. data/examples/street/parana.rb +30 -0
  47. data/examples/street/parana_areas.png +0 -0
  48. data/examples/street/query.overpass +8 -0
  49. data/examples/street/ramirez.geojson +355 -0
  50. data/examples/street/ramirez_big.geojson +9959 -0
  51. data/examples/street/ramirez_full.geojson +76 -0
  52. data/examples/street/ramirez_full.png +0 -0
  53. data/examples/street/ramirez_gis.png +0 -0
  54. data/examples/street/ramirez_osm.png +0 -0
  55. data/examples/street/ramirez_osm_full.png +0 -0
  56. data/examples/street/ramirez_polyline.png +0 -0
  57. data/examples/street/ramirez_road.png +0 -0
  58. data/examples/street/test_carto_dark.png +0 -0
  59. data/examples/street/test_osm_fr.png +0 -0
  60. data/examples/street/test_polygon.png +0 -0
  61. data/examples/street/tmp/tiles/carto_dark_15_10874_19433.png +0 -0
  62. data/examples/street/tmp/tiles/carto_dark_15_10874_19434.png +0 -0
  63. data/examples/street/tmp/tiles/carto_dark_15_10874_19435.png +0 -0
  64. data/examples/street/tmp/tiles/carto_dark_15_10874_19436.png +0 -0
  65. data/examples/street/tmp/tiles/carto_dark_15_10875_19433.png +0 -0
  66. data/examples/street/tmp/tiles/carto_dark_15_10875_19434.png +0 -0
  67. data/examples/street/tmp/tiles/carto_dark_15_10875_19435.png +0 -0
  68. data/examples/street/tmp/tiles/carto_dark_15_10875_19436.png +0 -0
  69. data/examples/street/tmp/tiles/carto_dark_15_10876_19433.png +0 -0
  70. data/examples/street/tmp/tiles/carto_dark_15_10876_19434.png +0 -0
  71. data/examples/street/tmp/tiles/carto_dark_15_10876_19435.png +0 -0
  72. data/examples/street/tmp/tiles/carto_dark_15_10876_19436.png +0 -0
  73. data/examples/street/tmp/tiles/esri_satellite_15_10874_19433.jpg +0 -0
  74. data/examples/street/tmp/tiles/esri_satellite_15_10874_19434.jpg +0 -0
  75. data/examples/street/tmp/tiles/esri_satellite_15_10874_19435.jpg +0 -0
  76. data/examples/street/tmp/tiles/esri_satellite_15_10874_19436.jpg +0 -0
  77. data/examples/street/tmp/tiles/esri_satellite_15_10875_19433.jpg +0 -0
  78. data/examples/street/tmp/tiles/esri_satellite_15_10875_19434.jpg +0 -0
  79. data/examples/street/tmp/tiles/esri_satellite_15_10875_19435.jpg +0 -0
  80. data/examples/street/tmp/tiles/esri_satellite_15_10875_19436.jpg +0 -0
  81. data/examples/street/tmp/tiles/esri_satellite_15_10876_19433.jpg +0 -0
  82. data/examples/street/tmp/tiles/esri_satellite_15_10876_19434.jpg +0 -0
  83. data/examples/street/tmp/tiles/esri_satellite_15_10876_19435.jpg +0 -0
  84. data/examples/street/tmp/tiles/esri_satellite_15_10876_19436.jpg +0 -0
  85. data/examples/street/tmp/tiles/osm_fr_15_10874_19433.png +0 -0
  86. data/examples/street/tmp/tiles/osm_fr_15_10874_19434.png +0 -0
  87. data/examples/street/tmp/tiles/osm_fr_15_10874_19435.png +0 -0
  88. data/examples/street/tmp/tiles/osm_fr_15_10874_19436.png +0 -0
  89. data/examples/street/tmp/tiles/osm_fr_15_10875_19433.png +0 -0
  90. data/examples/street/tmp/tiles/osm_fr_15_10875_19434.png +0 -0
  91. data/examples/street/tmp/tiles/osm_fr_15_10875_19435.png +0 -0
  92. data/examples/street/tmp/tiles/osm_fr_15_10875_19436.png +0 -0
  93. data/examples/street/tmp/tiles/osm_fr_15_10876_19433.png +0 -0
  94. data/examples/street/tmp/tiles/osm_fr_15_10876_19434.png +0 -0
  95. data/examples/street/tmp/tiles/osm_fr_15_10876_19435.png +0 -0
  96. data/examples/street/tmp/tiles/osm_fr_15_10876_19436.png +0 -0
  97. data/examples/tmp/tiles/15_10871_19430.png +0 -0
  98. data/examples/tmp/tiles/15_10871_19431.png +0 -0
  99. data/examples/tmp/tiles/15_10871_19432.png +0 -0
  100. data/examples/tmp/tiles/15_10871_19433.png +0 -0
  101. data/examples/tmp/tiles/15_10871_19434.png +0 -0
  102. data/examples/tmp/tiles/15_10871_19435.png +0 -0
  103. data/examples/tmp/tiles/15_10872_19430.png +0 -0
  104. data/examples/tmp/tiles/15_10872_19431.png +0 -0
  105. data/examples/tmp/tiles/15_10872_19432.png +0 -0
  106. data/examples/tmp/tiles/15_10872_19433.png +0 -0
  107. data/examples/tmp/tiles/15_10872_19434.png +0 -0
  108. data/examples/tmp/tiles/15_10872_19435.png +0 -0
  109. data/examples/tmp/tiles/15_10873_19430.png +0 -0
  110. data/examples/tmp/tiles/15_10873_19431.png +0 -0
  111. data/examples/tmp/tiles/15_10873_19432.png +0 -0
  112. data/examples/tmp/tiles/15_10873_19433.png +0 -0
  113. data/examples/tmp/tiles/15_10873_19434.png +0 -0
  114. data/examples/tmp/tiles/15_10873_19435.png +0 -0
  115. data/examples/tmp/tiles/15_10874_19430.png +0 -0
  116. data/examples/tmp/tiles/15_10874_19431.png +0 -0
  117. data/examples/tmp/tiles/15_10874_19432.png +0 -0
  118. data/examples/tmp/tiles/15_10874_19433.png +0 -0
  119. data/examples/tmp/tiles/15_10874_19434.png +0 -0
  120. data/examples/tmp/tiles/15_10874_19435.png +0 -0
  121. data/examples/tmp/tiles/15_10875_19430.png +0 -0
  122. data/examples/tmp/tiles/15_10875_19431.png +0 -0
  123. data/examples/tmp/tiles/15_10875_19432.png +0 -0
  124. data/examples/tmp/tiles/15_10875_19433.png +0 -0
  125. data/examples/tmp/tiles/15_10875_19434.png +0 -0
  126. data/examples/tmp/tiles/15_10875_19435.png +0 -0
  127. data/examples/tmp/tiles/15_10876_19430.png +0 -0
  128. data/examples/tmp/tiles/15_10876_19431.png +0 -0
  129. data/examples/tmp/tiles/15_10876_19432.png +0 -0
  130. data/examples/tmp/tiles/15_10876_19433.png +0 -0
  131. data/examples/tmp/tiles/15_10876_19434.png +0 -0
  132. data/examples/tmp/tiles/15_10876_19435.png +0 -0
  133. data/examples/tmp/tiles/15_10877_19430.png +0 -0
  134. data/examples/tmp/tiles/15_10877_19431.png +0 -0
  135. data/examples/tmp/tiles/15_10877_19432.png +0 -0
  136. data/examples/tmp/tiles/15_10877_19433.png +0 -0
  137. data/examples/tmp/tiles/15_10877_19434.png +0 -0
  138. data/examples/tmp/tiles/15_10877_19435.png +0 -0
  139. data/examples/tmp/tiles/4_0_0.png +0 -0
  140. data/examples/tmp/tiles/4_0_1.png +0 -0
  141. data/examples/tmp/tiles/4_0_10.png +0 -0
  142. data/examples/tmp/tiles/4_0_11.png +0 -0
  143. data/examples/tmp/tiles/4_0_12.png +0 -0
  144. data/examples/tmp/tiles/4_0_13.png +0 -0
  145. data/examples/tmp/tiles/4_0_14.png +0 -0
  146. data/examples/tmp/tiles/4_0_15.png +0 -0
  147. data/examples/tmp/tiles/4_0_2.png +0 -0
  148. data/examples/tmp/tiles/4_0_3.png +0 -0
  149. data/examples/tmp/tiles/4_0_4.png +0 -0
  150. data/examples/tmp/tiles/4_0_5.png +0 -0
  151. data/examples/tmp/tiles/4_0_6.png +0 -0
  152. data/examples/tmp/tiles/4_0_7.png +0 -0
  153. data/examples/tmp/tiles/4_0_8.png +0 -0
  154. data/examples/tmp/tiles/4_0_9.png +0 -0
  155. data/examples/tmp/tiles/4_10_0.png +0 -0
  156. data/examples/tmp/tiles/4_10_1.png +0 -0
  157. data/examples/tmp/tiles/4_10_10.png +0 -0
  158. data/examples/tmp/tiles/4_10_11.png +0 -0
  159. data/examples/tmp/tiles/4_10_12.png +0 -0
  160. data/examples/tmp/tiles/4_10_13.png +0 -0
  161. data/examples/tmp/tiles/4_10_14.png +0 -0
  162. data/examples/tmp/tiles/4_10_15.png +0 -0
  163. data/examples/tmp/tiles/4_10_2.png +0 -0
  164. data/examples/tmp/tiles/4_10_3.png +0 -0
  165. data/examples/tmp/tiles/4_10_4.png +0 -0
  166. data/examples/tmp/tiles/4_10_5.png +0 -0
  167. data/examples/tmp/tiles/4_10_6.png +0 -0
  168. data/examples/tmp/tiles/4_10_7.png +0 -0
  169. data/examples/tmp/tiles/4_10_8.png +0 -0
  170. data/examples/tmp/tiles/4_10_9.png +0 -0
  171. data/examples/tmp/tiles/4_11_0.png +0 -0
  172. data/examples/tmp/tiles/4_11_1.png +0 -0
  173. data/examples/tmp/tiles/4_11_10.png +0 -0
  174. data/examples/tmp/tiles/4_11_11.png +0 -0
  175. data/examples/tmp/tiles/4_11_12.png +0 -0
  176. data/examples/tmp/tiles/4_11_13.png +0 -0
  177. data/examples/tmp/tiles/4_11_14.png +0 -0
  178. data/examples/tmp/tiles/4_11_15.png +0 -0
  179. data/examples/tmp/tiles/4_11_2.png +0 -0
  180. data/examples/tmp/tiles/4_11_3.png +0 -0
  181. data/examples/tmp/tiles/4_11_4.png +0 -0
  182. data/examples/tmp/tiles/4_11_5.png +0 -0
  183. data/examples/tmp/tiles/4_11_6.png +0 -0
  184. data/examples/tmp/tiles/4_11_7.png +0 -0
  185. data/examples/tmp/tiles/4_11_8.png +0 -0
  186. data/examples/tmp/tiles/4_11_9.png +0 -0
  187. data/examples/tmp/tiles/4_12_0.png +0 -0
  188. data/examples/tmp/tiles/4_12_1.png +0 -0
  189. data/examples/tmp/tiles/4_12_10.png +0 -0
  190. data/examples/tmp/tiles/4_12_11.png +0 -0
  191. data/examples/tmp/tiles/4_12_12.png +0 -0
  192. data/examples/tmp/tiles/4_12_13.png +0 -0
  193. data/examples/tmp/tiles/4_12_14.png +0 -0
  194. data/examples/tmp/tiles/4_12_15.png +0 -0
  195. data/examples/tmp/tiles/4_12_2.png +0 -0
  196. data/examples/tmp/tiles/4_12_3.png +0 -0
  197. data/examples/tmp/tiles/4_12_4.png +0 -0
  198. data/examples/tmp/tiles/4_12_5.png +0 -0
  199. data/examples/tmp/tiles/4_12_6.png +0 -0
  200. data/examples/tmp/tiles/4_12_7.png +0 -0
  201. data/examples/tmp/tiles/4_12_8.png +0 -0
  202. data/examples/tmp/tiles/4_12_9.png +0 -0
  203. data/examples/tmp/tiles/4_13_0.png +0 -0
  204. data/examples/tmp/tiles/4_13_1.png +0 -0
  205. data/examples/tmp/tiles/4_13_10.png +0 -0
  206. data/examples/tmp/tiles/4_13_11.png +0 -0
  207. data/examples/tmp/tiles/4_13_12.png +0 -0
  208. data/examples/tmp/tiles/4_13_13.png +0 -0
  209. data/examples/tmp/tiles/4_13_14.png +0 -0
  210. data/examples/tmp/tiles/4_13_15.png +0 -0
  211. data/examples/tmp/tiles/4_13_2.png +0 -0
  212. data/examples/tmp/tiles/4_13_3.png +0 -0
  213. data/examples/tmp/tiles/4_13_4.png +0 -0
  214. data/examples/tmp/tiles/4_13_5.png +0 -0
  215. data/examples/tmp/tiles/4_13_6.png +0 -0
  216. data/examples/tmp/tiles/4_13_7.png +0 -0
  217. data/examples/tmp/tiles/4_13_8.png +0 -0
  218. data/examples/tmp/tiles/4_13_9.png +0 -0
  219. data/examples/tmp/tiles/4_14_0.png +0 -0
  220. data/examples/tmp/tiles/4_14_1.png +0 -0
  221. data/examples/tmp/tiles/4_14_10.png +0 -0
  222. data/examples/tmp/tiles/4_14_11.png +0 -0
  223. data/examples/tmp/tiles/4_14_12.png +0 -0
  224. data/examples/tmp/tiles/4_14_13.png +0 -0
  225. data/examples/tmp/tiles/4_14_14.png +0 -0
  226. data/examples/tmp/tiles/4_14_15.png +0 -0
  227. data/examples/tmp/tiles/4_14_2.png +0 -0
  228. data/examples/tmp/tiles/4_14_3.png +0 -0
  229. data/examples/tmp/tiles/4_14_4.png +0 -0
  230. data/examples/tmp/tiles/4_14_5.png +0 -0
  231. data/examples/tmp/tiles/4_14_6.png +0 -0
  232. data/examples/tmp/tiles/4_14_7.png +0 -0
  233. data/examples/tmp/tiles/4_14_8.png +0 -0
  234. data/examples/tmp/tiles/4_14_9.png +0 -0
  235. data/examples/tmp/tiles/4_15_0.png +0 -0
  236. data/examples/tmp/tiles/4_15_1.png +0 -0
  237. data/examples/tmp/tiles/4_15_10.png +0 -0
  238. data/examples/tmp/tiles/4_15_11.png +0 -0
  239. data/examples/tmp/tiles/4_15_12.png +0 -0
  240. data/examples/tmp/tiles/4_15_13.png +0 -0
  241. data/examples/tmp/tiles/4_15_14.png +0 -0
  242. data/examples/tmp/tiles/4_15_15.png +0 -0
  243. data/examples/tmp/tiles/4_15_2.png +0 -0
  244. data/examples/tmp/tiles/4_15_3.png +0 -0
  245. data/examples/tmp/tiles/4_15_4.png +0 -0
  246. data/examples/tmp/tiles/4_15_5.png +0 -0
  247. data/examples/tmp/tiles/4_15_6.png +0 -0
  248. data/examples/tmp/tiles/4_15_7.png +0 -0
  249. data/examples/tmp/tiles/4_15_8.png +0 -0
  250. data/examples/tmp/tiles/4_15_9.png +0 -0
  251. data/examples/tmp/tiles/4_1_0.png +0 -0
  252. data/examples/tmp/tiles/4_1_1.png +0 -0
  253. data/examples/tmp/tiles/4_1_10.png +0 -0
  254. data/examples/tmp/tiles/4_1_11.png +0 -0
  255. data/examples/tmp/tiles/4_1_12.png +0 -0
  256. data/examples/tmp/tiles/4_1_13.png +0 -0
  257. data/examples/tmp/tiles/4_1_14.png +0 -0
  258. data/examples/tmp/tiles/4_1_15.png +0 -0
  259. data/examples/tmp/tiles/4_1_2.png +0 -0
  260. data/examples/tmp/tiles/4_1_3.png +0 -0
  261. data/examples/tmp/tiles/4_1_4.png +0 -0
  262. data/examples/tmp/tiles/4_1_5.png +0 -0
  263. data/examples/tmp/tiles/4_1_6.png +0 -0
  264. data/examples/tmp/tiles/4_1_7.png +0 -0
  265. data/examples/tmp/tiles/4_1_8.png +0 -0
  266. data/examples/tmp/tiles/4_1_9.png +0 -0
  267. data/examples/tmp/tiles/4_2_0.png +0 -0
  268. data/examples/tmp/tiles/4_2_1.png +0 -0
  269. data/examples/tmp/tiles/4_2_10.png +0 -0
  270. data/examples/tmp/tiles/4_2_11.png +0 -0
  271. data/examples/tmp/tiles/4_2_12.png +0 -0
  272. data/examples/tmp/tiles/4_2_13.png +0 -0
  273. data/examples/tmp/tiles/4_2_14.png +0 -0
  274. data/examples/tmp/tiles/4_2_15.png +0 -0
  275. data/examples/tmp/tiles/4_2_2.png +0 -0
  276. data/examples/tmp/tiles/4_2_3.png +0 -0
  277. data/examples/tmp/tiles/4_2_4.png +0 -0
  278. data/examples/tmp/tiles/4_2_5.png +0 -0
  279. data/examples/tmp/tiles/4_2_6.png +0 -0
  280. data/examples/tmp/tiles/4_2_7.png +0 -0
  281. data/examples/tmp/tiles/4_2_8.png +0 -0
  282. data/examples/tmp/tiles/4_2_9.png +0 -0
  283. data/examples/tmp/tiles/4_3_0.png +0 -0
  284. data/examples/tmp/tiles/4_3_1.png +0 -0
  285. data/examples/tmp/tiles/4_3_10.png +0 -0
  286. data/examples/tmp/tiles/4_3_11.png +0 -0
  287. data/examples/tmp/tiles/4_3_12.png +0 -0
  288. data/examples/tmp/tiles/4_3_13.png +0 -0
  289. data/examples/tmp/tiles/4_3_14.png +0 -0
  290. data/examples/tmp/tiles/4_3_15.png +0 -0
  291. data/examples/tmp/tiles/4_3_2.png +0 -0
  292. data/examples/tmp/tiles/4_3_3.png +0 -0
  293. data/examples/tmp/tiles/4_3_4.png +0 -0
  294. data/examples/tmp/tiles/4_3_5.png +0 -0
  295. data/examples/tmp/tiles/4_3_6.png +0 -0
  296. data/examples/tmp/tiles/4_3_7.png +0 -0
  297. data/examples/tmp/tiles/4_3_8.png +0 -0
  298. data/examples/tmp/tiles/4_3_9.png +0 -0
  299. data/examples/tmp/tiles/4_4_0.png +0 -0
  300. data/examples/tmp/tiles/4_4_1.png +0 -0
  301. data/examples/tmp/tiles/4_4_10.png +0 -0
  302. data/examples/tmp/tiles/4_4_11.png +0 -0
  303. data/examples/tmp/tiles/4_4_12.png +0 -0
  304. data/examples/tmp/tiles/4_4_13.png +0 -0
  305. data/examples/tmp/tiles/4_4_14.png +0 -0
  306. data/examples/tmp/tiles/4_4_15.png +0 -0
  307. data/examples/tmp/tiles/4_4_2.png +0 -0
  308. data/examples/tmp/tiles/4_4_3.png +0 -0
  309. data/examples/tmp/tiles/4_4_4.png +0 -0
  310. data/examples/tmp/tiles/4_4_5.png +0 -0
  311. data/examples/tmp/tiles/4_4_6.png +0 -0
  312. data/examples/tmp/tiles/4_4_7.png +0 -0
  313. data/examples/tmp/tiles/4_4_8.png +0 -0
  314. data/examples/tmp/tiles/4_4_9.png +0 -0
  315. data/examples/tmp/tiles/4_5_0.png +0 -0
  316. data/examples/tmp/tiles/4_5_1.png +0 -0
  317. data/examples/tmp/tiles/4_5_10.png +0 -0
  318. data/examples/tmp/tiles/4_5_11.png +0 -0
  319. data/examples/tmp/tiles/4_5_12.png +0 -0
  320. data/examples/tmp/tiles/4_5_13.png +0 -0
  321. data/examples/tmp/tiles/4_5_14.png +0 -0
  322. data/examples/tmp/tiles/4_5_15.png +0 -0
  323. data/examples/tmp/tiles/4_5_2.png +0 -0
  324. data/examples/tmp/tiles/4_5_3.png +0 -0
  325. data/examples/tmp/tiles/4_5_4.png +0 -0
  326. data/examples/tmp/tiles/4_5_5.png +0 -0
  327. data/examples/tmp/tiles/4_5_6.png +0 -0
  328. data/examples/tmp/tiles/4_5_7.png +0 -0
  329. data/examples/tmp/tiles/4_5_8.png +0 -0
  330. data/examples/tmp/tiles/4_5_9.png +0 -0
  331. data/examples/tmp/tiles/4_6_0.png +0 -0
  332. data/examples/tmp/tiles/4_6_1.png +0 -0
  333. data/examples/tmp/tiles/4_6_10.png +0 -0
  334. data/examples/tmp/tiles/4_6_11.png +0 -0
  335. data/examples/tmp/tiles/4_6_12.png +0 -0
  336. data/examples/tmp/tiles/4_6_13.png +0 -0
  337. data/examples/tmp/tiles/4_6_14.png +0 -0
  338. data/examples/tmp/tiles/4_6_15.png +0 -0
  339. data/examples/tmp/tiles/4_6_2.png +0 -0
  340. data/examples/tmp/tiles/4_6_3.png +0 -0
  341. data/examples/tmp/tiles/4_6_4.png +0 -0
  342. data/examples/tmp/tiles/4_6_5.png +0 -0
  343. data/examples/tmp/tiles/4_6_6.png +0 -0
  344. data/examples/tmp/tiles/4_6_7.png +0 -0
  345. data/examples/tmp/tiles/4_6_8.png +0 -0
  346. data/examples/tmp/tiles/4_6_9.png +0 -0
  347. data/examples/tmp/tiles/4_7_0.png +0 -0
  348. data/examples/tmp/tiles/4_7_1.png +0 -0
  349. data/examples/tmp/tiles/4_7_10.png +0 -0
  350. data/examples/tmp/tiles/4_7_11.png +0 -0
  351. data/examples/tmp/tiles/4_7_12.png +0 -0
  352. data/examples/tmp/tiles/4_7_13.png +0 -0
  353. data/examples/tmp/tiles/4_7_14.png +0 -0
  354. data/examples/tmp/tiles/4_7_15.png +0 -0
  355. data/examples/tmp/tiles/4_7_2.png +0 -0
  356. data/examples/tmp/tiles/4_7_3.png +0 -0
  357. data/examples/tmp/tiles/4_7_4.png +0 -0
  358. data/examples/tmp/tiles/4_7_5.png +0 -0
  359. data/examples/tmp/tiles/4_7_6.png +0 -0
  360. data/examples/tmp/tiles/4_7_7.png +0 -0
  361. data/examples/tmp/tiles/4_7_8.png +0 -0
  362. data/examples/tmp/tiles/4_7_9.png +0 -0
  363. data/examples/tmp/tiles/4_8_0.png +0 -0
  364. data/examples/tmp/tiles/4_8_1.png +0 -0
  365. data/examples/tmp/tiles/4_8_10.png +0 -0
  366. data/examples/tmp/tiles/4_8_11.png +0 -0
  367. data/examples/tmp/tiles/4_8_12.png +0 -0
  368. data/examples/tmp/tiles/4_8_13.png +0 -0
  369. data/examples/tmp/tiles/4_8_14.png +0 -0
  370. data/examples/tmp/tiles/4_8_15.png +0 -0
  371. data/examples/tmp/tiles/4_8_2.png +0 -0
  372. data/examples/tmp/tiles/4_8_3.png +0 -0
  373. data/examples/tmp/tiles/4_8_4.png +0 -0
  374. data/examples/tmp/tiles/4_8_5.png +0 -0
  375. data/examples/tmp/tiles/4_8_6.png +0 -0
  376. data/examples/tmp/tiles/4_8_7.png +0 -0
  377. data/examples/tmp/tiles/4_8_8.png +0 -0
  378. data/examples/tmp/tiles/4_8_9.png +0 -0
  379. data/examples/tmp/tiles/4_9_0.png +0 -0
  380. data/examples/tmp/tiles/4_9_1.png +0 -0
  381. data/examples/tmp/tiles/4_9_10.png +0 -0
  382. data/examples/tmp/tiles/4_9_11.png +0 -0
  383. data/examples/tmp/tiles/4_9_12.png +0 -0
  384. data/examples/tmp/tiles/4_9_13.png +0 -0
  385. data/examples/tmp/tiles/4_9_14.png +0 -0
  386. data/examples/tmp/tiles/4_9_15.png +0 -0
  387. data/examples/tmp/tiles/4_9_2.png +0 -0
  388. data/examples/tmp/tiles/4_9_3.png +0 -0
  389. data/examples/tmp/tiles/4_9_4.png +0 -0
  390. data/examples/tmp/tiles/4_9_5.png +0 -0
  391. data/examples/tmp/tiles/4_9_6.png +0 -0
  392. data/examples/tmp/tiles/4_9_7.png +0 -0
  393. data/examples/tmp/tiles/4_9_8.png +0 -0
  394. data/examples/tmp/tiles/4_9_9.png +0 -0
  395. data/lib/gd/gis/basemap.rb +123 -6
  396. data/lib/gd/gis/geometry.rb +40 -0
  397. data/lib/gd/gis/layer_lines.rb +36 -0
  398. data/lib/gd/gis/layer_points.rb +60 -4
  399. data/lib/gd/gis/layer_polygons.rb +38 -0
  400. data/lib/gd/gis/map.rb +69 -29
  401. data/lib/gd/gis/projection.rb +14 -0
  402. metadata +406 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e2c3fe258b7fdb52d1775d50e18095333bf692416c4b4fadf3659febf174604
4
- data.tar.gz: 3e1ebd506ff4469f231ada7621a5a10a395464d2c373679ee81aacf4e6c1dd35
3
+ metadata.gz: dac7c14a782d59e332c74f826519a41213c5a4fea689006ae57b01d2d6f531db
4
+ data.tar.gz: 88d652bbcc7e56955f9cba7330a101759086e3561135b18a93b83254045a0c78
5
5
  SHA512:
6
- metadata.gz: c9bf3495bb2918619807b7b26a3f26b8cb523e839ec0813b7fdb369f9b26ce78add87f0d322e13acff7c6e265093b7852374482afad538bd90010aba13f5b12e
7
- data.tar.gz: bd5c40732c0126cc2b69c195cd675f4108d0dfc107da5acd8df00834e61d1d575a8bf1ce4b256a635e8fe80f6b07aafd8cc4fe9a45997805079a6361eb38171d
6
+ metadata.gz: c05ccb3f3f703229d999c6e2a0ce0d3f851a80ea5891ca3b6cb02b8b22d68a5ec38de5f10a9b1684ab92f1a5d71c4d9fd00a48101e578bac50cb91725c58e07e
7
+ data.tar.gz: 55e24d58d3ccf204de44fbf642ab7dcd377cd0a4ae9ce50e68d66766a70c1298d0f27c13d7ce503158c7e263ebaa6628d7f2d74e89bce7e97e24ef39806268fa
data/README.md CHANGED
@@ -1,24 +1,54 @@
1
- # libgd-gis
2
-
3
- **A geospatial raster engine for Ruby**
4
-
5
- Render real maps, GeoJSON layers, and geospatial data directly in Ruby using a native raster backend powered by **libgd**.
6
-
7
- This project brings back something Ruby lost over time:
8
- the ability to generate **maps, tiles, and geospatial visualizations natively**, without external tools like QGIS, ImageMagick, or Mapbox.
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
- ## 🌍 Example
40
+ ## A geospatial raster engine for Ruby.
13
41
 
14
- This map of Tanzania was generated entirely in Ruby from a GeoJSON dataset of hydroelectric power plants:
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
- ![Tanzania hydro plants](examples/output/tanzania_hydro.png)
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
- No JavaScript.
19
- No QGIS.
20
- No Mapbox.
21
- Just Ruby.
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
- geo = JSON.parse(File.read("hydro_plants.geojson"))
79
- plants = geo["features"]
80
-
81
- lons = plants.map { |f| f["geometry"]["coordinates"][0] }
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: bbox,
88
- zoom: 7,
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
- plants,
94
- lon: ->(f) { f["geometry"]["coordinates"][0] },
95
- lat: ->(f) { f["geometry"]["coordinates"][1] },
96
- icon: "hydro.png"
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("tanzania_hydro.png")
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
@@ -0,0 +1,42 @@
1
+ require "json"
2
+ require "gd/gis"
3
+
4
+ # ---------------------------
5
+ # Bounding box mundial
6
+ # ---------------------------
7
+ AMERICA = [-170, -60, -30, 75]
8
+
9
+ # ---------------------------
10
+ # Crear mapa
11
+ # ---------------------------
12
+ map = GD::GIS::Map.new(
13
+ bbox: AMERICA,
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/america.png")
41
+
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
@@ -0,0 +1,118 @@
1
+ require "net/http"
2
+ require "uri"
3
+ require "fileutils"
4
+ require "json"
5
+ require "gd"
6
+
7
+ # =========================
8
+ # Parámetros
9
+ # =========================
10
+ ZOOM = 4
11
+ TILE_SIZE = 256
12
+
13
+ X_MIN = 0
14
+ Y_MIN = 0
15
+ X_MAX = (2 ** ZOOM) - 1
16
+ Y_MAX = (2 ** ZOOM) - 1
17
+
18
+ COLS = X_MAX - X_MIN + 1
19
+ ROWS = Y_MAX - Y_MIN + 1
20
+
21
+ WIDTH = COLS * TILE_SIZE
22
+ HEIGHT = ROWS * TILE_SIZE
23
+
24
+ FONT = "./fonts/DejaVuSans-Bold.ttf"
25
+
26
+ FileUtils.mkdir_p("tmp/tiles")
27
+ FileUtils.mkdir_p("output")
28
+
29
+ # =========================
30
+ # Web Mercator helpers
31
+ # =========================
32
+ def lon2px(lon, z)
33
+ ((lon + 180.0) / 360.0 * (256 * 2**z))
34
+ end
35
+
36
+ def lat2px(lat, z)
37
+ rad = lat * Math::PI / 180
38
+ ((1 - Math.log(Math.tan(rad) + 1 / Math.cos(rad)) / Math::PI) / 2 * (256 * 2**z))
39
+ end
40
+
41
+ # =========================
42
+ # Descargar tile
43
+ # =========================
44
+ def fetch_tile(z, x, y)
45
+ path = "tmp/tiles/#{z}_#{x}_#{y}.png"
46
+ return path if File.exist?(path)
47
+
48
+ url = URI("https://basemaps.cartocdn.com/light_all/#{z}/#{x}/#{y}.png")
49
+ puts "Downloading #{url}"
50
+
51
+ Net::HTTP.start(url.host, url.port, use_ssl: true) do |http|
52
+ req = Net::HTTP::Get.new(url)
53
+ req["User-Agent"] = "ruby-libgd-gis"
54
+ res = http.request(req)
55
+ raise "Tile failed #{z}/#{x}/#{y}" unless res.code == "200"
56
+ File.binwrite(path, res.body)
57
+ end
58
+
59
+ path
60
+ end
61
+
62
+ # =========================
63
+ # Construir mapa base
64
+ # =========================
65
+ puts "Building world map #{WIDTH}x#{HEIGHT}..."
66
+
67
+ map = GD::Image.new(WIDTH, HEIGHT)
68
+
69
+ (X_MIN..X_MAX).each_with_index do |x, cx|
70
+ (Y_MIN..Y_MAX).each_with_index do |y, cy|
71
+ tile = GD::Image.open(fetch_tile(ZOOM, x, y))
72
+ map.copy(tile, cx * TILE_SIZE, cy * TILE_SIZE, 0, 0, TILE_SIZE, TILE_SIZE)
73
+ end
74
+ end
75
+
76
+ # =========================
77
+ # Cargar picos
78
+ # =========================
79
+ peaks = JSON.parse(File.read("picks.json"))
80
+
81
+ red = GD::Color.rgb(220, 40, 40)
82
+ black = GD::Color.rgb(0, 0, 0)
83
+
84
+ # =========================
85
+ # Dibujar picos
86
+ # =========================
87
+ puts "Plotting peaks..."
88
+
89
+ peaks.each do |p|
90
+ lon = p["longitude"]
91
+ lat = p["latitude"]
92
+ name = p["name"]
93
+
94
+ px = lon2px(lon, ZOOM)
95
+ py = lat2px(lat, ZOOM)
96
+
97
+ x = px.to_i
98
+ y = py.to_i
99
+
100
+ # Marcador
101
+ map.filled_circle(x, y, 7, red)
102
+
103
+ # Texto con FreeType
104
+ map.text(
105
+ name,
106
+ x: x + 10,
107
+ y: y - 5,
108
+ size: 10,
109
+ color: black,
110
+ font: FONT
111
+ )
112
+ end
113
+
114
+ # =========================
115
+ # Guardar
116
+ # =========================
117
+ map.save("output/world_peaks.png")
118
+ puts "Saved output/world_peaks.png"
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"
data/examples/peak.png ADDED
Binary file
@@ -0,0 +1,50 @@
1
+ [
2
+ {"name": "Mount Everest", "elevation_m": 8849, "latitude": 27.9881, "longitude": 86.9250, "country": "Nepal/China"},
3
+ {"name": "K2", "elevation_m": 8611, "latitude": 35.8825, "longitude": 76.5133, "country": "Pakistan/China"},
4
+ {"name": "Kangchenjunga", "elevation_m": 8586, "latitude": 27.7025, "longitude": 88.1475, "country": "Nepal/India"},
5
+ {"name": "Lhotse", "elevation_m": 8516, "latitude": 27.9617, "longitude": 86.9333, "country": "Nepal/China"},
6
+ {"name": "Makalu", "elevation_m": 8485, "latitude": 27.8867, "longitude": 87.0867, "country": "Nepal/China"},
7
+ {"name": "Cho Oyu", "elevation_m": 8188, "latitude": 28.0942, "longitude": 86.6608, "country": "Nepal/China"},
8
+ {"name": "Dhaulagiri I", "elevation_m": 8167, "latitude": 28.6967, "longitude": 83.4867, "country": "Nepal"},
9
+ {"name": "Manaslu", "elevation_m": 8163, "latitude": 28.5497, "longitude": 84.5617, "country": "Nepal"},
10
+ {"name": "Nanga Parbat", "elevation_m": 8126, "latitude": 35.2375, "longitude": 74.5892, "country": "Pakistan"},
11
+ {"name": "Annapurna I", "elevation_m": 8091, "latitude": 28.5961, "longitude": 83.8203, "country": "Nepal"},
12
+ {"name": "Gasherbrum I", "elevation_m": 8080, "latitude": 35.7211, "longitude": 76.6764, "country": "Pakistan/China"},
13
+ {"name": "Broad Peak", "elevation_m": 8051, "latitude": 35.8128, "longitude": 76.5647, "country": "Pakistan/China"},
14
+ {"name": "Gasherbrum II", "elevation_m": 8035, "latitude": 35.7533, "longitude": 76.6333, "country": "Pakistan/China"},
15
+ {"name": "Shishapangma", "elevation_m": 8027, "latitude": 28.3486, "longitude": 85.7781, "country": "China"},
16
+ {"name": "Aconcagua", "elevation_m": 6961, "latitude": -32.6532, "longitude": -70.0109, "country": "Argentina"},
17
+ {"name": "Ojos del Salado", "elevation_m": 6893, "latitude": -27.1192, "longitude": -68.5422, "country": "Chile/Argentina"},
18
+ {"name": "Monte Pissis", "elevation_m": 6795, "latitude": -27.7500, "longitude": -68.7700, "country": "Argentina"},
19
+ {"name": "Huascarán", "elevation_m": 6768, "latitude": -9.1211, "longitude": -77.6153, "country": "Peru"},
20
+ {"name": "Cerro Bonete", "elevation_m": 6759, "latitude": -28.5400, "longitude": -67.7300, "country": "Argentina"},
21
+ {"name": "Volcán Llullaillaco", "elevation_m": 6739, "latitude": -24.7214, "longitude": -68.5328, "country": "Chile/Argentina"},
22
+ {"name": "Chimborazo", "elevation_m": 6263, "latitude": -1.4690, "longitude": -78.8170, "country": "Ecuador"},
23
+ {"name": "Denali", "elevation_m": 6190, "latitude": 63.0692, "longitude": -151.0070, "country": "United States"},
24
+ {"name": "Mount Logan", "elevation_m": 5959, "latitude": 60.5639, "longitude": -140.3964, "country": "Canada"},
25
+ {"name": "Pico de Orizaba", "elevation_m": 5636, "latitude": 19.0300, "longitude": -97.2667, "country": "Mexico"},
26
+ {"name": "Sierra Nevada de Santa Marta", "elevation_m": 5700, "latitude": 10.8500, "longitude": -73.5000, "country": "Colombia"},
27
+ {"name": "Volcán Nevado del Huila", "elevation_m": 5364, "latitude": 2.9428, "longitude": -76.0267, "country": "Colombia"},
28
+ {"name": "Volcán Tajumulco", "elevation_m": 4203, "latitude": 15.0333, "longitude": -91.9000, "country": "Guatemala"},
29
+ {"name": "Pico Duarte", "elevation_m": 3098, "latitude": 19.0833, "longitude": -70.7667, "country": "Dominican Republic"},
30
+ {"name": "Cerro El Pital", "elevation_m": 2730, "latitude": 14.2956, "longitude": -88.3075, "country": "El Salvador/Honduras"},
31
+ {"name": "Mount Vinson", "elevation_m": 4892, "latitude": -78.5250, "longitude": -85.6167, "country": "Antarctica"},
32
+ {"name": "Mount Kilimanjaro", "elevation_m": 5895, "latitude": -3.0674, "longitude": 37.3556, "country": "Tanzania"},
33
+ {"name": "Mount Kenya", "elevation_m": 5199, "latitude": -0.1517, "longitude": 37.3081, "country": "Kenya"},
34
+ {"name": "Mount Stanley", "elevation_m": 5109, "latitude": 0.3322, "longitude": 29.8739, "country": "Uganda/Democratic Republic of the Congo"},
35
+ {"name": "Mount Elbrus", "elevation_m": 5642, "latitude": 43.3547, "longitude": 42.4483, "country": "Russia"},
36
+ {"name": "Mont Blanc", "elevation_m": 4810, "latitude": 45.8326, "longitude": 6.8652, "country": "France/Italy"},
37
+ {"name": "Mount Etna", "elevation_m": 3357, "latitude": 37.7510, "longitude": 14.9937, "country": "Italy"},
38
+ {"name": "Mount Olympus", "elevation_m": 2917, "latitude": 40.0833, "longitude": 22.3333, "country": "Greece"},
39
+ {"name": "Mount Ararat", "elevation_m": 5137, "latitude": 39.7022, "longitude": 44.2931, "country": "Turkey"},
40
+ {"name": "Mount Damavand", "elevation_m": 5610, "latitude": 35.9522, "longitude": 52.1083, "country": "Iran"},
41
+ {"name": "Jabal An-Nabi Shu'ayb", "elevation_m": 3666, "latitude": 15.4900, "longitude": 44.0583, "country": "Yemen"},
42
+ {"name": "Jabal al-Lawz", "elevation_m": 2543, "latitude": 29.5833, "longitude": 38.6333, "country": "Saudi Arabia"},
43
+ {"name": "Mount Fuji", "elevation_m": 3776, "latitude": 35.3606, "longitude": 138.7274, "country": "Japan"},
44
+ {"name": "Mount Apo", "elevation_m": 2954, "latitude": 7.1031, "longitude": 125.2333, "country": "Philippines"},
45
+ {"name": "Gunung Puncak Jaya", "elevation_m": 4884, "latitude": -4.0825, "longitude": 137.1517, "country": "Indonesia"},
46
+ {"name": "Gunung Rinjani", "elevation_m": 3726, "latitude": -8.4083, "longitude": 116.4736, "country": "Indonesia"},
47
+ {"name": "Mount Kosciuszko", "elevation_m": 2228, "latitude": -36.4567, "longitude": 148.2622, "country": "Australia"},
48
+ {"name": "Mount Wilhelm", "elevation_m": 4509, "latitude": -5.7900, "longitude": 144.8700, "country": "Papua New Guinea"},
49
+ {"name": "Mount Cook (Aoraki)", "elevation_m": 3724, "latitude": -43.5942, "longitude": 170.1419, "country": "New Zealand"}
50
+ ]