JOSM and .kml polyline colour editing

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

JOSM and .kml polyline colour editing

Bob Hawkins
I copy here a post from OpenStreetMap Forum>Editors, to which I have received no answer:
I have found the presence of Public Rights of Way .kml files in JOSM to be very useful for comparative purposes.  One drawback is that they appear as grey polylines.  I cannot see a facility to change colour, and wonder if anyone knows differently?  A colour key is present with a hexadecimal value as an attribute, but changing that has no effect.
NOTE: I have changed the colour codes in Notepad to no effect, either.

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Reply | Threaded
Open this post in threaded view
|

Re: JOSM and .kml polyline colour editing

Vincent Privat
Hi,
The color/colour tag is not natively used to colorize ways.
You could write your own map paint style to do so, see
https://josm.openstreetmap.de/wiki/Styles#CreateStyle
Cheers,
Vincent

2017-11-20 13:55 GMT+01:00 Bob Hawkins <[hidden email]>:

> I copy here a post from OpenStreetMap Forum>Editors, to which I have
> received no answer:
> I have found the presence of Public Rights of Way .kml files in JOSM to be
> very useful for comparative purposes.  One drawback is that they appear as
> grey polylines.  I cannot see a facility to change colour, and wonder if
> anyone knows differently?  A colour key is present with a hexadecimal value
> as an attribute, but changing that has no effect.
> NOTE: I have changed the colour codes in Notepad to no effect, either.
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
Reply | Threaded
Open this post in threaded view
|

Re: JOSM and .kml polyline colour editing

Dirk Stöcker
On Mon, 20 Nov 2017, Vincent Privat wrote:

> The color/colour tag is not natively used to colorize ways.
> You could write your own map paint style to do so, see
> https://josm.openstreetmap.de/wiki/Styles#CreateStyle

Isn't KML loaded alike to GPX? In this case he simply needs to right click
the layer and select a color.

Ciao
--
http://www.dstoecker.eu/ (PGP key available)

Reply | Threaded
Open this post in threaded view
|

Re: JOSM and .kml polyline colour editing

Vincent Privat
Nope, the plugin loads it as an OSM data layer. But it can be converted to
a GPX layer then.

2017-11-20 15:34 GMT+01:00 Dirk Stöcker <[hidden email]>:

> On Mon, 20 Nov 2017, Vincent Privat wrote:
>
> The color/colour tag is not natively used to colorize ways.
>> You could write your own map paint style to do so, see
>> https://josm.openstreetmap.de/wiki/Styles#CreateStyle
>>
>
> Isn't KML loaded alike to GPX? In this case he simply needs to right click
> the layer and select a color.
>
> Ciao
> --
> http://www.dstoecker.eu/ (PGP key available)
>
>
Reply | Threaded
Open this post in threaded view
|

Re: JOSM and .kml polyline colour editing

Bob Hawkins
Vincent, Dirk
If I might interject: exporting to .gpx and using that because I can change colour would take me backwards.  I use .kml files now instead of .gpx because they retain the attributes of the polyline, in this case.  I have arrived at a convoluted solution: to export to .gpx, open it, position it above the .kml layer and change the colour.  I can view the attributes if I swap the layers.  I hoped there might be a simpler way. My knowledge does not extend to creating my own Map Paint styles regrettably.

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Reply | Threaded
Open this post in threaded view
|

Re: JOSM and .kml polyline colour editing

Gertrud Simson
Hello,

I quickly created an mappaint style called "colour tag". I checked with
an osm file but not with an kml file. Please check if it works for you.
You can download it from within josm.

Stefan


Am 20.11.2017 um 18:31 schrieb Bob Hawkins:
> Vincent, Dirk
> If I might interject: exporting to .gpx and using that because I can change colour would take me backwards.  I use .kml files now instead of .gpx because they retain the attributes of the polyline, in this case.  I have arrived at a convoluted solution: to export to .gpx, open it, position it above the .kml layer and change the colour.  I can view the attributes if I swap the layers.  I hoped there might be a simpler way. My knowledge does not extend to creating my own Map Paint styles regrettably.
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus


Reply | Threaded
Open this post in threaded view
|

Re: JOSM and .kml polyline colour editing

Bob Hawkins
Stefan
I thank you for your offer.  I have opened Edit>Preferences>Map Settings>Map Paint Styles in JOSM but do not see “Colour tag” in ‘Available styles:’

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Reply | Threaded
Open this post in threaded view
|

Re: JOSM and .kml polyline colour editing

Gertrud Simson
Please use the blue reload button below the mappaint style list in the
prefereces to load the latest list from the server. (If your josm
language is set to german you find the style under the name "Farb-Merkmal").

Regards

Reply | Threaded
Open this post in threaded view
|

Re: JOSM and .kml polyline colour editing

Bob Hawkins
Stefan
Please excuse my ignorance: I have made ‘colour tag’ active, now that I see it in the Map Paint Styles’ list.  I have JOSM open with my .kml file present and ‘colour tag’ box checked.  I am unsure what should happen now, because nothing I do has any effect.

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Reply | Threaded
Open this post in threaded view
|

Re: JOSM and .kml polyline colour editing

Gertrud Simson
The ways in your kml file must have the tag colour=*  (Supprted formats
are 6 digit RGB hexadecimal (#112233), 3 digit RGB hexadecimal (#123)
and CSS color names (green).)

@team: Is there an automatic tag transformation for kml files similar to
https://josm.openstreetmap.de/wiki/Help/Action/ConvertToDataLayer?


Reply | Threaded
Open this post in threaded view
|

Re: JOSM and .kml polyline colour editing

Bob Hawkins
Stefan
All is clear now, and I thank you very much for your valued contribution.  I failed to understand what you were providing was the means to do what my original message stated could not be done, regarding the colour of the polylines not changing when I edited the hexadecimal code in Value.  I had to change the existing Key from “color” to “colour”, only.
I have yet to learn how to select the polylines alone.  “Select all” selects the nodes, invisible initially, but present, too.

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Reply | Threaded
Open this post in threaded view
|

Re: JOSM and .kml polyline colour editing

Gertrud Simson
You should install the plugin UtilsPlugin2, which among others adds a
lot of entries to the selection menu including "unselect nodes".