Examples of ClosestEdge


Examples of org.locationtech.udig.tools.edit.support.ClosestEdge

            if (!cycleGeom) {
                SimpleFeatureType featureType = editLayer.getSchema();
                GeometryDescriptor defaultGeometryType = featureType.getGeometryDescriptor();
                Class< ? > type = defaultGeometryType.getType().getBinding();
                boolean polygonLayer=Polygon.class.isAssignableFrom(type) || MultiPolygon.class.isAssignableFrom(type);
                ClosestEdge edge = geom.getShell().getClosestEdge(Point.valueOf(e.x, e.y), polygonLayer);
                if (edge != null &&
                        edge.getDistanceToEdge() <= PreferenceUtil.instance().getVertexRadius()){
                    return geom.getShell();
                }
            }
        }
        if (cycleGeom) //selected geom was the last one, therefore select the first match
View Full Code Here

Examples of org.locationtech.udig.tools.edit.support.ClosestEdge

        ILayer selectedLayer = handler.getEditLayer();
        Class type = selectedLayer.getSchema().getGeometryDescriptor().getType().getBinding();
        boolean polygonLayer=Polygon.class.isAssignableFrom(type) || MultiPolygon.class.isAssignableFrom(type);

        ClosestEdge closestEdge = geom.getClosestEdge(point, polygonLayer);
       
        return closestEdge!=null && closestEdge.getDistanceToEdge()<PreferenceUtil.instance().getVertexRadius();
    }
View Full Code Here

Examples of org.locationtech.udig.tools.edit.support.ClosestEdge

    private boolean isOverEdge(EditToolHandler handler, MapMouseEvent e) {
        ILayer selectedLayer = handler.getEditLayer();
        Class<?> type = selectedLayer.getSchema().getGeometryDescriptor().getType().getBinding();
        boolean polygonLayer=Polygon.class.isAssignableFrom(type) || MultiPolygon.class.isAssignableFrom(type);

        ClosestEdge edge=handler.getCurrentGeom().getClosestEdge(Point.valueOf(e.x,e.y), polygonLayer);
        if( edge==null )
            return false;
        return edge.getDistanceToEdge()<=PreferenceUtil.instance().getVertexRadius();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.