Package org.bremersee.geojson.model
Interface LatLonAware
-
- All Known Implementing Classes:
LatitudeLongitude,LatLon
public interface LatLonAwareThe interface lat lon aware.- Author:
- Christian Bremer
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceLatLonAware.BuilderThe builder interface.static classLatLonAware.BuilderImplThe builder implementation.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static LatLonAware.Builderbuilder()Returns a new builder.BigDecimalgetLatitude()Gets latitude.BigDecimalgetLongitude()Gets longitude.default booleanhasValues()Determines whether latitude and longitude have values.default org.locationtech.jts.geom.CoordinatetoCoordinate()To GeoJSON coordinate (x is longitude, y is latitude).default StringtoLatLonString()To comma separated latitude longitude string.default StringtoLonLatString()To comma separated longitude latitude string.default org.locationtech.jts.geom.PointtoPoint()To GeoJSON point (x is longitude, y is latitude).
-
-
-
Method Detail
-
getLatitude
BigDecimal getLatitude()
Gets latitude.- Returns:
- the latitude
-
getLongitude
BigDecimal getLongitude()
Gets longitude.- Returns:
- the longitude
-
hasValues
default boolean hasValues()
Determines whether latitude and longitude have values.- Returns:
trueif latitude and longitude is notnull, otherwisefalse
-
toPoint
default org.locationtech.jts.geom.Point toPoint()
To GeoJSON point (x is longitude, y is latitude).- Returns:
- the point
-
toCoordinate
default org.locationtech.jts.geom.Coordinate toCoordinate()
To GeoJSON coordinate (x is longitude, y is latitude).- Returns:
- the coordinate
-
toLatLonString
default String toLatLonString()
To comma separated latitude longitude string.- Returns:
- the string
-
toLonLatString
default String toLonLatString()
To comma separated longitude latitude string.- Returns:
- the string
-
builder
static LatLonAware.Builder builder()
Returns a new builder.- Returns:
- the builder
-
-