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

tpkc-topochecker

v1.0.3

Published

Backend tool for BIM_GIS_ML-68

Downloads

1

Readme

tpkc-topoChecker

Backend tool for BIM_GIS_ML-68

Intro

用typescript編寫,compile成commonjs型式的javascript,如有需要也能compile成AMD或UMD。 後端可直接取用GeoJsonValidator.js這包code。

Usage

於constructor中定義每種geometry type的處理方式
點(point) : repair強制選取第一個點,toPolyline將型別改成Polyline
線(line) : toPoint將只有一個座標的Polyline轉換成點
面(polygon) : repair強制封閉polyline,toPolyline轉換成Polyline

複合點(MultiPoint) : repair強制選取第一個點
複合線(MultiPolyline) : ignore無視,toPolyline若傳入的只有一條線則轉型成普通的Polyline,toPoint若只有一條線並只有一個座標則轉換成點
複合面(MultiPolygon) : repair將所有傳入的線強制封閉成線

npm i geojsonvalnpm

// require module
let GeoJsonValidator = require('geojsonvalnpm');

// this is a geojson variable
let staticGeoJson = {};

// new instance
let myChecker = new GeoJsonValidator.default({
    pointOption: "repair",
    polylineOption: "toPoint",
    polygonOption: "toPolyline",
    multiPointOption: "repair",
    multiPolylineOption: "toPoint",
    multiPolygonOption: "repair"
});

// reqair geojson
myChecker.repairGeoJson(staticGeoJson)