survos/geonames-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

survos/geonames-bundle

最新稳定版本:2.2.2

Composer 安装命令:

composer require survos/geonames-bundle

包简介

Symfony bundle for fetching packaged GeoNames authority databases.

README 文档

README

survos/geonames-bundle is the GeoNames authority-list bundle for packaged SQLite place databases.

The runtime model is intentionally small:

  • fetch a published authority database
  • store it locally
  • query it through a service such as GeoService

Runtime Databases

Initial published databases:

  • geo.sqlite contains countries and states
  • us.sqlite contains United States cities

GeoNames provides the canonical ids, so the shared runtime base is geo.sqlite, with country-specific city databases layered on top.

Build Workflow

Build-time tooling is separate from the public bundle command.

Admin tools:

  • admin/download-geonames.php
  • admin/build-sqlite.php

Current build sequence:

  1. Download the GeoNames source files.
  2. Run admin/build-sqlite.php.
  3. Parse the downloaded GeoNames files directly and insert them into SQLite with prepared statements.
  4. Publish the SQLite artifacts to Hugging Face.

GeoNames Source Files

The build command currently depends on:

  • countryInfo.txt
  • admin1CodesASCII.txt
  • admin2Codes.txt
  • allCountries.zip

These files carry the GeoNames ids needed to keep countries, administrative areas, and cities on the same authority system.

Publishing To Hugging Face

The published output should include:

  • a README.md dataset card with YAML front matter
  • geo.sqlite
  • us.sqlite

The public bundle command will fetch those published SQLite files rather than rebuilding them locally.

Installing The Bundle

composer req survos/geonames-bundle

Fetching The Authority

The public Symfony command is:

bin/console survos:geo

Planned usage:

bin/console survos:geo
bin/console survos:geo --country=us

The current bundle command is still a stub; the admin commands are the active build path.

Using The Bundle

The runtime API will stay lookup-oriented.

Example:

$geoId = $this->geoService->find('Oslo');

We will refine the query methods and return values later. For now, the design center is local lookup against fetched authority data.

See PLAN.md for the CSV layout and next migration steps.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固