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

@lbdudc/gis-publisher

v1.1.2

Published

<div style="display:flex; margin-bottom: 20px;"> <img src="https://img.shields.io/npm/v/@lbdudc/gis-publisher?&style=flat-square" alt="npm version"> <img src="https://img.shields.io/badge/License-MIT-yellow.svg?&style=flat-square" alt="License: MIT">

Downloads

42

Readme

GisPublisher

Tool designed to simplify the creation of web-based Geographic Information Systems (GIS) from a collection of shapefiles. With optional support for OGC Web Coverage Service (WCS), it simplifies the process of generating interactive GIS platforms, allowing users to visualize and analyze spatial data efficiently.

Table of Contents

  1. Installation
  2. Configuration
  3. Usage
  4. Data Visualizations with Vega
  5. Examples
  6. Development
  7. Changing the config.json
  8. Authors
  9. License

Installation

nvm use (optional, if you have nvm installed, otherwise just use node 19.x)
npm install

Configuration

You can customize the features selected in your feature model adding a "features" key in the config.json file. For example:

{
  ...
  "features": [
    "feature1",
    "feature2"
  ],
}
  • Change the config.json file to match your needs. Choosing the type of deployment (local, ssh or aws) and the necessary parameters for each one. You can find more information about the configuration in the Changing the config.json section.

  • Add your shapefiles in a folder. The tool accepts shapefiles with the following extensions: .shp, .shx, .dbf, .prj, .cpg and .sld. Also accepts .zip files containing the shapefiles.

!WARNING!: The geometries must be in EPSG:4326 projection!, and the geometries of Polygon and LineString must be MultiPolygon and MultiLineString respectively.

Usage

gispublisher shapefilesFolder [--generate] [--config path] [--only-import] [--bbox bbox] [--help] [--version] [--debug]

Arguments

  • shapefilesFolder: Path to the folder containing the shapefiles to be published.

Options

  • --generate, -g: Just generate the product, do not deploy.
  • --config: Path to config file (default config file if not used).
  • --only-import, -i: Only import shapefiles.
  • --bbox: Bounding box to restrict the search. Format is expected to be: southwest_lng,southwest_lat,northeast_lng,northeast_lat.
  • --help: Print this info.
  • --version: Print version.

Data Visualizations with Vega

GisPublisher allows including data visualizations by defining a charts folder in the project structure. Charts are described using Vega specifications and are automatically integrated into the generated product.

There are two approaches to add charts in your project: by adding them manually or by creating them in the Chart Explorer within the UI.

Adding charts manually

To add charts manually, create a charts directory inside the shapefiles folder passed to gispublisher, for example:

shapefilesFolder/charts
                  ├─ /chart1.json
                  ├─ /chart2.json

Each .json file must contain a valid Vega or Vega-Lite specification.

Charts can be defined in two different ways:

a) Standard Vega Charts

You can include any standard Vega or Vega-Lite specification that uses static data or external data sources.

b) Charts using generated entities

Charts can also use the entities generated from the shapefiles during the product generation. In this case, the data source should point to the following endpoint: /api/entities/<entity>/export/tsv.

The chart specification must define the data source URL and indicate which fields from that entity will be used as the X and Y axes.

You can see an example of a valid chart specification by exporting a chart from the Chart Explorer in the UI, which provides a JSON in the correct format.

Once the charts are added, generating the product with GisPublisher will automatically include a Data Visualizations section in the output. These charts will appear in the Chart Viewer under the My Charts tab, where they can be viewed and explored.

Using the Chart Explorer

In the Chart Viewer, there is another tab called Explorer, where you can create and customize your own charts. You can select:

  • The entity to visualize
  • The fields for the X and Y axes
  • The chart type (e.g., line, bar)

Once you’ve designed a chart, you can export it. To save it in the My Charts section, move the .json file to the shapefilesFolder/charts directory. The next time you generate the product with GisPublisher, these charts will automatically appear in My Charts.

Examples

We provide some examples in the examples folder. You can use them to test the tool.

gispublisher examples/hello_world

gispublisher examples/WaterSupply

Development

# if nvm installed, otherwise just use node 19.x
nvm use

npm install

# to set husky git hooks (linting)
npm run prepare

# to run, first update config.json and then:
npx gispublisher args

# for example
npx gispublisher examples/hello_world

Changing the config.json

Local

  • Pre-requisites: Have docker and docker-compose installed
{
  "deploy": {
    "type": "local"
  },
  "host": "http://localhost:80"
}

SSH

{
  "deploy": {
    "type": "ssh",
    "host": "your-remote-host.com or IP",
    "port": 22222,
    "username": "username",
    "certRoute": "/path/to/your/cert.pem",
    "remoteRepoPath": "/path/to/remote/repo/code"
  },
  "host": "your-remote-host.com or IP"
}

AWS

"deploy": {
    "type": "aws",
    "AWS_ACCESS_KEY_ID": "AKIAJY2Q...",
    "AWS_SECRET_ACCESS_KEY": "X8Y4X0...",
    "AWS_REGION": "eu-west-2",
    "AWS_AMI_ID": "ami-08b064b1296caf3b2",
    "AWS_INSTANCE_TYPE": "t2.micro",
    "AWS_INSTANCE_NAME": "my-aws-instance",
    "AWS_SECURITY_GROUP_ID": "sg-0a1b2c3d4e5f6a7b8",
    "AWS_KEY_NAME": "mykey",
    "AWS_USERNAME": "ec2-user",
    "AWS_SSH_PRIVATE_KEY_PATH": "user/.ssh/mykey.pem",
    "REMOTE_REPO_PATH": "/home/ec2-user/code"
}

Authors

| Name | Email | | ------------------ | --------------------------- | | Victor Lamas | [email protected] | | David De Castro | [email protected] | | Alejandro Cortiñas | [email protected] |

License

This project is licensed under the MIT License - see the LICENSE.md file for details