1.0.0 • Published 7 months ago
libya-osm-data v1.0.0
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
- Install the required packages:
pip install -r requirements.txt
- Run the script:
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
npm install libya-osm-data
Usage
// 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.
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
1.0.0
7 months ago