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

org.openstreetmap.atlas.geography.converters.jts.JtsPrecisionManager Maven / Gradle / Ivy

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

import org.locationtech.jts.geom.GeometryFactory;
import org.locationtech.jts.geom.PrecisionModel;

/**
 * JTS Precision utility class.
 *
 * @author Yiqing Jin
 */
public final class JtsPrecisionManager
{
    private static final int PRECISION_SCALE = 10_000_000;
    private static PrecisionModel precisionModel;
    private static GeometryFactory geometryFactory;

    static
    {
        precisionModel = new PrecisionModel(PRECISION_SCALE);
        geometryFactory = new GeometryFactory(precisionModel);
    }

    public static GeometryFactory getGeometryFactory()
    {
        return geometryFactory;
    }

    public static PrecisionModel getPrecisionModel()
    {
        return precisionModel;
    }

    private JtsPrecisionManager()
    {
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy