关于Swift



          描述数据集

          public mapwork.swift.system.Layer CreateLayer(mapwork.swift.system.Parameters parameters)

          创建一个数据集的图层

          参数:

          parameters 创建图层参数

          返回:

          图层,失败时返回null

          public mapwork.swift.system.DataSource GetDataSource()

         获取数据集的数据源

          参数:

          返回:

          数据源

          public java.lang.String GetName()

          获取数据集名称

          参数:

          返回:

          数据集名称



          描述数据源

          public mapwork.swift.system.DataSet OpenDataSet(java.lang.String datasetname)

          打开一个数据集

          参数:

          Datasetname 数据集名称

          返回:

          数据集,失败返回null

          public java.lang.Boolean CreateDataSet(mapwork.swift.system.Parameters parameters)

          创建一个数据集

          参数:

          parameters 创建数据集的参数

          返回:

          是否成功创建

          public mapwork.swift.system.Parameters GetParameters()

          获取数据源的参数

          参数:

          返回:

          数据源的参数



         数据源工厂

         public DataSourceFactory()

         构造函数

         public static void RegisterAll(android.app.Activity activity)

         注册所有格式支持

         参数:

         activity android Activity

         返回:

         public mapwork.swift.system.DataSource CreateDataSource(mapwork.swift.system.Parameters parameters)

         生产一个数据源

         参数:

         parameters 数据源参数

         返回:

         数据源,失败返回null



          要素

         public void Delete()

          删除这个要素

         public void Save()

          保存这个要素

         public mapwork.swift.system.data.Data GetFieldValue(int fieldindex)

          获取要素数据

         参数:

          fieldindex 字段索引

         返回:

         值,失败返回null

         public void SetFieldValue(int fieldindex, mapwork.swift.system.data.Data data)

         设置要素数据

         参数:

         fieldindex 字段索引

         data 数据

         public mapwork.swift.geometry.Geometry GetGeometry()

         获取要素的图元

         参数:

         返回:

         图元,若要素无图元返回null

         public void SetGeometry(mapwork.swift.geometry.Geometry geometry)

         设置要素的图元

         参数:

         geometry 图元

         返回:



         要素游标

         public void MoveFirst()

         移动到游标起点

         public mapwork.swift.system.Feature MoveNext()

         取得下一个要素

         参数:

         返回:

         要素,如果已到达游标终点返回null



         要素类型的数据集

         public mapwork.swift.system.Feature NewFeature()

         新的要素

         参数:

         返回:

         要素

         public int GetFieldCount()

         获取要素集的字段数量

         public int GetFieldIndex(java.lang.String fieldname)

         通过字段名获取字段索引

         参数:

         fieldname 字段名

         返回:

         字段索引,如果要素数据集没有条件字段名返回-1

         public java.lang.String GetFieldName(int fieldindex)

         获取字段名

         参数:

         fieldindex 字段索引

         返回:

         字段名,字段索引超出字段数量时返回””

         public mapwork.swift.system.data.Data.DataType GetFieldType(int fieldindex)

         获取字段数据类型

         参数:

         fieldindex 字段索引

         返回:

         字段数据类型,字段索引超出字段数量时返回

         mapwork.swift.system.data.Data.DataType.DtKnown

         public mapwork.swift.coordinatesystem.CoordinateReferenceSystem GetCoordinateReferenceSystem()

         获取要素数据集的坐标系定义

         返回:

         坐标系定义,如果没定义坐标系返回null



         单要素集

         public void AddPoint(double x, double y, double z)

         向要素的图元中增加点

         public void SetDesc(java.lang.String desc)

         设置描述

         public java.lang.String GetDesc()

         获取描述



         要素数据源

         public java.lang.Boolean StartEdit()

         开始编辑

         返回:

         是否成功开始编辑

         public void SaveEdit()

         保存编辑

         public java.lang.Boolean IsStartEdit()

         获取是否开始编辑

         public void StartEditOperation()

         开始编辑命令

         public void StopEditOperation()

         结束编辑命令

         public java.lang.Boolean BackEditOperation()

         回滚一个编辑命令

         返回:

         是否回滚成功

         public java.lang.Boolean RepeatEditOperation()

         重复一个编辑命令

         返回:

         是否重复成功

         public int GetEditOperationCount()

         获取编辑命令数量



         要素标注渲染

         public FeatureLabelRenderType GetType()

         获取要素标注渲染类型{FLRTUnknown, FLRTPointLabelRender, FLRTLineLabelRender, FLRTPolygonLabelRender}



         线要素标注渲染

         public Boolean GetLinkSame()

         获取是否连接相同的标注.

         public void SetLinkSame(Boolean linksame)

         设置是否连接相同的标注

         public FeatureLineLabelRenderStyle GetStyle()

         获取样式{ FLLRSNormal, FLLRSAlong, FLLRSCharAlong}

         public void SetStyle(FeatureLineLabelRenderStyle style)

         设置样式.



         要素图层

         public GeometryDefine.KGeometryType GetGeometryType()

         获取几何类型

         public FeatureRender GetRender()

         获取渲染

         public void SetRender(FeatureRender render)

         设置渲染

         public QueryFilter GetQueryFilter()

         获取过滤

         public QueryFilter SetQueryFilter(QueryFilter queryfilter)

         设置过滤

         public void SetLabelExpression(String expression)

         设置标注字段

         public String GetLabelExpression()

         获取标注字段

         public void SetLabelWeight(int weight)

         设置标注权重

         public int GetLabelWeight()

         获取标注权重

         public void SetLabelVisibleScaleMin(double scale)

         设置标注最小显示比例

         public double GetLabelVisibleScaleMin()

         获取标注最小显示比例

         public void SetLabelVisibleScaleMax(double scale)

         设置标注最大显示比例

         public double GetLabelVisibleScaleMax()

         获取标注最大显示比例

         public void SetFeaturePointLabelRender(FeaturePointLabelRender render)

         设置点要素标注渲染

         public void SetFeatureLineLabelRender(FeatureLineLabelRender render)

         设置线要素标注渲染

         public void SetFeaturePolygonLabelRender(FeaturePolygonLabelRender render)

         设置面要素标注渲染

         public FeaturePointLabelRender GetFeaturePointLabelRender()

         获取点要素标注渲染

         public FeatureLineLabelRender GetFeatureLineLabelRender()

         获取线要素标注渲染

         public FeaturePolygonLabelRender GetFeaturePolygonLabelRender()

         获取面要素标注渲染





         图层渲染类

         public FeatureRenderType GetFeatureRenderType()

         获取渲染类型



         简单图层渲染类

         Paint SetPaint(Paint paint)

         设置喷绘器

         public Paint GetPaint()

         获取喷绘器



          分组图层渲染类

         public String GetFieldName()

         获取分组字段

         public Paint SetPaint(Paint paint)

         设置默认喷绘器

         public Paint GetPaint()

         获取默认喷绘器

         public Paint SetPaint(int index, Paint paint)

         通过索引设置喷绘器

         public Paint SetPaint(Data data, Paint paint)

         通过键值设置喷绘器

         public Paint GetPaint(int index)

         通过索引获得喷绘器

         public Paint GetPaint(Data data)

         通过键值获得喷绘器

         public Data GetData(int index)

         获取键值

         public void DeletePaint(int index)

         通过索引删除喷绘器

         public void DeletePaint(Data data)

         通过键值删除喷绘器

         public int GetIndex(Data data)

         获取键值索引



         图层类

         public LayerType GetType()

         获取图层类型

         public DataSet GetDataSet()

         获取数据集

         public Rectangle GetEnvelope()

         获取范围

         public String GetName()

         获取名称

         public void SetName(String name)

         设置名称

         public void SetVisible(Boolean visible)

         设置是否显示

         public Boolean GetVisible()

         获取是否显示

         public void SetVisibleScaleMin(double scale)

         设置最小显示比例

         public double GetVisibleScaleMin()

         获取最小显示比例

         public void SetVisibleScaleMax(double scale)

         设置最大显示比例

         public double GetVisibleScaleMax()

         获取最大显示比例



         地图类

         public CoordinateReferenceSystem GetCoordinateReferenceSystem()

         获取地图坐标系

         public CoordinateReferenceSystem SetCoordinateReferenceSystem(CoordinateReferenceSystem crs)

         设置地图坐标系

         public void AddLayer(Layer layer)

         添加图层

         public int GetLayerCount()

         获取图层数量

         public Layer GetLayer(int layerindex)

         获取图层

         public int GetLayerIndex(String layername)

         获取指定图层名称的索引

         public Boolean RemoveLayer(int layerindex)

         移除图层

         public Boolean MoveLayer(int fromindex, int toindex)

         移动图层



         数据查询过滤器

         public static QueryFilter CreateQueryFilter(String expression)

         通过语句创建数据查询过滤器



          栅格图层类

         public int GetRasterXSize()

         获取图幅x尺寸

         public int GetRasterYSize()

         获取图幅y尺寸



         设置类

         public static Boolean InitActivity(Activity activity)

         初始化

         public static void SetConfigOption(String key, String value)

         写入设置

         public static String GetConfigOption(String key, String defaultvalue)

         获取设置

         public static String CreateICPlain()

         得到设备号

         public static Boolean RegisterByICPlain(String plaincode)

         明码注册

         public static Boolean CreateICFile(String filepath)

         创建设备号文件

         public static void SetSnFilePath(String filepath)

         设置授权路径

         public static Boolean CheckSnActivation()

         授权是否有效

         public static void SetPlatformCharSet(String charset)

         设置平台字符编码

         public static int PixelToDip(android.content.Context context, int pixel)

         像素转换为dip

         public static int DipToPixel(android.content.Context context, int dip)

         dip转换为像素



         空间查询过滤器



          简单空间查询过滤器



         空间包含查询过滤器

         public SpatialFilterContain(mapwork.swift.geometry.Geometry geometry, Boolean becontained)



         空间相交查询过滤器

         public SpatialFilterIntersect(mapwork.swift.geometry.Geometry geometry)



         空间接近查询过滤器

         public SpatialFilterNear(mapwork.swift.geometry.Geometry geometry, double dist)



         复合空间查询过滤器

         public SpatialFilterComplex(SpatialFilter spatialfilter1, SpatialFilter spatialfilter2, Boolean join)



         地图控件

         public void BindTool(mapwork.swift.tools.ITool tool)

         绑定工具

         public void SetCurTool(mapwork.swift.tools.ITool tool)

         设置当前工具

         public mapwork.swift.system.Map SetMap(mapwork.swift.system.Map map)

         设置当前地图

         public mapwork.swift.system.Map GetMap()

         得到当前地图

         public void SetMapBackColor(int color)

         设置背景色

         public int GetMapBackColor()

         获取背景色

         public void RefreshMap()

         重绘地图(图层变化-增加、删除、修改图层数据的时候)

         public void invalidate()

         触发addDrawListener设置的监听(绘制临时点、线、面等)

         public void CenterAt(mapwork.swift.geometry.Point pt)

         设置中心点

         public mapwork.swift.geometry.Point GetCenter()

         获取中心点

         public mapwork.swift.geometry.Rectangle GetExtent()

         获取当前范围

         public mapwork.swift.geometry.Rectangle GetFullExtent()

         获取全图范围

         public void SetScale(double scale)

         设置比例

         public double GetScale()

         获取比例

         public void SetExtent(mapwork.swift.geometry.Rectangle rect)

         设置地图范围

         public mapwork.swift.geometry.Point FromPixel(int x, int y)

         像素转换为地图坐标

         public android.graphics.Point ToPixel(double x, double y)

         地图坐标转换为像素

         public void SetDodgeLabel(Boolean b)

         设置是否标注躲避

         public Boolean GetDodgeLabel()

         获取是否标注躲避

         public Boolean FromMWDOC(String docname)

         读取图档

         public Boolean ToMWDOC(String docname, Boolean overwrite)

         保存为图档



        坐标系类


        地理坐标系类


      投影坐标系类

      public mapwork.swift.geometry.Point ProjCal(mapwork.swift.geometry.Point pt, AngularUnit angular_unit, LinearUnit linear_unit)

      投影变换

      public mapwork.swift.geometry.Point ProjInvCal(mapwork.swift.geometry.Point pt, LinearUnit linear_unit, AngularUnit angular_unit)

      投影反变换


      7参数转换器工厂

      public void Reset()

      重置

      public void Add(double x, double y, double z, double x1, double y1, double z1)

      增加坐标对

      public CoordinateTransForm7 Produce()

      生产7参数转换器


      7参数转换器

      public mapwork.swift.geometry.Point TransForm(mapwork.swift.geometry.Point pt)

      坐标转换


      几何图形类

      public GeometryDefine GetGeometryDefine()

      获取几何定义

      public GeometrySpatialRelationType GetSpatialRelation(Geometry geo)

      获取两个几何图形的空间关系

      public Boolean IsContain(Geometry geo)

      是否包含

      public Boolean IsIntersect(Geometry geo)

      是否相交

      public static GeometryCollection Intersection(Geometry geometry1, Geometry geometry2)

      相交

      public static GeometryCollection Union(Geometry geometry1, Geometry geometry2)

      合并


      点

      public double GetDist(Geometry geo)

      计算距离

      public Point GetNearestPoint(Geometry geo)

      得到最近点

      public Boolean OnVector(Vector v)

      是否在线段上


      线

      public double GetLength()

      获取长度


       面

      public double Area()

      得到面积

      public void ClockWise(int segment)

      顺时针

      public Polygon Intersection(Polygon polygon)

      相交

      public GeometryCollection CutByPolyline(Polyline polyline)

      线切割


      几何定义

      public KGeometryType GetGeometryType()

      获取几何类型

      public double GetMinX()

      获取最小x

      public double GetMinY()

      获取最小y

      public double GetMaxX()

      获取最大x

      public double GetMaxY()

      获取最大y


      地图工具接口

      public boolean onTouchEvent(MotionEvent event, MapControl mapcontrol);

      触摸事件

      public void onMapControlDraw(Canvas canvas);

      地图控件刷新事件

      public Boolean ZoomByMultiTouchFirst();

      多点触控是否优先

      public int GetMapLeft();

      地图左边界在控件中的位置

      public int GetMapTop();

      地图上边界在控件中的位置

      public int GetMapWidth();

      地图宽度

      public int GetMapHeight();

      地图高度


       地图命令接口

      public void onCreate(MapControl mapcontrol);

      建立于地图控件

      public void excute();

      执行命令

mapwork.swift.system类包

mapwork.swift.controls类包

mapworkswift.coordinatesy

mapwork.swift.geometry类包

mapwork.swift.tools类包

 

 

               
Copyright © 2007-2018 沈阳开沃软件有限公司 版权所有
手机:+8613332420811 电话:+862423491067
Mapwork -地理信息系统