Class KMLShapeRepository

    • Method Detail

      • setQueryField

        public void setQueryField​(java.lang.String queryField)
      • getCachedGeoData

        public GeoData getCachedGeoData​(java.lang.String cacheId)
        Description copied from interface: MapObjectRepository
        Retrieve the GeoData from the cache. The repository is responsible to cache the geometry data. If cache is missing, it should read it from file system and reset the cache and then returns the data object.
        Specified by:
        getCachedGeoData in interface MapObjectRepository<MapShape>
        Parameters:
        cacheId - The cache Id
        Returns:
        See Also:
        GeoData
      • loadObjects

        public java.lang.String loadObjects​(java.lang.String path,
                                            java.lang.Integer shapeType,
                                            java.util.Map<java.lang.String,​java.lang.String> queryName)
        Description copied from interface: MapObjectRepository
        Load objects from a specified location with specified config object. If the shapeType is already defined in file, then ignore the parameter. Otherwise, assign the type for each shape loaded from the path.
        Specified by:
        loadObjects in interface MapObjectRepository<MapShape>
        Parameters:
        path - The path to the location where the file located.
        shapeType - An integer representing the shape category / shape type for the shapes that are saved into repository.
        queryName - A map object contains name-value pair. Example: use queryField as the key and kml path as the value
        Returns:
        A string as key to access the loaded object later.
      • loadObjects

        public java.lang.String loadObjects​(java.lang.String path,
                                            java.lang.Integer shapeType)
        Description copied from interface: MapObjectRepository
        Load objects from a specified location. If the shapeType is already defined in file, then ignore the parameter. Otherwise, assign the type for each shape loaded from the path.
        Specified by:
        loadObjects in interface MapObjectRepository<MapShape>
        Parameters:
        path - The path to the location where the file located.
        shapeType - An integer representing the shape category / shape type for the shapes that are saved into repository.
        Returns:
        A string as key to access the loaded object later.
      • getKMLObjects

        public java.util.List<KMLObject> getKMLObjects​(java.lang.String path)
      • shpPolygonToKmlModel

        public GeoData shpPolygonToKmlModel​(double[][][] points)
      • checkRingIsClockwise

        public int checkRingIsClockwise​(double[][] p)