layer.symbology: manual graduated breaks refused on a layer read in place ("has no numeric values")
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
Research direction
Start by tracing layer.symbology for graduated renderers and how it obtains numeric values from layers read in place; compare that path with style.add and style.apply, which the issue says work. Then inspect how remote GeoParquet statistics are exposed for a field maximum and how view features are classified. Done means manual breaks produce the stated classes, and quantile classification uses the current view as described.
Written by the indexing model from the issue text.
Description
What happens
layer.symbology with "type": "graduated" and "method": "manual" is refused on a layer read in place (a remote GeoParquet or FlatGeobuf, read a view at a time): 'height' has no numeric values. Manual breaks don't need the field's values, but the command looks for them in the features held, and a layer read in place holds none.
The same classes, written as a style and applied with style.add and style.apply, draw correctly on that layer. So the renderer works; only the command refuses.
Steps to reproduce (RustGIS 0.7.0, code unchanged on main def3c292)
GlobalBuildingAtlas on Source Cooperative: a GeoParquet of 1.09 GB, 13.6 M buildings, with a numeric height field (Double):
layer.addUrl {"url": "https://data.source.coop/tge-labs/globalbuildingatlas-lod1/w045_s20_w040_s25.parquet", "name": "gba"}
map.goToXY {"lon": -42.8825, "lat": -20.754, "scale": 8000}
layer.symbology {"layer": "gba", "type": "graduated", "field": "height", "method": "manual", "breaks": [4, 7, 10, 15, 25]}
- Result:
layer.symbology: 'height' has no numeric values. Exporting the map first, so the view's features are read, gives the same answer. - Expected: the six classes, with upper bounds 4, 7, 10, 15 and 25. The last class would be closed by a large bound, since the field's largest value isn't known.
Choices in this proposal
- Manual breaks: accepted without reading values. The last class is closed by the field's statistics when the file has them (GeoParquet column statistics give a max), else left open (
+∞), and the legend says "more than 25". - Other methods (natural breaks, quantile…) on a layer read in place: classify the features the current view holds. The answer then says the classes come from the view.
- Unique values: the same, values from the view.
- Tests:
- manual breaks on a remote GeoParquet layer give a Graduated renderer;
- quantiles on it come from the view and say so.
Context
This came up in the BrasilData plugin, which colours GlobalBuildingAtlas buildings by height. The plugin now writes the classes as a style (style.add), which works around this.
- Dominant language
- Rust
- Stars
- 1.9k
- Forks
- 268
- Avg merge
- 11h 1m
- Merged PRs (30d)
- 942
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from opengeos/RustGIS
-
[Bug]: layer.move to the place a layer already has fails and stops a script; with several layers it leaves an empty undo stepPossibly taken @jgregoriorincon claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
opengeos/RustGIS#2621 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 61/100
opengeos/RustGIS#1446 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
All issues in opengeos/RustGIS
Similar issues
-
postgresql-rules / queue-rules: implicit KEY SHARE before a parent key update, and job self-overlapOpen
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
jonathanong/no-mistakes#3879 ·
Maintainers usually reply within 1 day
-
area:index v0.35.0
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
nautechsystems/nautilus_trader#5741 ·
Maintainers usually reply within 1 day
-
RunPlugin derives Hash over all fields while PartialEq compares only location and configurationOpen
Difficulty 1/5 Under an hour Newbie friendliness 86/100
zellij-org/zellij#5969 ·
Maintainers usually reply within 1 day
-
eth_get_proof reports another account's fields for an absent accountPossibly taken @Indian-boult claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day