Question (RFC): Is function [has-period-ended] an option?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Question (RFC): Is function [has-period-ended] an option?

AnkEric
Way/Area closure Period (from date_start until date_end) is – in general –
not on OSM.

Some exceptions:

opening_hours = Mar 15-Jun 15 off "bird breeding season"

Construction period is between two dates.

Or:
opening_hours = 2019 Feb 18-2019 Mar 29 closed "Reconstruction period
Defensie Eiland"

Or:
access:conditional = no @ (2019 Feb 18-2019 Mar 29)

For me it's hard to not forget to remove by the end of construction period.

Therefore I Set:
fixme = opening_hours to be deleted by 2019 Mar 21

Still, hard to not forget.

Question: Can mkgmap implement a new function?
[period-has-ended]
Function:
 - Is there a date ("yyyy mmm dd") in opening_hours? Including "yyyy"?
 - If yes, find the last date.
 - If Today > Last_date Then [has-period-ended] = True

Even better:
Function has-period-ended (MyDate).
Opening_hours (closure) will have ended (or not) after Map production date
or start of my holiday: MyDate.

I guess mkgmap Logging option (-Dlog.config=filename) can be used to
generate a text file having all my Errors. I do hope { echotags "Error
message... " } can be logged as well.
Or I could Render outdated Warnings on the Map, differently from actual
Warnings.

And if this is an option, has mkgmap a preference for [opening_hours] or
[access:conditional]?
access:conditional is more straight forward, easier to interpret.
But opening_hours has the option to add free text: "Reconstruction period
Defensie Eiland", "ferry during working hours" (extra information and
explanation).




--
Sent from: http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Question (RFC): Is function [has-period-ended] an option?

Gerd Petermann
Hi Eric,

I fear I don't understand what this post is about. The program doesn't evaluate opening_hours or similar tags. It would be possible to add a style function
which would expect a valid date and calculate an offset to another date like maybe current date-time or a given date which might be in the past or in the future.
How would you use this to improve the map? If you just want to parse your fixme tags I'd say it is not related to mkgmap.
The evaluation of the meaning of an opening_hours value is very complex, see https://github.com/simonpoole/OpeningHoursParser

Gerd

________________________________________
Von: mkgmap-dev <[hidden email]> im Auftrag von AnkEric <[hidden email]>
Gesendet: Freitag, 20. März 2020 15:13
An: [hidden email]
Betreff: [mkgmap-dev] Question (RFC): Is function [has-period-ended] an option?

Way/Area closure Period (from date_start until date_end) is – in general –
not on OSM.

Some exceptions:

opening_hours = Mar 15-Jun 15 off "bird breeding season"

Construction period is between two dates.

Or:
opening_hours = 2019 Feb 18-2019 Mar 29 closed "Reconstruction period
Defensie Eiland"

Or:
access:conditional = no @ (2019 Feb 18-2019 Mar 29)

For me it's hard to not forget to remove by the end of construction period.

Therefore I Set:
fixme = opening_hours to be deleted by 2019 Mar 21

Still, hard to not forget.

Question: Can mkgmap implement a new function?
[period-has-ended]
Function:
 - Is there a date ("yyyy mmm dd") in opening_hours? Including "yyyy"?
 - If yes, find the last date.
 - If Today > Last_date Then [has-period-ended] = True

Even better:
Function has-period-ended (MyDate).
Opening_hours (closure) will have ended (or not) after Map production date
or start of my holiday: MyDate.

I guess mkgmap Logging option (-Dlog.config=filename) can be used to
generate a text file having all my Errors. I do hope { echotags "Error
message... " } can be logged as well.
Or I could Render outdated Warnings on the Map, differently from actual
Warnings.

And if this is an option, has mkgmap a preference for [opening_hours] or
[access:conditional]?
access:conditional is more straight forward, easier to interpret.
But opening_hours has the option to add free text: "Reconstruction period
Defensie Eiland", "ferry during working hours" (extra information and
explanation).




--
Sent from: http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Question (RFC): Is function [has-period-ended] an option?

AnkEric
In reply to this post by AnkEric
Mapillary, Survey, local knowledge: road closure in future from date_start
till date_end

https://www.mapillary.com/map/im/a4s9RiyhwiYQ2KecMuD2HQ

I can see this Closure on the Map by "red dots" showing on the way.
Hoover over or Click to show [opening_hours] or [access:conditional].
This is a "Warning" only, not implying routing is not possible.
So if I forget to Delete these tags afterwards (by the end of construction
period): no harm.
Also planning a future route is still possible (routing is possible) if my
trip is after construction period has ended.

