libgd-gis 0.4.3 → 0.4.4

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 (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +38 -32
  3. data/lib/gd/gis/style.rb +3 -3
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8fdfcd8c25a4c2d5be9f69153957d4d3c5fbd2b82e26167554be17c7e0ff058c
4
- data.tar.gz: 9b5b504f06e11d6a0ac465747237e8832986234bee3ded81f0360a5c6749d29f
3
+ metadata.gz: 12f001e0a04fd6daa74954df04a6e9a7fb0c96125dcc4abc9d86ad47e2b88c7f
4
+ data.tar.gz: 691682c8ba0207ab1e57f6e47b42aca5f352e99674090b0fb88082d9a01252b1
5
5
  SHA512:
6
- metadata.gz: 7ded6603953b5144db8794841f6c898aea15819960b8d1a3b89c46e7122e74bf7c0e344814a983d5fbede7f4472080dc39ea360743d6d73d24c82d31371e5dcc
7
- data.tar.gz: 2a2b7f255b78b338e128d9a2a0bd293db0936da7a30cfdb94e710c541251937c798504b9f5c20fd5ccabb8845c10fc29a47878d886a723e0a66f3ce25effd4aa
6
+ metadata.gz: 7c211ae32a88b7c012ac235a4d00cf03b195074ebfd9a8140f2661368e0515125366e81c576f2d7e277eb38ab56f20e44c484fac8fcf44fb3ce44053d627e146
7
+ data.tar.gz: 245b629a1c2729a7e43d09a47c9e5833e3032699ca4d2b80479d19b9dfc44f4d14eb16261d2c0a113794ffea3e1eff029aa9cb1ed314e9e6f887c5fa16de28d9
data/README.md CHANGED
@@ -27,7 +27,6 @@
27
27
  <p align="right">
28
28
  <img src="docs/images/logo-gis.png" width="160" />
29
29
  </p>
30
-
31
30
  ![CI](https://github.com/ggerman/libgd-gis/actions/workflows/ci.yml/badge.svg)
32
31
  [![Codacy Badge](https://api.codacy.com/project/badge/Grade/6bc3e7d6118d47e6959b16690b815909)](https://www.codacy.com/app/libgd-gis/libgd-gis?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=libgd-gis/libgd-gis&amp;utm_campaign=Badge_Grade)
33
32
  [![Test Coverage](https://coveralls.io/repos/githublibgd-gis/libgd-gis/badge.svg?branch=master)](https://coveralls.io/github/libgd-gis/libgd-gis?branch=master)
@@ -35,16 +34,46 @@
35
34
 
36
35
  ---
37
36
 
38
- **libgd-gis** is a lightweight Ruby GIS rendering library built on top of **GD**.
39
- It renders geographic data (GeoJSON, points, lines, polygons) into raster images using Web Mercator tiles and a simple, explicit rendering pipeline.
37
+ **libgd-gis** is a A native map rendering engine for Ruby built on **libgd**.
38
+
39
+ It allows developers to generate maps, tiles, and heatmaps directly from GeoJSON using the libgd raster engine — without external services.
40
+
41
+ ---
42
+
43
+ ## Use Cases
44
+
45
+ libgd-gis is useful for:
46
+
47
+ - Generating static maps for Rails applications
48
+ - Rendering GeoJSON data to PNG images
49
+ - Creating heatmaps and geographic visualizations
50
+ - Building internal dashboards with map outputs
51
+ - Self-hosted alternatives to static map APIs
52
+
53
+ ---
54
+
55
+ ## Example
56
+
57
+ ```ruby
58
+ map = GD::GIS::Map.new(width: 800, height: 600)
59
+
60
+ map.add_geojson("countries.geojson")
61
+ map.add_point(lat: -34.6, lon: -58.4)
62
+ map.render
63
+
64
+ map.save("map.png")
65
+ ```
40
66
 
41
- This library is designed for **map visualization**, not for spatial analysis.
67
+ ![](examples/parana/parana.png)
42
68
 
43
69
  ---
44
70
 
71
+ > 🆕 **Update:** Style is no longer mandatory. Maps now render out-of-the-box using a built-in default style.
72
+
73
+ ---
45
74
  ## Features
46
75
 
47
- - Web Mercator tile rendering (OSM, CARTO, ESRI, Stamen, etc.)
76
+ - Web Mercator map and tile rendering (OSM, CARTO, ESRI, Stamen, etc.)
48
77
  - CRS normalization (CRS84, EPSG:4326, EPSG:3857, Gauss–Krüger Argentina)
49
78
  - Layered rendering pipeline
50
79
  - YAML-based styling
@@ -54,20 +83,6 @@ This library is designed for **map visualization**, not for spatial analysis.
54
83
 
55
84
  ---
56
85
 
57
- ## Non-Goals
58
-
59
- libgd-gis intentionally does **not** aim to be:
60
-
61
- - a spatial analysis engine
62
- - a replacement for PostGIS / GEOS
63
- - a full map server
64
- - a vector tile generator
65
-
66
- If you need projections beyond Web Mercator or topological correctness,
67
- use a full GIS stack.
68
-
69
- ---
70
-
71
86
  ## Installation
72
87
 
73
88
  Add to your Gemfile:
@@ -124,19 +139,6 @@ map.save("map.png")
124
139
 
125
140
  ---
126
141
 
127
- ## Styles Are Mandatory
128
-
129
- libgd-gis requires an explicit **style definition** in order to render a map.
130
-
131
- A `GD::GIS::Map` instance **will not render without a style**, and calling
132
- `map.render` before assigning one will raise an error.
133
-
134
- This is intentional.
135
-
136
- Styles define how semantic layers (roads, water, parks, points, etc.) are mapped
137
- to visual properties such as colors, stroke widths, fills, and drawing order.
138
- No implicit or default styling is applied.
139
-
140
142
  ### Example:
141
143
 
142
144
  ```ruby
@@ -201,6 +203,8 @@ order:
201
203
  This design ensures predictable rendering and makes all visual decisions explicit
202
204
  and reproducible.
203
205
 
206
+ ![](examples/paris/paris.png)
207
+
204
208
 
205
209
  ---
206
210
 
@@ -210,6 +214,8 @@ and reproducible.
210
214
  LibGD-GIS includes a global dataset of predefined geographic areas.
211
215
  You can use them directly as the `bbox` parameter.
212
216
 
217
+ ![](examples/legend/example_parana_polaroid.png)
218
+
213
219
  ### Example
214
220
 
215
221
  ```ruby
data/lib/gd/gis/style.rb CHANGED
@@ -127,7 +127,7 @@ module GD
127
127
  },
128
128
 
129
129
  label: {
130
- label: { # ← envolver
130
+ label: {
131
131
  color: [229, 231, 235],
132
132
  font: GD::GIS::FontHelper.find("DejaVuSans"),
133
133
  size: 12
@@ -135,7 +135,7 @@ module GD
135
135
  },
136
136
 
137
137
  roads: {
138
- roads: { # ← envolver
138
+ roads: {
139
139
  color: [229, 231, 235],
140
140
  font: GD::GIS::FontHelper.find("DejaVuSans"),
141
141
  width: 6
@@ -172,7 +172,7 @@ module GD
172
172
  },
173
173
 
174
174
  track: {
175
- track: { # ← CLAVE
175
+ track: {
176
176
  stroke: [0, 85, 127, 250],
177
177
  color: [250, 204, 21],
178
178
  width: 2,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libgd-gis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Germán Alberto Giménez Silva