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 🙏

© 2024 – Pkg Stats / Ryan Hefner

gis-topology

v1.0.2

Published

前端gis拓扑分析库

Downloads

4

Readme

gis-topology

这是一个gis前端的空间拓扑分析库

安装使用

安装

npm i gis-topology

API

utils模块

1、坐标比对方法

  1. isEqualCoord
    判断是否是相同的坐标

  2. compareCoord
    对比两个坐标,返回一个布尔值。方法接受一个容差值,当两个坐标直接差距小于容差,则返回真;否则返回假

  3. coordsIsEqualGeoHash
    判断两对坐标是否具有相同的geohash编码

  4. isEqualCoordList
    判断两组坐标是否完全相等

relation模块

  1. isIntersect
    判断两个线是否相交

ol模块

这个模块是对openlayers的空间运算的扩展, 方法的输入以openlayers中的feature和geometry对象为主

  1. getGeomMaxGeohash
    获取geometry对象的最大外接geohashBox

  2. getLineNodes
    获取线的所有节点坐标

  3. getLineBoundPoint
    获取线的端点

  4. isEqualLine
    判断两条线是否相同

  5. pointsGroupByHash
    将点集合按geohash编码分组

  6. testRepeatPointByHash
    检查重复点,基于geohash,编码相同的点被视为重复点

  7. testRepeatLineSlow
    检查重复线(数据量少时可以用)

  8. testRepeatLine
    检查重复线

  9. testSingleLineIntersect
    检查两个单线是否交叉(交点经过线上节点的情况除外)

  10. testLineIntersectMultiLine
    判断单线和多线是否相交

  11. testLineIntersect
    判断两个线是否相交

  12. testCrossesLines
    检查相交线(效率较高)

  13. groupPointByGeohash
    将坐标进行geohash编码,并存储到一个Map对象里

  14. testPointsNotTouchLineNodes

  15. testShortLines