PHPackages                             georgique/world-geojson - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. georgique/world-geojson

ActiveLibrary

georgique/world-geojson
=======================

GeoJson for all the countries, areas (regions) and some states.

3.4.0(6mo ago)4754.4k↓40%102[1 PRs](https://github.com/georgique/world-geojson/pulls)GPL-3.0-or-laterJavaScript

Since Aug 1Pushed 6mo ago11 watchersCompare

[ Source](https://github.com/georgique/world-geojson)[ Packagist](https://packagist.org/packages/georgique/world-geojson)[ GitHub Sponsors](https://github.com/georgique)[ RSS](/packages/georgique-world-geojson/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (10)DependenciesVersions (17)Used By (0)

[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://supportukrainenow.org/)

World boundaries in GeoJSON format
==================================

[](#world-boundaries-in-geojson-format)

This repository contains GeoJSON data for all the countries boundaries including boundaries for states of bigger countries (note that this repository is currently filling). Detalization is good for using this data on scales up to 1:10000000 / gmaps zoom 6-7 (it's the best quality in combination with free-to-use license). Data is created using [geojson.io](http://geojson.io/) tool.

[![Quality example](https://user-images.githubusercontent.com/15987211/179500121-a3dd509b-dc05-43b4-8f2c-40d42b4741da.png)](https://user-images.githubusercontent.com/15987211/179500121-a3dd509b-dc05-43b4-8f2c-40d42b4741da.png)

Getting started
---------------

[](#getting-started)

You can either download it or install in your project either via Composer or NPM:

Via Composer:

```
"require": {
  "georgique/world-geojson": "^3.0"
}
```

Via NPM:

```
"dependencies": {
  "world-geojson": "^3.0",
}
```

Help with integrating it with any other Package Manager is welcome.

Usage
-----

[](#usage)

JSON files can be read from the directory in which the package was downloaded.

### Node.js

[](#nodejs)

Node.js applications can use the provided helper functions to synchronously load the JSON as a JavaScript object.

```
const geoJson = require('world-geojson') // or `import * as geoJson from 'world-geojson'`

geoJson.forCountry('Antigua & Barbuda'); // returns the contents of /countries/antigua_and_barbuda.json
geoJson.forState('Australia', 'New South Wales'); // returns the contents of /states/australia/new_south_wales.json
geoJson.forArea('U.S.A.', 'U.S. Virgin Islands'); // returns the contents of /areas/usa/us_virgin_islands.json

// Combine multiple GeoJSONs into one
const combined = geoJson.combineGeoJson([
  {countryName: 'Antigua & Barbuda'},
  {countryName: 'Australia', stateName: 'New South Wales'},
  {countryName: 'U.S.A.', areaName: 'U.S. Virgin Islands'}
]);
```

What's included
---------------

[](#whats-included)

#### Countries (v1)

[](#countries-v1)

Contries boundaries besides mainlands include all the geographically separated, but de jure dependent, associated and managed territories. Separated mainland and all the territories mentioned are added in release 2. Countries states are to be added in release 3. More about countries boundaries release [here](http://www.httphobo.com/all/world-geojson-release-1-0-0/).

#### Additional areas (v2)

[](#additional-areas-v2)

Besides bigger countries which are to be splitted into states, some smaller are also worth to be splitted into geographical areas. More about additional area boundaries release [here](http://www.httphobo.com/all/world-geojson-release-2-0-0/).

Countries split into areas are:

- Azerbaijan (2): Mainland/Nakhchivan
- Denmark (3): Mainland/Greenland/Faroe Islands
- Ecuador (2): Mainland/Galápagos Islands
- France (18): Mainland/Corsica/French Guiana/Guadeloupe/Martinique/Mayotte/Réunion/Clipperton Island/French Polynesia/New Caledonia/Saint Barthélemy/Saint Martin/Saint Pierre and Miquelon/Wallis and Futuna/French Southern and Atlantic Lands
- Italy (3): Mainland/Sardinia/Sicily
- Netherlands (7): Mainland/Bonaire/Saba/Sint Eustatius/Aruba/Curaçao/Sin Maarten
- New Zealand (12): Mainland/North Island/South Island/Tokelau/Kermadec Islands/Chatham Islands/Three Kings Islands/Antipodes Islands/Auckland Islands/Bounty Islands/Campbell Island/Snares Islands
- Norway (3): Mainland/Svalbard/Jan Mayen
- Portugal (3): Mainland/Azores/Madeira
- Spain (3): Mailand/Canary Islands/Balearic Islands
- United Kingdom (21): United Kingdom/England/Scotland/Wales/Northern Ireland/Isle of Man/Guernsey/Jersey/Gibraltar/Akrotiri and Dhekelia/Bermuda/Turks and Caicos Islands/British Virgin Islands/Anguilla/Cayman Islands/Montserrat/Pitcairn Islands/Saint Helena, Ascension and Tristan de Cunha/British Indian Ocean Territory/Falkland Islands/South Georgia and the South Sandwich Islands
- USA (17): Mainland (to be split to states in v3)/Palmyra Atoll/Guam/Northern Mariana Islands/Puerto Rico/United States Virgin Islands/American Samoa/Baker Island/Howland Island/Jarvis Island/Johnston Atoll/Kingman Reef/Wake Island/Midway Atoll/Navassa Island/Serranilla Bank/Bajo Nuevo Bank

#### Aligned borders for all the countries (v3.0) and Australian states (v3.1)

[](#aligned-borders-for-all-the-countries-v30-and-australian-states-v31)

This release is about gluing borders between all the countries so they perfectly align. Was / Is:

[![](https://user-images.githubusercontent.com/15987211/223083854-86f8ffef-6cf9-4964-a8b5-a55f389fc102.png)](https://user-images.githubusercontent.com/15987211/223083854-86f8ffef-6cf9-4964-a8b5-a55f389fc102.png)[![](https://user-images.githubusercontent.com/15987211/223084469-1fbb1fc2-4cf5-4064-a251-a65a4eea7401.png)](https://user-images.githubusercontent.com/15987211/223084469-1fbb1fc2-4cf5-4064-a251-a65a4eea7401.png)

Also, NPM this package can now be installed via [NPM](https://www.npmjs.com/package/world-geojson)

#### Added region boundaries for Thailand and Switzerland (v3.2)

[](#added-region-boundaries-for-thailand-and-switzerland-v32)

Note that those region boundaries are not aligned with the country borders.

#### Added Taiwan (v3.3)

[](#added-taiwan-v33)

Enough said. It was missing, not it is not.

#### Added India states (v3.4)

[](#added-india-states-v34)

Quality is unknown.

What's planned
--------------

[](#whats-planned)

There is no ongoing work right now and no commitment to have this ready within a certain timeframe, so these shouldn't be counted on, but this is the plan in general.

#### Aligned and better quality state borders for CA and USA (v3.5)

[](#aligned-and-better-quality-state-borders-for-ca-and-usa-v35)

- Better Canadian province borders
- Glued borders for Canadian provinces
- Better USA state borders
- Glued borders for USA states

#### States boundaries (v4.0)

[](#states-boundaries-v40)

Countries which we are going to provide state boundaries for:

- Australia (ready)
- Argentina (pending: 24)
- Brazil (pending: 26)
- Canada (ready / OSM / low quality)
- China (pending: 33)
- India (pending: 29)
- Indonesia (pending: 34)
- Kazakhstan (pending: 14)
- Mexico (pending: 31)
- Philippines (pending: 18)
- Russia (pending: 83)
- USA (ready, OSM data)

Note that some states boundaries are provided by OSM, however quality of that data is much lower. It's planned to replace them with handmade ones eventually.

Help wanted
-----------

[](#help-wanted)

- Providing geojson for any regions - not necessarily from the roadmap above, any country's regions can be included
- Integration with any package managers other than NPM and Packagist

Reference
---------

[](#reference)

- [GitHub Repository](https://github.com/georgique/world-geojson)
- [Composer package](https://packagist.org/packages/georgique/world-geojson)
- [NPM package](https://www.npmjs.com/package/world-geojson)
- [Tool for editing GeoJSON - geojson.io](http://geojson.io/)
- [OpenStreetMap](https://www.openstreetmap.org)

---

This library is my personal mini-project which I enjoy doing and I am happy if that is useful for anyone else. If you want to thank me, feel free to buy me a cup of coffee through the GitHub Sponsor program.

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance65

Regular maintenance activity

Popularity45

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 98.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~231 days

Recently: every ~92 days

Total

14

Last Release

209d ago

Major Versions

1.0.0 → 2.0.02017-09-08

2.3.2 → 3.0.02023-04-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/d1d6c708c69a433539ac1cac48c5d7f71516134a4836ed9eaed7b5b486cd55eb?d=identicon)[georgique](/maintainers/georgique)

---

Top Contributors

[![georgique](https://avatars.githubusercontent.com/u/15987211?v=4)](https://github.com/georgique "georgique (650 commits)")[![b-jazz](https://avatars.githubusercontent.com/u/6668322?v=4)](https://github.com/b-jazz "b-jazz (1 commits)")[![bnf](https://avatars.githubusercontent.com/u/473155?v=4)](https://github.com/bnf "bnf (1 commits)")[![chidam333](https://avatars.githubusercontent.com/u/86545749?v=4)](https://github.com/chidam333 "chidam333 (1 commits)")[![chingchai](https://avatars.githubusercontent.com/u/2278716?v=4)](https://github.com/chingchai "chingchai (1 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![janic0](https://avatars.githubusercontent.com/u/69144251?v=4)](https://github.com/janic0 "janic0 (1 commits)")[![NJRBailey](https://avatars.githubusercontent.com/u/23001743?v=4)](https://github.com/NJRBailey "NJRBailey (1 commits)")[![AlexGouget](https://avatars.githubusercontent.com/u/13834739?v=4)](https://github.com/AlexGouget "AlexGouget (1 commits)")[![tvedeane](https://avatars.githubusercontent.com/u/1138746?v=4)](https://github.com/tvedeane "tvedeane (1 commits)")

---

Tags

area-boundariesboundariescountriescountries-boundariesgeographygeojsonregion-boundariesworld-boundariesgeojsonborders

### Embed Badge

![Health badge](/badges/georgique-world-geojson/health.svg)

```
[![Health](https://phpackages.com/badges/georgique-world-geojson/health.svg)](https://phpackages.com/packages/georgique-world-geojson)
```

###  Alternatives

[pragmarx/countries

PHP Countries and Currencies

1.9k3.3M18](/packages/pragmarx-countries)[jmikola/geojson

GeoJSON implementation for PHP

3109.0M77](/packages/jmikola-geojson)[gasparesganga/php-shapefile

PHP library to read and write ESRI Shapefiles, compatible with WKT and GeoJSON

1511.6M20](/packages/gasparesganga-php-shapefile)[pragmarx/countries-laravel

Countries for Laravel

1471.1M2](/packages/pragmarx-countries-laravel)[lwwcas/laravel-countries

A comprehensive package for managing country data in Laravel applications, including multilingual support, geographic coordinates, and detailed metadata for seamless integration with Laravel.

12464.0k](/packages/lwwcas-laravel-countries)[funiq/geophp

Open-source native PHP library for doing geometry operations. Can read and write a wide variety of formats: (E)WKT, (E)WKB, TWKB, GeoJSON, KML, GPX, GeoRSS. Works with all Simple-Feature geometries (Point, LineString, Polygon...) and can be used to get centroids, bounding-boxes, area, etc.

21114.4k1](/packages/funiq-geophp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
