Package org.openstreetmap.josm.data.osm

Examples of org.openstreetmap.josm.data.osm.MultipolygonCreate


        // add ways of existing relation to include them in polygon analysis
        Set<Way> ways = new HashSet<>(selectedWays);
        ways.addAll(selectedMultipolygonRelation.getMemberPrimitives(Way.class));

        final MultipolygonCreate polygon = analyzeWays(ways, true);
        if (polygon == null) {
            return null; //could not make multipolygon.
        } else {
            return Pair.create(selectedMultipolygonRelation, createRelation(polygon, new Relation(selectedMultipolygonRelation)));
        }
View Full Code Here


    /**
     * Returns a {@link Pair} null and the newly created/modified multipolygon {@link Relation}.
     */
    public static Pair<Relation, Relation> createMultipolygonRelation(Collection<Way> selectedWays, boolean showNotif) {

        final MultipolygonCreate polygon = analyzeWays(selectedWays, showNotif);
        if (polygon == null) {
            return null; //could not make multipolygon.
        } else {
            return Pair.create(null, createRelation(polygon, new Relation()));
        }
View Full Code Here

     * @param selectedWays list of selected ways
     * @return <code>null</code>, if there was a problem with the ways.
     */
    private static MultipolygonCreate analyzeWays(Collection < Way > selectedWays, boolean showNotif) {

        MultipolygonCreate pol = new MultipolygonCreate();
        String error = pol.makeFromWays(selectedWays);

        if (error != null) {
            if (showNotif) {
                new Notification(error)
                        .setIcon(JOptionPane.INFORMATION_MESSAGE)
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.data.osm.MultipolygonCreate

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.