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

PathLayer (regular) reverses #220

Closed
devemux86 opened this issue Oct 30, 2016 · 9 comments
Closed

PathLayer (regular) reverses #220

devemux86 opened this issue Oct 30, 2016 · 9 comments
Labels
Milestone

Comments

@devemux86
Copy link
Collaborator

devemux86 commented Oct 30, 2016

PathLayer (regular) with a directed texture (e.g. arrow) shows reversed line segments at large zooms.
Probably LineClipper plays a role to that?

Note that JTS PathLayer works without issues.

@Gustl22
Copy link

Gustl22 commented Apr 15, 2018

Do you have an image or location on map where I can reproduce this? I recently worked with the clipper and maybe I can help here.

@devemux86
Copy link
Collaborator Author

Can use LineTexTest replacing with regular PathLayer and LineStyle.
Depending on latitude, the directed textures are reversed from around zoom 10.

Correct direction:
1

Reversed direction:
2

@devemux86
Copy link
Collaborator Author

Note: regular PathLayer had another issue with disappearing segments, fixed in #108.

@Gustl22
Copy link

Gustl22 commented Apr 23, 2018

Problem seems to be that line length in LineTexBucket is out of range of Short.MAX_VALUE at higher zoom levels.

Thus problem can happen in jts PathLayer, too, but never would, cause of smaller clipping values.

I did not find out why there's need of lineLength or where the OpenGL calculations take place. But theoretically this param is redundant.

As note: lineLength sums up the lengths of all line segments, so if total line is larger than the short limit, weird things can happen.

@devemux86
Copy link
Collaborator Author

Note that line stipples and textures didn't exist in master VTM.
They were introduced in #105 based on work by @hjanetzek.

@Gustl22
Copy link

Gustl22 commented Apr 24, 2018

@devemux86: As I can see you're much more experienced in OpenGL programming than me. Can you give me a hint where the lineLength is used in LineTexBucket.Renderer code (or attribute in shaders) after adding it to vertex items. I spent hours (also in Googles gapid) and didn't catch the concept.

@devemux86
Copy link
Collaborator Author

@hjanetzek wrote that part of VTM, so I need also to search first to find out that. 🙂

@Gustl22
Copy link

Gustl22 commented Apr 25, 2018

No sweat. Thought you might have an idea 🙂

@devemux86
Copy link
Collaborator Author

devemux86 commented May 1, 2018

Fixed via #532.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants