@@ -562,7 +562,7 @@ QueryRaw::getWaysByIds(std::string &waysIds, std::map<long, std::shared_ptr<osmo
562
562
#endif
563
563
// Get Ways and it's geometries (Polygon and LineString)
564
564
std::string waysQuery = " SELECT distinct(osm_id), ST_AsText(geom, 4326), 'polygon' as type from ways_poly wp where osm_id = any(ARRAY[" + waysIds + " ]) " ;
565
- waysQuery += " UNION SELECT distinct(osm_id), ST_AsText(geom, 4326), 'linestring' as type from ways_line wp where osm_id = any(ARRAY[" + waysIds + " ])" ;
565
+ waysQuery += " UNION SELECT distinct(osm_id), ST_AsText(geom, 4326), 'linestring' as type from ways_line wp where osm_id = any(ARRAY[" + waysIds + " ]); " ;
566
566
auto ways_result = dbconn->query (waysQuery);
567
567
if (ways_result.size () == 0 ) {
568
568
log_debug (" No results returned!" );
@@ -862,10 +862,8 @@ QueryRaw::getWaysByNodesRefs(std::string &nodeIds) const
862
862
863
863
// Get all Ways that have references to Nodes from the DB, including Polygons and LineString geometries
864
864
// std::string waysQuery = "SELECT distinct(osm_id), refs, version, tags, uid, changeset from way_refs join ways_poly wp on wp.osm_id = way_id where node_id = any(ARRAY[" + nodeIds + "])";
865
- queries.push_back (" SELECT distinct(osm_id), refs, version, tags, uid, changeset from ways_poly where refs @> '{" + nodeIds + " }'" );
866
-
867
- queries.push_back (" SELECT distinct(osm_id), refs, version, tags, uid, changeset from ways_line where refs @> '{" + nodeIds + " }'" );
868
- // waysQuery += " UNION SELECT distinct(osm_id), refs, version, tags, uid, changeset from way_refs join ways_line wl on wl.osm_id = way_id where node_id = any(ARRAY[" + nodeIds + "]);";
865
+ queries.push_back (" SELECT distinct(osm_id), refs, version, tags, uid, changeset from ways_poly where refs @> '{" + nodeIds + " }';" );
866
+ queries.push_back (" SELECT distinct(osm_id), refs, version, tags, uid, changeset from ways_line where refs @> '{" + nodeIds + " }';" );
869
867
870
868
for (auto it = queries.begin (); it != queries.end (); ++it) {
871
869
0 commit comments