{"id":4021,"library":"geonames","title":"Geonames Data Parser (CLI for Shapefile/KML)","description":"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.","status":"abandoned","version":"0.1.3","language":"en","source_language":"en","source_url":"https://pypi.org/project/geonames/","tags":["geonames","geospatial","shapefile","kml","cli","parser"],"install":[{"cmd":"pip install geonames","lang":"bash","label":"Basic Installation"},{"cmd":"sudo apt-get update && sudo apt-get install -y libgdal-dev\npip install fiona\npip install geonames","lang":"bash","label":"Installation with Fiona/GDAL (Linux example)"}],"dependencies":[{"reason":"Required for reading/writing OGR vector data formats like Shapefile/KML, which is the core functionality of this library. Fiona itself depends on the GDAL/OGR C++ library.","package":"fiona","optional":false}],"imports":[{"note":"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`.","wrong":"import geonames # for parsing dumps to shapefile/KML","symbol":"geonames CLI tool","correct":"$ geonames PH.txt"}],"quickstart":{"code":"# 1. Download a GeoNames dump file (e.g., for Philippines)\n#    wget http://download.geonames.org/export/dump/PH.zip\n#    unzip PH.zip\n\n# 2. Convert the downloaded .txt file to a Shapefile using the CLI tool\ngeonames PH.txt\n\n# This will generate a Shapefile (e.g., PH.shp, PH.shx, PH.dbf, etc.)\n# in the current directory.","lang":"bash","description":"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."},"warnings":[{"fix":"Consider using more actively maintained libraries like `fiona` directly for spatial data handling or `geopandas` for broader geospatial tasks, and parsing GeoNames data yourself or using libraries like `geonamescache` or `geonames-lib` that specifically handle GeoNames data in Python.","message":"The 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.","severity":"breaking","affected_versions":"<=0.1.3"},{"fix":"Always verify the PyPI project page (e.g., `pypi.org/project/geonames/`) and its documentation to ensure you are installing and using the intended library. For this specific `geonames` (0.1.3) package, its core functionality is exclusively via the `geonames` command-line tool, not `import geonames`.","message":"Name 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.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure that GDAL/OGR and its Python bindings (fiona) are correctly installed on your system before attempting to use the `geonames` CLI. Refer to the `fiona` installation documentation for detailed instructions specific to your operating system.","message":"Heavy 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.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}