com.xj.anylogic.engine.presentation
Class ShapeGISMap.Layer

java.lang.Object
  extended by com.xj.anylogic.engine.presentation.ShapeGISMap.Layer
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
ShapeGISMap

public static class ShapeGISMap.Layer
extends java.lang.Object
implements java.io.Serializable

Class which stores GIS map layer information

Author:
XJ Technologies Company Ltd. www.anylogic.com
See Also:
Serialized Form

Constructor Summary
ShapeGISMap.Layer(java.lang.String shapeFileName, java.lang.String dbfFileName, java.awt.Color lineColor, java.awt.Color fillColor, int objectNameColumnIndex)
          Creates new Layer descriptor
 
Method Summary
 com.bbn.openmap.layer.shape.areas.PoliticalArea findPoliticalArea(double longitude, double latitude)
          Returns (if there are several objects at the same point, returns one of them)
 com.bbn.openmap.layer.shape.areas.PoliticalArea findPoliticalArea(java.lang.String identifier)
          Finds political area by its string identifier
 com.bbn.openmap.layer.shape.areas.PoliticalArea[] findPoliticalAreas(double longitude, double latitude)
          Returns PoliticalArea objects of this layer located at the given coordinates
 com.bbn.openmap.layer.shape.areas.AreaShapeLayer getLayerObject()
          Returns OpenMap layer object associated with this Layer
 com.bbn.openmap.omGraphics.OMGraphicList getObjects(double longitude, double latitude)
          Returns new OMGraphicsList with objects of this layer located at the given coordinates
 com.bbn.openmap.omGraphics.OMGraphicList getObjects(java.lang.String objectName)
          Returns new OMGraphicsList with objects of this layer having name objectName
 java.util.Collection<com.bbn.openmap.layer.shape.areas.PoliticalArea> getPoliticalAreas()
          Returns the collection of all political areas located in this layer
Political areas are usually defined in DBF file
Each PoliticalArea has its identifier and human-readable name and may contain several shapes on the map (e.g. islands)
PoliticalArea has methods for tuning its presentation on the map, e.g. changing fill color.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShapeGISMap.Layer

public ShapeGISMap.Layer(java.lang.String shapeFileName,
                         java.lang.String dbfFileName,
                         java.awt.Color lineColor,
                         java.awt.Color fillColor,
                         int objectNameColumnIndex)
Creates new Layer descriptor

Parameters:
shapeFileName - GIS Map Shape file name (.shp) with shapes of the layer
dbfFileName - DBF file name with descriptions of GIS Map Shape file objects
lineColor - default line color for objects in this layer
fillColor - default fill color for objects in this layer
objectNameColumnIndex - the index of the object-name column in .dbf file
Method Detail

getPoliticalAreas

public java.util.Collection<com.bbn.openmap.layer.shape.areas.PoliticalArea> getPoliticalAreas()
Returns the collection of all political areas located in this layer
Political areas are usually defined in DBF file
Each PoliticalArea has its identifier and human-readable name and may contain several shapes on the map (e.g. islands)
PoliticalArea has methods for tuning its presentation on the map, e.g. changing fill color.

Returns:
the collection of all political areas located in this layer

findPoliticalArea

public com.bbn.openmap.layer.shape.areas.PoliticalArea findPoliticalArea(java.lang.String identifier)
Finds political area by its string identifier

Parameters:
identifier - the identifier of political area
Returns:
the political area with given identifier or null

findPoliticalAreas

public com.bbn.openmap.layer.shape.areas.PoliticalArea[] findPoliticalAreas(double longitude,
                                                                            double latitude)
Returns PoliticalArea objects of this layer located at the given coordinates

Parameters:
longitude - the longitude of point, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)
latitude - the latitude of point, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)
Returns:
the array with PoliticalArea objects of this layer located at the given coordinates (empty array if no political areas were found)

findPoliticalArea

public com.bbn.openmap.layer.shape.areas.PoliticalArea findPoliticalArea(double longitude,
                                                                         double latitude)
Returns (if there are several objects at the same point, returns one of them)

Parameters:
longitude - the longitude of point, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)
latitude - the latitude of point, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)
Returns:
the PoliticalArea object of this layer located at the given coordinates (null if no political areas were found)

getObjects

public com.bbn.openmap.omGraphics.OMGraphicList getObjects(double longitude,
                                                           double latitude)
Returns new OMGraphicsList with objects of this layer located at the given coordinates

Parameters:
longitude - the longitude of point, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)
latitude - the latitude of point, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)
Returns:
new OMGraphicsList with objects of this layer located at the given coordinates

getObjects

public com.bbn.openmap.omGraphics.OMGraphicList getObjects(java.lang.String objectName)
Returns new OMGraphicsList with objects of this layer having name objectName

Parameters:
objectName - the name of objects to be returned
Returns:
new OMGraphicsList with objects of this layer having name objectName

getLayerObject

public com.bbn.openmap.layer.shape.areas.AreaShapeLayer getLayerObject()
Returns OpenMap layer object associated with this Layer

Returns:
the OpenMap layer object associated with this Layer


Copyright © 1991-2008 XJ Technlogies. All Rights Reserved.