kopia lustrzana https://github.com/onthegomap/planetiler
				
				
				
			sonar
							rodzic
							
								
									fcb8c2136c
								
							
						
					
					
						commit
						3476a10efd
					
				| 
						 | 
					@ -72,11 +72,11 @@ public class VWSimplifier extends GeometryTransformer implements Function<Geomet
 | 
				
			||||||
  @Override
 | 
					  @Override
 | 
				
			||||||
  protected CoordinateSequence transformCoordinates(CoordinateSequence coords, Geometry parent) {
 | 
					  protected CoordinateSequence transformCoordinates(CoordinateSequence coords, Geometry parent) {
 | 
				
			||||||
    boolean area = parent instanceof LinearRing;
 | 
					    boolean area = parent instanceof LinearRing;
 | 
				
			||||||
    if (coords.size() == 0) {
 | 
					    int num = coords.size();
 | 
				
			||||||
 | 
					    if (num == 0) {
 | 
				
			||||||
      return coords;
 | 
					      return coords;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    int num = coords.size();
 | 
					 | 
				
			||||||
    DoubleMinHeap heap = DoubleMinHeap.newArrayHeap(num, Integer::compare);
 | 
					    DoubleMinHeap heap = DoubleMinHeap.newArrayHeap(num, Integer::compare);
 | 
				
			||||||
    Vertex[] points = new Vertex[num];
 | 
					    Vertex[] points = new Vertex[num];
 | 
				
			||||||
    //    Stack<Vertex> intersecting = new Stack<>();
 | 
					    //    Stack<Vertex> intersecting = new Stack<>();
 | 
				
			||||||
| 
						 | 
					@ -91,9 +91,7 @@ public class VWSimplifier extends GeometryTransformer implements Function<Geomet
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      prev = cur;
 | 
					      prev = cur;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (prev != null) {
 | 
					 | 
				
			||||||
    heap.push(prev.idx, prev.updateArea());
 | 
					    heap.push(prev.idx, prev.updateArea());
 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    int left = num;
 | 
					    int left = num;
 | 
				
			||||||
    int min = area ? 4 : 2;
 | 
					    int min = area ? 4 : 2;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Ładowanie…
	
		Reference in New Issue