Package net.sf.myway.base.db

Examples of net.sf.myway.base.db.BoundingBox


      @Override
      public void run() {
        monitor.beginTask(Messages.NewRegionWizard_CreatingRegion + _page3.getRegionName(), 3);
        monitor.worked(1);
        final Region r = new Region();
        r.setBoundingBox(new BoundingBox(north, south, west, east));
        r.setName(name);
        if (!_page.getSelection().isEmpty()
          && _page.getSelection() instanceof IStructuredSelection) {
          final Object f = ((IStructuredSelection) _page.getSelection())
            .getFirstElement();
View Full Code Here


  void doFinishFromMap(final ScannedMap scannedMap, final double d, final IProgressMonitor monitor) {
    monitor.beginTask(Messages.NewRegionWizard_CreatingRegion + scannedMap.getName(), 3);
    monitor.worked(1);
    final Region r = new Region();
    final double a = d / 60.0;
    final BoundingBox bb = new BoundingBox();
    r.setBoundingBox(bb);
    bb.setNorth(new Angle(scannedMap.getNorth().getVal() + a));
    bb.setSouth(new Angle(scannedMap.getSouth().getVal() - a));
    bb.setWest(new Angle(scannedMap.getWest().getVal() - a));
    bb.setEast(new Angle(scannedMap.getEast().getVal() + a));
    r.setName(scannedMap.getName());
    if (!_selection.isEmpty() && _selection instanceof IStructuredSelection) {
      final Object f = ((IStructuredSelection) _selection).getFirstElement();
      if (f instanceof Region)
        r.setParent((Region) f);
View Full Code Here

      if (east.getVal() < node.getLongitude().getVal())
        east.setVal(node.getLongitude().getVal());
      if (west.getVal() > node.getLongitude().getVal())
        west.setVal(node.getLongitude().getVal());
    }
    _boundingBox = new BoundingBox(north, south, west, east);
  }
View Full Code Here

   *
   * @return new bounding box.
   */
  @Transient
  public BoundingBox getBoundingBox() {
    return new BoundingBox(_north, _south, _west, _east);
  }
View Full Code Here

  public List<MapObject> getAllObjects() {
    if (_mapObjects == null) {
      final double longMax = _lon + EDGE_LEN * _lonInc;
      final double latMax = _lat - EDGE_LEN * _latInc;
      final List<MapObject> all = MapPlugin.getBL().getObjects(
        new BoundingBox(latMax, _lat, _lon, longMax));
      _mapObjects = all == null ? new ArrayList<MapObject>() : new ArrayList<MapObject>(all);
      _log.info("fetch objects for " + new Angle(_lon) + "[" + _lon + "] "
        + new Angle(longMax) + "[" + longMax + "] " + new Angle(latMax) + "[" + latMax
        + "] " + new Angle(_lat) + "[" + _lat + "] Anzahl Objekte: " + all.size());
      // TODO Objekte klassifizieren und auf layers aufteilen.
View Full Code Here

  /**
   * @param boundingBox
   *            The boundingBox to set.
   */
  public void setBoundingBox(final BoundingBox boundingBox) {
    final BoundingBox old = _boundingBox;
    _boundingBox = boundingBox;
    firePropertyChange("bounding-box", old, _boundingBox);
  }
View Full Code Here

  private void initPropValues() {
    if (_north != null)
      return;
    if (_region.getBoundingBox() == null)
      _region.setBoundingBox(new BoundingBox());
    _north = new AnglePropertySource(_region.getBoundingBox().getNorth(), Border.NORTH);
    _north.setReadOnly(true);
    _south = new AnglePropertySource(_region.getBoundingBox().getSouth(), Border.SOUTH);
    _south.setReadOnly(true);
    _west = new AnglePropertySource(_region.getBoundingBox().getWest(), Border.WEST);
View Full Code Here

    _mainPage = new ImportWizardPage("Importer", selection); // NON-NLS-1 //$NON-NLS-1$
    try {
      _importers = getImporters();
      _mainPage.setImporters(_importers);
      // Region region = EditPlugin.getModel().getRegion();
      final BoundingBox bb = null; // TODO region == null ? null : region.getBoundingBox();
      if (_importers != null)
        for (final ImporterInfo ii : _importers)
          ii.createPages(bb);
    }
    catch (final CoreException ex) {
View Full Code Here

TOP

Related Classes of net.sf.myway.base.db.BoundingBox

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.