Skip to content

Data error if wp ends with "_" #244

Closed

Description

@michihdeu

It happened to me that I entered _ at the end of a label, e.g.: "A1_". It is not allowed that labels end with "_" and it's usually intended to add cardinal directions, e.g. "A1_N". I think it's worth to add a data check.

List of current errors:
..\HighwayData\hwy_data\COD\afrrtr\cod.rtr103.wpt (1 hit)
Line 26: D231B_ http://www.openstreetmap.org/?lat=-5.713440&lon=19.217663
..\HighwayData\hwy_data\DEU-RP\deurpl\deurp.l016.wpt (1 hit)
Line 7: L12_ http://www.openstreetmap.org/?lat=50.160715&lon=6.331869
..\HighwayData\hwy_data\DEU-RP\deurpl\deurp.l522.wpt (1 hit)
Line 3: L455_ http://www.openstreetmap.org/?lat=49.510059&lon=8.201289
..\HighwayData\hwy_data\FRA-IDF\fraidfd\fraidf.d014978.wpt (1 hit)
Line 11: D27_ http://www.openstreetmap.org/?lat=48.572295&lon=1.988026
..\HighwayData\hwy_data\SCT\eurtr\for tracing\sct.burnshertrl.wpt (1 hit)
Line 9: B725_ http://www.openstreetmap.org/?lat=55.048028&lon=-3.597507

@si404 COD and SCT are yours

Activity

  1. michihdeu commented on Jul 16, 2019

    @michihdeu
    ContributorAuthor

    Same for "/" (need to check if there are currently wps ending with "/" in HwyData)

  2. michihdeu commented on Jul 16, 2019

    @michihdeu
    ContributorAuthor

    No wp is currently ending with "/".

    Are there more wp label issues which might be checked?

  3. added a commit that references this issue on Jul 17, 2019
  4. yakra commented on Nov 27, 2019

    @yakra
    Contributor
    • if label begins with anything in _/()
      (grep -v '^\+' */*/*.wpt | cut -f1 -d' ' | grep ':\*\?[_/()]')
    • ends with anything in /_(+*
      (grep -v '^\+' */*/*.wpt | cut -f1 -d' ' | grep '[_/(+\*]$')
    • contains ) before (
      (grep -v '^\+' */*/*.wpt | cut -f1 -d' ' | grep ':.*).*(')
  5. yakra commented on Nov 28, 2019

    @yakra
    Contributor

    Enhancements written. Not yet tested.

  6. yakra commented on Nov 28, 2019

    @yakra
    Contributor

    Need to check for + or * in the middle of labels, not just at the end.

  7. yakra commented on Dec 2, 2019

    @yakra
    Contributor

    Need to check for + or * in the middle of labels, not just at the end.

    Done.

    • if label begins with anything in _/()
    • ends with anything in /_(+*

    No need to check for a label starting with ) or ending with (.

    • If the corresponding ( or ) is present, LABEL_PARENS will be flagged due to )( out of order.
    • If not, LABEL_PARENS will be flagged due to mismatching ( and ) counts.

    Although...
    A label could have more than one pair of parentheses. This should be disallowed. Right now, if a label were to have >1 pair:

    • C++ version would only check the last pair for out-of-order )(
    • Python version would only check the first pair for out-of-order )(
  8. yakra commented on Dec 3, 2019

    @yakra
    Contributor

    Commit added to #267.
    New/enhanced datachecks are live on lab2.
    13 instances of a label ending with _:

    • 1 in COD
    • 4 in FRA-GES
    • 8 in FRA-IDF
  9. michihdeu commented on Dec 3, 2019

    @michihdeu
    ContributorAuthor

    Thank you very much! I'll fix it as soon as it's live 😄

  10. yakra commented on Dec 3, 2019

    @yakra
    Contributor

    On noreaster, I take it?

  11. michihdeu commented on Dec 3, 2019

    @michihdeu
    ContributorAuthor

    what? I thought when it's live on the production server or lab2 or whatever where I can find them.
    But I won't fix it this week since I'm still on the road...

  12. yakra commented on Dec 3, 2019

    @yakra
    Contributor

    Oh. I got confused. *Shrug.* It's live on lab2 now. #267 pending for the main site.

  13. michihdeu commented on Dec 4, 2019

    @michihdeu
    ContributorAuthor

    And now live on production server. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions