npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dsh-gis/dsh-gis-formats

v0.1.0

Published

Pure-JS GIS format layer: WKT/EWKT/WKB, GeoJSON/NDJSON, shapefile families

Downloads

119

Readme

@dsh-gis/dsh-gis-formats

纯 JS 的格式层:WKT/EWKT、GeoJSON/NDJSON 与 shapefile 家族。 这里的一切都是对字节或文本的纯函数 —— 没有文件系统、没有服务;I/O 由 provider 负责,把已读入的源交给这一层,因此可以用 fixture 穷尽测试。

dsh-gis 的一部分:给 DeepSeek Harness 的 GIS 能力插件(读空间数据、画地图卡片、查询、CRS 换算、OGC 服务)。

安装

通常是随 bundle 一起装进来的:

dsh plugin --profile <profile> add @dsh-gis/dsh-gis

然后把 @dsh-gis/dsh-gis 加进 profile 的 dsh.profile.bundles 并重启 dsh。 单独挂这一行(而不是 bundle)时,才需要显式 add 这个包本身。

这一层做什么

  • WKT/EWKT 的解析与序列化,以及与 GeoJSON 几何的互转:手写 parser,覆盖 POINT 到 GEOMETRYCOLLECTION、2/3/4 维和 SRID=n; 前缀;裸 WKT 不携带 CRS,必须由调用方给出。
  • GeoJSON 与 NDJSON 读取:按实际内容检测而不是假定 RFC 7946;越界坐标只作为启发式 issue 报告并附上原始范围,不静默重投影。
  • shapefile 家族读取:.shp 与 .dbf 同行,.shx 索引,.prj 定 CRS,.cpg 定编码 —— 家族作为已读入的字节传入,保持纯函数。
  • dBASE 属性表的编码解析顺序:调用方显式选择、.cpg、DBF language-driver 字节;三者都没有就报 unknown,让上层拒绝猜。
  • .prj 的 CRS 解析:只认根节点的 AUTHORITY;否则按有限的名字表(WGS 84、Web Mercator、UTM、CGCS2000、Xian 1980、Beijing 1954)给码,解不出的如实说有名无码,而不是编一个。
  • 导出的都是纯函数,可被多个 provider 共用:GDAL handler 的要素读取最终也走这里的 GeoJSON reader,所以只有一条经过测试的要素路径。

许可

MIT(见 LICENSE 与 THIRD_PARTY_NOTICES.md)。