Class GeoPath.SimpleGeoPath
java.lang.Object
org.episteme.social.geography.GeoPath.SimpleGeoPath
- All Implemented Interfaces:
Serializable, Boundary<EarthCoordinate>
- Enclosing class:
GeoPath
Inner class representing a single continuous path segment.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPoint(GeodeticCoordinate point) booleancontains(EarthCoordinate point) Checks if a point is contained within this boundary.Computes the convex hull of this boundary.Computes the boundary measure (perimeter/surface area).Returns the bounding box of this boundary.Returns the centroid of this boundary.intReturns the dimensionality of this boundary.Computes the measure (length/area/volume) of this boundary.intersection(Boundary<EarthCoordinate> other) Computes the intersection of this boundary with another.booleanintersects(Boundary<EarthCoordinate> other) Checks if this boundary intersects with another.booleanisEmpty()Checks if this boundary is empty.Creates a scaled copy of this boundary.translate(EarthCoordinate offset) Creates a copy of this boundary translated by a vector.union(Boundary<EarthCoordinate> other) Computes the union of this boundary with another.
-
Constructor Details
-
SimpleGeoPath
public SimpleGeoPath()
-
-
Method Details
-
addPoint
-
getPoints
-
getLength
-
getDimension
public int getDimension()Description copied from interface:BoundaryReturns the dimensionality of this boundary.- Specified by:
getDimensionin interfaceBoundary<EarthCoordinate>- Returns:
- 0 for point, 1 for line, 2 for polygon, 3 for polyhedron
-
contains
Description copied from interface:BoundaryChecks if a point is contained within this boundary.- Specified by:
containsin interfaceBoundary<EarthCoordinate>- Parameters:
point- the point to test- Returns:
- true if point is inside or on the boundary
-
isEmpty
public boolean isEmpty()Description copied from interface:BoundaryChecks if this boundary is empty.- Specified by:
isEmptyin interfaceBoundary<EarthCoordinate>- Returns:
- true if the boundary has no extent
-
getCentroid
Description copied from interface:BoundaryReturns the centroid of this boundary.- Specified by:
getCentroidin interfaceBoundary<EarthCoordinate>- Returns:
- the geometric center
-
getBoundingBox
Description copied from interface:BoundaryReturns the bounding box of this boundary.- Specified by:
getBoundingBoxin interfaceBoundary<EarthCoordinate>- Returns:
- an axis-aligned bounding box
-
getMeasure
Description copied from interface:BoundaryComputes the measure (length/area/volume) of this boundary. For 2D: area, for 3D: volume, for 1D: length.- Specified by:
getMeasurein interfaceBoundary<EarthCoordinate>- Returns:
- the measure as a Real value
-
getBoundaryMeasure
Description copied from interface:BoundaryComputes the boundary measure (perimeter/surface area). For 2D: perimeter, for 3D: surface area.- Specified by:
getBoundaryMeasurein interfaceBoundary<EarthCoordinate>- Returns:
- the boundary measure
-
intersects
Description copied from interface:BoundaryChecks if this boundary intersects with another.- Specified by:
intersectsin interfaceBoundary<EarthCoordinate>- Parameters:
other- the other boundary- Returns:
- true if boundaries intersect
-
union
Description copied from interface:BoundaryComputes the union of this boundary with another.- Specified by:
unionin interfaceBoundary<EarthCoordinate>- Parameters:
other- the other boundary- Returns:
- the union boundary
-
intersection
Description copied from interface:BoundaryComputes the intersection of this boundary with another.- Specified by:
intersectionin interfaceBoundary<EarthCoordinate>- Parameters:
other- the other boundary- Returns:
- the intersection boundary
-
convexHull
Description copied from interface:BoundaryComputes the convex hull of this boundary.- Specified by:
convexHullin interfaceBoundary<EarthCoordinate>- Returns:
- the convex hull
-
translate
Description copied from interface:BoundaryCreates a copy of this boundary translated by a vector.- Specified by:
translatein interfaceBoundary<EarthCoordinate>- Parameters:
offset- the translation vector (as point)- Returns:
- translated boundary
-
scale
Description copied from interface:BoundaryCreates a scaled copy of this boundary.- Specified by:
scalein interfaceBoundary<EarthCoordinate>- Parameters:
factor- the scaling factor- Returns:
- scaled boundary
-