Class GeoJsonPolygon

  • All Implemented Interfaces:
    DataPolygon, Geometry

    public class GeoJsonPolygon
    extends java.lang.Object
    implements DataPolygon
    A GeoJsonPolygon geometry contains an array of arrays of LatLngs. The first array is the polygon exterior boundary. Subsequent arrays are holes.
    • Constructor Summary

      Constructors 
      Constructor Description
      GeoJsonPolygon​(java.util.List<? extends java.util.List<com.google.android.gms.maps.model.LatLng>> coordinates)
      Creates a new GeoJsonPolygon object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<? extends java.util.List<com.google.android.gms.maps.model.LatLng>> getCoordinates()
      Gets a list of a list of coordinates of the GeoJsonPolygons
      java.util.List<? extends java.util.List<com.google.android.gms.maps.model.LatLng>> getGeometryObject()
      Gets the stored geometry object
      java.lang.String getGeometryType()
      Gets the type of geometry
      java.util.ArrayList<java.util.ArrayList<com.google.android.gms.maps.model.LatLng>> getInnerBoundaryCoordinates()
      Gets an array of arrays of inner boundary coordinates
      java.util.ArrayList<com.google.android.gms.maps.model.LatLng> getOuterBoundaryCoordinates()
      Gets an array of outer boundary coordinates
      java.lang.String getType()
      Gets the type of geometry.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • GeoJsonPolygon

        public GeoJsonPolygon​(java.util.List<? extends java.util.List<com.google.android.gms.maps.model.LatLng>> coordinates)
        Creates a new GeoJsonPolygon object
        Parameters:
        coordinates - list of list of coordinates of GeoJsonPolygon to store
    • Method Detail

      • getType

        public java.lang.String getType()
        Gets the type of geometry. The type of geometry conforms to the GeoJSON 'type' specification.
        Returns:
        type of geometry
      • getCoordinates

        public java.util.List<? extends java.util.List<com.google.android.gms.maps.model.LatLng>> getCoordinates()
        Gets a list of a list of coordinates of the GeoJsonPolygons
        Returns:
        list of a list of coordinates of the GeoJsonPolygon
      • getGeometryObject

        public java.util.List<? extends java.util.List<com.google.android.gms.maps.model.LatLng>> getGeometryObject()
        Gets the stored geometry object
        Specified by:
        getGeometryObject in interface Geometry
        Returns:
        geometry object
      • getGeometryType

        public java.lang.String getGeometryType()
        Gets the type of geometry
        Specified by:
        getGeometryType in interface Geometry
        Returns:
        type of geometry
      • getOuterBoundaryCoordinates

        public java.util.ArrayList<com.google.android.gms.maps.model.LatLng> getOuterBoundaryCoordinates()
        Gets an array of outer boundary coordinates
        Specified by:
        getOuterBoundaryCoordinates in interface DataPolygon
        Returns:
        array of outer boundary coordinates
      • getInnerBoundaryCoordinates

        public java.util.ArrayList<java.util.ArrayList<com.google.android.gms.maps.model.LatLng>> getInnerBoundaryCoordinates()
        Gets an array of arrays of inner boundary coordinates
        Specified by:
        getInnerBoundaryCoordinates in interface DataPolygon
        Returns:
        array of arrays of inner boundary coordinates
      • toString

        @NonNull
        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object