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

Cut away from area cuts away also lines #2293

Open
ollesmaps opened this issue Nov 1, 2024 · 4 comments
Open

Cut away from area cuts away also lines #2293

ollesmaps opened this issue Nov 1, 2024 · 4 comments

Comments

@ollesmaps
Copy link

Steps to reproduce

  1. Select two lines
  2. Cut away from area
  3. Lines get cut as well

Actual behaviour

I realized this "bug" existed after finding strange shaped contours on a map. I was editing a sprint map - adding paved areas over private areas and using Cut away from area at the end. I accidentally also included contours into the mix...

Expected behaviour

I suggest Cut away from area cuts only areas.
If needed there shall be a separate tool Cut away from lines (but I am not sure what that would serve).

Configuration

Mapper Version: 0.9.5
Android

@dl3sdo
Copy link
Member

dl3sdo commented Nov 1, 2024

It even happens on lines without any area:

CutAwayFromLines.mp4
CutAwayFromLines2.mp4

@lpechacek
Copy link
Member

lpechacek commented Nov 1, 2024

I'll write what users don't like to read. That's why I was shielded from customers by two levels of trained support personnel. ;-)

The program works perfectly fine. There is almost no distinction between an area and a line object on the data level. The visual difference is caused by the choice of symbol. So, Mapper considers the line object as an area where the line ends are connected with a straight segment. And then magic happens. Choose multiple lines. The first one is the one that will lose the parts there it overlaps with the other selected lines or areas. Yes, if the lines are contours or paths, it's a problem for the map content.

Matthias takes the example to a new level by presenting a self-intersecting area (mimicking as a line) and showing that the area falls apart in the process. That's indeed surprising but not that much given that we may argue that a self-intersecting area is not a valid object.

I acknowledge that this kind of argumentation is like saying that a chainsaw works perfectly fine when its saw chain cuts away lumberjack's leg in an instant. That's a clear indication that the device does that's it's supposed to do - cut anything it touches regardless if it's a plant or a human.

So for practical use, I agree with Aleš that some safety measure should be implemented. Disallowing cut-away operation on objects dressed in a line symbol might be a good one. Another one might be exclusion of areas that lack a closed border or intersect itself.

@ollesmaps
Copy link
Author

Thanks for the explainer Libor!

Disallowing cut-away operation on objects dressed in a line symbol might be a good one.

This would solve the mentioned use case best. It would stop contours accidentaly turning into strange objects:

I realized this "bug" existed after finding strange shaped contours on a map. I was editing a sprint map - adding paved areas over private areas and using Cut away from area at the end. I accidentally also included contours into the mix...

This behaviour also applies to Intersect areas and Area XOr.

@ollesmaps
Copy link
Author

Another observation:

  1. If I select two overlapping areas by drag and click
  2. Then use the Cut away from area tool
  3. Areas get separated
  4. However I can not predict which area will stay "on top"

Is there some kind of logic to it?

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

3 participants