Commit 8f32885
authored
feat(plugins): add a STAC catalogs browser plugin (#1516)
* feat(plugins): add a STAC catalogs browser plugin
Browsing SpatioTemporal Asset Catalogs previously meant leaving the app or
hand-adding COG URLs. This plugin discovers catalogs from STAC Index, connects
to both static catalogs and STAC APIs, and adds visualizable assets as layers.
* Address CodeRabbit review feedback
- Thread the panel's AbortController signal through visualizeAsset so an
in-flight GeoJSON asset fetch is cancelled when the panel unmounts instead
of leaving the Add button disabled indefinitely.
- Normalize item.bbox through itemBbox() before the extent test in
searchStaticStac; a 3D (6-element) bbox was read as 2D, comparing minZ
against the query's minX and silently mis-filtering items with an
elevation extent.
- Cover the searchStacApi GET fallback and the 3D-bbox static filter case.
* fix(stac): collapse per-asset buttons into a dropdown, resize collections
An item with ten assets rendered twenty buttons, so a page of twenty results
was a wall of them. Each card is now Zoom plus one asset dropdown with a
single Add and Download, preselecting the first asset that can go on the map
and disabling Add with an explanatory tooltip for the rest.
The collection list is also drag-resizable, since catalogs can advertise
well over a hundred collections into a three-row box.
* fix(stac): register search footprints as a real layer
The footprints were pushed straight onto the MapLibre style, so they never
appeared in the Layers panel and there was no way to hide or remove them.
They are a store GeoJSON layer now, with visibility, opacity, styling, and
delete working like any other layer, and they persist when the panel closes.
Repeat searches patch the existing layer instead of stacking duplicates, and
a search after the user deletes it adds it back.
* feat(stac): footprint selection and raster rendering options
Clicking a footprint on the map now selects that item: the matching result
card is outlined and scrolled into view, and the footprint is highlighted.
Clicking a card selects it too, so the map and the list stay in step both
ways. A fresh search clears the selection; Load more keeps it.
Adds a collapsed "Raster rendering options" section feeding addCogLayer, so
a GeoTIFF asset can be added with a band combination, named colormap, min/max
rescale, and NoData override instead of only the renderer's inferred defaults.
Result cards get a minimum height and the filter sections scroll as a group,
so opening the new section cannot push the results off the panel.
* Address CodeRabbit review feedback
- Mark the footprints layer with metadata.sourceKind and look it up by that
marker as well as by id. The layer is saved into the project while
footprintLayerId only lives for the session, so a search after reopening a
saved project added a second copy and deactivation could not remove the
restored one.
* fix(stac): expose raster symbology for COG assets
* feat(stac): extend and clear catalog searches
* fix(stac): render COG assets from direct HTTP URLs
* fix(layers): scroll and copy metadata
* i18n: translate the STAC Catalogs plugin name into the 15 non-English catalogs
The plugin name added in this branch was the only key missing anywhere, so
every catalog fell back to English in the Plugins menu. STAC stays Latin like
the other acronym-named entries (NASA Earthdata, FEMA NFHL); only "Catalogs"
is translated, reusing each catalog's existing word for it.
* i18n: migrate the STAC panel strings to the label-push pattern
The panel built its DOM with English literals, so it rendered English in every
locale no matter what the catalogs said. It now takes its 64 user-facing
strings from a StacLabels record that the host fills with t() and re-pushes on
language change, matching maplibre-graticule and maplibre-timelapse.
All 15 non-English catalogs are translated, so coverage stays at 100 percent.
Count and asset strings follow the h3Plugin.cellCount precedent of a single
form phrased neutrally rather than CLDR plural sets.1 parent fe8466c commit 8f32885
27 files changed
Lines changed: 2966 additions & 42 deletions
File tree
- apps/geolibre-desktop/src
- components
- layout
- panels
- hooks
- i18n/locales
- packages/plugins
- src
- plugins
- tests
Lines changed: 68 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
572 | 573 | | |
573 | 574 | | |
574 | 575 | | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
575 | 643 | | |
576 | 644 | | |
577 | 645 | | |
| |||
Lines changed: 36 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
602 | 602 | | |
603 | 603 | | |
604 | 604 | | |
| 605 | + | |
605 | 606 | | |
606 | 607 | | |
607 | 608 | | |
| |||
799 | 800 | | |
800 | 801 | | |
801 | 802 | | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
802 | 820 | | |
803 | 821 | | |
804 | 822 | | |
| |||
3555 | 3573 | | |
3556 | 3574 | | |
3557 | 3575 | | |
3558 | | - | |
| 3576 | + | |
| 3577 | + | |
| 3578 | + | |
| 3579 | + | |
3559 | 3580 | | |
3560 | 3581 | | |
3561 | 3582 | | |
| |||
3603 | 3624 | | |
3604 | 3625 | | |
3605 | 3626 | | |
| 3627 | + | |
| 3628 | + | |
| 3629 | + | |
| 3630 | + | |
| 3631 | + | |
| 3632 | + | |
3606 | 3633 | | |
3607 | 3634 | | |
3608 | 3635 | | |
3609 | 3636 | | |
3610 | 3637 | | |
3611 | 3638 | | |
3612 | 3639 | | |
3613 | | - | |
3614 | | - | |
3615 | | - | |
3616 | | - | |
3617 | | - | |
3618 | | - | |
3619 | | - | |
3620 | | - | |
3621 | | - | |
3622 | | - | |
3623 | | - | |
3624 | | - | |
3625 | | - | |
3626 | | - | |
| 3640 | + | |
| 3641 | + | |
| 3642 | + | |
| 3643 | + | |
| 3644 | + | |
| 3645 | + | |
| 3646 | + | |
| 3647 | + | |
3627 | 3648 | | |
3628 | 3649 | | |
3629 | 3650 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| 172 | + | |
171 | 173 | | |
172 | 174 | | |
173 | 175 | | |
| |||
799 | 801 | | |
800 | 802 | | |
801 | 803 | | |
802 | | - | |
| 804 | + | |
803 | 805 | | |
804 | 806 | | |
805 | 807 | | |
| |||
884 | 886 | | |
885 | 887 | | |
886 | 888 | | |
887 | | - | |
888 | | - | |
889 | | - | |
890 | | - | |
891 | | - | |
892 | | - | |
893 | | - | |
894 | | - | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
895 | 903 | | |
896 | | - | |
897 | | - | |
898 | | - | |
899 | | - | |
900 | | - | |
901 | | - | |
902 | | - | |
903 | | - | |
904 | | - | |
905 | | - | |
906 | | - | |
907 | | - | |
908 | | - | |
909 | | - | |
910 | | - | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
911 | 919 | | |
912 | 920 | | |
913 | 921 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2569 | 2569 | | |
2570 | 2570 | | |
2571 | 2571 | | |
| 2572 | + | |
2572 | 2573 | | |
2573 | 2574 | | |
2574 | 2575 | | |
| |||
4982 | 4983 | | |
4983 | 4984 | | |
4984 | 4985 | | |
| 4986 | + | |
| 4987 | + | |
| 4988 | + | |
| 4989 | + | |
| 4990 | + | |
| 4991 | + | |
| 4992 | + | |
| 4993 | + | |
| 4994 | + | |
| 4995 | + | |
| 4996 | + | |
| 4997 | + | |
| 4998 | + | |
| 4999 | + | |
| 5000 | + | |
| 5001 | + | |
| 5002 | + | |
| 5003 | + | |
| 5004 | + | |
| 5005 | + | |
| 5006 | + | |
| 5007 | + | |
| 5008 | + | |
| 5009 | + | |
| 5010 | + | |
| 5011 | + | |
| 5012 | + | |
| 5013 | + | |
| 5014 | + | |
| 5015 | + | |
| 5016 | + | |
| 5017 | + | |
| 5018 | + | |
| 5019 | + | |
| 5020 | + | |
| 5021 | + | |
| 5022 | + | |
| 5023 | + | |
| 5024 | + | |
| 5025 | + | |
| 5026 | + | |
| 5027 | + | |
| 5028 | + | |
| 5029 | + | |
| 5030 | + | |
| 5031 | + | |
| 5032 | + | |
| 5033 | + | |
| 5034 | + | |
| 5035 | + | |
| 5036 | + | |
| 5037 | + | |
| 5038 | + | |
| 5039 | + | |
| 5040 | + | |
| 5041 | + | |
| 5042 | + | |
| 5043 | + | |
| 5044 | + | |
| 5045 | + | |
| 5046 | + | |
| 5047 | + | |
| 5048 | + | |
| 5049 | + | |
| 5050 | + | |
| 5051 | + | |
4985 | 5052 | | |
4986 | 5053 | | |
0 commit comments