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

org.geolatte.geom.MeasureGeometryOperations Maven / Gradle / Ivy

Go to download

This geoLatte-geom library offers a geometry model that conforms to the OGC Simple Features for SQL specification.

The newest version!
/*
 * This file is part of the GeoLatte project.
 *
 *     GeoLatte is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU Lesser General Public License as published by
 *     the Free Software Foundation, either version 3 of the License, or
 *     (at your option) any later version.
 *
 *     GeoLatte is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU Lesser General Public License for more details.
 *
 *     You should have received a copy of the GNU Lesser General Public License
 *     along with GeoLatte.  If not, see .
 *
 * Copyright (C) 2010 - 2012 and Ownership of code is shared by:
 * Qmino bvba - Romeinsestraat 18 - 3001 Heverlee  (http://www.qmino.com)
 * Geovise bvba - Generaal Eisenhowerlei 9 - 2140 Antwerpen (http://www.geovise.com)
 */

package org.geolatte.geom;

/**
 * A set of operations on measured (2DM/3DM) Geometrys.
 *
 * @author Karel Maesen, Geovise BVBA
 *         creation-date: 4/4/12
 */
public interface MeasureGeometryOperations {

    /**
     * Default implementation of this interface
     */
    public final MeasureGeometryOperations Default = new DefaultMeasureGeometryOperations();


    /**
     * Creates an operation to calculate the GeometryCollection that matches the specified range of M-coordinate value
     * inclusively.
     * 
     * 

This method is only valid if executed on 0- or 1-dimensional objects or collections thereof.

*

The semantics implemented here are specified by SFA 1.2.1, section 6.1.2.6.

* * @param geometry the geometry on which to perform the calculation * @param startMeasure the start of the specified range of M-coordinate values * @param endMeasure the end of the specified range of M-coordinate values * @return a GeometryOperation that calculates the GeometryCollection matching the * specified range of M-coordinate values. * @throws IllegalArgumentException if this method is executed on 2-dimensional Geometrys. */ public

Geometry

locateBetween(final Geometry

geometry, final double startMeasure, final double endMeasure); /** * Creates an operation to calculate the GeometryCollection that matches the specified M-coordinate value. * *

This method is only valid if executed on 0- or 1-dimensional objects or collections thereof.

*

The semantics implemented here are specified by SFA 1.2.1, section 6.1.2.6.

* * @param geometry the geometry on which to perform the calculation * @param mValue the specified M-coordinate value * @return a GeometryOperation that calculates the GeometryCollection matching * the specified M-coordinate value. * @throws IllegalArgumentException if this method is executed on 2-dimensional Geometrys. */ public

Geometry

locateAlong(final Geometry

geometry, final double mValue); /** * Creates a GeometryOperation to calculate the measure value * at the specified point * * @param geometry a linear Geometry * @param pos a Position within tolerance of the geometry * @param tolerance the maximum value allowed for distance between pos and geometry. * @return a GeometryOperation that returns the measure value at the specified point on the specified geometry */ public

double measureAt(final Geometry

geometry, final C2D pos, double tolerance); /** * Creates a GeometryOperation that creates a new Geometry * that has the same 2D/3D-coordinates as the specified Geometry, and * with measure values that correspond with the length along it (or begin-measure + length). * *

The positionTypeMarker is needed because the compiler can't figure our the relationship between the input CRS * and its measured variant.

* * @param geometry the Geometry for which to build measures * @param keepBeginMeasure if true, than the measure of the first coordinate is used as start-value * @param positionTypeMarker the type of {@code Position} for the result of the created operations * @return a GeometryOperation that returns a Geometry with measures increasing with length */ public

Geometry measureOnLength( Geometry

geometry, Class positionTypeMarker, boolean keepBeginMeasure); /** * Creates a {@code GeometryOperation} that returns the minimum measure value of the {@code Position}s * of the specified Geometry. * * If the geometry is empty, this method returns Double.NaN * * @param geometry the geometry for which the minimum measure is sought * @return the minimum measure * @throws IllegalArgumentException if the geometry is not a measured geometry */ public

double minimumMeasure(Geometry

geometry); /** * Creates a {@code GeometryOperation} that returns the maximum measure value of the {@code Position}s * of the specified Geometry. * * If the geometry is empty, this method returns Double.NaN * * @param geometry the geometry for which the maximum measure is sought * @return the minimum measure * @throws IllegalArgumentException if the geometry is not a measured geometry */ public

double maximumMeasure(Geometry

geometry); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy