0

I'm using an old code written by an ex-fellow and I wonder what is GID in OSM? The gid is basically used everywhere. The project uses PostGIS and PgRouting. Any pointers to that?

I know this is a naive question but I need a start. Thanks.

As an example, this method comes from this interface.

/**
     * @param gid the gid of the openstreetmap entity we want to retrieve
     * @return the OpenstreetMap entity or null if not found
     */
    public OpenStreetMap getByGid(final Long gid) ;
2
  • 1
    I think it is just referring to a Global (unique) ID -"Every object in the OSM database has a unique ID. It is assigned by the OSM database when the object is created. Object IDs are, for example, used to relate ways to the nodes they contain." from OSM Wiki.
    – PolyGeo
    Commented Jul 31, 2013 at 22:38
  • There is no such thing as a global unique ID in OSM. All nodes, ways and relations have an ID but this ID is only unique within the element type. A node can have the same ID as a way or a relation.
    – scai
    Commented Sep 22, 2014 at 7:09

3 Answers 3

2

It seems to be the Road link ID : http://workshop.pgrouting.org/chapters/topology.html

1
  • So as far as I understand, this is a small road segment that starts with a node and ends with a node. Right?
    – M-T-A
    Commented Jul 31, 2013 at 15:33
-1

Unique record ID, i have two imports and same street/way is different gid in each.

2
  • Are you saying that Unique record ID should be used instead of GID? What is the name of the Unique record ID?
    – user3461
    Commented Jul 31, 2013 at 15:28
  • I did twice same data import and gid was always different for same record, to me it look like an unique id for row in db.
    – Matus
    Commented Jul 31, 2013 at 16:55
-2

"get ID" I would say. Just like gLon, gLat etc.

3
  • 2
    Hi Doruk, Welcome to GIS Stack Exchange :) One line answers are generally discouraged, and one liners that are are just a guess doubly so. We strive to build quality answers that will still be useful some time from now. Commented Jul 31, 2013 at 22:50
  • Will do my best next time.. Commented Jul 31, 2013 at 22:54
  • 2
    I have confidence in that Doruk. :) We were all new at some point, and the Stack Exchange approach is quite different from many systems that have come before it. Read the help, walk through the tutorial, and you'll be doing fine in short order. Just remember that up & down votes are not about you, they're about the post. Commented Jul 31, 2013 at 23:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.