brutile

brutile is a skill for Claude Code, Codex from znlgis/opengis-skills. It costs 107 tokens per session (4,270 once invoked), scanned A, original, MIT.

A .NET library that finds and downloads the map tiles needed for a visible map area. It supplies tile data but does not display the map; a separate map component does that.

In plain words
What is it for?
Use it to fetch HTTP map tiles, read MBTiles or file-based tile caches, calculate tiles for a viewport, and connect tile data to Mapsui or SharpMap.
Why use it?
It removes the work of translating a map view and zoom level into tile requests, including support for online services and offline tile files.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to fetch HTTP map tiles, read MBTiles or file-based tile caches, calculate tiles for a viewport, and connect tile data to Mapsui or SharpMap.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/znlgis/opengis-skills/brutile
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add znlgis/opengis-skills --skill brutile
Clone the repo
git clone --depth 1 https://github.com/znlgis/opengis-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for brutile

README.md
[![agentmods](https://agentmods.dev/badge/skills/znlgis/opengis-skills/brutile/github.svg)](https://agentmods.dev/skills/znlgis/opengis-skills/brutile)
Your own site
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/brutile"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/brutile/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for brutile

Your own site · 80×15
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/brutile"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/brutile.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 107 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,270 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00107 $0.04270
Opus 5.5 $0.00043 $0.01708
Sonnet 5.5 $0.00021 $0.00854
Haiku 4.5 $0.00011 $0.00427

Measured 9d ago against content hash c7e17232ea11, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

brutile scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

gis/brutile/SKILL.md · 290 lines

How it starts

The opening of the file, as written. The whole thing — 290 lines — stays where its author put it; the contents beside it link to each section on GitHub.

项目地址: https://github.com/BruTile/BruTile

NuGet: BruTile 6.0.0 / BruTile.MbTiles 6.0.0(net8.0 / net9.0,截至 2026-10)

官方文档: https://github.com/BruTile/BruTile

许可证: Apache-2.0

概述

BruTile 是一个只管「瓦片」的 .NET 库:给定视口范围与分辨率,算出需要哪些瓦片,再去对应服务把瓦片字节取回来。它不做渲染、不含 UI,瓦片最终由 Mapsui、SharpMap、ArcBruTile 等地图组件显示。这种职责划分让 BruTile 可以同时支撑 WPF、MAUI、Blazor、ASP.NET 等多种宿主,也是它在 .NET 地图栈中长期作为底座的原因。

  • 瓦片方案(schema):Web 墨卡托全球网格、WMTS、TMS、WMS-C 等组织的分辨率与瓦片索引映射
  • 瓦片源:HTTP 瓦片服务(XYZ/OSM、ArcGIS、Bing 等)、MBTiles 离线文件、文件系统瓦片缓存
  • 视口计算:ITileSchema.GetTileInfos(extent, resolution) 求当前需要渲染的瓦片集合
  • 缓存:内存缓存与持久化缓存(MBTiles、文件系统)可组合
  • 坐标系约定:默认 Web 墨卡托(EPSG:3857),OSM 与 TMS 的 y 轴方向不同,需显式选择

版本提示:BruTile 6.0.0 只发布 net8.0 / net9.0 目标。需要 netstandard2.0 的场景(例如 .NET Framework、SharpMap 1.2)只能用 5.0.6 或更早版本,详见下方版本对照表。


环境准备

安装

# 在线瓦片(HTTP 服务)
dotnet add package BruTile --version 6.0.0

# 离线 MBTiles 需要额外的包
dotnet add package BruTile.MbTiles --version 6.0.0

# 需要挂在 Mapsui 上时
dotnet add package Mapsui --version 5.1.0
Install-Package BruTile -Version 6.0.0

验证

using BruTile;
using BruTile.Predefined;

var schema = new GlobalSphericalMercator();
Console.WriteLine(schema.Resolutions.Count);   // 默认 0..19 级共 20 个分辨率
var tileInfos = schema.GetTileInfos(
    new Extent(-20037508, -20037508, 20037508, 20037508), 156543.03392804097);
Console.WriteLine(tileInfos.Count());          // 0 级应只有 1 张
dotnet run

版本与目标框架对照

BruTile 版本 目标框架 说明
6.0.0 net8.0 / net9.0 当前版本;HttpTileSource.GetTileAsync 需要传入 HttpClient
5.0.6 net6.0 / netstandard2.0 兼容 .NET Framework 4.6.1+ 与 .NET 6/7
4.0.0 / 3.1.3 netstandard2.0 / netstandard1.1 老项目常用;BruTile.Desktop 在 4.0 起被删除,内容并入 BruTile

BruTile.Desktop、BruTile.Desktop.DbCache 这两个包名在 4.0 之后已不存在,旧代码里的 using BruTile.Desktop 需要改命名空间。


核心 API

TileSchema 与分辨率

using BruTile;
using BruTile.Predefined;

// 全球 Web 墨卡托,默认 0-19 级;y 轴默认 OSM 约定
var schema = new GlobalSphericalMercator(minZoomLevel: 0, maxZoomLevel: 18);

// 自定义瓦片方案
var custom = new TileSchema
{
    Name = "MyTiles",
    Srs = "EPSG:3857",
    Extent = new Extent(-20037508, -20037508, 20037508, 20037508),
    YAxis = YAxis.OSM,
    Format = "image/png",
};
custom.Resolutions.Add(0, new Resolution(0, 156543.03392804097, 256, 256));
custom.Resolutions.Add(1, new Resolution(1, 78271.51696402048, 256, 256));

Read the full file on GitHub · 290 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 290 lines · 107 tokens per session scan A c7e17232ea11

Subscribe to this mod's changes

brutile is a skill published in the GitHub repository znlgis/opengis-skills (76 stars, last pushed 10d ago), licensed MIT. It adds 107 tokens to every session and 4,270 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-28.

Related

brutile compared with skills from other repositories

brutile next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
brutileznlgis/opengis-skillsSkill7610d agoMITA107Claude Code, Codex
date-formatterAzure/azure-sdk-for-netSkill6.1kyesterdayMITA13Claude Code, Codex
semantic-kernelmanagedcode/dotnet-skillsSkill508yesterdayMITA116Claude Code, Codex
api-designericrisco/rsc-harnessSkill5032d agoMITA105Claude Code, Codex
winformsmanagedcode/dotnet-skillsSkill508yesterdayMITA122Claude Code, Codex
grpcmanagedcode/dotnet-skillsSkill508yesterdayMITA95Claude Code, Codex
add-adrSSWConsulting/SSW.VerticalSliceArchitectureSkill4168d agoMITA83Claude Code