NOTICE: is being shutdown on 1st March 2024. Please use the OpenStreetMap Community Forum

Hi, I just discovered OSM files, and I think it awesome ! I am a cg artist. I use a software called Houdini, in which I would like to import osm data.

I have a python script doing excatly that. I read osm datas fine. But the problem is : I can't really make sens of all the different nodes in the file. The only paramters that make sense to me are the one containing some coordinates. I have been able to loop through them, creating a point each time. And I can se a result. All the points start to draw the shape of some streets.

So I am getting the data, no problem about that I think.

My question is : How are these points related to each other ? How can I make sense of them enough to be able to connect them ? My final goal is just to able to connect these points to represent streets and roads,but not necesserally in a very realistic way. I mean, all I really need is an order in which to connect points, and some infos about which point belongs to which way or road.

I hope I am being clear ?

asked 24 Jun '13, 23:38

gui2one's gravatar image

accept rate: 0%

edited 25 Jun '13, 00:56

aseerel4c26's gravatar image

aseerel4c26 ♦

I think I've got it, I didn't seen the <way/> nodes with <nd ref="something ..."/> "ref" attribute corresponding to the id of the points I managed to loop through ... I must not be far from my goal ^^

permanent link

answered 25 Jun '13, 00:40

gui2one's gravatar image

accept rate: 0%

permanent link

answered 25 Jun '13, 00:54

aseerel4c26's gravatar image

aseerel4c26 ♦
accept rate: 18%

Thank you, I get that part now ^^ . The rest of the job is python and me I guess. I have to write some nice lines of code to process this data. And there's potentialy A LOT of data ^^

I'll try to comment on my progress ^^ thanks for your help


(25 Jun '13, 02:26) gui2one

Okay, fine! I think you could write an entry about your progress with OSM-derived artwork in your user blog if you want to. At least I would be interested.

By the way: Please don't forget to attribute OSM and mention the OSM license if you publish your works, so others know where you got that great, open, free geo data from. :-)

(25 Jun '13, 03:14) aseerel4c26 ♦

hello, well I tried to post an entry in my blog. But the formatting is awfull. I posted my ptyhon code, and it's just unreadable. There seems to some formatting "commands". I am not familiar with that.

(25 Jun '13, 04:15) gui2one

It's Markdown. It does take a bit of getting used to...

(25 Jun '13, 07:39) SomeoneElse ♦

If you r using osmosis to bring the data into a data base its quite easy coz osmosis create the line strings for the ways then u can simply use

insert into polygons (select id,ST_MakePolygon(linestring) from ways where nodes[1]=nodes[array_upper(nodes,1)]);

command to create polygons from them

permanent link

answered 04 Jan '16, 06:23

Ballaji%20R's gravatar image

Ballaji R
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 24 Jun '13, 23:38

question was seen: 8,376 times

last updated: 04 Jan '16, 06:23

NOTICE: is being shutdown on 1st March 2024. Please use the OpenStreetMap Community Forum