[GRASS-dev] [GRASS GIS] #2185: Painfully Slow 'v.in.ogr' Vector Import
GRASS GIS
trac at osgeo.org
Tue Mar 21 06:02:13 PDT 2017
#2185: Painfully Slow 'v.in.ogr' Vector Import
-------------------------+------------------------------------------------
Reporter: justinzane | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.6
Component: Vector | Version: svn-trunk
Resolution: | Keywords: import, OGR, performance, v.in.ogr
CPU: x86-64 | Platform: Linux
-------------------------+------------------------------------------------
Comment (by mmetz):
Replying to [comment:34 neteler]:
> Wow. After full recompilation, with gcc it does NOT "hang":
[...]
>
> So, unfortunate clang compiler settings before or gcc-is-better-than-
clang here?
No, the difference is -O2 which you used with gcc but not with clang. I
could reproduce the problem by not using any optimization.
The problem is that Vect_break_lines() enters an infinite loop because it
continuously generates two new lines that are again intersecting each
other, always at the same locations.
The attached patch ([comment:31 hcho]) helps, but as mentioned in
comment:31 there are more comparisons and it does not seem to be a good
idea to allow tolerance at some places but not at other places when
comparing a cross with a vertex.
What also helps is using Vect_line_intersection2() instead of
Vect_line_intersection(). Interestingly, Vect_line_intersection2() does
not need the patch, even though that part of the code is identical.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2185#comment:36>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list