Soenneker.GeoNames.Cities500.Data
4.0.121
Prefix Reserved
dotnet add package Soenneker.GeoNames.Cities500.Data --version 4.0.121
NuGet\Install-Package Soenneker.GeoNames.Cities500.Data -Version 4.0.121
<PackageReference Include="Soenneker.GeoNames.Cities500.Data" Version="4.0.121" />
<PackageVersion Include="Soenneker.GeoNames.Cities500.Data" Version="4.0.121" />
<PackageReference Include="Soenneker.GeoNames.Cities500.Data" />
paket add Soenneker.GeoNames.Cities500.Data --version 4.0.121
#r "nuget: Soenneker.GeoNames.Cities500.Data, 4.0.121"
#:package Soenneker.GeoNames.Cities500.Data@4.0.121
#addin nuget:?package=Soenneker.GeoNames.Cities500.Data&version=4.0.121
#tool nuget:?package=Soenneker.GeoNames.Cities500.Data&version=4.0.121
Soenneker.GeoNames.Cities500.Data
A NuGet content package containing a US-only, four-column extract derived from GeoNames' cities500 gazetteer.
Install
dotnet add package Soenneker.GeoNames.Cities500.Data
The package has no callable API and requires no service registration. It copies the UTF-8, tab-delimited dataset to the consuming application's output:
Resources/cities500.txt
For example:
string path = Path.Combine(AppContext.BaseDirectory, "Resources", "cities500.txt");
await foreach (string line in File.ReadLinesAsync(path))
{
string[] columns = line.Split('\t');
string city = columns[0];
string stateCode = columns[1];
double latitude = double.Parse(columns[2], CultureInfo.InvariantCulture);
double longitude = double.Parse(columns[3], CultureInfo.InvariantCulture);
}
For repeated searching and typed US-city records, use Soenneker.GeoNames.Cities500.Lookup instead of reparsing the file in application code.
Row format
The update runner selects rows whose GeoNames country code is US and writes:
| Index | Field |
|---|---|
| 0 | City/place name from the GeoNames name field |
| 1 | GeoNames first-level administrative code (US state/territory code) |
| 2 | Latitude in decimal WGS84 degrees |
| 3 | Longitude in decimal WGS84 degrees |
Do not treat this as the complete GeoNames schema: IDs, alternate names, population, feature codes, time zone, and modification date are not retained. Tabs delimit the four output columns.
The upstream schema, feature codes, and latest extracts are documented in the GeoNames dump readme.
Data license and freshness
GeoNames publishes this dataset under Creative Commons Attribution 4.0. Preserve GeoNames attribution when redistributing or presenting derived data. GEONAMES-LICENSE.txt is included in the package alongside the MIT license for the package's software and packaging.
GeoNames publishes updated source extracts daily, but a NuGet version is a fixed transformed snapshot. Pin a package version for reproducible deployments and upgrade deliberately when fresher place data is needed. GeoNames provides the source data without guarantees of accuracy, timeliness, or completeness.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.GeoNames.Cities500.Data:
| Package | Downloads |
|---|---|
|
Soenneker.GeoNames.Cities500.Lookup
An indexed lookup for the packaged US city, state, and coordinate extract derived from GeoNames cities500 data. |
GitHub repositories
This package is not used by any popular GitHub repositories.