Skip to content

fix(geocode): expand feature type mappings and tolerate whitespace in viewbox bounds - #1

Merged
ATLURI0001 merged 1 commit into
mainfrom
fix/nominatim-viewbox-and-type-mappings
Nov 10, 2026
Merged

ATLURI0001 merged 1 commit into
mainfrom
fix/nominatim-viewbox-and-type-mappings

Conversation

@ATLURI0001

Copy link
Copy Markdown
Owner

Overview

This pull request improves Nominatim geocoding parsing in src/nominatimGeocode.js by expanding OpenStreetMap feature type classifications, tolerating delimited whitespace in bounding box viewport coordinates, and adding automated unit tests.

Key Changes

  1. Delimited Whitespace Tolerance (src/nominatimGeocode.js):

    • nominatimViewboxFromBounds now tolerates surrounding and interior whitespace around , and | coordinate delimiters, allowing robust handling of user-formatted bounds queries (e.g. 30.1 , -97.95 | 30.52 , -97.55).
  2. Expanded Feature Type Classifications:

    • Added mapped classifications for common geographic features: borough, subdivision, hotel, motel, museum, hospital, harbour, bay, river, lake, sea, ocean, volcano.
    • Added class mappings for railway (['transit_station']) and boundary (['political']).
  3. Automated Unit Tests (src/nominatimGeocode.test.mjs):

    • Expanded unit tests validating new address categories and whitespace-tolerant viewport hints.

@ATLURI0001
ATLURI0001 merged commit 4fbb5e4 into main Nov 10, 2026
1 of 3 checks passed
@ATLURI0001
ATLURI0001 deleted the fix/nominatim-viewbox-and-type-mappings branch November 10, 2026 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant