Modify

Opened 6 years ago

Closed 9 months ago

Last modified 9 months ago

#8039 closed enhancement (fixed)

Readonly layers for private data should block downloading OSM data into it

Reported by: OSchmiede Owned by: team
Priority: normal Milestone: 18.02
Component: Core Version:
Keywords: Cc: skyper, leopoldofederico@…

Description

On advice from Cobra:

I want to manage some data in private layers, e.g. things which are not yet mapped so I can insert these on the map and later plan routes where I visit these places and them. Currently, I often stumble over the feature that you can download OSM data into these layers (undo won't work) which renders them pretty useless as the custom points drown in the OSM data.

Attachments (3)

01.gif (1.4 MB) - added by Klumbumbus 9 months ago.
6 download never.osm (6.6 KB) - added by Klumbumbus 9 months ago.
02.gif (5.2 MB) - added by Klumbumbus 9 months ago.

Change History (42)

comment:1 Changed 6 years ago by skyper

Do not know if I did understand your problem but as long as you only keep not yet uploaded objects (ID:0) in your file you should not have any problems:

  1. Just select all objects (Ctrl+A)
  2. use filter to remove all objects with ID:0 from selection
  3. purge

and your data is restored.

Hopefully undo of merge will be ready sooner or later (#7489).

comment:2 Changed 5 years ago by Don-vip

Ticket #8843 has been marked as a duplicate of this ticket.

comment:3 Changed 5 years ago by skyper

Cc: skyper leopoldofederico@… added

comment:4 Changed 19 months ago by Don-vip

Ticket #14878 has been marked as a duplicate of this ticket.

comment:5 Changed 10 months ago by Don-vip

Milestone: 18.02

comment:6 Changed 10 months ago by Don-vip

In 13434/josm:

see #8039, see #10456 - support read-only data layers

comment:7 Changed 10 months ago by Don-vip

In 13435/josm:

see #8039, see #10456 - fix regressions and code style issues

comment:8 in reply to:  6 Changed 10 months ago by aseerel4c26

Replying to Don-vip:
Could you please give me a hint how to mark a layer as "read-only"? Do we have a help page (section) already?

comment:9 Changed 10 months ago by Don-vip

Sure, you must modify your .osm file as follows:

<osm version='0.6' generator='JOSM' read-only='true'>

This is not described anywhere yet, feel free to improve the wiki :)

comment:10 Changed 10 months ago by Klumbumbus

Do you plan to add it to the gui, e.g. expert mode only in layers context menu similar to Help/Action/EncourageDiscourageUpload ?

comment:11 Changed 10 months ago by Don-vip

In 13444/josm:

see #8039, see #10456 - fix crash with rendering of virtual nodes

comment:12 Changed 10 months ago by Don-vip

In 13446/josm:

see #8039, see #10456 - disable more actions modifying the dataset

comment:13 in reply to:  10 Changed 10 months ago by Don-vip

Replying to Klumbumbus:

Do you plan to add it to the gui, e.g. expert mode only in layers context menu similar to Help/Action/EncourageDiscourageUpload ?

Not for this month release, as this feature will require some polishing. We'll see later if a GUI is a good idea or not.

comment:14 in reply to:  9 Changed 10 months ago by aseerel4c26

Replying to Don-vip:

This is not described anywhere yet, feel free to improve the wiki :)

Have created Help/Action/ReadOnlyLayer? and linked at Help/Dialog/LayerList.

comment:15 Changed 10 months ago by aseerel4c26

I have opened a layer (which contains downloaded OSM data and added new data) which I have marked as read-only. Uploading is not possible (grey button), however, when deleting the layer JOSM warns and suggests to upload. I guess the upload warning should not be given - at least for the originally mentioned use case.

Hmm, some thoughts:

Maybe we should not name it "read-only", but "local-only" layer or something. Because uploading would be still read-only, but it is forbidden here. Or uploading for read-only should not be forbidden (because this could be set separately by upload='never' or via context menu). ... This brings me to the next paragraph:

Or we should name it "no download" and only disable downloading data to it (just like the upload option for layers). Editing could still be possible. If the layer is deleted with unuploaded changes asking to upload/save sounds reasonable. For me this last paragraph sounds most like what OSchmiede wanted. The "read-only" case may be useful in some other cases.

Last edited 10 months ago by aseerel4c26 (previous) (diff)

comment:16 Changed 10 months ago by Klumbumbus

I noticed the following:

  • I had a writable layer in the layer list and below a locked layer
  • the locked layer is active
  • When downloading data sometimes the data goes always in the unlocked layer and sometimes at every download a new layer is created
  • I didn't figue out what triggers which behavior

comment:17 Changed 10 months ago by Don-vip

Uploading a data set means every modified object will be modified (new version, author, modification date, etc.). That's why these layers can't be uploaded. I will rename this feature to "locked layers" and make sure JOSM doesn't suggest to upload them.

comment:18 Changed 10 months ago by Don-vip

Resolution: fixed
Status: newclosed

In 13453/josm:

fix #8039, fix #10456: final fixes for the read-only/locked layers:

  • rename "read-only" to "locked" (in XML and Java classes/interfaces)
  • add a new download policy (true/never) to allow private layers forbidding only to download data, but allowing everything else

This leads to:

  • normal layers: download allowed, modifications allowed, upload allowed
  • private layers: download allowed or not (download=true/never), modifications allowed, upload allowed or not (upload=true/discouraged/never)
  • locked layers: nothing allowed, the data cannot be modified in any way

comment:19 in reply to:  18 ; Changed 10 months ago by aseerel4c26

Replying to Don-vip:
Thanks! I have tested each switch and documented them: Help/Dialog/LayerList (see "upload, download, locked").

comment:20 in reply to:  19 ; Changed 10 months ago by Hb---

Replying to aseerel4c26:

I have tested each switch and documented them: Help/Dialog/LayerList (see "upload, download, locked").

Thanks. But the LayerList page was overcrowded. I moved your content to Help/Menu/OSMLayer#LayerStates Another reason was that this change only affects map data layers.

comment:21 in reply to:  20 ; Changed 10 months ago by aseerel4c26

Replying to Hb---:

Replying to aseerel4c26:

I have tested each switch and documented them: Help/Dialog/LayerList (see "upload, download, locked").

Thanks. But the LayerList page was overcrowded. I moved your content to Help/Menu/OSMLayer#LayerStates Another reason was that this change only affects map data layers.

Yes, it was. See my version comment https://josm.openstreetmap.de/wiki/Help/Dialog/LayerList?action=diff&version=75 .

Hmm, but I am not really satisfied with your changes. Wrong terms, misunderstood meaning. I really put some effort to get that right yesterday. Now it is not right anymore... Please revert.

I will step back from this for a while - that's no fun. Btw: where to discuss such wiki changes? Wiki pages have no talk page, right?

comment:22 in reply to:  21 Changed 10 months ago by Don-vip

Replying to aseerel4c26:

where to discuss such wiki changes? Wiki pages have no talk page, right?

Discussing on the ticket is fine :)

comment:23 in reply to:  21 Changed 10 months ago by Hb---

Replying to aseerel4c26:

Yes, it was. See my version comment https://josm.openstreetmap.de/wiki/Help/Dialog/LayerList?action=diff&version=75

Fine that we agree on this.

Hmm, but I am not really satisfied with your changes. Wrong terms, misunderstood meaning. I really put some effort to get that right yesterday. Now it is not right anymore... Please revert.

I'm also not satisfied with the current draft. And finding the best terms is difficult, especially for Krauts in the JOSM environment. Here every term has at least two meanings.

So I

  1. put that note on top of the page and
  2. asked here for your opinion and other peoples thoughts

hoping that in a day or two someone, you or me would have given more input here or even improved the draft.

I will step back from this for a while - that's no fun.

Please accept my apologies on this. No need to step back - more fun to bring the common work forward.

Btw: where to discuss such wiki changes? Wiki pages have no talk page, right?

That is a problem on Trac. In the past complete draft pages were created. Or tickets like #12800 and #12801 were used to talk about wiki pages. But by those results I got "not really satisfied" as you named it.

comment:24 Changed 9 months ago by Klumbumbus

Resolution: fixed
Status: closedreopened

download=never doesn't work for me. It just loads data into such a layer. The small caution cons are displayed in the layer list though.
(if I use locked=true then it works and creates a new layer)

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2018-03-01 18:22:48 +0100 (Thu, 01 Mar 2018)
Build-Date:2018-03-02 02:35:48
Revision:13479
Redirecting:to URL 'https://josm.openstreetmap.de/svn/trunk':
Relative:URL: ^/trunk

