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

@simwrapper/gmns

v0.1.4

Published

GMNS: the General Modeling Network Specification. Load GMNS networks from cmdline or in the browser. Converts GMNS to GeoJSON.

Readme

GMNS

GMNS is the "General Modeling Network Specification." GMNS itself is supported by the Zephyr Transport Foundation and is being developed here:

This is a JavaScript/TypeScript implementation of a GMNS reader. It allows you to read GMNS networks from your JavaScript code and convert them to a standard GeoJSON object usable anywhere that GeoJSON is spoken!

Current features

Load GMNS networks:

  • from a .zipfile containing all GMNS tables
  • from a folder containing the raw .csv tables

Convert GMNS:

  • to GeoJSON format

Converting MATSim networks to GMNS

As a courtesy, this package also contains a Python script which converts a MATSIM network.xml file into GMNS format. To convert your MATSIM network.xml to a zipped GMNS network file, first run:

  • python3 create-gmns-network.py

Installation of NPM package

npm install @simwrapper/gmns

Usage

// ESM
import GMNS from '@simwrapper/gmns'

// CommonJS
const GMNS = require('@simwrapper/gmns')

const network = GMNS.load('mynetwork.gmns.zip')
const geojson = GMNS.toGeojson(network)
console.log(geojson) // Output: { "type": "FeatureCollection", "features": [...]}

API Documentation

load(path: string, data?: ArrayBuffer|Blob|Uint8Array|String|Promise)

Load a GMNS file from a path or from an already-loaded Blob object.

Returns a GMNSNetwork object, which contains

  • path the file path from which the network was loaded
  • config parameters loaded from config.csv
  • t object which contains all of the .csv tables that were found in the zip file or folder.

Parameters:

path Required. can be a valid .zip file, a valid folder path containing the various CSV files, or sometimes a path directly to the GMNS config.csv file itself (but this only works with certain web servers). Even if you pass in the data directly (see below), this path string is used for identifying the dataset.

data Optional. Pass in an ArrayBuffer, Blob object, Uint8Array, or Promise to one of those datatypes with the .zip file content. The data will be used directly instead of loading from the net or disk.

toGeojson(GMNS: GMNSNetwork)

Returns a GeoJSON-compatible object with the network content. Currently only the nodes and link tables are read, and optionally if a geometry table exists, then the link geometries will also be present.

License

MIT