STAC Lens
STAC 是描述地理空间数据的开放标准——卫星影像、航拍、高程、气候格网,都以 Catalog → Collection → Item 的目录挂在网上,从 NASA、ESA、Microsoft Planetary Computer 到各国测绘机构,公开的目录有几百个。但想知道"这个目录到底长什么样",逐字段翻页的浏览器帮不上忙。
STAC Lens 回答三个问题。形状:发布者到底是怎么组织数据的——层层嵌套,还是一个根下平铺四百个 Collection?健康:元数据在哪里自相矛盾、哪里不合规范?与规范的距离:API 声称支持什么,真被问到时又做了什么?它会发出真实请求,报告两者的差。
粘贴任意一个 catalog URL 就能用:结构画成一棵可拖拽缩放的树(同一份结构还有 Outline / Icicle / Radial 三种视图),时间和空间覆盖并排显示,在哪个视图里选中,其它视图都跟着走。一切都在浏览器里完成,什么都不上传——每个请求都从你的浏览器直接发向你在看的那个目录。
它不是另一个 STAC Browser:STAC Browser 忠实地读一个目录的每个字段,STAC Lens 想让你理解一个目录是什么。想让访客阅读你发布的目录,部署 STAC Browser;想看清一个目录——你自己的或任何人的——用 STAC Lens 打开它。
几条原则:
- 不枚举无法枚举的东西——五千万条 Item 的 Collection 就用 API 自己的游标一页页翻,没有"全部加载"
- 不发明结构——树只画发布者做出的层级,平的就是平的;不做客户端分组,不造数据里没有的数字
- 失败就显示为失败——被拒绝的请求显示服务器自己的原话,而不是一个空结果
- "健康"不是分数,是一条条有出处的规则(STAC 规范、best practices、stac-check、stac-api-validator 的方法),每条有编号可以引用;没有规则可依的事实只作为观察报告,不当作问题
首页同时是一个入口:100 多个验证过的公开 STAC 目录,按主题 / 地区 / 发布者筛选,逐个确认过是活的、是真 STAC、浏览器可达。
技术:TypeScript + React 19 + Vite,D3 画结构,Leaflet 画地图,纯客户端,Apache-2.0。
--- layout: lab.njk title_zh: STAC Lens title_ja: STAC Lens title_en: STAC Lens year: 2026 cover: /images/lab/stac-lens/cover.png description: "Browser-only viewer and health checker for any STAC catalog or API — the shape of the data, where the metadata contradicts itself, and what the API actually does when asked. Paste a URL; nothing is uploaded." url: https://staclens.com embed: https://staclens.com github: https://github.com/rednotfound/stac-lens workTags: - lab - software --- <div lang="zh"> STAC 是描述地理空间数据的开放标准——卫星影像、航拍、高程、气候格网,都以 Catalog → Collection → Item 的目录挂在网上,从 NASA、ESA、Microsoft Planetary Computer 到各国测绘机构,公开的目录有几百个。但想知道"这个目录到底长什么样",逐字段翻页的浏览器帮不上忙。 STAC Lens 回答三个问题。**形状**:发布者到底是怎么组织数据的——层层嵌套,还是一个根下平铺四百个 Collection?**健康**:元数据在哪里自相矛盾、哪里不合规范?**与规范的距离**:API 声称支持什么,真被问到时又做了什么?它会发出真实请求,报告两者的差。 粘贴任意一个 catalog URL 就能用:结构画成一棵可拖拽缩放的树(同一份结构还有 Outline / Icicle / Radial 三种视图),时间和空间覆盖并排显示,在哪个视图里选中,其它视图都跟着走。一切都在浏览器里完成,什么都不上传——每个请求都从你的浏览器直接发向你在看的那个目录。 它不是另一个 STAC Browser:STAC Browser 忠实地读一个目录的每个字段,STAC Lens 想让你理解一个目录*是*什么。想让访客阅读你发布的目录,部署 STAC Browser;想看清一个目录——你自己的或任何人的——用 STAC Lens 打开它。 几条原则: - 不枚举无法枚举的东西——五千万条 Item 的 Collection 就用 API 自己的游标一页页翻,没有"全部加载" - 不发明结构——树只画发布者做出的层级,平的就是平的;不做客户端分组,不造数据里没有的数字 - 失败就显示为失败——被拒绝的请求显示服务器自己的原话,而不是一个空结果 - "健康"不是分数,是一条条有出处的规则(STAC 规范、best practices、stac-check、stac-api-validator 的方法),每条有编号可以引用;没有规则可依的事实只作为观察报告,不当作问题 首页同时是一个入口:100 多个验证过的公开 STAC 目录,按主题 / 地区 / 发布者筛选,逐个确认过是活的、是真 STAC、浏览器可达。 技术:TypeScript + React 19 + Vite,[D3](https://d3js.org/) 画结构,[Leaflet](https://leafletjs.com/) 画地图,纯客户端,Apache-2.0。 </div> <div lang="ja"> STAC は地理空間データを記述するオープンな標準だ。衛星画像、航空写真、標高、気候グリッド——どれも Catalog → Collection → Item のカタログとしてウェブに載っていて、NASA、ESA、Microsoft Planetary Computer から各国の測量機関まで、公開カタログは数百ある。ただ「このカタログは結局どんな形をしているのか」を知りたいとき、フィールドを一つずつめくるブラウザは役に立たない。 STAC Lens が答えるのは 3 つの問いだ。**形**:発行者はデータをどう組織したのか——深い入れ子か、ルート直下に 400 の Collection が平置きか。**健康**:メタデータはどこで自己矛盾し、どこで仕様から外れているか。**仕様との距離**:API は何をサポートすると宣言していて、実際に聞かれたとき何をするのか。本物のリクエストを送り、その差を報告する。 カタログの URL を貼るだけで使える。構造はドラッグとホイールで動かせるツリーに描かれ(同じ構造を Outline / Icicle / Radial の 3 つのビューでも見られる)、時間と空間のカバレッジが並んで表示され、どのビューで選択しても他のビューが追従する。すべてブラウザの中で完結し、何もアップロードしない——リクエストはすべて、あなたのブラウザから、見ているそのカタログへ直接飛ぶ。 もう一つの STAC Browser ではない。STAC Browser はカタログの全フィールドを忠実に読むためのもので、STAC Lens はカタログが*何であるか*を理解するためのものだ。自分の公開したカタログを訪問者に読んでほしいなら STAC Browser をデプロイする。カタログ——自分のでも誰のでも——の姿を見たいなら STAC Lens で開く。 いくつかの原則: - 数え上げられないものは数え上げない——5,100 万 Item の Collection は API 自身のカーソルで 1 ページずつめくる。「全部読み込む」は存在しない - 構造を発明しない——ツリーは発行者が作った階層だけを描く。平らなものは平らなまま。クライアント側のグルーピングも、ソースにない数字も作らない - 失敗は失敗として見せる——拒否されたリクエストはサーバー自身の言葉のエラーとして表示する。空の結果にはしない - 「健康」はスコアではなく、出典つきのルールの一覧(STAC 仕様、ベストプラクティス、stac-check、stac-api-validator の手法)。各ルールに ID があり引用できる。よりどころのルールがない事実は観察として報告するだけで、問題扱いにはしない ランディングページは入口でもある:検証済みの公開 STAC カタログ 100 以上を、トピック / 地域 / 発行者でしぼり込める。ひとつずつ、生きていること、本物の STAC であること、ブラウザから届くことを確認してある。 技術:TypeScript + React 19 + Vite、構造は [D3](https://d3js.org/)、地図は [Leaflet](https://leafletjs.com/)。純クライアントサイド、Apache-2.0。 </div> <div lang="en"> STAC is the open standard for describing geospatial data — satellite imagery, aerial photography, elevation models, climate grids — published as catalogs of Collections and Items, by everyone from NASA, ESA and Microsoft Planetary Computer to national mapping agencies. Hundreds of public catalogs exist. But when you want to know what a catalog actually *looks like*, a field-by-field browser doesn't help. STAC Lens answers three questions. **Shape**: how did the publisher actually organize this data — deep and nested, or a flat root with four hundred Collections? **Health**: where does the metadata contradict itself or the standard? **Distance from the specification**: what does an API *declare* it supports, and what does it *do* when asked? It sends real requests and reports the difference. Paste any catalog URL: the structure is drawn as a pannable, zoomable tree (with Outline, Icicle and Radial views of the same loaded graph), coverage in time and space sits alongside it, and selecting anything in one view moves the others. Everything happens in the browser and nothing is uploaded — every request goes from your browser to the catalog you are looking at. It is not another STAC Browser: STAC Browser reads a catalog faithfully, every object, every field; STAC Lens is for understanding what a catalog *is*. If you publish a catalog and want visitors to read it, deploy STAC Browser. If you want to see the shape of one — yours or anyone's — open it in STAC Lens. A few principles: - Never enumerate what can't be enumerated — a 51-million-Item Collection is browsed through the API's own cursor, one page at a time; there is no "load everything" - Never invent structure — the tree shows the hierarchy the publisher made, flat where it is flat; no client-side grouping, no counts the source didn't give - Show a failure as a failure — a rejected request is an error message with the server's own words, never an empty result - "Health" is not a score but a list of rules, each cited to a source (the STAC spec, its best practices, stac-check, the method of stac-api-validator), each with a stable ID so a finding can be cited; a fact with no rule behind it is reported as an observation, never as a problem The landing page doubles as a front door: 100+ verified public STAC catalogs, filterable by topic, region and publisher — each confirmed live, real STAC, and reachable from a browser. Stack: TypeScript + React 19 + Vite, [D3](https://d3js.org/) for structure, [Leaflet](https://leafletjs.com/) for maps. Client-side only, Apache-2.0. </div>