title: get city name by latitude and longitude from OSM data stored in Postgres
body: <p>i know there are lot of similar question but after long time searchin none of them worked for me thats why i'm posting,</p>
  
  <p>I want to get city name with lat and lon from planet_osm_polygon table where are polygons stored including polygons of cities, here is my code:</p>
  
  <pre><code>SELECT name
    FROM planet_osm_polygon
    where place = 'city'
   and ST_CONTAINS(ST_Transform(way,4326), ST_SetSRID(ST_Point(41.693459100461496,44.8014495),4326));
  </code></pre>
  
  <p><strong>(the logic is.. if polygon contains given point, return its name if its a city)</strong></p>
  
  <p>What is the problem? i transformed both geometries to 4326 but still not working. P.S "way" is a column of geometry(polygon).</p>
  
  <p><strong>Query always returns empty result</strong></p>
  
  <p><strong>Edit</strong></p>
  
  <p>City is not missing from planet_osm_polygon and its geometry column really is type of polygon, here is some query results: </p>
  
  <p><a href="https://i.stack.imgur.com/tbK20.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tbK20.jpg" alt="Cities query"></a></p>
  
  <p><a href="https://i.stack.imgur.com/yX1pU.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yX1pU.jpg" alt="In geometry viewer it looks correct"></a></p>