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 🙏

© 2025 – Pkg Stats / Ryan Hefner

wkid

v0.0.5

Published

CGCS2000 coordinate system definitions library with multiple format support

Readme

WKID 坐标系定义库

一个完整的中国2000国家大地坐标系(CGCS2000)坐标系定义库,包含各种投影格式的定义。

简介

本库提供了CGCS2000坐标系的完整定义,包括地理坐标系和多种投影坐标系。所有坐标系定义都包含了在不同GIS平台和库中使用的格式,如OGC WKT、ESRI WKT、PROJ4、GeoServer、MapServer、Mapnik和PostGIS等。

安装

npm install wkid

使用方法

作为库使用

import {
  CGCS2000_GEOGRAPHIC,
  CGCS2000_GK_3DEG_NO_ZONE,
  CGCS2000_GK_3DEG_WITH_ZONE,
  CGCS2000_GK_6DEG_NO_ZONE,
  CGCS2000_GK_6DEG_WITH_ZONE,
  CGCS2000_DEFINITIONS,
  findCoordinateSystemByWkid,
  findCoordinateSystemByName
} from 'wkid';

访问特定坐标系

// 获取地理坐标系
console.log(CGCS2000_GEOGRAPHIC);

// 获取3度带不带带号投影
console.log(CGCS2000_GK_3DEG_NO_ZONE);

// 获取3度带带带号投影
console.log(CGCS2000_GK_3DEG_WITH_ZONE);

// 获取6度带不带带号投影
console.log(CGCS2000_GK_6DEG_NO_ZONE);

// 获取6度带带带号投影
console.log(CGCS2000_GK_6DEG_WITH_ZONE);

查找坐标系

// 通过WKID查找
const coordSystem = findCoordinateSystemByWkid(4490);
console.log(coordSystem.name); // "CGCS2000 Geographic Coordinate System"

// 通过名称查找
const coordSystem2 = findCoordinateSystemByName("CGCS2000 / 3-degree Gauss-Kruger zone 25");
console.log(coordSystem2.wkid); // 4513

使用命令行工具

安装后,您可以直接使用命令行工具查询坐标系信息:

# 交互式查询
npx wkid

# 查询指定WKID
npx wkid 4490

# 显示帮助信息
npx wkid --help

坐标系分类

地理坐标系

  • WKID: 4490
  • 名称: CGCS2000 Geographic Coordinate System

高斯-克吕格投影

3度带不带带号

  • WKID范围: 4534 - 4554
  • 中央子午线: 75°E - 135°E (间隔3°)
  • 特点: false easting为500000,不包含带号

3度带带带号

  • WKID范围: 4513 - 4533
  • 分带: 25 - 45带
  • 中央子午线: 75°E - 135°E (间隔3°)
  • 特点: false easting为带号×1000000+500000,包含带号

6度带不带带号

  • WKID范围: 4502 - 4512
  • 中央子午线: 75°E - 135°E (间隔6°)
  • 特点: false easting为500000,不包含带号

6度带带带号

  • WKID范围: 4491 - 4501
  • 分带: 1 - 11带
  • 中央子午线: 3°E - 63°E (间隔6°)
  • 特点: false easting为带号×1000000+500000,包含带号

坐标系定义格式

每个坐标系定义包含以下属性:

开发

构建项目

npm run build

运行测试

npm test

生成覆盖率报告

npm run coverage

许可证

MIT

贡献

欢迎提交Issue和Pull Request来改进这个库。