preprocessor speedup using more memory

This commit is contained in:
Arndt Brenschede 2019-09-24 08:32:18 +02:00
parent 76e4ef8cab
commit ba34488447
10 changed files with 236 additions and 69 deletions

View file

@ -107,6 +107,21 @@ public class PosUnifier extends MapCreatorBase
}
private void findUniquePos( NodeData n )
{
int lon = n.ilon;
int lat = n.ilat;
long pid = ( (long) lon ) << 32 | lat; // id from position
if ( !positionSet.contains( pid ) )
{
positionSet.fastAdd( pid );
}
else
{
_findUniquePos( n );
}
}
private void _findUniquePos( NodeData n )
{
// fix the position for uniqueness
int lonmod = n.ilon % 1000000;