nettopologysuite

nettopologysuite is a skill for Claude Code, Codex from znlgis/opengis-skills. It costs 85 tokens per session (3,597 once invoked), scanned A, original, MIT.

A .NET library for calculating relationships and measurements between two-dimensional shapes. It supports common map geometries such as points, lines, and polygons, plus formats including GeoJSON and WKT.

In plain words
What is it for?
Use it in C# applications for intersections, unions, buffers, distance checks, geometry validation, spatial indexes, and database spatial queries.
Why use it?
It saves C# developers from implementing spatial calculations, shape indexing, and geometry file handling from scratch.

Skill for Claude CodeCodex

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

Good fit Use it in C# applications for intersections, unions, buffers, distance checks, geometry validation, spatial indexes, and database spatial queries.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/znlgis/opengis-skills/nettopologysuite
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 nettopologysuite
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 nettopologysuite

README.md
[![agentmods](https://agentmods.dev/badge/skills/znlgis/opengis-skills/nettopologysuite/github.svg)](https://agentmods.dev/skills/znlgis/opengis-skills/nettopologysuite)
Your own site
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/nettopologysuite"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/nettopologysuite/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 nettopologysuite

Your own site · 80×15
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/nettopologysuite"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/nettopologysuite.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,597 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00085 $0.03597
Opus 5.5 $0.00034 $0.01439
Sonnet 5.5 $0.00017 $0.00719
Haiku 4.5 $0.00009 $0.00360

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

Security

Grade A, and why

nettopologysuite 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/nettopologysuite/SKILL.md · 338 lines

How it starts

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

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

NuGet: NetTopologySuite(最新稳定版 2.6.0,截至 2026-10,NuGet)

官方文档: https://nettopologysuite.github.io/NetTopologySuite/

许可证: BSD-3-Clause

概述

NTS 与 JTS API 几乎一一对应(C# 命名风格):

  • 几何模型:Point/LineString/Polygon/Multi*/GeometryCollection
  • 空间关系:Equals/Contains/Within/Intersects/Touches/Crosses/Overlaps/Disjoint/Relate
  • 集合运算:Intersection/Union/Difference/SymmetricDifference/Buffer
  • 几何分析:ConvexHull/Centroid/Area/Length/Distance/IsValid/Simplify
  • 空间索引:STRtree/Quadtree
  • 格式读写:WKT、WKB、GeoJSON、Shapefile(独立 NuGet)
  • EF Core 集成:SqlServer 与 PostgreSQL 自动翻译为空间 SQL

环境准备

dotnet add package NetTopologySuite --version 2.6.0

# GeoJSON:按序列化框架二选一(不要同时装)
dotnet add package NetTopologySuite.IO.GeoJSON --version 4.0.0       # Newtonsoft.Json
dotnet add package NetTopologySuite.IO.GeoJSON4STJ --version 4.0.0    # System.Text.Json

dotnet add package NetTopologySuite.IO.Esri.Shapefile --version 1.2.0 # Shapefile 读写
dotnet add package ProjNet --version 2.1.0                            # 坐标变换(可选)

.NET 6+ 推荐;各 IO 包需与主库 2.6 对齐(IO.GeoJSON / IO.GeoJSON4STJ / IO.Esri.Shapefile 均为 4.0.0、1.2.0 一档,ProjNet 2.1.0)。


核心 API:几何工厂

using NetTopologySuite;
using NetTopologySuite.Geometries;

// 推荐:由 NtsGeometryServices 提供工厂(也可继续用 new GeometryFactory(new PrecisionModel(), 4326))
var gf = NtsGeometryServices.Instance.CreateGeometryFactory(srid: 4326);

// 等价旧写法:var gf = new GeometryFactory(new PrecisionModel(), 4326);

var p  = gf.CreatePoint(new Coordinate(116.397, 39.908));
var ls = gf.CreateLineString(new[] {
    new Coordinate(116, 39), new Coordinate(117, 40)
});
var poly = gf.CreatePolygon(new[] {
    new Coordinate(0,0), new Coordinate(10,0),
    new Coordinate(10,10), new Coordinate(0,10), new Coordinate(0,0)
});

空间关系与运算

bool b   = polyA.Intersects(polyB);
var inter = polyA.Intersection(polyB);
var union = polyA.Union(polyB);
var diff  = polyA.Difference(polyB);

var buf  = p.Buffer(100);
var hull = mp.ConvexHull();
double area = poly.Area;
double len  = ls.Length;
double dist = polyA.Distance(polyB);

string rel = polyA.Relate(polyB).ToString();
bool ok    = polyA.Relate(polyB, "T*F**F***");

Read the full file on GitHub · 338 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 Changed · +71 lines 3dd90cfbd0b9
  2. 16d ago Changed · -2 lines · +28 tokens per session 2df607de5c62
  3. 21d ago Changed · +9 lines a045193f0e4a
  4. 22d ago Changed · +5 lines 9c5808ea757d
  5. 1mo ago Changed 2ccc53cda566
  6. 1mo ago Changed 6fd24f8fbd1f
  7. 1mo ago Changed 49891412f212
  8. 2mo ago First seen · 255 lines · 57 tokens per session scan A abde5484210c

Subscribe to this mod's changes

nettopologysuite is a skill published in the GitHub repository znlgis/opengis-skills (76 stars, last pushed 10d ago), licensed MIT. It adds 85 tokens to every session and 3,597 once invoked, about $0.0003 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-09-03.

Related

nettopologysuite compared with skills from other repositories

nettopologysuite next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
nettopologysuiteznlgis/opengis-skillsSkill7610d agoMITA85Claude Code, Codex
add-sliceSSWConsulting/SSW.VerticalSliceArchitectureSkill4168d agoMITA125Claude Code
entity-framework-migrationivegamsft/basecoatSkill47d agoMITA92Claude Code
generate-code-csAzure/azure-sdk-for-netSkill6.1kyesterdayMITA26Claude Code, Codex
author-testAzure/azure-sdk-for-netSkill6.1kyesterdayMITA68Claude Code, Codex
opentelemetry-net-instrumentationAaronontheweb/dotnet-skillsSkill1.3k9d agoMITA56Claude Code
migrate-xunit-to-mstestmanagedcode/dotnet-skillsSkill508yesterdayMITA141Claude Code, Codex