![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@mapbox/graph-normalizer
Advanced tools
Takes nodes and ways and turn them into a normalized graph of intersections and ways.
graph-normalizer
is a JavaScript module that performs operations on an array of GeoJSON LineStrings representing OpenStreetMap ways. The operations performed cover a standard set of graph normalization techniques such as merging edges between intersections and splitting edges that cross over intersections. Ids assigned to ways in the normalized graph are deterministic and reproducible.
npm install @mapbox/graph-normlizer
npm test
npm run bench
var normalizer = require('@mapbox/graph-normalizer');
var ways = require('./ways.json');
var splitWays = normalizer.splitWays(ways);
var mergedWays = normalizer.mergeWays(ways);
console.log(JSON.stringify(ways));
Any ways that traverse an intersection are split in two. !<i>
is appended to the way id where i
is the index of the split way in the original geometry. Note that !0
is appended to the way id if there is no split.
Ways that share a node which is not an intersection (only 2 way owners) are merged together. The resulting id is <wayOne>,<wayTwo>
.
refs
array signifying node Ids of the coordinates that make up the way used for topology constructionid
property representing the OpenStreetMap id of the wayhighway
property representing the OpenStreetMap highway tag of the wayoneway
property representing the OpenStreetMap oneway tag of the way
oneway
property must be normalized to 0
, 1
, or -1
0
signifies a bidirectional way1
signifies a oneway way traveling in coordinate order-1
signifies a oneway way traveling in reverse coordinate order (this will be normalized to forward order 1
)yes
, or no
highway
, oneway
, bridge
and tunnel
tags are conserved from the original graph by default.highway
, bridge
and tunnel
tags can be merged using optional arguments. When merging different tags:
highway
tag is set as unclassified
tunnel
tag is set to yes
i.e. we keep the info that there is a tunnel in the merged waybridge
tag is set to yes
i.e. we keep the info that there is a bridge in the merged wayFAQs
Takes nodes and ways and turn them into a normalized graph of intersections and ways.
The npm package @mapbox/graph-normalizer receives a total of 55 weekly downloads. As such, @mapbox/graph-normalizer popularity was classified as not popular.
We found that @mapbox/graph-normalizer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 14 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.