iran-geojson
v1.0.0
Published
Iran GeoJSON file with provinces and cities
Readme
iran-geojson
Iran GeoJSON file with provinces and cities.
Installation
Install via npm:
npm install iran-geojson
## Usage
Load the GeoJSON file in Node.js:
```js
const iran = require('iran-geojson');
// نمایش تعداد Feature ها (استانها و شهرها)
console.log(iran.features.length);
// نمایش اولین Feature
console.log(iran.features[0]);
// نمونه: نمایش تمام استانها
iran.features
.filter(f => f.properties.type === 'province')
.forEach(p => console.log(p.properties.name));
// نمونه: نمایش تمام شهرها
iran.features
.filter(f => f.properties.type === 'city')
.forEach(c => console.log(c.properties.city, c.geometry.coordinates));