User talk:Push-f/Default speed limits

From OpenStreetMap Wiki
Jump to navigation Jump to search

Promising

This looks promising because

  1. it's awesome that an automatic generation of a JSON without a dedicated parser is possible
  2. to put the vehicle types on the X-Axis will make the table more compressed and possibly easier to read

However, it needs some work to fully project the information contained in the current table. I can't list all, because I don't have it all in my mind, but some that come to mind:

  • Order matters for the road types (see below, how to read the table)
  • there can be several maxspeed conditionals
  • the syntax for the conditionals is deliberately not 1:1 direct maxspeed:conditional-value syntax to make it easier readable
  • there is some other special syntax, e.g. "advisory: 130"
  • current table does make clear that e.g. "bus" is a top category and "minibus" or "coach" is a subcategory. This is currently lost in the template-table (but maybe not that tragic)
  • you solved the vertical-cell-merging by being able to specify road types with an "or". This may lead to table rows that are very hard to interpret and also write correctly because different vehicle types have different speed limits for a different amount of road types (e.g. hgv is 80 for rural and motorroad but 100 for motorway; bus is 80 for rural but 100 for motorroad and motorway), this could get very messy for many legislations. In particular, this different format will it make somewhat difficult to correctly preserve the information when converting to the template format

... and probably 1. more that don't come to mind right now and 2. more that will arise after I am done with updating the data in the table and try to parse it again. (I will be finished with updating the data in the table in about 20 days.)

So, I am not sure if the template-method is really better because I did not look at/we do not know all the variables yet.

But what is clear is that this would require a lot of effort because the process would be:

  1. try to get the template correct to be able to properly transfer the data to a template-version of the table
  2. build that second table based on the current one on a separate page and check if the JSON output is the same, notice and try to fix any issues
  3. finally, replace the original table with the template version

Basically, step 2 or at least step 3 requires the JSON output to be stable. It currently is not because I am still developing it to take into account any intricacies I encounter (during researching more speed limit legislations). --Westnordost (talk) 12:04, 30 June 2022 (UTC)