Modify

Opened 12 years ago

Closed 6 years ago

Last modified 6 years 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 6 years ago.
6 download never.osm (6.6 KB ) - added by Klumbumbus 6 years ago.
02.gif (5.2 MB ) - added by Klumbumbus 6 years ago.

Change History (42)

comment:1 by skyper, 12 years ago

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 by Don-vip, 11 years ago

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

comment:3 by skyper, 11 years ago

Cc: skyper leopoldofederico@… added

comment:4 by Don-vip, 7 years ago

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

comment:5 by Don-vip, 6 years ago

Milestone: 18.02

comment:6 by Don-vip, 6 years ago

In 13434/josm:

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

comment:7 by Don-vip, 6 years ago

In 13435/josm:

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

in reply to:  6 comment:8 by aseerel4c26, 6 years ago

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 by Don-vip, 6 years ago

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 by Klumbumbus, 6 years ago

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 by Don-vip, 6 years ago

In 13444/josm:

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

comment:12 by Don-vip, 6 years ago

In 13446/josm:

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

in reply to:  10 comment:13 by Don-vip, 6 years ago

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.

in reply to:  9 comment:14 by aseerel4c26, 6 years ago

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 by aseerel4c26, 6 years ago

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 6 years ago by aseerel4c26 (previous) (diff)

comment:16 by Klumbumbus, 6 years ago

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 by Don-vip, 6 years ago

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 by Don-vip, 6 years ago

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

in reply to:  18 ; comment:19 by aseerel4c26, 6 years ago

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

in reply to:  19 ; comment:20 by Hb---, 6 years ago

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.

in reply to:  20 ; comment:21 by aseerel4c26, 6 years ago

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?

in reply to:  21 comment:22 by Don-vip, 6 years ago

Replying to aseerel4c26:

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

Discussing on the ticket is fine :)

in reply to:  21 comment:23 by Hb---, 6 years ago

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 by Klumbumbus, 6 years ago

Resolution: fixed
Status: closedreopened

download=never doesn't work for me. It just loads data into such a layer. The small caution icons 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
Last edited 6 years ago by Klumbumbus (previous) (diff)

in reply to:  24 comment:25 by Don-vip, 6 years ago

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 by Klumbumbus, 6 years ago

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

by Klumbumbus, 6 years ago

Attachment: 01.gif added

by Klumbumbus, 6 years ago

Attachment: 6 download never.osm added

comment:27 by Hb---, 6 years ago

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 by Don-vip, 6 years ago

In 13485/josm:

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

comment:29 by Don-vip, 6 years ago

Resolution: fixed
Status: reopenedclosed

In 13486/josm:

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

comment:30 by Don-vip, 6 years ago

In 13488/josm:

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

comment:31 by Don-vip, 6 years ago

In 13490/josm:

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

comment:32 by Don-vip, 6 years ago

In 13497/josm:

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

comment:33 by Klumbumbus, 6 years ago

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 6 years ago by Klumbumbus (previous) (diff)

by Klumbumbus, 6 years ago

Attachment: 02.gif added

in reply to:  33 ; comment:34 by Hb---, 6 years ago

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?

in reply to:  34 comment:35 by Klumbumbus, 6 years ago

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 by stoecker, 6 years ago

Depending on the currently active layer?

comment:37 by Klumbumbus, 6 years ago

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

comment:38 by Hb---, 6 years ago

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

comment:39 by Don-vip, 6 years ago

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. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.