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

I have a diff.osc file with a changeset #40293631 in a private OSM server. This is apparently one of the successful updates sent to a tile server. In the part of the file I have following, specifically related to a node id 4269514246:

<create>
   <node id="4269514246" version="1" timestamp="2018-07-13T03:40:33Z" uid="4170915" user="ABC" changeset="40293631" lat="43.1734836" lon="77.0276441"/>
</create>
<modify>
   <way id="238131937" version="6" timestamp="2018-07-13T03:40:35Z" uid="4170915" user="ABC" changeset="40293631">
      <nd ref="4269514246"/>
   </way>
</modify>
<create>
   <way id="428143996" version="1" timestamp="2018-07-13T03:40:34Z" uid="4170915" user="ABC" changeset="40293631">
      <nd ref="4269514246"/>
   <tag .../>
</create>

Now I would like to locate those updates in PostgreSQL database. In it I searched following:

 gis=# select * from planet_osm_nodes where id=4269514246;
         id     |    lat    |    lon    | tags
    ------------+-----------+-----------+------ 
    4269514246 | 533841521 | 857467812 | (1 row)

I found that the coordinates need to be converted to decimal format, so I did:

gis=# select id,ST_X(ST_AsText(st_transform(st_geomfromtext('POINT ('||lon/100||' '||lat/100||')',900913),4326))) as lon, ST_Y(ST_AsText(st_transform(st_geomfromtext('POINT ('||lon/100||' '||lat/100||')',900913),4326))) as lat from planet_osm_nodes where id=4269514246;
     id     |       lon        |       lat
------------+------------------+------------------  
4269514246 | 77.0276430380341 | 43.1734822268193 (1 row)

But I realised that the coordinates in the database and diff.osc file are not the same. The diff file's and the database's lon,lat respectively are
[43.1734836, 77.0276441]
[43.1734822268193, 77.0276430380341]

Could there be conversion mistake or something else is causing it? Please, also advise on better troubleshooting methods, if they exist? Is there a way to get the last update on the tile server, if it does not save timestamps?

asked 03 Aug '18, 11:21

khassen's gravatar image

khassen
11113
accept rate: 0%

edited 03 Aug '18, 11:25

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:

×290
×204
×32
×11

question asked: 03 Aug '18, 11:21

question was seen: 948 times

last updated: 03 Aug '18, 11:25

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