title: How to solve the problem of same OSM ID of different Lat, Long pairs?
body: <p>(I am not a native English speaker so please ignore my grammar mistakes.)</p>
  <p>I have a PostgreSQL database name as Karachi and I have downloaded osm karachi map from <strong><a href="https://download.bbbike.org/" rel="nofollow noreferrer">https://download.bbbike.org/</a></strong> in shp file format then I converted it to GeoJSON using QGIS and then imported this Karachi.geojson to PostgreSQL through these commands:</p>
  <pre><code>ogr2ogr -select name -nlt CONVERT_TO_LINEAR -lco GEOMETRY_NAME=the_geom -lco FID=id -f PostgreSQL PG:&quot;dbname='Karachi' host='localhost' port='5432' user='postgres' password='Password'&quot; -nln edges Karachi.geojson -where &quot;OGR_GEOMETRY='MultiLineString'&quot;
  
  ALTER TABLE edges ADD source INT4;
  ALTER TABLE edges ADD target INT4;
  ALTER TABLE edges ALTER COLUMN the_geom TYPE geometry(linestring,4326) USING ST_GeometryN(the_geom, 1);
  
  SELECT pgr_nodeNetwork('edges', 0.00001);
  SELECT pgr_createTopology('edges_noded', 0.00001);
  
  ALTER TABLE edges_noded ADD COLUMN name VARCHAR,ADD COLUMN type VARCHAR;
  
  UPDATE edges_noded AS new SET name=old.name FROM edges as old WHERE new.old_id=old.id;
  
  ALTER TABLE edges_noded ADD distance FLOAT8;
  
  UPDATE edges_noded SET distance = ST_Length(ST_Transform(the_geom, 4326)::geography) / 1000;
  </code></pre>
  <p>After that I have two latitudes and longitudes</p>
  <ol>
  <li><code>67.112457,24.882638</code></li>
  <li><code>67.113009,24.882293</code></li>
  </ol>
  <p>I want to find distance between these two latitude and longitude so I use this query for getting osm ids:</p>
  <pre><code>SELECT v.id, v.the_geom, string_agg(distinct(e.name),',') AS name
  FROM edges_noded_vertices_pgr AS v, edges_noded AS e
  WHERE v.id = (
      SELECT id
      FROM edges_noded_vertices_pgr
      ORDER BY the_geom &lt;-&gt; ST_SetSRID(ST_MakePoint(67.0691865,24.9065008), 4326)
      LIMIT 1
    )
    AND (e.source = v.id OR e.target = v.id)
  GROUP BY v.id, v.the_geom
  </code></pre>
  <p>This query returns me same osm id for both (lat,long)s
  How to solve this problem?</p>
  <p>Is there any other solution to this problem by using windows 10?</p>