Geoserver logo

Geoserver

Community
znlgis
geoserver

Use when deploying GeoServer 3.0.x to publish WMS/WFS/WMTS/WCS/MVT, or configuring SLD/CSS styles, RBAC security, and GeoWebCache seeding. Covers geoserver-3.0.2-bin.zip, docker.osgeo.org/geoserver:3.0.2 on Java 17/21, /rest/about/version.json, blank GetMap from wrong native bounds, and Shapefile charset mojibake.

Overview

Publisherznlgis
Repositoryopengis-skills
Skill namegeoserver
Stars
76
Forks
12
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by znlgis on GitHub. Read the source before you install it.

Installation

Install the Geoserver AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/znlgis/opengis-skills/tree/main/gis/geoserver
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/znlgis/opengis-skills.git /tmp/opengis-skills
mkdir -p .claude/skills
cp -r /tmp/opengis-skills/gis/geoserver .claude/skills/geoserver
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Geoserver in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Geoserver on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Geoserver is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

官方文档: https://docs.geoserver.org/latest/en/user/

下载: https://geoserver.org/release/stable/

最新版本: 3.0.2(2026-10-17 发布,安全修复版,生产应优先升级;官方下载)

运行环境: Java 17 或 21;3.0.2 内含 GeoTools 35.2、GeoWebCache 2.0.2

许可证: GPL-2.0

该 SKILL 关注 GeoServer 服务端运维与配置;REST API 自动化管理资源请配合 gis/geoserver-rest-api。

概述

GeoServer 提供:

  • OGC 服务:WMS、WMTS、WFS、WCS、WPS、CSW
  • 矢量瓦片:Mapbox Vector Tiles(pbf)
  • 样式:SLD、CSS、YSLD、MBStyle
  • 数据源:PostGIS、Shapefile、GeoPackage、Oracle、SQL Server、ArcSDE、GeoTIFF、ImageMosaic、JP2、NetCDF
  • 安全:基于角色的访问控制(RBAC)
  • 管理:Web UI(端口 8080) + REST API

安装部署

前置:JDK

3.0.x 需要 Java 17 或 21;先 java -version 确认(低于 17 的 JVM 无法启动 3.x 分发包)。

二进制

bash
curl -fLO https://sourceforge.net/projects/geoserver/files/GeoServer/3.0.2/geoserver-3.0.2-bin.zip
unzip geoserver-3.0.2-bin.zip && cd geoserver-3.0.2
sh bin/startup.sh         # http://localhost:8080/geoserver  (admin/geoserver)

Docker

bash
docker run --name gs -p 8080:8080 \
  -e SKIP_DEMO_DATA=true \
  -e EXTRA_JAVA_OPTS="-Xms512m -Xmx2g" \
  -v $PWD/data:/opt/geoserver_data \
  docker.osgeo.org/geoserver:3.0.2

数据目录

text
GEOSERVER_DATA_DIR/
├── workspaces/<ws>/<store>/...
├── styles/
├── layergroups/
├── gwc/
└── security/

核心概念

概念说明
Workspace命名空间
Store数据存储
Layer图层(Store 资源 + 样式)
Style渲染规则(SLD/CSS)
LayerGroup图层组
GeoWebCache (GWC)内置瓦片缓存

发布矢量图层(PostGIS)

  1. 创建 Workspace my_ws
  2. 添加 Store:选 PostGIS,填 host/db/user/pass
  3. 发布图层:选表 → 计算原始范围 → 设置 SRS
  4. 配置样式(默认 / SLD)
  5. Layer Preview

访问 URL:

text
WMS  : /geoserver/my_ws/wms?service=WMS&version=1.1.0&request=GetMap&layers=my_ws:poi&srs=EPSG:4326&bbox=...&width=512&height=512&format=image/png
WMTS : /geoserver/gwc/service/wmts?...&LAYER=my_ws:poi&...
WFS  : /geoserver/my_ws/ows?service=WFS&version=2.0.0&request=GetFeature&typeNames=my_ws:poi&outputFormat=application/json
MVT  : /geoserver/gwc/service/wmts?...&FORMAT=application/vnd.mapbox-vector-tile

SLD 样式示例

xml
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0"
    xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc">
  <NamedLayer>
    <Name>poi</Name>
    <UserStyle><FeatureTypeStyle>
      <Rule>
        <ogc:Filter><ogc:PropertyIsGreaterThan>
          <ogc:PropertyName>pop</ogc:PropertyName>
          <ogc:Literal>1000000</ogc:Literal>
        </ogc:PropertyIsGreaterThan></ogc:Filter>
        <PointSymbolizer>
          <Graphic><Mark><WellKnownName>circle</WellKnownName>
            <Fill><CssParameter name="fill">#ff0000</CssParameter></Fill>
          </Mark><Size>10</Size></Graphic>
        </PointSymbolizer>
      </Rule>
    </FeatureTypeStyle></UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

栅格

  • GeoTIFF:UI → Coverage Store → Add new → GeoTIFF
  • ImageMosaic:目录中放多个 GeoTIFF(同投影),创建 Mosaic store;推荐配合 gdaladdo 建金字塔

