Thomas Brinkhoff移动对象生成器的修改


Thomas Brinkhoff移动对象生成器的修改,包括地图数据的写出控制,还有生成的移动对象的数据包含该对象所在路径id信息
资源截图
代码片段和文件信息
package drawables;

import java.awt.*;
import java.io.*;
import util.*;

/**
 * Basic class for drawable primitives.
 *
 * @version 3.41 20.08.2003 layers become byte use of MBR improved Rect removed
 * @version 3.40 05.10.2002 interface SpatialSearchTreeEntry removed
 * @version 3.30 20.02.2002 data output streams toString added
 * @version 3.20 03.07.2001 getContainer added
 * @version 3.10 25.08.2000 writeGML added
 * @version 3.00 27.06.2000 implementation of spatial search tree objects support of presenation modes linked primitives
 * @version 2.50 09.04.2000 intersects for drawable primitives added
 * @version 2.40 26.03.2000 contains isContainedBy added; intersects renamed
 * @version 2.30 31.01.2000 getobject isVisible computeDistance setMBR added
 * @version 2.20 10.10.1999 write writeCoord added
 * @version 2.10 14.08.1999 lazy loading of geometry
 * @version 2.00 14.03.1999 changed from interface to class
 * @author Thomas Brinkhoff
 */

public abstract class Drawable implements Serializable EntryReadable {

/**
 * Standard layer for areal primitives.
 */
public static final byte AREAlayer = 0;
/**
 * Standard layer for line primitives.
 */
public static final byte LINElayer = 1;
/**
 * Standard layer for point primitives.
 */
public static final byte POINTlayer = 2;
/**
 * Standard layer for text primitives.
 */
public static final byte TEXTlayer = 3;
/**
 * Standard layer for (not scalable) bitmaps.
 */
public static final byte BITMAPlayer = 4;
/**
 * Default for the least detailed scale.
 */
public static final int DEFMINSCALE = Integer.MAX_VALUE; 
/**
 * Default for the most detailed scale.
 */
public static final int DEFMAXSCALE = 0; 

/**
 * The minimum bounding rectangle.
 */
protected Rectangle mbr = null;
/**
 * The least detailed scale for drawing.
 */
protected int minScale = DEFMINSCALE; 
/**
 * The most detailed scale for drawing.
 */
protected int maxScale = DEFMAXSCALE; 
/**
 * layer.
 */
protected byte layer = LINElayer; 
/**
 * Is the primitive selected?
 */
protected boolean selected = false;
/**
 * The corresponding presentation object.
 */
protected DrawablePresentation pres = null;
/**
 * The corresponding drawable object.
 */
protected Drawableobject obj = null;
/**
 * Container of the primitive.
 */
protected Drawableobjects container = null;
/**
 * Next primitive of the same layer.
 */
protected Drawable nextOflayer = null;

/**
 * Computes the distance between two points.
 * @return distance
 * @param x1 x-coordinate of the 1st point
 * @param y1 y-coordinate of the 1st point
 * @param x2 x-coordinate of the 2nd point
 * @param y2 y-coordinate of the 2nd point
 */
public static double computeDistance (int x1 int y1 int x2 int y2) {
long xDist = Math.abs(x1-x2);
long yDist = Math.abs(y1-y2);
return Math.sqrt(xDist*xDist + yDist*yDi

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-10-25 10:33  CompleteSource21
     文件         394  2016-09-26 11:54  CompleteSource21.classpath
     文件       10244  2016-10-18 10:38  CompleteSource21.DS_Store
     目录           0  2016-10-28 10:37  __MACOSX
     目录           0  2016-10-28 10:37  __MACOSXCompleteSource21
     文件         120  2016-10-18 10:38  __MACOSXCompleteSource21._.DS_Store
     文件      211050  2016-06-05 08:17  CompleteSource21.edge
     文件      109890  2016-06-05 08:17  CompleteSource21.node
     文件         387  2005-02-14 15:23  CompleteSource21.project
     目录           0  2016-10-06 08:11  CompleteSource21.settings
     文件        4021  2016-09-26 11:54  CompleteSource21.settingsorg.eclipse.jdt.core.prefs
     文件      231797  2016-10-25 10:33  CompleteSource21data_edge.txt
     文件      112316  2016-10-25 10:33  CompleteSource21data_node.txt
     目录           0  2016-10-20 19:13  CompleteSource21drawables
     文件        6148  2016-09-22 16:22  CompleteSource21drawables.DS_Store
     目录           0  2016-10-28 10:37  __MACOSXCompleteSource21drawables
     文件         120  2016-09-22 16:22  __MACOSXCompleteSource21drawables._.DS_Store
     文件        9661  2016-10-20 19:13  CompleteSource21drawablesDrawable.class
     文件       14752  2003-08-20 16:51  CompleteSource21drawablesDrawable.java
     文件        3662  2016-10-20 19:13  CompleteSource21drawablesDrawableBitmap.class
     文件        4647  2003-08-12 13:39  CompleteSource21drawablesDrawableBitmap.java
     文件        3551  2016-10-20 19:13  CompleteSource21drawablesDrawableCircle.class
     文件        4065  2003-08-12 13:39  CompleteSource21drawablesDrawableCircle.java
     文件        7942  2016-10-20 19:13  CompleteSource21drawablesDrawableLine.class
     文件       11877  2003-08-19 19:55  CompleteSource21drawablesDrawableLine.java
     文件        6399  2016-10-20 19:13  CompleteSource21drawablesDrawableobject.class
     文件        8773  2003-09-03 20:11  CompleteSource21drawablesDrawableobject.java
     文件        8760  2016-10-20 19:13  CompleteSource21drawablesDrawableobjects.class
     文件       14266  2003-08-19 19:28  CompleteSource21drawablesDrawableobjects.java
     文件        5460  2016-10-20 19:13  CompleteSource21drawablesDrawableobjectsWithSearchTree.class
     文件        6859  2003-08-16 13:28  CompleteSource21drawablesDrawableobjectsWithSearchTree.java
............此处省略217个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)