Skip to content

Instantly share code, notes, and snippets.

@DavidMoraisFerreira
Last active January 27, 2022 21:05
Show Gist options
  • Save DavidMoraisFerreira/b0352134991805a03b058b86d8e973c7 to your computer and use it in GitHub Desktop.
Save DavidMoraisFerreira/b0352134991805a03b058b86d8e973c7 to your computer and use it in GitHub Desktop.
select ST_AsGeoJSON(t.*)
from (
select distinct st_transform(ST_LineMerge(ST_UNION(trp_vc.wkb_geometry)), 4326),
addresses.rue
from trp_vc,
addresses
where trp_vc.id_rue_cac = addresses.id_caclr_rue
and not exists (
select 1
from road_names_osm
where addresses.rue = road_names_osm.rue
)
and not exists (
select 1
from road_names_osm
where addresses.rue = road_names_osm.alt_name
)
and not exists (
select 1
from planet_osm_point
where place is not null
and addresses.rue = planet_osm_point.name
)
GROUP BY rue
) as t;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment