Registry / data / geonames

geonames

JSON →
library0.1.3pypypiunverified

This `geonames` library (version 0.1.3) is an older Python package primarily designed as a Command Line Interface (CLI) tool. It parses downloaded GeoNames.org geographical data dump files (typically `.txt` files) and converts them into clean OGR Shapefile or KML formats. The library's last update was in 2015, indicating it is no longer actively maintained.

dataserialization
Install & Compatibility
Where this runs
tested against v0.1.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.6MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 2.5s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

This specific `geonames` (0.1.3) package is primarily a command-line utility for converting GeoNames dump files to Shapefile/KML. It does not expose a direct Python API for this core functionality. Other packages, like `geonames-lib` or `geonamescache`, offer Python APIs and may use `import geonames`.

$ geonames PH.txt

The primary use case for this `geonames` library is via its command-line interface to convert GeoNames dump files. Ensure you have downloaded a `.txt` dump file (e.g., `PH.txt` from `PH.zip`) before running the command. The `fiona` library and its GDAL/OGR dependencies must be installed for Shapefile/KML output to work.

# 1. Download a GeoNames dump file (e.g., for Philippines) # wget http://download.geonames.org/export/dump/PH.zip # unzip PH.zip # 2. Convert the downloaded .txt file to a Shapefile using the CLI tool geonames PH.txt # This will generate a Shapefile (e.g., PH.shp, PH.shx, PH.dbf, etc.) # in the current directory.
geonames --version
Debug
Known footguns
breakingThe library is abandoned and was last updated in 2015. It may not be compatible with newer Python versions or depend on outdated versions of its dependencies (e.g., Fiona, GDAL) which could lead to installation or runtime issues.
gotchaName collision with other 'geonames' related packages: The PyPI package `geonames` (v0.1.3) is distinct from `geonames-lib` (a library for querying dumps), `geonamescache` (for in-memory cache), and `python-geonames` (an async database backend). Be careful to install and refer to the correct package.
gotchaHeavy dependency on GDAL/OGR: This library relies on `fiona` for its core Shapefile/KML conversion, which in turn depends on the GDAL/OGR C++ library. Installing GDAL/OGR can be complex and platform-specific, often requiring system-level packages.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
21 hits · last 30 days
gptbot
4
ahrefsbot
4
bytedance
3
dotbot
1
script
1
Resources