Identification: JOSM/1.5 (13479 de) Windows 10 64-Bit
OS Build number: Windows 10 Pro 1709 (16299)
Memory Usage: 1644 MB / 3641 MB (1029 MB allocated, but free)
Java version: 1.8.0_161-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1680x1050
Maximum Screen Size: 1680x1050
VM arguments: [-Djava.security.manager, -Djava.security.policy=file:<java.home>\lib\security\javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>\bin, -Djnlpx.origFilenameArg=C:\Program Files (x86)\josm-latest-mehr-RAM.jnlp, -Djnlpx.remove=true, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.heapsize=1024m,4096m, -Djnlpx.splashport=52254, -Djnlpx.jvm=<java.home>\bin\javaw.exe]
Dataset consistency test: No problems found
Version 0, edited 9 months ago by Klumbumbus (next)

comment:25 in reply to:  24 Changed 9 months ago by Don-vip

Replying to Klumbumbus:

download=never doesn't work for me. It just loads data into such a layer

For me it works, please describe how you do it.

comment:26 Changed 9 months ago by Klumbumbus

It seems it works only if there is only one layer in the list. See attached gif and sample file.

Changed 9 months ago by Klumbumbus

Attachment: 01.gif added

Changed 9 months ago by Klumbumbus

Attachment: 6 download never.osm added

comment:27 Changed 9 months ago by Hb---

Can confirm this even with more layers loaded. The gif showed that the second download attempt against the layer with download=never was successful.

Saving as.. a layer which once had the switch download=never gives a new file without that switch even while the orange triangle icon was present in the GUI.

comment:28 Changed 9 months ago by Don-vip

In 13485/josm:

see #8039, see #10456 - keep layer download/upload/locked flags when saving to .osm file

comment:29 Changed 9 months ago by Don-vip

Resolution: fixed
Status: reopenedclosed

In 13486/josm:

fix #8039, see #10456 - fix bugs with non-downloadable layers

comment:30 Changed 9 months ago by Don-vip

In 13488/josm:

fix #16039, see #8039, see #10456 - fix upload regression when using individual primitive upload strategy

comment:31 Changed 9 months ago by Don-vip

In 13490/josm:

fix #16045, see #8039, see #10456 - fix NPE when clicking preset link from relation editor

comment:32 Changed 9 months ago by Don-vip

In 13497/josm:

fix #16051, see #8039, see #10456 - more fixes for download/upload policies and locked status (merge of layers)

comment:33 Changed 9 months ago by Klumbumbus

There is still some strange behavior how new layers are created. It seems it behaves this way:

  • add several layers with different download/upload/locked status
  • downloading in the locked layer creates always (each time) a new layer
  • delete all downloadable layers
  • downloading in the locked layer creates a new layer and then always loads into this new layer

see attachment:02.gif (created with r13497).

Last edited 9 months ago by Klumbumbus (previous) (diff)

Changed 9 months ago by Klumbumbus

Attachment: 02.gif added

comment:34 in reply to:  33 ; Changed 9 months ago by Hb---

Replying to Klumbumbus:

... It seems it behaves this way:

  • add several layers with different download/upload/locked status
  • downloading in the locked layer creates always (each time) a new layer
  • delete all downloadable layers
  • downloading in the locked layer creates a new layer and then always loads into this new layer

That seems like the behaviour wanted. Or should JOSM act in another way?

comment:35 in reply to:  34 Changed 9 months ago by Klumbumbus

Replying to Hb---:

That seems like the behaviour wanted. Or should JOSM act in another way?

It behaves different:

  • downloading in the locked layer creates always (each time) a new layer
  • downloading in the locked layer creates a new layer and then always loads into this new layer

and I can't find a reason why.

I.e. in the beginning of the gif why is there layer "Datenebene 11" created when it could download in one of the 3 layers which allow downloading?

comment:36 Changed 9 months ago by stoecker

Depending on the currently active layer?

comment:37 Changed 9 months ago by Klumbumbus

No, I always made the locked layer the active one.

comment:38 Changed 9 months ago by Hb---

A clear error message "Downloading to this layer is blocked" will be most users friend.

comment:39 Changed 9 months ago by Don-vip

In 13586/josm:

fix #16141, see #8039, see #10456: fix NPE in preset editor

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.