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

org.opengis.geometry.coordinate.Triangle Maven / Gradle / Ivy

There is a newer version: 24.2-oss84-1
Show newest version
/*
 *    GeoTools - The Open Source Java GIS Toolkit
 *    http://geotools.org
 *
 *    (C) 2011, Open Source Geospatial Foundation (OSGeo)
 *    (C) 2003-2005, Open Geospatial Consortium Inc.
 *
 *    All Rights Reserved. http://www.opengis.org/legal/
 */
package org.opengis.geometry.coordinate;

import static org.opengis.annotation.Obligation.*;
import static org.opengis.annotation.Specification.*;

import java.util.List;
import org.opengis.annotation.UML;

/**
 * A planar polygon defined by 3 corners. That is, a triangle would be the result of a constructor
 * of the form: {@code Polygon(LineString({P1, P2, P3, P1}))} where P1,
 * P2, and P3 are three {@linkplain Position positions}.
 * Triangles have no holes. Triangle shall be used to construct {@linkplain TriangulatedSurface
 * triangulated surfaces}.
 *
 * 

Note: The points in a triangle can be located in terms of their corner points * by defining a set of barycentric coordinates, three nonnegative numbers c1, * c2, and c3 such that * *

c1 + c2 + c3 = 1.0. * *

Then, each point P in the triangle can be expressed for some set of barycentric * coordinates as: * *

* *

* * P = c1P1 + * c2P2 + * c3P3 * *
* * @version ISO 19107 * @author Martin Desruisseaux (IRD) * @since GeoAPI 2.0 */ @UML(identifier = "GM_Triangle", specification = ISO_19107) public interface Triangle extends Polygon { /** Returns the triangle corner. The list must contains exactly 3 elements. */ @UML(identifier = "corners", obligation = MANDATORY, specification = ISO_19107) List getCorners(); /** Returns the patch which own this surface patch. */ @UML(identifier = "surface", obligation = MANDATORY, specification = ISO_19107) TriangulatedSurface getSurface(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy