Interface GISPrimitive

    • Field Detail

      • COMPARATOR

        static final Comparator<GISPrimitive> COMPARATOR
        Comparator on GISPrimitive. It uses the geolocation of the elements
    • Method Detail

      • getUUID

        @Pure
        UUID getUUID()
        Replies the Unique identifier.
        Returns:
        the Unique identifier, never null.
      • getGeoLocation

        @Pure
        GeoLocation getGeoLocation()
        Replies the geo-location.

        A GeoLocation is unique according to the geo-location of the element. If two elements have the same points in the same order, or if two elements have the same points in a reverse order, they must have equal GeoLocations.

        The following code is always true (where the arguments of the constructors are the list of points of the polyline). It illustrates that for two elements with the same geo-localized points, they have the same geo-location identifier (Geo-Id) and they have different unique ientifier (Uid):

        
         GISElement obj1 = new MapPolyline(100,10,200,30,300,4);
         GISElement obj2 = new MapPolyline(100,10,200,30,300,4);
         assert( obj1.getGeoId().equals(obj2.getGeoId()) );
         assert( obj2.getGeoId().equals(obj1.getGeoId()) );
         assert( ! obj1.getUid().equals(obj2.getUid()) );
         assert( ! obj2.getUid().equals(obj1.getUid()) );
         
        Returns:
        a location
        See Also:
        getGeoId(), getGeoLocation()
      • getGeoId

        @Pure
        GeoId getGeoId()
        Replies an unique identifier for primitive.

        A Geo-Id is unique according to the geo-location of the element. If two elements have the same points in the same order, or if two elements have the same points in a reverse order, they must have the same Geo-Id.

        Returns:
        an identifier
        See Also:
        getGeoLocation()