1) colonne intersectioncomplexe ajoutée ( a prioris il y aura plus de faux positif si .t.) voir id=153318806 ou id=111737255 2) la meme route decoupée en plusieurs morceaux - 1 morceau etait un way de la frontiere entre 2 communes => pas dans analyse = ok (39219738) - 1 autre morceau avec une intersection avec encore une autre commune => trouvé dans analyse = ok(107747493)
ce meme nom est bien présent dans fantoir : 591840060A 593660047V 594970200S en ne mettant pas ref:FR:FANTOIR, le rapprochement est fait (points bleu) => - l'analyse est ok - la description actuelle dans osm permet de faire le rapprochement bano (sans code fantoir) - faut-il splitter ce way et lui attribuer un code fantoir par commune ? ------------------------------ l'analyse utilisée : ------------------------------ SELECT id, st_astext(intersection) as locosmose, count(*) as nbintersection, sum(anadm)>0 as intersectioncomplexe FROM ( SELECT highway.id, highway.linestring, ST_ClosestPoint(highway.linestring, ST_Intersection(admin.linestring,highway.linestring)) AS intersection, case when GeometryType(ST_Intersection(admin.linestring,highway.linestring))='MULTIPOINT' then 1 else 0 end as anadm FROM relations JOIN relation_members ON relation_members.relation_id = relations.id AND relation_members.member_type = 'W' JOIN ways AS admin ON admin.id = relation_members.member_id AND ST_NPoints(admin.linestring) > 1 JOIN ways AS highway ON -- les ways qui ne sont pas des voies type autoroute ni des raceway, qui ont un tag name et qui sont > a 1km highway.tags?'highway' AND NOT highway.tags->'highway' IN ('proposed', 'motorway', 'trunk', 'motorway_link', 'trunk_link','raceway') AND highway.tags?'name' AND ST_Length(highway.linestring, false) > 1000 AND ST_NPoints(highway.linestring) > 1 AND -- avec une intersection ST_Intersects(admin.linestring, highway.linestring) WHERE relations.tags?'type' AND relations.tags->'type' = 'boundary' AND relations.tags?'boundary' AND relations.tags->'boundary' = 'administrative' AND relations.tags?'admin_level' AND relations.tags->'admin_level' = '8' AND relations.tags?'ref:INSEE' ) AS t WHERE -- la taille de l'intersection par rapport a la longueur de la voie est significative ST_Line_Locate_Point(linestring, intersection) > 0.1 AND ST_Line_Locate_Point(linestring, intersection) < 0.9 group by 1,2 ; _______________________________________________ dev-fr mailing list dev-fr@openstreetmap.org https://lists.openstreetmap.org/listinfo/dev-fr