Re: [Jts-topo-suite-user] LineStringSnapper.snapSegments bugs ?
Brought to you by:
dr_jts
From: Martin D. <mtn...@te...> - 2010-12-03 22:06:03
|
Quite possibly you're right. This check is probably there just for a double-check. I don't think it has a big impact on performance. Is it difficult for you to implement as is? strk wrote: > I'm reviewing LineStringSnapper to make sure GEOS port is correct > and found something that sound like an useless check. > > In snapSegments, when a snap point is found, we add that to the > source CoordinateList asking to check for duplicates. > > But the snap point is found using findSegmentIndexToSnap > which refuses to consider a segment snapping on an endpoint > as a valid match (returns -1 in that case). > > So, how is it possible for a snap point to be equal to previous ? > > int index = findSegmentIndexToSnap(snapPt, srcCoords); > if (index >= 0) { > srcCoords.add(index + 1, new Coordinate(snapPt), false); > } > > Am I missing something or the srcCoords.add() call might be performed > w/out the final argument (avoid checking for duplicates) ? > > --strk; > > () Free GIS & Flash consultant/developer > /\ http://strk.keybit.net/services.html > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Jts-topo-suite-user mailing list > Jts...@li... > https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user > > > ----- > No virus found in this message. > Checked by AVG - www.avg.com > Version: 10.0.1170 / Virus Database: 426/3294 - Release Date: 12/03/10 > > > |