Download the PHP package arielmejiadev/atlas without Composer
On this page you can find all versions of the php package arielmejiadev/atlas. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download arielmejiadev/atlas
More information about arielmejiadev/atlas
Files in arielmejiadev/atlas
Package atlas
Short Description Offline geocoder for Laravel — fills latitude/longitude from a bundled SQLite database, no API calls.
License MIT
Homepage https://github.com/arielmejiadev/atlas
Informations about the package atlas
Atlas — Offline Geocoder for Laravel
Fills latitude and longitude on any Eloquent model from a bundled SQLite database of world cities and US ZIP codes. No API keys, no rate limits, no network calls at runtime.
Precision note: Atlas provides centroid-level precision (city/ZIP center), not street-level geocoding. It's ideal for analytics, clustering, and approximate distance calculations.
Installation
Run Migrations
This creates the atlas_coordinates polymorphic table where coordinates are stored.
Build the Database
Atlas ships without the ~22 MB geocoding database. Build it at install time:
This downloads ~25 MB of public data from GeoNames (CC BY 4.0) and builds a local SQLite file. Takes 30–90 seconds.
For air-gapped environments, download a prebuilt file:
Configuration
Publish the config:
Key options in config/atlas.php:
Usage
Add the Trait
Geocode a Model
Facade
Dependency Injection
Column Mapping
Each model controls its own mapping. Four patterns are supported:
Standard Columns (Zero Config)
Custom Column Names
Partial Data
Single Column / Full Control
Backfill Command
Geocode existing records in bulk:
Auto-Geocode on Create (Listener)
Opt in via config:
New records are automatically geocoded via a queued job.
Geocoding Methods
Atlas tries methods in order and returns on the first hit:
| # | Method | Condition |
|---|---|---|
| 1 | us_zip |
US country + valid ZIP code |
| 2 | us_city_state |
US country + city + state |
| 3 | city_exact |
International exact city match |
| 4 | state_as_city |
State field used as city name |
| 5 | city_partial |
Partial/substring city match |
| 6 | country_centroid |
Falls back to country center |
| 7 | text_extract_city |
Detects country from text, finds city |
| 8 | text_extract_country_centroid |
Detected country's center |
| 9 | global_big_city_match |
Last resort: matches big cities globally |
Requirements
- PHP 8.2+
- Laravel 12 or 13
- Extensions:
pdo_sqlite,zip,curl - Suggested:
intl(better Unicode transliteration)
Testing
Data Attribution
Geocoding data sourced from GeoNames, licensed under Creative Commons Attribution 4.0.
License
MIT. See LICENSE.md.
All versions of atlas with dependencies
ext-pdo_sqlite Version *
ext-zip Version *
ext-curl Version *
illuminate/contracts Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
illuminate/database Version ^12.0|^13.0
illuminate/console Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0