Пример #1
0
 public void add(double lat, double lon, double ele) {
   int newSize = size + 1;
   incCap(newSize);
   latitudes[size] = lat;
   longitudes[size] = lon;
   if (is3D) elevations[size] = ele;
   else if (!Double.isNaN(ele))
     throw new IllegalStateException("This is a 2D list we cannot store elevation: " + ele);
   size = newSize;
 }
Пример #2
0
 public void add(PointList points) {
   int newSize = size + points.getSize();
   incCap(newSize);
   for (int i = 0; i < points.getSize(); i++) {
     int tmp = size + i;
     latitudes[tmp] = points.getLatitude(i);
     longitudes[tmp] = points.getLongitude(i);
     if (is3D) elevations[tmp] = points.getElevation(i);
   }
   size = newSize;
 }
Пример #3
0
 @Override
 public void ensureNode(int nodeId) {
   incCap(nodeId + 1);
 }