GeoWebCache

UI:Tile Caching → Tile Layers → Seed/Truncate

bash
curl -u admin:geoserver -XPOST \
  "http://localhost:8080/geoserver/gwc/rest/seed/my_ws:poi.json" \
  -H "Content-Type: application/json" \
  -d '{"seedRequest":{"name":"my_ws:poi","srs":{"number":4326},"zoomStart":0,"zoomStop":10,"format":"image/png","type":"seed","threadCount":4}}'

常用扩展

扩展用途
vector-tilesMVT 输出
cssCSS 样式
wps处理服务
monitor请求监控
control-flow限流
printing打印
csw元数据

放入 webapps/geoserver/WEB-INF/lib/ 重启即可。


典型工作流

  1. 部署 GeoServer:优先使用 Docker 镜像 docker.osgeo.org/geoserver:3.0.2(安全修复版;从旧版本升级前先备份数据目录)
  2. 创建 Workspace:为每个项目创建独立工作空间实现命名隔离
  3. 添加数据存储:根据数据类型选择 PostGIS(矢量)、Shapefile(文件矢量)、GeoTIFF(栅格)
  4. 发布图层:设置 SRS(坐标参考系)、计算 Native Bounds、配置样式
  5. 验证服务:通过 Layer Preview 或直接构造 WMS/WFS 请求测试
  6. 优化性能:启用 GeoWebCache 预切片、PostGIS 建空间索引、调整 JVM 参数

性能优化

  1. JVM:-Xms2g -Xmx4g -XX:+UseG1GC
  2. PostGIS 必建空间索引
  3. 启用 GeoWebCache 预切片
  4. control-flow 限流:ows.global=10
  5. 正确设置图层 native bbox
  6. 关闭未用服务
  7. ImageMosaic 用金字塔与索引

常见问题

问题解决
启动慢 / OOM增加 -Xmx,关闭 demo 数据
Shapefile 中文乱码Store 设 charset=UTF-8 或 GBK
图层范围空白重新计算 native bounds
WFS-T 403Data 规则允许 w 权限
跨域配置 CORS 过滤器
改了 SLD 但预览不变图层被 GeoWebCache 缓存:Tile Caching 里 Truncate 该图层,或给 GetMap 加 &tiled=false
忘记管理员密码数据目录 security/users.properties 里恢复,改完重启;GeoServer 3.x 默认改由 security 配置文件管理
启动报 UnsupportedClassVersionErrorJVM 版本低于 17:换成 JDK 17 或 21 再启动 3.0.x 分发包

AI 使用建议

  • 执行环境:命令在终端 / shell 中执行(Windows 用 PowerShell);wget/unzip 换成 curl.exe -LO 与 Expand-Archive,$PWD 换成 (Get-Location)。
  • 先探测版本:curl -s -u admin:geoserver http://localhost:8080/geoserver/rest/about/version.json(无 jq 时管道给 python -m json.tool),核对 GeoServer、GeoWebCache 与 JVM;java -version 必须是 17 或 21,否则 3.0.2 包直接启动失败。
  • 验证产物:发布后用 curl -s -o out.png -w "%{http_code} %{size_download}\n" "http://localhost:8080/geoserver/my_ws/wms?service=WMS&version=1.1.0&request=GetMap&layers=my_ws:poi&srs=EPSG:4326&bbox=...&width=512&height=512&format=image/png",要 200 且字节数大于 0;再拉一次 GetCapabilities 确认图层已注册,不要只凭 UI 回显。
  • 写后回读:REST 建 workspace/store/layer 或上传 SLD 后,用同路径 GET 回读;?recurse=true 删除后再 GET 应得 404。
  • 安全与权限:admin:geoserver 凭据不要回显到命令输出或报告里(用环境变量传入);重启容器、改 -Xmx、删除 workspace、清 GWC 缓存前先征得用户同意。
  • 常见误操作:WMS 返回空白图先查 native bounds 与 SRS 是否对不上;Shapefile 中文乱码改 Store 的 charset;seed 大范围瓦片会撑爆磁盘,先小 zoom 范围试。

相关技能

参考资源

Frequently asked questions

What does the Geoserver AI skill do?

Use when deploying GeoServer 3.0.x to publish WMS/WFS/WMTS/WCS/MVT, or configuring SLD/CSS styles, RBAC security, and GeoWebCache seeding. Covers geoserver-3.0.2-bin.zip, docker.osgeo.org/geoserver:3.0.2 on Java 17/21, /rest/about/version.json, blank GetMap from wrong native bounds, and Shapefile charset mojibake.

Why use Geoserver on TypingMind?

Because you install it once and use it with any model. Geoserver is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Geoserver in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/znlgis/opengis-skills/tree/main/gis/geoserver. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Geoserver?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Geoserver?

As many as you like. As long as a model supports skills, you can use Geoserver with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Geoserver AI skill free?

Yes. It is published on GitHub by znlgis under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