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

[classif] Move low use highway=road to a higher ID #8181

Merged
merged 4 commits into from
May 28, 2024

Conversation

pastk
Copy link
Contributor

@pastk pastk commented May 15, 2024

Following #8168

Also fixes wrong hardcoded ID for highway=busway.

@pastk pastk requested a review from vng May 15, 2024 07:47
@@ -93,8 +93,7 @@ highway|primary;27;
railway|rail;28;
highway|service|parking_aisle;[highway=service][service=parking_aisle];;name;int_name;29;
place|hamlet;30;
# TODO: 50k usages, move
highway|road;31;
moved:highway|road:05.2024;31;highway|road
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is 05.2024 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

date when it was moved/deprecated
so that we know when its OK to re-use it

@@ -54,7 +54,7 @@ enum class HighwayType : uint16_t
HighwaySecondaryLink = 176,
RouteFerry = 259,
HighwayTertiaryLink = 272,
HighwayBusway = 858, // reserve type here, but this type is not used for any routing by default
HighwayBusway = 857, // reserve type here, but this type is not used for any routing by default
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? I don't see changes in types.txt here.

Can we make a test for these constants, not to break something in future? :)

Copy link
Contributor Author

@pastk pastk May 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its just wrong, it should be a mapping ID - 1, so atm the hardcoded 858 points to highway-busway-bridge

highway|busway;[highway=busway],[highway=service][service=busway],[highway=service][service=bus];;name;int_name;858;
highway|busway|bridge;[highway=busway][bridge?];;name;int_name;859;

@vng
Copy link
Member

vng commented May 19, 2024

You are right, it was moved several times.
Screenshot 2024-05-19 at 19 08 57

Please, add cpp test for these constants, or I can do it?

@pastk
Copy link
Contributor Author

pastk commented May 23, 2024

Please, add cpp test for these constants, or I can do it?

Add it please!

@pastk
Copy link
Contributor Author

pastk commented May 27, 2024

@vng merge it as is?
Someone could add tests separately later.

pastk and others added 4 commits May 27, 2024 23:18
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
@vng vng force-pushed the pastk-classif-move-highway-road branch from bbfc0d4 to f19401f Compare May 28, 2024 02:30
Copy link
Contributor Author

@pastk pastk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test looks good!

@vng vng merged commit ba6c277 into master May 28, 2024
15 checks passed
@vng vng deleted the pastk-classif-move-highway-road branch May 28, 2024 12:12
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

3 participants