Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
From the location of ambulance posts, create two GeoJSON files, one that contains their locations, the other contains the area they can reach within 15 minutes. To determine this, we are creating a small script that will use [OSRM](https://project-osrm.
Create GeoJSON isochrone contours based on how far you can drive, cycle or walk in an interval based on the Open Source Routing Machine (OSRM).
Although there are multiple npm packages that provide a similar service, e.g. isochrone and galton, this one uses an OSRM REST source instead of the alternatives, which rely on node bindings. Although node bindings are probably more performant, they are notoriously difficult to install on Windows, since node-gyp
sucks and the latest binaries were released for node 8. Also it is quite a pain if you first need to create the required OSRM graph in order to run it a few times. Therefore, this version uses the public OSRM service, which should be fine for a few queries, but you can specify your own OSRM service too if you need to resolve many locations.
While implementing the previously mentioned methods, I noticed that the quality was not very good: it requires a lot of tweaking of specific parameters in order to get acceptable results. Furthermore, they create a rectangular grid around the desired location, which does not make sense as most isochrones will more likely be round. Further investigations lead to the work of geolytix, and that version is implemented here. Another interesting read is Peter Liu's explanation of the MapBox implementation.
Usage: howfar [options]
Returns a GeoJSON file indicating how far you can travel starting at the provided coordinates.
You can use it as a REST service when no coordinates are supplied, or as a command by supplying them.
In case you use it as a service, query it using http://localhost:PORT/lat/lon/bands
(where /bands is optional). For example, when the service is running on port 3000, use
http://localhost:3000/52.373083994540266/4.891233444213867?distance=15&bands=5&detail=3
Options:
-V, --version output the version number
-c, --coordinates <lat, lon> Start coordinate as "lon, lat"
-d, --distance <values> Max distance in minutes (default: 15)
-p, --port <number> Port to use for exposing a REST endpoint, e.g. http://localhost:PORT/lat/lon
-t, --profile <profile> Transport type, can be car, bike or foot (default: "car")
-n, --serviceProvider <provider> Link to the OSRM provider
-o, --output Output file, if provided. Otherwise output will be send to stdout.
-h, --help display help for command
npm i
npm run nodemon
npm i -g howfar
Sometimes you need to estimate how far you can get in a certain interval, and you want to display this as a GeoJSON file. For a simple case, you can just run the command line version to convert a starting coordinate to an isochrone, e.g.
howfar -c "5.5, 51.5" -o isochrone.geojson
In case you want to run it as a service, you can provide a port too. To see more options, use howfar -h
.
howfar -p 3000
Alternatively, if you need to perform many queries, start a local OSRM service, and use that:
howfar -p 3000 -n http://127.0.0.1:5000
To run your own service, see the Project OSRM backend service or here.
FAQs
From the location of ambulance posts, create two GeoJSON files, one that contains their locations, the other contains the area they can reach within 15 minutes. To determine this, we are creating a small script that will use [OSRM](https://project-osrm.
The npm package ambulances receives a total of 2 weekly downloads. As such, ambulances popularity was classified as not popular.
We found that ambulances demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.