All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openstreetmap.atlas.geography.WktPrintable Maven / Gradle / Ivy

There is a newer version: 7.0.8
Show newest version
package org.openstreetmap.atlas.geography;

import org.openstreetmap.atlas.utilities.collections.StringList;

/**
 * @author matthieun
 */
public interface WktPrintable
{
    static String toWktCollection(final Iterable input)
    {
        final StringList wktList = new StringList();
        input.forEach(wktPrintable -> wktList.add(wktPrintable.toWkt()));
        final StringBuilder builder = new StringBuilder();
        builder.append("GEOMETRYCOLLECTION (");
        builder.append(wktList.join(", "));
        builder.append(")");
        return builder.toString();
    }

    String toWkt();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy