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

node-red-contrib-proj4

v1.0.0

Published

A Node-Red node for performing geographic coordinate conversions

Downloads

15

Readme

node-red-contrib-proj4

A Node-Red node for performing conversions between different geographic coordinate reference systems (CRS) based on the Proj4js JavaScript library.

Purpose

This node is primarily intended for converting between coordinates provided in global coordinate reference systems such as World Geodetic System (WGS84) which is used by GPS, or WGS84 Psuedo-Mercator which is commonly used by web mapping platforms, and the local coordinate systems maintained by national mapping agencies to ensure optimal accuracy for applications in civil engineering and construction.

Usage

The user specifies a coordinate reference system to 'Convert from', and a second to 'Convert to'. When the node receives a payload with coordinates in an accepted format it will transform the values from the first CRS to the second.

The user first chooses a method for specifiying the two CRSs to use in the conversion. Selecting 'EPSG Codes' provides prepopulated dropdown lists.

EPSG Code

Alternatively users can select 'Proj / WKT string' in order to input the relevant proj-strings or well-known text (WKT) representations as found on epsg.io or spatialreference.org.

Proj WKT String

As with proj4.js library, coordinates can be provided as an object of the form {x:x,y:y} or an array of the form [x,y]. Additionally the node will parse the incomming message payload for coordinates identified by one of the following combinations of payload properties:

  • x,y: msg.payload.x and msg.payload.y
  • lat,lon: msg.payload.lon and msg.payload.lat
  • latitude,longitude: msg.payload.longitude and msg.payload.latitude
  • eastings,northings: msg.payload.eastings and msg.payload.northings

Results will be returned as a new message property msg.proj4_coords. The results will be returned in the same format as they were received, either an object of the form {x:x,y:y} or as an array of the form [x,y].

Example File

An example file has been provided which demonstrates common usage of the node. Access the example by navigating to the Node-Red editor's menu and selecting Export > Examples > node-red-contrib-proj4 > Coordinate Transformation.

Example Flow

Supported Coordinate Reference Systems

Currently the Proj4 node supports the following coordinate systems:

  • OSGB (EPSG:27700)
  • ITM (EPSG:2157)
  • Irish Grid (EPSG:29903)
  • NAD83 (EPSG:4269)
  • WGS84 / GPS (EPSG:4326)
  • WGS84 / Psuedo-Mercator (EPSG:3857)

Further details of different coordinate reference systems can be found on epsg.io.

Further Development

If you are interested in suggesting enhancements please raise an issue for review via GitHub.