preprocessor speedup using more memory
This commit is contained in:
parent
76e4ef8cab
commit
ba34488447
10 changed files with 236 additions and 69 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue