I found the solution, so is someone will search for it.
</br>
Need to use planet_osm_rels table
</br>
Sample:
</br>
select osm_id, ref, name, way
FROM planet_osm_roads where ST_DWithin(ST_Transform(ST_SetSrid(ST_Point(-1.021076,51.714512), 4326), 3857), way,20000)
and osm_id in(
SELECT distinct(unnest(parts)) as part
FROM planet_osm_rels
WHERE parts @> ARRAY[147856382]::bigint[] and tags @> ARRAY['M40']::text[]
)
I found the solution, so is someone will search for it.
</br>
Need to use planet_osm_rels tab;e
table
</br>
Sample:
</br>
select osm_id, ref, name, way
FROM planet_osm_roads where ST_DWithin(ST_Transform(ST_SetSrid(ST_Point(-1.021076,51.714512), 4326), 3857), way,20000)
and osm_id in(
SELECT distinct(unnest(parts)) as part
FROM planet_osm_rels
WHERE parts @> ARRAY[147856382]::bigint[] and tags @> ARRAY['M40']::text[]
)
I found the solution, so is someone will search for it.
Need to use planet_osm_rels tab;e
Sample:
select osm_id, ref, name, way
FROM planet_osm_roads where ST_DWithin(ST_Transform(ST_SetSrid(ST_Point(-1.021076,51.714512), 4326), 3857), way,20000)
and osm_id in(
SELECT distinct(unnest(parts)) as part
FROM planet_osm_rels
WHERE parts @> ARRAY[147856382]::bigint[] and tags @> ARRAY['M40']::text[]
)
I found the solution, so is someone will search for it.
Need to use planet_osm_rels tab;e
Sample:
select osm_id, ref, name, way
FROM planet_osm_roads where ST_DWithin(ST_Transform(ST_SetSrid(ST_Point(-1.021076,51.714512), 4326), 3857), way,20000)
and osm_id in(
SELECT distinct(unnest(parts)) as part
FROM planet_osm_rels
WHERE parts @> ARRAY[147856382]::bigint[] and tags @> ARRAY['M40']::text[]
)