Modify

Opened 2 years ago

Last modified 2 years ago

#12579 new defect

Add inner polygons when using Tools → Create multipolygon

Reported by: Penegal Owned by: team
Priority: normal Milestone:
Component: Core multipoly Version: tested
Keywords: default create multipolygon inner outer tool Cc:

Description

Hello.

Often, I use Tools → Create multipolygon to create landuse multipolygons; mines always have inner polygons, often already drawn when I use this tool, and I think this occurs, at least occasionally for most landuse mappers. It would be very useful that this tool automagically add inner polygons, either by default or by selection, to the created relation: if a selected polygon totally contains other ones, then the container would be included in the relation with the outer role, and the contained ones with the inner role. In order to avoid unnecessary huge multipolygon monsters, this mode could be non default, enabled from the preferences with a warning that the use of this mode should be reasonable; you should prefer fragmenting the huge polygons over making multipolygon monsters whenever possible.

Regards.

Attachments (4)

After.osm (142.1 KB) - added by anonymous 2 years ago.
After example modification
Before.osm (141.9 KB) - added by Penegal 2 years ago.
Before example modification
Sans titre.png (274.5 KB) - added by Penegal 2 years ago.
Screenshot of the resulting relation, with both polygons in the outer role
preferences.xml (37.2 KB) - added by Penegal 2 years ago.
Sample preferences file with which the problem appears

Download all attachments as: .zip

Change History (18)

comment:1 Changed 2 years ago by Klumbumbus

Owner: changed from team to Penegal
Status: newneedinfo

This works fine for me. When I select all member ways and use tools -> create multipolygon, then the roles inner and outer are automatically set. This even works with splitted ways.

Please describe in more detail the steps you do and add your statusreport as asked on newticket.

comment:2 Changed 2 years ago by Penegal

Well, the inner ways are attributed the outer role; AFAIK, the inner ways should have the inner role, or did I misunderstood the wiki?

comment:3 in reply to:  2 Changed 2 years ago by Klumbumbus

Replying to penegal@…:

the inner ways should have the inner role

Yes. And this way the josm tool works.

comment:4 Changed 2 years ago by Penegal

What steps will reproduce the problem?

  1. I select two polygons, the first totally overlapping the second.
  2. I use Tools → Create a multipolygon.

What is the expected result?

A multipolygon relation should be created with the first polygon in outer role, the second in inner role.

What happens instead?

A multipolygon relation is created with both polygons in outer role.

Please provide any additional information below. Attach a screenshot if possible.

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-02-28 14:07:49 +0100 (Sun, 28 Feb 2016)
Build-Date:2016-02-28 22:44:23
Revision:9900
Relative:URL: ^/trunk

Identification: JOSM/1.5 (9900 fr) Windows Vista 32-Bit
Memory Usage: 180 MB / 989 MB (36 MB allocated, but free)
Java version: 1.8.0_45-b14, Oracle Corporation, Java HotSpot(TM) Client VM
VM arguments: [-Djosm.home=E:\JOSM]
Dataset consistency test: No problems found

Plugins:
- apache-commons (31895)
- cadastre-fr (32060)
- contourmerge (1014)
- download_along (31772)
- ejml (31895)
- geotools (31895)
- jts (31772)
- opendata (32071)
- utilsplugin2 (32018)

Last errors/warnings:
- W: Invalid jar file ''E:\JOSM\plugins\opendata.jar.new'' (exists: false, canRead: false)
- W: Invalid jar file ''E:\JOSM\plugins\cadastre-fr.jar.new'' (exists: false, canRead: false)
- W: Echec de l'ajout de resource://data/validator/power.mapcss au vérificateur d'attribut
- W: java.io.IOException: L’ouverture du flux d’entrée pour la ressource 'resource://data/validator/power.mapcss' a échoué

comment:5 Changed 2 years ago by Klumbumbus

Can you attach a osm file with the created multipolygon?

Changed 2 years ago by anonymous

Attachment: After.osm added

After example modification

Changed 2 years ago by Penegal

Attachment: Before.osm added

Before example modification

comment:6 Changed 2 years ago by Penegal

Summary: Add inner polygons when using Tools -> Create multipolygonAdd inner polygons when using Tools → Create multipolygon

Here it comes; the only actions performed between the two files is selecting only the meadow polygon #392210844 and the forest #356350457 polygon, the first totally overlapping the second, and clicking on Tools → Create a multipolygon. The resulting multipolygon relation has the two members in the outer role, whereas, in this case, the overlapped #356350457 polygon should have the inner role. This is what I expect in such a situation: I know no situation where the current result could be useful, although there should be some, but, IMHO, the overlapped polygons should always have the inner role, at least by default. Tagging of the created relation should reflect that, by taking tags away from the outer polygon, as it is currently the case when you select a single polygon to create a multipolygon.

comment:7 Changed 2 years ago by Klumbumbus

Owner: changed from Penegal to team
Status: needinfonew
Type: enhancementdefect

I don't know what goes wrong here. For me this works fine. Forest gets inner role and landuse=meadow tag is moved from outer way to the relation.

Changed 2 years ago by Penegal

Attachment: Sans titre.png added

Screenshot of the resulting relation, with both polygons in the outer role

comment:8 Changed 2 years ago by Penegal

Well, there must be a problem with my eyes, because, when I open the After.osm file and look at the resulting relation, as on the attached screenshot, both polygons have the outer role in the created multipolygon relation, and the relation has no tags inherited from the polygons, only the type=multipolygon tag.

comment:9 Changed 2 years ago by Klumbumbus

I see that too. I just said that I cannot reproduce this problem with my pc.

comment:10 Changed 2 years ago by Penegal

Oh. Then, would you like some additional data about my config? A screencast? I must add that the problem rose on 2 different platforms, with two different versions of Java, and with 2 different jOSM home directories. In addition, the problem was already present before the current tested version, at least with the previous one.

comment:11 Changed 2 years ago by simon04

Please try with a fresh config, see Help/CommandLineOptions how to use josm.home

comment:12 Changed 2 years ago by Penegal

You got it: a fresh config made the tool working as expected; should I append the old preferences.xml or a part of it to diagnose the problem?

comment:13 Changed 2 years ago by simon04

Only after ensuring that no personal data (especially OSM credentials) is contained in preferences.xml. You could also test with your old preferences.xml, but all plugins disabled: specify --skip-plugins on the command line.

Changed 2 years ago by Penegal

Attachment: preferences.xml added

Sample preferences file with which the problem appears

comment:14 Changed 2 years ago by Penegal

Here comes the preferences file. I tried using this file with --skip-plugins, but the problem is still there.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to Penegal
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.