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

Polygon clipping issues #3

Open
hjanetzek opened this issue Jan 14, 2013 · 3 comments
Open

Polygon clipping issues #3

hjanetzek opened this issue Jan 14, 2013 · 3 comments
Assignees

Comments

@hjanetzek
Copy link

It seems that the default agg polygon clipper is not reliable when it is used for geometry output, as stated on their site. I tried to figure out what might cause the broken polygons when using this backend in VectorTileMap and found that the clipping messes things up. I've hacked Clipper into polygon processing and it seems to do the job well. the results is in my 'origin' branch. maybe you can integrate it properly :)

@artemp
Copy link
Owner

artemp commented Jan 14, 2013

@hjanetzek - great, thanks, I'll have a look. Do you have a screenshot with broken polygons ?

@ghost ghost assigned artemp Jan 14, 2013
@hjanetzek
Copy link
Author

most of these wrong points were not visible because the 'stencil buffer method' for polygon drawing can cope it.
one can see it with buidling outlines for example[1] and when using triangulation on the clipped output duplicate nodes and coincident lines which go back and forth cause trouble[2].

e.g. tile: 17/68736/42655 the building at top center
http://city.informatik.uni-bremen.de/~jeff/screenshots/Screenshot_2013-01-14-12-35-52.png
the point at position 6 is not on the building:
tags: [0]
indx: [10]
1029 1360
2265 0
2687 0
1431 1387
1713 1643
3263 0
4096 0
3673 0
1777 2016
1029 1360

[1]http://city.informatik.uni-bremen.de/~jeff/screenshots/Screenshot_2013-01-14-13-30-47.png
[2]http://city.informatik.uni-bremen.de/~jeff/screenshots/Screenshot_2013-01-14-13-31-02.png

Clipper produces
tags: [0]
indx: [8]
2265 0
2687 0
1431 1387
1713 1643
3263 0
3673 0
1777 2016
1029 1360

[1]http://city.informatik.uni-bremen.de/~jeff/screenshots/Screenshot_2013-01-14-14-13-33.png
[2] http://city.informatik.uni-bremen.de/~jeff/screenshots/Screenshot_2013-01-14-14-15-03.png

another one where clipping fill the tile with water (behind residential)
http://city.informatik.uni-bremen.de/~jeff/screenshots/Screenshot_2013-01-14-12-24-52.png
http://city.informatik.uni-bremen.de/~jeff/screenshots/Screenshot_2013-01-14-12-49-03.png

I had a few more really results that I cannot find atm where complex landuse polygons should result in one tile filling quad but were made of 9 points.

@hjanetzek hjanetzek reopened this Jan 14, 2013
@hjanetzek
Copy link
Author

btw. the problem with drawing all objects for one layer (by tag) in one go via stencil buffer is that overallping parts will cancel each other out.. just in case that you see it and wonder whats goind on.

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

No branches or pull requests

2 participants