Large language models have moved quickly from novelty to everyday tool in many technical fields, and geospatial work is no exception. GIS analysts are using them to tidy messy data, write documentation, and translate plain-language questions into queries. At the same time, location data has a way of exposing the weaknesses of these models: they are good with words and patterns, but they don’t inherently understand coordinates, projections, or the ground truth of a place.
This article looks at three practical uses of language models in GIS workflows, how to set them up sensibly, and the checks that keep errors out of your maps.
- Address cleaning and standardization
Anyone who has geocoded a spreadsheet of customer or asset addresses knows the pain: inconsistent abbreviations, missing postal codes, apartment numbers in the wrong field, typos, and free-text notes mixed in with the address itself.
Language models are good at this kind of normalization. Given a batch of raw records and a clear output schema, a model can split addresses into components, expand or standardize abbreviations, and flag records that look incomplete.
A few guidelines make this much more reliable:
- Ask for structured output. Request JSON with fixed fields such as house number, street, unit, locality, region, and postal code, plus a confidence or “needs review” flag.
- Never let the model invent missing parts. Instruct it explicitly to leave a field empty rather than guess a postal code or town.
- Geocode with a real geocoder. The model cleans the text; a proper geocoding service or reference dataset assigns coordinates. Language models should not be asked to produce latitude and longitude from memory.
- Sample and review. Check a random sample of outputs against the source and keep the original raw field alongside the cleaned one.
- Metadata generation
Metadata is the part of GIS work that everyone agrees matters and nobody enjoys writing. Language models can draft abstracts, purpose statements, keywords, and attribute descriptions from information you already have: the layer’s field list, a sample of values, the processing steps from your scripts, and notes from the analyst.
This works best as a drafting step. Feed the model facts about the dataset and ask it to produce a draft that follows your organization’s metadata standard. Then have the data steward review it. Pay special attention to:
- Coordinate reference system and datum. Take these from the data itself, never from the model’s description.
- Spatial extent and dates. Compute them from the data rather than letting the model summarize them.
- Lineage. Make sure processing steps described in the draft actually happened.
Handled this way, metadata that used to be skipped under deadline pressure can be produced consistently.
- Natural language to SQL and spatial queries
One of the most appealing uses is letting colleagues ask questions in plain language, such as “which parcels within five hundred meters of the river are zoned residential?”, and having a model produce the spatial SQL.
The pattern that works is to give the model your schema, including table names, geometry columns, and their spatial reference, along with a few example queries. It then drafts a query for a human or an automated validator to check before execution.
Even this simple example hides a classic trap: ST_DWithin measures distance in the units of the geometry’s spatial reference. If the layers are stored in a geographic coordinate system, “500” means degrees, not meters. A model may not catch that unless you tell it the CRS and units, and a reviewer should always check.
Other safeguards worth adding:
- Run generated queries with a read-only database role.
- Apply row limits and timeouts so a careless query can’t lock up the server.
- Log the original question, the generated query, and the result count for auditing.
Choosing and connecting models
Different tasks suit different models. Address normalization across thousands of rows benefits from a fast, smaller model, while query generation and metadata drafting often benefit from a stronger reasoning model. Most providers now support the OpenAI-compatible API format, so a Python script or a QGIS plugin can switch models through configuration.
Teams that want to compare several models without managing separate accounts sometimes use a gateway such as OpenLux, which provides access to models from multiple vendors with one API key, bills pay-as-you-go with no monthly fee, and records the usage and cost of each request. That per-request record is useful when a batch cleaning job needs to be budgeted or explained to a project manager.
Data sensitivity
Location data is often sensitive. Home addresses, the locations of critical infrastructure, and the habitats of protected species can all cause harm if exposed. Before sending data to any external model, check your organization’s data policies and the provider’s retention terms. Where possible, strip identifiers, send only the fields required, and keep the most sensitive layers on infrastructure you control.
Verification is the job
The common thread across all of these uses is verification. Language models are helpful assistants for text-heavy GIS tasks, but they do not know where things are. Coordinates should come from geocoders and survey data, extents from the geometry, and spatial logic from analysts who understand projections and topology. Used with that discipline, language models can remove a lot of tedious work and leave more time for the analysis that only a GIS professional can do.