@mapbox/stream-features-from-file

Stream GeoJSON features from a file

Usage no npm install needed!

<script type="module">
  import mapboxStreamFeaturesFromFile from 'https://cdn.skypack.dev/@mapbox/stream-features-from-file';
</script>

README

stream-features-from-file

Build Status

Streams GeoJSON features from a file.

Supports the following source formats:

  • GeoJSON (FeatureCollection only!)
  • CSV
  • Shapefile

Non-GeoJSON formats are read by Mapnik.

Usage

const featureStream = streamFeaturesFromFile(filePath);

streamFeaturesFromFile accepts a filePath argument and returns a readable object-mode stream of GeoJSON features derived from the provided file.