Closed benoitgaudou closed 4 years ago
Hi,
The previous issue can be easily reproduced with the following simple model:
global {
init {
list<geometry> lines;
list<geometry> clean_lines ;
lines <- [line({10,10}, {20,20}), line({10.0,20.0,0.0},{15.0,15.0,0.0})];
clean_lines <- clean_network(lines,3.0,true,false) ;
write length(clean_lines);
write clean_lines;
clean_lines <- split_lines(lines,true) ;
write length(clean_lines);
write clean_lines;
clean_lines <- split_lines(lines) ;
write length(clean_lines);
write clean_lines;
}
}
Note that split_lines(list<geometry>)
works very well to split the 2 geometries in 3.
But clean_network
and split_lines(list<geometry>, bool)
(used by clean_network), does not work in this case.
In addition, split_lines(list<geometry>, bool)
does not use its boolean operand.
Describe the bug Using the
clean_network
operator to clean a shapefile coming from OSM seems to remove too many roads (when the optionreduce_to_main_connected_components
is set to true).To Reproduce Steps to reproduce the behavior:
Clean Line Network.gaml
or look at the 2 files produced by the model:Expected behavior It is expected that after cleaning most of the roads to be in the main component.
Desktop (please complete the following information):