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

Lake intersecting viewport is rendered wrong #143

Closed
habi opened this issue Oct 18, 2022 · 5 comments
Closed

Lake intersecting viewport is rendered wrong #143

habi opened this issue Oct 18, 2022 · 5 comments
Labels
bug Something that went wrong duplicate Issue already exists

Comments

@habi
Copy link

habi commented Oct 18, 2022

I'd like to produce a high-resolution render of a campsite and can do this by issuing map-machine render --boundary-box=6.712,46.802,6.723,46.807 --zoom=16 --output=out/vd8.svg.

This does render the lake bordering the campsite weirdly, e.g. glitches out with the intersection of the campsite.
I know that rendering of lakes or larger water bodies is complicated, but how could I generate a nice map of this campsite?

map

@habi
Copy link
Author

habi commented Oct 18, 2022

Some observations in relation to the lake rendering

  • map-machine render --coordinates=46.805,6.715 --zoom=16 --output=out/bad0.svg
  • map-machine render --coordinates 46.805,6.755 --zoom=16 --output=out/good0.svg
  • map-machine render --coordinates 46.789,6.669 --zoom=16 --output=out/good1.svg
  • map-machine render --coordinates 46.789,6.675 --zoom=16 --output=out/bad1.svg

At first I thougth it's because of the 'layering' of the lake with a swimming area also mapped there, but I now think it might have something to do with a wetland polygon in the vicinity.

@enzet
Copy link
Owner

enzet commented Oct 20, 2022

Hello, @habi!

Thank you for the issue. I'm afraid, this is really a hard one. Map Machine downloads only ways that at least partly present inside boundary box, so it doesn't have enough information about lake shape.

I may provide two ways to fix that:

  1. Easy one is to just try to download more data. I'll add an option to specify another bigger boundary box for downloading.
  2. Hard one is to try to honestly compute lake shape analysing way direction.

I think, I want to start with the first one and then will continue with the second one.

@enzet enzet added the bug Something that went wrong label Oct 20, 2022
@enzet enzet moved this to Todo in Project support Oct 20, 2022
@habi
Copy link
Author

habi commented Oct 21, 2022

There's no option for 'discarding' a feature (the lake) in map-machine?
Or could I somehow twiddle with the downloaded XML and try to remove all 'traces' of the lake?

@enzet
Copy link
Owner

enzet commented Oct 21, 2022

Sure, you just need to either edit default scheme file or use a custom scheme file.

E.g. use no_water.yml and --scheme option:

map-machine render --coordinates=46.805,6.715 --zoom=16 --output=out/bad0.svg --scheme no_water.yml

no_water.yml is just map_machine/scheme/default.yml with the following diff:

   - tags: {natural: water}
     exception: {intermittent: "yes"}
     style:
-      fill: water_color
-      # stroke: water_border_color
-      # stroke-width: 1.0
+      # fill: water_color
+      stroke: water_border_color
+      stroke-width: 1.0
     priority: 21.0

habi added a commit to habi/campsitemap that referenced this issue Oct 24, 2022
@enzet enzet added the duplicate Issue already exists label Oct 26, 2022
@enzet
Copy link
Owner

enzet commented Oct 26, 2022

This is a duplicate of #120.

@enzet enzet closed this as not planned Won't fix, can't repro, duplicate, stale Oct 26, 2022
Repository owner moved this from Todo to Done in Project support Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that went wrong duplicate Issue already exists
Projects
Status: Done
Development

No branches or pull requests

2 participants