-
Notifications
You must be signed in to change notification settings - Fork 0
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
Streets #16
Comments
However, there is a problem. Suppose, a roadway consists of two sections. The number of lanes is given in the OSM data for one of them. And it isn't given for the other one. The number of lanes can't be set randomly for the second lane. It should be taken from the first section. PML should indicate that some processing is required before setting the styling for a section. @setup
section{
numLanes: attr("lanes");
numForwardLanes: attr("lanes:forward");
numBackwardLanes: attr("lanes:backward");
}
@setup
street{
numLanes: random_weighted( (50, 2), (50, 4) );
}
@setup lanes
street{} The above syntax means: (2) (3) All setup functions must be executed immediately after assigning a style to the related Once the number of lanes is set, a style for a section(item["numLanes"]==2) {
class: two_lanes;
width: 6.0;
} |
This kind of split is addressed with two different sections within a |
OK, now I seem to understand.
So, a
Can this happen? As far as I know, the number of lanes is defined as two for a two-way road, and as one for a one-way road, if the tag There is no way-section without a defined number of lanes. I can't yet see, how these can be overwritten by the style blocks above the roadway{
numLanes: 4;
}
section{
numLanes: attr("lanes");
} does the |
Shouldn't we also consider the case of clusters, which are currently not yet (no more) implemented? |
Yes. Only 62.67% of highway=primary have the tag Only 4.81% of highway=residential have the tag Since OSM data base has millions of OSM-ways created by thousands of contributors, it's quite possible to find a combination of two consequent OSM-ways where one of them has the tag
It's vice versa. A
I hope clusters are already addressed with the proposed concept. There are two or more roadways ( section(item.roadway.forward) {
class: forward_section;
}
section(item.roadway.backward) {
class: backward_section;
} |
This kind of assignment is not need, since there is complex logic anyway for calculating the numbers of lanes. This assignment will be completely done in Python as it is the case right now. Only the default values will be set in PML: @setup
street{
numLanes: random_weighted( (50, 2), (50, 4) );
} |
The idea with the |
Three base style block are proposed:
street
.It describes the whole street between two intersections or between an intersection and a dead-end or between two dead-ends. A
street
may have one or more roadways. A pedestrian street does not have roadways at all.'roadway'
A
roadway
has one or more roadway sections.'section'
Roadway properties (e.g. the number of lanes) are the same along the road
section
. Asection
has the present classStreetSection
as its counterpart in the code. The classStreetSection
may be renamed later intoSection
.section
,roadway
,street
make a hierarchy. If an attribute is not defined insection
, it will be looked up inroadway
and then instreet
.Example:
The text was updated successfully, but these errors were encountered: