Skip to content

Region from coordinates - extended look #2426

Open
@andrixnet

Description

@andrixnet

Given the recent hickup described in issue #2423 I'd like to open a discussion and maybe make some improvements based on OC NODE specific circumstances.

On OCRO I have NUTS data. Editing a cache automatically (via JS and AJAX) sets the "Region" field. I assume it's done via NUTS.
Currently pressing "Region from coordinates" yields an informative box with the following sources:

  • NUTS data (local)
  • Google Maps (yields no info)
  • Nominatim (via OpenStreetMap)

There are several possible sources for this info, some requiring API key and possibly payment. Although this is a volunteer and community supported project (ie each OC national site), it might be concievable that OC site X might prefer evena subscription based service.

As a general concept, I would suggest the following strategy:

  • reverse-geocoding services be specified in /config in a modular way with at least a "name" config_key and service specific config_keys.
  • a list of services, first item in the list being the default service used for the AJAX one.

smth like:

$geocoding['services'] = 'nuts, nominatim';
$geocoding['nuts']['source'] = 'local';
$geocoding['nuts']['level'] = 3;
$geocoding['nominatim']['source'] = 'xxxxxxx';
// etc

This concept would make handling per site much more straightforward.

On the other hand, OCRO is still affected by #103 as our "judeţ" zoning is the appropriate one, but we can't configure NUTS, it's hardcoded and changing anything would break other nodes.
Also see #1838

right now NUTS answer and Nominatim answer differ:
region

In the least, configurable NUTS layer would be of great help.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions