UNPKG

libya-osm-data

Version:

Optimized OpenStreetMap data for Libya - Ready to use geographical data

81 lines (54 loc) 1.64 kB
# Libya OpenStreetMap Data Fetcher This project fetches geographical data for Libya from OpenStreetMap using the Overpass API and saves it in JSON format. ## Features The script fetches the following data types: - Cities and towns - Roads and highways - Buildings - Administrative boundaries - Amenities (points of interest) ## Setup 1. Install the required packages: ```bash pip install -r requirements.txt ``` 2. Run the script: ```bash python fetch_libya_data.py ``` ## Output The script will create a `data` directory containing separate JSON files for each feature type: - `libya_cities.json` - `libya_roads.json` - `libya_buildings.json` - `libya_administrative.json` - `libya_amenities.json` ## Note - The script includes a delay between requests to respect the Overpass API's rate limits - Some queries might take a few minutes to complete due to the amount of data - The data is saved in raw OSM JSON format ## Libya OSM Data This package provides optimized OpenStreetMap data for Libya in an easy-to-use format. ### Installation ```bash npm install libya-osm-data ``` ### Usage ```javascript // Import the package const libyaData = require('libya-osm-data'); // Get all data const allData = libyaData.getAllData(); // Or access data directly const data = libyaData.data; ``` ### TypeScript Support This package includes TypeScript type definitions. ```typescript import { getAllData, data } from 'libya-osm-data'; const allData = getAllData(); ``` ### Data Structure The data is structured in an optimized JSON format containing geographical information about Libya from OpenStreetMap. ### License MIT