package nl.tudelft.simulation.dsol.animation.gis;
import java.awt.Color;
import java.io.Serializable;
import java.util.List;
import org.djutils.draw.bounds.Bounds2d;
/**
* Feature contains an element of a layer, defined by a key value combination, with its own colors.
* TODO: minimum scale and maximum scale to draw features has to be added again, but first, scale needs to be defined properly.
*
* Copyright (c) 2021-2021 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See * for project information DSOL Manual. The DSOL * project is distributed under a three-clause BSD-style license, which can be found at * DSOL License. *
* @author Alexander Verbraeck */ public interface FeatureInterface extends Serializable { /** * Return the key that defines a feature in a layer, can be "*" if no features are defined. * @return String; the key that defines a feature in a layer, can be "*" if no features are defined */ String getKey(); /** * Set the key that defines a feature in a layer, can be "*" if no features are defined. * @param key String; the key that defines a feature in a layer, can be "*" if no features are defined. */ void setKey(String key); /** * Return the value belonging to the key that defines the feature in a layer, can be "*" if all elements in the data source * that have the correct key have to be drawn. * @return String; the value belonging to the key that defines the feature in a layer, can be "*" if all elements in the * data source that have the correct key have to be drawn. */ String getValue(); // // /** // * Return the data source, which contains the location of the GIS datasource. // * @return DataSourceInterface the data source, contains the location of the GIS datasource // */ // DataSourceInterface getDataSource(); /** * Return whether the data has been initialized for this feature. * @return boolean; whether the data has been initialized for this feature */ boolean isInitialized(); /** * Set whether the data has been initialized for this feature. * @param initialized boolean; whether the data has been initialized for this feature */ void setInitialized(boolean initialized); /** * Return the number of shapes for this feature at this moment. * @return int; the number of shapes in the data source */ int getNumShapes(); /** * Return a GisObject. * @param index int; the number of the shape to be returned for this feature * @return GisObject returns anl.tudelft.simulation.dsol.animation.gis.GisObject
* @throws IndexOutOfBoundsException whenever index > numShapes or index < 0
*/
GisObject getShape(int index) throws IndexOutOfBoundsException;
/**
* Return all the shapes of the particular data source for this feature.
* @return List the resulting List of nl.tudelft.simulation.dsol.animation.gis.GisObject
*/
Listnl.tudelft.simulation.dsol.animation.gis.GisObject
*/
List