Search in sources :

Example 26 with Project

use of com.revolsys.swing.map.layer.Project in project com.revolsys.open by revolsys.

the class AbstractRecordLayer method zoomToBoundingBox.

public void zoomToBoundingBox(BoundingBox boundingBox) {
    if (!RectangleUtil.isEmpty(boundingBox)) {
        final Project project = getProject();
        final GeometryFactory geometryFactory = project.getGeometryFactory();
        boundingBox = boundingBox.convert(geometryFactory);
        boundingBox = boundingBox.expandPercent(0.1);
        project.setViewBoundingBox(boundingBox);
    }
}
Also used : Project(com.revolsys.swing.map.layer.Project) GeometryFactory(com.revolsys.geometry.model.GeometryFactory)

Example 27 with Project

use of com.revolsys.swing.map.layer.Project in project com.revolsys.open by revolsys.

the class EditRecordGeometryOverlay method getElevation.

private double getElevation(final Point point) {
    final Project project = getProject();
    final double scale = getViewportScale();
    return ElevationModelLayer.getElevation(project, scale, point);
}
Also used : Project(com.revolsys.swing.map.layer.Project)

Example 28 with Project

use of com.revolsys.swing.map.layer.Project in project com.revolsys.open by revolsys.

the class ProjectTreeNode method newTree.

public static BaseTree newTree(final Project project) {
    final ProjectTreeNode root = new ProjectTreeNode(project);
    final BaseTree tree = new BaseTree(root);
    tree.setProperty("treeType", Project.class.getName());
    return tree;
}
Also used : BaseTree(com.revolsys.swing.tree.BaseTree) Project(com.revolsys.swing.map.layer.Project)

Aggregations

Project (com.revolsys.swing.map.layer.Project)28 BoundingBox (com.revolsys.geometry.model.BoundingBox)14 GeometryFactory (com.revolsys.geometry.model.GeometryFactory)6 Viewport2D (com.revolsys.swing.map.Viewport2D)4 MapPanel (com.revolsys.swing.map.MapPanel)3 Point (com.revolsys.geometry.model.Point)2 GeoreferencedImage (com.revolsys.raster.GeoreferencedImage)2 ImageViewport (com.revolsys.swing.map.ImageViewport)2 Layer (com.revolsys.swing.map.layer.Layer)2 LayerGroup (com.revolsys.swing.map.layer.LayerGroup)2 AbstractRecordLayer (com.revolsys.swing.map.layer.record.AbstractRecordLayer)2 PageFormat (java.awt.print.PageFormat)2 PrinterException (java.awt.print.PrinterException)2 PrinterJob (java.awt.print.PrinterJob)2 File (java.io.File)2 ArrayList (java.util.ArrayList)2 Geometry (com.revolsys.geometry.model.Geometry)1 LineString (com.revolsys.geometry.model.LineString)1 RectangularMapGrid (com.revolsys.gis.grid.RectangularMapGrid)1 RectangularMapTile (com.revolsys.gis.grid.RectangularMapTile)1