Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect phrases in french raster layer names as hints that a layer represents an elevation surface #53644

Merged
merged 2 commits into from
Jun 29, 2023

Conversation

nicogodet
Copy link
Member

We (well, me in my work) use sl for "Surface Libre" which is the free surface elevation (mainly computed using flood model).
But I'm afraid this will detect too many false positive.
I wonder if this list could be exposed to user in settings

@github-actions github-actions bot added this to the 3.34.0 milestone Jun 29, 2023
Co-authored-by: Björn <pathmapper@posteo.de>
@lbartoletti
Copy link
Member

I wonder if this list could be exposed to user in settings

if it's intended to have hints for each language, they could be in the settings/text files, couldn't they?

@nicogodet
Copy link
Member Author

IMO it would be better than hardcoded values (or in addition to generic english hardcoded values).

@nyalldawson
Copy link
Collaborator

There's an explanation at #30245 why this list should NOT be localised

@nicogodet
Copy link
Member Author

but adding hardcoded localized variants of the strings is encouraged

Did I miss-interpreted this comment ?

@nyalldawson
Copy link
Collaborator

@nicogodet

No, your approach here is correct. I'm referring to the comment regarding having a per language list.

@nicogodet
Copy link
Member Author

Personally, I suggested to expose to user in GUI a way to add user defined hints

Roughly:

static const QStringList sPartialCandidates{ QStringLiteral( "dem" ),
      QStringLiteral( "height" ),
      QStringLiteral( "elev" ),
      QStringLiteral( "srtm" ),
      // French hints
      QStringLiteral( "mne" ),
      QStringLiteral( "mnt" ),
      QStringLiteral( "mns" ),
      QStringLiteral( "rge" ),
      QStringLiteral( "alti" ) };
sPartialCandidates << settings->userDemHints();

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.

None yet

4 participants