@esri/arcgis-to-geojson-utils

中文文档
1.3.0发布于 2018/07/07Apache-2.0ESM + CJS零依赖近 30 天下载 3万

Tools to convert ArcGIS JSON geometries to GeoJSON geometries and vica-versa.

原始使用文档
文档目录9 节
  1. Install
  2. Usage
  3. Browser (from CDN)
  4. ES6
  5. Node.js
  6. Issues
  7. Contributing
  8. Ports
  9. Licensing

arcgis-to-geojson-utils

npm travis standard

Tools to convert ArcGIS JSON geometries to GeoJSON geometries and vice versa.

Install

npm install @esri/arcgis-to-geojson-utils

Usage

Browser (from CDN)

This package is distributed as a UMD module and can also be used in AMD based systems or as a global under the ArcgisToGeojsonUtils namespace.

<script src="https://unpkg.com/@esri/arcgis-to-geojson-utils"></script>
ArcgisToGeojsonUtils.arcgisToGeoJSON({
    "x":-122.6764,
    "y":45.5165,
    "spatialReference": {
      "wkid": 4326
    }
});

ES6

import { arcgisToGeoJSON } from '@esri/arcgis-to-geojson-utils';
import { geojsonToArcGIS } from '@esri/arcgis-to-geojson-utils';

// parse ArcGIS JSON, convert it to GeoJSON
const geojson = arcgisToGeoJSON({
    "x":-122.6764,
    "y":45.5165,
    "spatialReference": {
      "wkid": 4326
    }
  });

// take GeoJSON and convert it to ArcGIS JSON
const arcgis = geojsonToArcGIS({
  "type": "Point",
  "coordinates": [45.5165, -122.6764]
});

Node.js

const esriUtils = require('@esri/arcgis-to-geojson-utils');

esriUtils.geojsonToArcGIS(/* ... */);
esriUtils.arcgisToGeoJSON(/* ... */);

Thanks to @JeffJacobson, TypeScript typings and tests can be found on npm.

We recommend using --moduleResolution Node to ensure the compiler recognizes the types.

Issues

Find a bug or want to request a new feature? Please let us know by submitting an issue.

Contributing

Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.

Ports

ProjectLanguageStatusMaintainer
arcgis2geojsonPythonIncomplete@chris48s

Licensing

Copyright © 2015-2018 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository's LICENSE file.

版本与发布记录

@esri/arcgis-to-geojson-utils 共发布 6 个版本,首次发布于 2017/09/29;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.3.0latest2018/07/078 年前
1.2.02018/03/308 年前
1.1.12018/03/098 年前
1.1.02018/02/248 年前
1.0.52017/12/298 年前
1.0.42017/09/299 年前

关于 @esri/arcgis-to-geojson-utils 的常见问题

@esri/arcgis-to-geojson-utils 是什么?

Tools to convert ArcGIS JSON geometries to GeoJSON geometries and vica-versa.

如何安装 @esri/arcgis-to-geojson-utils?

在项目目录运行 npm install @esri/arcgis-to-geojson-utils,或使用 pnpm add / yarn add / bun add。

@esri/arcgis-to-geojson-utils 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/esri__arcgis-to-geojson-utils 是否存在。

@esri/arcgis-to-geojson-utils 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@esri/arcgis-to-geojson-utils 可以商用吗?

@esri/arcgis-to-geojson-utils 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@esri/arcgis-to-geojson-utils 的下载量有多少?

根据 npm 官方下载统计,@esri/arcgis-to-geojson-utils 在 2026/10/14 – 2026/11/12 这 30 天内被下载 29,698 次,日均约 990 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@esri/arcgis-to-geojson-utils 还在维护吗?

最新版本 1.3.0 发布于 2018/07/07(8 年前);至今共发布 6 个版本,其中过去 12 个月发布了 0 个;首次发布于 2017/09/29。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。