nettopologysuite

nettopologysuite is a skill for Claude Code, Codex from znlgis/opengis-skills. It costs 57 tokens per session (2,119 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 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,119 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.00057 $0.02119
Opus 5 $0.00028 $0.01059
Sonnet 5 $0.00011 $0.00424
Haiku 4.5 $0.00006 $0.00212

Measured today against content hash 6fd24f8fbd1f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 today.

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 · 255 lines

How it starts

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

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

NuGet: NetTopologySuite

官方文档: 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
dotnet add package NetTopologySuite.IO.GeoJSON
dotnet add package NetTopologySuite.IO.ShapeFile
dotnet add package ProjNet                          # 坐标变换(可选)

.NET 6+ 推荐。


几何工厂

using NetTopologySuite.Geometries;

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***");

WKT / WKB / GeoJSON

using NetTopologySuite.IO;

var rdr = new WKTReader();
var g = rdr.Read("POINT (116.4 39.9)");

string wkt = new WKTWriter().Write(g);
byte[] wkb = new WKBWriter().Write(g);

using NetTopologySuite.IO.Converters;
using System.Text.Json;
var opts = new JsonSerializerOptions();
opts.Converters.Add(new GeoJsonConverterFactory());
string json = JsonSerializer.Serialize(g, opts);
var g2 = JsonSerializer.Deserialize<Geometry>(json, opts);

Read the full file on GitHub · 255 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. today Changed 6fd24f8fbd1f
  2. 2d ago Changed 49891412f212
  3. 9d 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 (61 stars, last pushed yesterday), licensed MIT. It adds 57 tokens to every session and 2,119 once invoked, about $0.0003 per session on Opus 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

Other skills, from other repositories

add-slice

Scaffold a slice in this Vertical Slice Architecture template — one use case in its own folder, with its FastEndpoints endpoint, request, response, validator, and summary, plus the Feature and Group if they don't exist yet, plus tests. Use when the user says "add a slice", "add a use case", "add an endpoint", "add a…

SSWConsulting/SSW.VerticalSliceArchitecture · 125 tokens

entity-framework-migration

Use when modernizing legacy Entity Framework data layers to EF Core with help for model mapping, DbContext refactors, phased cutovers, and migration risk review. USE FOR: migrate EF6 to EF Core, refactor DbContext configuration, convert model mappings and conventions, plan phased database cutover, validate query…

ivegamsft/basecoat · 92 tokens

generate-code-cs

Generate the code from typespec for C#. Parameter: C# SDK repository root location .

Azure/azure-sdk-for-net · 26 tokens

author-test

Generate a test given sample. Parameters: C# SDK repository root; Package name: one of Azure.AI.Projects, Azure.AI.Projects.Agents or Azure.AI.Extensions.OpenAI; the sample to use as a starting point for the test.

Azure/azure-sdk-for-net · 68 tokens

opentelemetry-net-instrumentation

Provides guidance for implementing OpenTelemetry instrumentation in .NET codebases, covering tracing (Activities/Spans), metrics, logs, naming conventions, error handling, performance, SDK setup, resources, context propagation, and API design best practices.

Aaronontheweb/dotnet-skills · 56 tokens

aot-trimming

Guidelines for making .NET libraries and applications trimming-safe and Native AOT compatible. Covers the trimming/AOT model, the MSBuild properties that enable analysis (IsTrimmable, IsAotCompatible, PublishTrimmed, PublishAot), the trimming attributes (RequiresUnreferencedCode, RequiresDynamicCode…

Aaronontheweb/dotnet-skills · 181 tokens