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

org.openlr.encoder.IntermediateProcessor Maven / Gradle / Ivy

The newest version!
package org.openlr.encoder;

import org.openlr.map.Line;
import org.openlr.map.Path;

import java.util.OptionalDouble;

/**
 * An intermediate processor determines the placement of intermediate location reference points along a path.
 * The processor is handed the remaining path to encode and determines how far along the path it would like
 * to place its next intermediate location reference point.
 */
public interface IntermediateProcessor {
    /**
     * Determine the distance along the remaining path to place the next intermediate location reference point.
     * If the processor decides not to place any intermediate location reference point along the path
     * an {@link OptionalDouble#empty()} is returned.
     *
     * @param path the remaining path to encode
     * @param  the line type
     * @return the distance along the path to place the next intermediate location reference point
     */
    > OptionalDouble getDistanceToNext(Path path);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy