Skip to content

Data check "Name missing in con csv file" #338

Open

Description

@michihdeu

If a _con.csv file has more than one route for the system without name entry, a data error should be reported:

Error:

deub;B262;;;deurp.b262
deub;B262;;;deuhe.b262

Fine:

deub;B262;;Mayen;deurp.b262
deub;B262;;Wiesbaden;deuhe.b262

Not sure whether there are cases where it could be correct without any name entry?

Activity

  1. yakra commented on Jun 10, 2020

    @yakra
    Contributor

    Not immediately important in that nothing directly related to a ConnectedRoute is used in user data or specified in QS parameters.

    It will be more important in the future, such as when TravelMapping/Web#421 is implemented, if the ConnectedRoute name is shown in the web browser title bar.

    It probably is good to have unique names that we can refer to ConnectedRoutes by, so we can talk about "I-35 (S. Texas)", "I-35 (N. Texas - S. Minnesota)" and "I-35 (N. Minnesota)", rather than just... "I-35".

    We shouldn't just check for duplicate blank names, but any duplicate name within a system. The string to analyze should be something like route + banner + ' ' + groupname. I see no harm in having duplicate names in different systems.

    Not sure whether there are cases where it could be correct without any name entry?

    Not sure what you mean by this.

  2. michihdeu commented on Jun 10, 2020

    @michihdeu
    ContributorAuthor

    Not sure what you mean by this.

    Are there cases where it would be fine to omit the name entries? I don't think so but haven't thought much about it.

    In addition, are there cases where it could be fine to omit the name entry for one connected route but specify it for the other route(s) only? Again, didn't think about it much but I guess that there should be no exceptions.

    I think it would be nice to get a list of potential data errors - as you usually do - to check this before introducting the new check.

  3. yakra commented on Jun 10, 2020

    @yakra
    Contributor

    Are there cases where it would be fine to omit the name entries? I don't think so but haven't thought much about it.

    Anywhere a ConnectedRoute name would be unique within a system. Staying with the deub example,

    deub;B8n;;;deunw.b008n
    deub;B11a;;;deuby.b011a
    deub;B15a;;;deuby.b015a
    deub;B15n;;;deuby.b015n
    deub;B16a;;;deuby.b016a
    deub;B17;;;deuby.b017
    deub;B20;;;deuby.b020
    

    etc. all look fine of course.
    http://travelmapping.net/devel_new/manual/syshwylist.php#rework02

    In addition, are there cases where it could be fine to omit the name entry for one connected route but specify it for the other route(s) only? Again, didn't think about it much but I guess that there should be no exceptions.

    In terms of usability & keeping unique names, it should be fine.
    From a manual / style guide perspective? Having another look at the manual, I see...

    If there are multiple rows with the same Route+Banner combination, each row should have a nonblank Name.

    This would suggest having another datacheck for ConnectedRoutes with a blank name that should be non-blank.
    (I think per a not-so-recent forum thread, there's some stuff I'd need to fix in my regions... Nova Scotia maybe; anywhere else?)

    Perhaps
    DUPLICATE_CONRTE_NAME
    and BLANK_CONRTE_NAME

    Since the DatacheckEntry class is designed to store a chopped root, it makes sense to store the ConnectedRoute's first chopped root as the route with the error, and not list any waypoint labels.
    deuhe.b262;;;;BLANK_CONRTE_NAME;481 (481 is the line # in deub_con.csv)
    deuhe.b262;;;;DUPLICATE_CONRTE_NAME;481
    deurp.b262;;;;BLANK_CONRTE_NAME;480

    Theoretically, datacheck.php could detect these error codes, and change the link to point to a ConnectedRoute in the HB, or mapview, or even the _con.csv file on GitHub.

  4. michihdeu commented on Jun 10, 2020

    @michihdeu
    ContributorAuthor

    there cases where it would be fine to omit the name entries? I don't think so but haven't thought much about it.

    Anywhere a ConnectedRoute name would be unique within a system. Staying with the deub example,

    Sure. That's what I meant in combination to the OP. I just didn't repeat it because I thought it's obvious:

    If a _con.csv file has more than one route for the system without name entry

  5. yakra commented on Mar 17, 2021

    @yakra
    Contributor
  6. yakra commented on May 22, 2021

    @yakra
    Contributor

    Tagged the wrong issue in #430.

  7. reopened this on May 22, 2021
  8. yakra commented on Feb 16, 2022

    @yakra
    Contributor

    DUPLICATE_CONRTE_NAME shell script

    As of 0df0a8c1d1f5469a7b534ed899108c9101690acb

    for datum in `diff \
    <(tail -q -n +2 *_con.csv | sed -r 's~(.*;.*;.*;.*);.*~\1~' | grep -v '^$' | sort) \
    <(tail -q -n +2 *_con.csv | sed -r 's~(.*;.*;.*;.*);.*~\1~' | grep -v '^$' | sort | uniq) \
    | grep '^<' | sed 's~^< ~~' | tr ' ' '%'`; do \
      grep "$(echo $datum | tr '%' ' ')" *_con.csv
      echo
    done

    yields

    chng_con.csv:chng;G0501;;;chnsx.g0501
    chng_con.csv:chng;G0501;;;chnsx.g0511
    
    cisa_con.csv:cisa;A381;;;uzb.a381
    cisa_con.csv:cisa;A381;;;tkm.a381
    
    deua_con.csv:deua;A270;;;deuhb.a270
    deua_con.csv:deua;A270;;;deuni.a270
    
    deub_con.csv:deub;B208;;;deush.b208
    deub_con.csv:deub;B208;;;deumv.b208
    
    espa_con.csv:espa;A15;;Lekunberri;espnc.a015
    espa_con.csv:espa;A15;;Lekunberri;esppv.a015
    
    eure2_con.csv:eure2;E45;;;itatre.e45,itaven.e45,italom.e45,itaemi.e45,itatos.e45,itaumb.e45,italaz.e45ort,itaumb.e45ort,italaz.e45bau,itaumb.e45cas,italaz.e45,itacam.e45,itabas.e45,itacal.e45
    eure2_con.csv:eure2;E45;;;itasic.e45
    eure2_con.csv:eure2;E45;;Roma (loop);italaz.e45rom
    
    eure2_con.csv:eure2;E74;;;italig.e74
    eure2_con.csv:eure2;E74;;;itapie.e74
    
    eurtr_con.csv:eurtr;SaaRenTie;;Saariston Rengastie (Turku);fin.saarentie
    eurtr_con.csv:eurtr;SaaRenTie;;Saariston Rengastie (Turku);fin.saarentienag
    
    fran_con.csv:fran;N6;;;fraidf.n006
    fran_con.csv:fran;N6;;;frabfc.n006
    
    gbnb_con.csv:gbnb;B6318;;;eng.b6318
    gbnb_con.csv:gbnb;B6318;;;sct.b6318
    
    gbnb_con.csv:gbnb;B6452;;;sct.b6452
    gbnb_con.csv:gbnb;B6452;;;eng.b6452
    
    itaa2_con.csv:itaa2;RA5;;Raccordo Autostradale Scalo Sicignano - Potenza;itacam.ra005
    itaa2_con.csv:itaa2;RA5;;Raccordo Autostradale Scalo Sicignano - Potenza;itabas.ra005
    
    itaa2_con.csv:itaa2;RA6;;Raccordo Autostradale Bettolle-Perugia;itatos.ra006
    itaa2_con.csv:itaa2;RA6;;Raccordo Autostradale Bettolle-Perugia;itaumb.ra006
    
    itass2_con.csv:itass2;SS12;Var;;itatos.ss012var
    itass2_con.csv:itass2;SS12;Var;;itaemi.ss012var
    itass2_con.csv:itass2;SS12;Var;;itaven.ss012var
    
    itass2_con.csv:itass2;SS12;Var;;itatos.ss012var
    itass2_con.csv:itass2;SS12;Var;;itaemi.ss012var
    itass2_con.csv:itass2;SS12;Var;;itaven.ss012var
    
    itass2_con.csv:itass2;SS16;Dir;;itaabr.ss016dir
    itass2_con.csv:itass2;SS16;Dir;;itamar.ss016dir
    
    itass2_con.csv:itass2;SS7;Racc;;italaz.ss007racc
    itass2_con.csv:itass2;SS7;Racc;;itacam.ss007racc
    itass2_con.csv:itass2;SS7;Racc;;itabas.ss007racc
    itass2_con.csv:itass2;SS7;Racc;;itapug.ss007racc
    
    itass2_con.csv:itass2;SS7;Racc;;italaz.ss007racc
    itass2_con.csv:itass2;SS7;Racc;;itacam.ss007racc
    itass2_con.csv:itass2;SS7;Racc;;itabas.ss007racc
    itass2_con.csv:itass2;SS7;Racc;;itapug.ss007racc
    
    itass2_con.csv:itass2;SS7;Racc;;italaz.ss007racc
    itass2_con.csv:itass2;SS7;Racc;;itacam.ss007racc
    itass2_con.csv:itass2;SS7;Racc;;itabas.ss007racc
    itass2_con.csv:itass2;SS7;Racc;;itapug.ss007racc
    
    jpnhky_con.csv:jpnhky;N497;;Nishi Kyūshū Expwy Sasebo section (E35);jpn.n497
    jpnhky_con.csv:jpnhky;N497;;Nishi Kyūshū Expwy Sasebo section (E35);jpn.n497fuk
    
    mexdn_con.csv:mexdn;MEX145D;;;mexchis.mex145d,mextab.mex145d,mexver.mex145dcho
    mexdn_con.csv:mexdn;MEX145D;;;mexver.mex145d
    
    usaif_con.csv:usaif;I-265;Fut;Louisville, KY;in.i265futlou
    usaif_con.csv:usaif;I-265;Fut;Louisville, KY;ky.i265futlou
    
  9. michihdeu commented on Feb 16, 2022

    @michihdeu
    ContributorAuthor

    @yakra if N6 is wrong:

    fran;N6;;;fraidf.n006
    fran;N6;;;frabfc.n006
    

    The first N7 entry must also be wrong!

    fran;N7;;;fraidf.n007
    fran;N7;;Roanne;frabfc.n007,fraara.n007
    fran;N7;;Valence;fraara.n007val,frapac.n007
    fran;N7;;Avignon;frapac.n007avi
    

    https://travelmapping.net/devel/manual/syshwylist.php#conncname

    the Name field is used to distinguish between otherwise identically named routes (same Route and Banner fields)

    fraidf.n007 has the same Route + Banner but is in a different region which is not enough according to the manual.
    The chopped name is fine though: https://travelmapping.net/devel/manual/syshwylist.php#ccity

    City: Used to distinguish between otherwise identically named routes of the same highway in the same region.

  10. michihdeu commented on Feb 16, 2022

    @michihdeu
    ContributorAuthor

    If so, I think that the original issue text should be revised?

    If a _con.csv file has more than one route for the system without name entry, a data error should be reported
    -->
    If a _con.csv file has more than one route for the system and minimum one route has no name entry, a data error should be reported

  11. 8 remaining items

  12. michihdeu commented on Feb 16, 2022

    @michihdeu
    ContributorAuthor

    deub;B180;;;deust.b180
    deub;B180;;Altenburg;deuth.b180,deusn.b180har,deuth.b180gah,deusn.b180

    Nope. It is a ConnectedRoutes that should be combined into one. Why did the other check not find it?

    Edit: Not sure which "other check" I meant but wasn't there a data check dealing with disconnected connected routes? @yakra I didn't find it in the manual. Was it just script magic?

  13. michihdeu commented on Feb 16, 2022

    @michihdeu
    ContributorAuthor

    What do you think about these?

    Your examples are very long main routes and each a very short spur or whatever. I think that the main routes should get a (Main) "name"

    https://travelmapping.net/devel/manual/syshwylist.php#conncname_multirows

    If there are multiple routes with the same Route+Banner combination, each route should have a nonblank Name.

    We might add the "(Main)" example to the manual. However, I'm not sure if there is consensus on it (I think minimum @si404 and me usually do it this way)

  14. yakra commented on Feb 16, 2022

    @yakra
    Contributor

    Your examples are very long main routes and each a very short spur or whatever. I think that the main routes should get a (Main) "name"

    Sounds good; I like this idea.

    https://travelmapping.net/devel/manual/syshwylist.php#conncname_multirows

    If there are multiple routes with the same Route+Banner combination, each route should have a nonblank Name.

    We might add the "(Main)" example to the manual. However, I'm not sure if there is consensus on it (I think minimum @si404 and me usually do it this way)

    Just now fixing up Texas, I got to https://travelmapping.net/devel/manual/syshwylist.php#conncname_shorter

    the Name should be devised in the same way as the City field in the Chopped Routes File

    So I then went to https://travelmapping.net/devel/manual/syshwylist.php#ccity and arrived at "(Main)" that way.
    This works for FM2760, but those I/US routes don't pass the a route is more local (shorter) test.

    We might add the "(Main)" example to the manual.

    Agree.

  15. added a commit that references this issue on Feb 16, 2022
  16. michihdeu commented on Feb 16, 2022

    @michihdeu
    ContributorAuthor

    We might add the "(Main)" example to the manual.

    Agree.

    I'm not sure about the text (I'm too limited in expressing it) and - I think we need to agree on the change on the forum (poll) although the rule is just a "should" - we should know if there are a lot of "errors" out there before we ask for the rule modification. I just fixed four or five issues with systems I drafted and even more in systems @si404 originally drafted when the regions were maintained by him. I fear that there could be a lot of trouble for other contributors....

  17. michihdeu commented on Feb 16, 2022

    @michihdeu
    ContributorAuthor

    deub;B180;;;deust.b180
    deub;B180;;Altenburg;deuth.b180,deusn.b180har,deuth.b180gah,deusn.b180

    Nope. It is a ConnectedRoutes that should be combined into one. Why did the other check not find it?

    Edit: Not sure which "other check" I meant but wasn't there a data check dealing with disconnected connected routes? @yakra I didn't find it in the manual. Was it just script magic?

    I'm confused. Shouldn't DISCONNECTED_ROUTE catch it?

  18. yakra commented on Feb 16, 2022

    @yakra
    Contributor

    Almost missed this reply...

    deub;B180;;;deust.b180
    deub;B180;;Altenburg;deuth.b180,deusn.b180har,deuth.b180gah,deusn.b180

    Nope. It is a ConnectedRoutes that should be combined into one.

    I'd say "Yep. It is ConnectedRoutes that should be combined into one." ;)
    It gets flagged same as the others, because there are multiple B180 entries, and one with no groupName.

    If it had been deub;B180;;Dorf;deust.b180 it wouldn't have been flagged.
    Which means we need yet a 3rd datacheck to flag these cases!

    Why did the other check not find it?

    Edit: Not sure which "other check" I meant but

    I assumed you meant the first shell script upthread.
    That check didn't flag it because there's one blank groupName and one for Altenburg, no duplicates.

    wasn't there a data check dealing with disconnected connected routes? @yakra I didn't find it in the manual. Was it just script magic?

    I'm confused. Shouldn't DISCONNECTED_ROUTE catch it?

    DISCONNECTED_ROUTE only looks within individual ConnectedRoute entries, making sure the endpoint coords of adjacent chopped Routes match up.

    • For deub;B180;;Altenburg;deuth.b180,deusn.b180har,deuth.b180gah,deusn.b180, it compares
      • deuth.b180 <-> deusn.b180har
      • deusn.b180har <-> deuth.b180gah
      • deuth.b180gah <-> deusn.b180
    • deust.b180 is only one chopped Route, so it doesn't get checked against anything else.

    we should know if there are a lot of "errors" out there before we ask for the rule modification. I just fixed four or five issues with systems I drafted and even more in systems @si404 originally drafted when the regions were maintained by him. I fear that there could be a lot of trouble for other contributors....

    I'll get my corrections in too, and after everything is merged we can see what kind of clutter is left over.

  19. yakra commented on Feb 18, 2022

    @yakra
    Contributor

    I'll get my corrections in too, and after everything is merged we can see what kind of clutter is left over.

    366 errors in 66 systems as of 0240f504e9dd4d4cdec5009c6a514ff853849d0f

    c=0
    for rg in `cut -f1 -d';' BLANK_CONRTE_NAME.log | grep -v '^$' | uniq`; do
      echo -en $rg '|' `egrep -c "^$rg;.+;;;" BLANK_CONRTE_NAME.log` '| '
      c=`expr $c + 1`
      if [ `echo $c % 3 | bc` == 0 ]; then echo; fi
    done
    system errors system errors system errors
    afrrtr 1 asiah 10 asiahp 1
    ausqld 3 austasb 1 auswa 1
    blrm 1 canbc 4 canon 1
    cansk 1 chea 1 chng 4
    espa 3 espar 1 espcn 1
    espex 1 eure2 1 eure 5
    fracord 1 gbna 55 gbnb 34
    irnf 1 jama 1 jpne 9
    jpnh 26 jpnhhk 4 jpnhks 4
    jpnhkt 21 jpnhky 21 jpnhsh 10
    mexdn 2 mexedn 2 mexf 43
    mkda 2 mltt 1 mtqd 1
    myse 10 naca 2 nira 2
    nirb 6 nzlsh 1 poldk 2
    roudj 4 tuna 1 turd 1
    ukrm 5 usafl 3 usaga 4
    usai 1 usaky 1 usala 1
    usamo 1 usams 6 usanc 3
    usanm 2 usansf 1 usaor 1
    usasc 2 usatxf5 1 usatxf6* 1
    usatxf* 1 usaus 2 usava 15
    usavi 1 usawa 5 zafn 1

    *I left these in to remind myself, once they hit the HB in devel status, to take a closer look at whether a couple routes should get implied concurrencies.

  20. added a commit that references this issue on Feb 18, 2022
  21. michihdeu commented on Feb 18, 2022

    @michihdeu
    ContributorAuthor

    Ok, most are maintained by Si, mapmikey and nezinscot do also have some issues to be checked. If they could be convinced that the rule modification is fine.... @yakra Do you want to give it a try?

  22. yakra commented on Feb 18, 2022

    @yakra
    Contributor

    On the one hand, using the existing rules, we could say

    • I-95 (Florida - Maine)
    • US52 (North Dakota - South Carolina)
    • US67 (Texas - Iowa)

    ...though that might make people think there's another "main" piece of the same highway of comparable stature?
    An argument can be made that in cases like these "(Main)" might be more clear.

    I'm not sure about the text (I'm too limited in expressing it)

    I know what you mean. What solution to propose, where and how, isn't immediately straightforward.

    Maybe a new rule after https://travelmapping.net/devel/manual/syshwylist.php#conncname_multiregion...
    Am I getting ahead of myself here?
    I guess there's 2 questions to be answered here:

    • Do we allow "(Main)"?
    • If so, how to word the new rule?

    Yeah, it might be something to take to the forum.

  23. michihdeu commented on Feb 18, 2022

    @michihdeu
    ContributorAuthor

    We already allow "(Main)" because we use it and there is no rule forbiding it 😉

    It should be in the manual either after
    If the route is lengthy and spans multiple regions
    or after
    If a route is more local (shorter) (preferred because it is not concerned by number of regions and it is kinda "last option if nothing else fits"?)

    "How to word" is my issues....
    If one route sticks out due to its length, and all other route(s) are very short compared to it or even just spurs, the main route should simply be named "(Main)"

  24. yakra commented on Dec 4, 2022

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

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