<http://gis.19327.n8.nabble.com/file/t344065/Closed_by_opening_hours.png>

In JOSM:

<http://gis.19327.n8.nabble.com/file/t344065/Closed_by_opening_hours_JOSM.png>

My Challence:
I have to Delete these tags once Construction Period has ended:
access:conditional=no@ (2020 Mar 20 18:00-24:00;2020 Mar 21-22 00:00-24:00;
2020 Mar 23 00:00-06:00)
fixme=TO BE DELETED Construction period ENDS 2020 Mar 23 06:00

The fixme is a reminder warning: PLEASE DELETE by "2020 Mar 23". Don't
forget, since this is sloppy and poluting the map.

The requested Function should return an Offset between
[LAST_DATE_ALSO_HAVING_YEAR_SPECIFIED] and an Offset_Date ("yyyy mmm dd").
So the Challenge is to find the "Last date" ("yyyy mmm dd") in a complex
opening_hours or conditional  value.
The value to supply is up to me:
${bicycle:conditional}
${access:conditional}
${opening_hours}

In above example Value_Last_Date to be found is: "2020 Mar 23".
Hours are to be ignored (not relevant).

This - example - warning has not yet "ended". It's still active!
Next week I should Delete it.

FWIW: OpenFietsMap also shows these warnings (it was introduced by OFM).
Only disadvantage: only Rendered on cycleways. IMO it should be Rendered on
ALL ways.

And I hate running into a construction-closure-trap! Most specific on
bicycle these closures should be avoided in trip-route-planning.






--
Sent from: http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Reply | Threaded
Open this post in threaded view
|

Re: Question (RFC): Is function [has-period-ended] an option?

Gerd Petermann
Hi Eric,

I don't see how this function improves mkgmap. Such a check makes sense in OSM QA tools like Osmose.
FWIW: You can use overpass wizzard to search for e.g. access:conditional~"- *2019"

Gerd

________________________________________
Von: mkgmap-dev <[hidden email]> im Auftrag von AnkEric <[hidden email]>
Gesendet: Samstag, 21. März 2020 10:42
An: [hidden email]
Betreff: Re: [mkgmap-dev] Question (RFC): Is function [has-period-ended] an     option?

Mapillary, Survey, local knowledge: road closure in future from date_start
till date_end

https://www.mapillary.com/map/im/a4s9RiyhwiYQ2KecMuD2HQ

I can see this Closure on the Map by "red dots" showing on the way.
Hoover over or Click to show [opening_hours] or [access:conditional].
This is a "Warning" only, not implying routing is not possible.
So if I forget to Delete these tags afterwards (by the end of construction
period): no harm.
Also planning a future route is still possible (routing is possible) if my
trip is after construction period has ended.

<http://gis.19327.n8.nabble.com/file/t344065/Closed_by_opening_hours.png>

In JOSM:

<http://gis.19327.n8.nabble.com/file/t344065/Closed_by_opening_hours_JOSM.png>

My Challence:
I have to Delete these tags once Construction Period has ended:
access:conditional=no@ (2020 Mar 20 18:00-24:00;2020 Mar 21-22 00:00-24:00;
2020 Mar 23 00:00-06:00)
fixme=TO BE DELETED Construction period ENDS 2020 Mar 23 06:00

The fixme is a reminder warning: PLEASE DELETE by "2020 Mar 23". Don't
forget, since this is sloppy and poluting the map.

The requested Function should return an Offset between
[LAST_DATE_ALSO_HAVING_YEAR_SPECIFIED] and an Offset_Date ("yyyy mmm dd").
So the Challenge is to find the "Last date" ("yyyy mmm dd") in a complex
opening_hours or conditional  value.
The value to supply is up to me:
${bicycle:conditional}
${access:conditional}
${opening_hours}

In above example Value_Last_Date to be found is: "2020 Mar 23".
Hours are to be ignored (not relevant).

This - example - warning has not yet "ended". It's still active!
Next week I should Delete it.

FWIW: OpenFietsMap also shows these warnings (it was introduced by OFM).
Only disadvantage: only Rendered on cycleways. IMO it should be Rendered on
ALL ways.

And I hate running into a construction-closure-trap! Most specific on
bicycle these closures should be avoided in trip-route-planning.






--
Sent from: http://gis.19327.n8.nabble.com/Mkgmap-Development-f5324443.html
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[hidden email]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev