Package org.openstreetmap.osmosis.core.util

Examples of org.openstreetmap.osmosis.core.util.TileCalculator


        userManager = new UserManager(dbCtx);
        changesetManager = new ChangesetManager(dbCtx);

        this.populateCurrentTables = populateCurrentTables;

        tileCalculator = new TileCalculator();
        memberTypeRenderer = new MemberTypeRenderer();
    }
View Full Code Here


  @Test
  public void test() {
    Assert.assertEquals(
        "Incorrect tile value generated.",
        2062265654,
        new TileCalculator().calculateTile(51.4781325, -0.1474929));
  }
View Full Code Here

        maxWayId = Long.MIN_VALUE;
        minWayId = Long.MAX_VALUE;
        maxRelationId = Long.MIN_VALUE;
        minRelationId = Long.MAX_VALUE;

        tileCalculator = new TileCalculator();
        memberTypeRenderer = new MemberTypeRenderer();

        initialized = false;
    }
View Full Code Here

      @Override
      public void release() {
        throw new UnsupportedOperationException();
      } });
   
    tileCalculator = new TileCalculator();
    uintComparator = new UnsignedIntegerComparator();
   
    // Create node store and indexes.
    nodeObjectStore = storeContainer.add(
      new RandomAccessObjectStore<Node>(
View Full Code Here

   *            The latitude marking the top edge of the bounding box.
   * @param bottom
   *            The latitude marking the bottom edge of the bounding box.
   */
  public BoundingBoxContext(double left, double right, double top, double bottom) {
    TileCalculator tileCalculator;
    Comparator<Integer> tileOrdering;
    int calculatedTile;
    int tmpMinimumTile;
    int tmpMaximumTile;
   
    // Create utility objects.
    tileCalculator = new TileCalculator();
    tileOrdering = new UnsignedIntegerComparator();
   
    // Create a rectangle representing the bounding box.
    boundingBox = new Rectangle2D.Double(left, bottom, right - left, top - bottom);
   
    // Calculate the maximum and minimum tile values for the bounding box.
    calculatedTile = (int) tileCalculator.calculateTile(top, left);
    tmpMaximumTile = calculatedTile;
    tmpMinimumTile = calculatedTile;
   
    calculatedTile = (int) tileCalculator.calculateTile(top, right);
    if (tileOrdering.compare(calculatedTile, tmpMinimumTile) < 0) {
      tmpMinimumTile = calculatedTile;
    }
    if (tileOrdering.compare(calculatedTile, tmpMaximumTile) > 0) {
      tmpMaximumTile = calculatedTile;
    }
   
    calculatedTile = (int) tileCalculator.calculateTile(bottom, left);
    if (tileOrdering.compare(calculatedTile, tmpMinimumTile) < 0) {
      tmpMinimumTile = calculatedTile;
    }
    if (tileOrdering.compare(calculatedTile, tmpMaximumTile) > 0) {
      tmpMaximumTile = calculatedTile;
    }
   
    calculatedTile = (int) tileCalculator.calculateTile(bottom, right);
    if (tileOrdering.compare(calculatedTile, tmpMinimumTile) < 0) {
      tmpMinimumTile = calculatedTile;
    }
    if (tileOrdering.compare(calculatedTile, tmpMaximumTile) > 0) {
      tmpMaximumTile = calculatedTile;
View Full Code Here

TOP

Related Classes of org.openstreetmap.osmosis.core.util.TileCalculator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.