mapshaper-info-recreated-via-gdal
✓ Published0🌍 Public
TThomasG77
Last edited Sep 12, 2022
Created on Sep 12, 2022
This example recreates the command-line tool mapshaper-info using the gdal-async library to inspect a GeoJSON TopoJSON file containing German administrative regions. It downloads the dataset from GitHub, then prints layer metadata including geometry type, record count, bounding box, and coordinate reference system, followed by a formatted table of attribute names and their first values. The script uses the got library for streaming downloads and the pipeline function from stream/promises to handle the file writing asynchronously.
AI-generated descriptionISC Licensed