Skip to content

WorkBench GEOLocate requires non-empty latitude1/longitude1 values to pass any data #8322

Description

@grantfitzsimmons

Describe the bug
In the WorkBench, clicking the "GEOLocate" button opens the GEOLocate dialog, but all fields (locality string, country, state, county) are empty — even when those columns are mapped and contain values. The dialog only populates with data when the latitude1 and longitude1 columns have non-empty values.

This can somewhat defeat the purpose of GEOLocate since users typically want to use GEOLocate to obtain coordinates from a locality description, not to refine existing coordinates.

To Reproduce
Steps to reproduce the behavior:

  1. In the Workbench, upload a dataset that has columns mapped to locality.latitude1, locality.longitude1, locality.localityname, and geography ranks (locality.geography.$Country.name, etc.)
  2. Leave the latitude1 and longitude1 cells empty, but fill in the locality and geography cells with real values
  3. Select one or more rows and click the "GEOLocate" button in the toolbar
  4. Observe that the GEOLocate dialog opens with all fields (country, state, county, locality) empty

Expected behavior
The GEOLocate dialog should receive the available locality description data (country, state, county, locality name) even when latitude/longitude are empty. The form-based GEOLocate plugin (FormPlugins/GeoLocate.tsx) already behaves correctly. It sends geography and locality data without requiring coordinates.

Additional context
Root cause: In helpers.ts, getLocalityData() checks requiredLocalityColumns (['locality.latitude1', 'locality.longitude1']) and returns false if either is empty. In WbToolkit/GeoLocate.tsx, getGeoLocateData() uses getLocalityCoordinate(...) || {} — the false || {} fallback produces an empty object, discarding all country/state/county/locality data.

The form-based plugin version does not have this issue — its getGeoLocateData() in FormPlugins/GeoLocate.tsx correctly sends geography data independently of coordinates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    2 - WorkBenchIssues that are related to the WorkBench

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions