4

Creating handles for OSM objects

There are times when I have had to copy or modify objects in my OSM file by hand. I get that each object has a handle and that the objects refer to each other by handle instead of names. If I copy an object I usually just change a number or two in the handle to create a new one, is this ok? Is there a better way to create a handle for an OSM object?

hodor's avatar
463
hodor
asked 2015-04-01 21:04:22 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2015-11-07 17:41:54 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

4

Hey @hodor, first of all sorry about that new feature in OpenStudio 1.7.0, we will get to it eventually ;-)

Secondly, you shouldn't be modifying OSM files in a text editor unless you really have to. However, if you really have to, creating handles by changing a few digits is not a good idea. The handles are supposed to be Universally unique identifiers, changing a few digits is likely to end up generating conflicting handles at some point. There are several web tools that will generate good UUIDs for you. Just create a new version 4 handle for each object and you will be fine.

macumber's avatar
12k
macumber
answered 2015-04-01 21:07:34 -0500
Julien Marrec's avatar
29.7k
Julien Marrec
updated 2015-04-02 00:57:54 -0500
edit flag offensive 0 remove flag delete link

Comments

Thanks @macumber that is great!

hodor's avatar hodor (2015-04-01 21:08:01 -0500) edit

Do I want a version 1 or version 4 UUID?

hodor's avatar hodor (2015-04-01 21:09:06 -0500) edit

You want version 4

macumber's avatar macumber (2015-04-01 21:09:32 -0500) edit
3

I just realized that one of my existing Notepad++ plugins, ToolBucket, can generate GUIDs right in Notepad++.

Julien Marrec's avatar Julien Marrec (2015-04-02 04:00:40 -0500) edit

Cool nice find @Julien Marrec

macumber's avatar macumber (2015-04-02 11:27:34 -0500) edit
add a comment see more comments