NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi everyone.

I'm interesting in road painting. I try to explain. For example I have some roads in DB ( _ways) and I want to show them with polylines but each road color depends on it's variable: road "Brown. st" has value 1 and its color is green, "St. Jorge st" has value is 2 - it's color yellow and so on. I found out similar great project to my question (http://resultmap.neis-one.org/japan.html)

So there are two questions:

1)How can I select a definite road from the DB ( or all roads ) and show them with layers?

2)How can I paint with random color each road?

Thanks in advance for a reply.

asked 07 Dec '11, 21:10

zzzzteph's gravatar image

zzzzteph
30557
accept rate: 0%

2

I think I should somehow modify osm.xml to generating only road lines and other features and using ./generate_tiles.py generate necessary layer. Am I right ?

(08 Dec '11, 11:03) zzzzteph

I dont understand this question. What are the 1 and 2 values for? Do you just want all the roads to each have their own randomly selected colour (the result might be quiet interesting I suppose but generally would be a multicoloured mess!) or... what do you mean? Could you maybe add a picture of the kind of output you want. Also "Brown St" is a confusing street name example.

(10 Dec '11, 12:58) Harry Wood

Something like this imagelink.

(11 Dec '11, 17:32) zzzzteph

Openlayers and Leaflet can easily color features loaded from vector data in different colours. This will be unusable if you have too many streets or an old browser, that map you link will probably work.

permanent link

answered 14 Dec '11, 12:36

emj's gravatar image

emj
2.0k123547
accept rate: 15%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×223
×69

question asked: 07 Dec '11, 21:10

question was seen: 6,663 times

last updated: 14 Dec '11, 12:36

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum