1 GNIS
Tom Russo edited this page 2025-12-24 11:59:53 -07:00

Using USGS GNIS data

Finding GNIS data

GNIS data is from the USGS Geographic Names Information System.

Xastir can still read the archived nation-wide Populated Places file that can be found at the National Map.

Note that this archived file format was discontinued in 2021 and is no longer updated. It was still available when this page was written on 24 Dec 2025, but it may disappear at any time.

This single file (POP_PLACES_20210825.txt, which must be extracted from the zip file you can download), covering the entire United States and its territories, is the only one remaining on the GNIS site that will work with Xastir. The state-wide files no longer have the format that we need, and they're not updated, either.

Note

There is a second, maintained Populated Place file available on the "Download GNIS Data" page, but it is in a slightly different format than the older one and the Locate Map Feature function does not work with it because the code expects the records to have a specific ordering of fields in each record. This newer file does not conform to that old ordering.

History of GNIS use in Xastir

Prior to 2009, the USGS maintained data files called "State Gazetteer" files that listed geographic names (populated places and other map features with names). These files contained a field for population.

After 2009, the population field was replaced by elevation, rendering the new files useless for mapping.

Using the pre-2009 format data, Xastir could plot these populated places using the population value to decide when to plot them (e.g. at what zoom level).

After 2009, the GNIS data became useless for mapping because Xastir has no way of figuring out when to display the data. Unfortunately, a developer "fixed" the map_gnis.c code to deal with the new data format, but didn't actually fix the display code to render the maps in any useful way.

However, the post-2009 GNIS files remained useful for the Locate Map Feature tool in the Map menu.

To allow Xastir users with older data to continue to use them with Xastir as map sources, rather than revert the changes to map_gnis.c, a "new" map type (supported by map_pop.c) was added. Those old files could be renamed from ".gnis" files to ".pop" files and continue to work using the map_pop.c renderer.

A server at Texas A&M University was set up for Xastir users to deposit old GNIS files (renamed to .pop) for continued use. This data was later moved to a server at the University of Alabama in Huntsville. Both of these servers have been gone for many years, making this map format only of historical interest.

Some very old Xastir users may still have useful ".pop" files. Try asking around the Xastir user group or in Github discussions if you want to try to find some. You might get lucky.

Current GNIS data

The USGS maintains GNIS data in modern GIS formats now (Geopkg and Geodatabase) but Xastir cannot read these.

Your best bet, should you really need this information, would be to use a GIS that can read such data and create your own maps in shapefile format from them. This is beyond the scope of the current batch of Xastir documentation.