ArcMobileTool

本文介绍了一个基于ArcGIS Mobile的地图查询工具类,该工具提供多种方法来检索地图中的特征数据,包括根据矩形区域、SQL语句条件等进行查询。

using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using ESRI.ArcGIS.Mobile;

namespace USTC
{
    public class ArcMobileTool
    {
        private ESRI.ArcGIS.Mobile.Map map1;
        public ArcMobileTool(Map map)
        {
            this.map1 = map;
        }

        ///


        /// 得到矩形区域内的包含所选图层的图元
        ///

        /// 所选图层
        /// 矩形左上点
        /// 矩形右下点
        ///
        public FeatureLayerDataTable GetFeature(FeatureLayer featureLayer, Coordinate m_startCoordinate, Coordinate m_endCoordinate)
        {
            Envelope envelope = new Envelope(m_startCoordinate, m_endCoordinate);
            // Retrieves the first layer in the map
            //FeatureLayer featureLayer = map1.MapLayers[0].Layer as FeatureLayer;

            if (featureLayer == null)
                return null;
            // Creates a instance of a query filter. Query filter uses the dragged map rectangle and
            // it will search for all features in layer index = 0, that are contained in this geometry.
            QueryFilter spatialQueryFilter = new QueryFilter(envelope, EsriGeometricRelationship.Contain);

            // Querying the feature layer
            FeatureLayerDataTable featureLayerDataTable = featureLayer.GetDataTable(spatialQueryFilter);

            return featureLayerDataTable;

        }

        public FeatureDataReader GetDataReader(FeatureLayer featureLayer, Coordinate m_startCoordinate, Coordinate m_endCoordinate)
        {
            Envelope envelope = new Envelope(m_startCoordinate, m_endCoordinate);
            // Retrieves the first layer in the map
            //FeatureLayer featureLayer = map1.MapLayers[0].Layer as FeatureLayer;

            if (featureLayer == null)
                return null;
            // Creates a instance of a query filter. Query filter uses the dragged map rectangle and
            // it will search for all features in layer index = 0, that are contained in this geometry.
            QueryFilter spatialQueryFilter = new QueryFilter(envelope, EsriGeometricRelationship.Contain);
            // Querying the feature layer
            FeatureDataReader featureLayerDataTable = featureLayer.GetDataReader(spatialQueryFilter, null);
            return featureLayerDataTable;
            /*
                        *  while (reader.Read())
                             {
                         // Retrieves the feature抯 geometry
                            geometry = reader.GetGeometry();

                          if (geometry != null)
                           // If geometry is valid, the map will rendered once for 100 milliseconds.
                             map1.FlashGeometry(Pens.Red, (SolidBrush)Brushes.Yellow, 15, 100, 1, geometry);
                               }

                        */
        }

      ///


      /// 根据SQL语句的WHERE条件查询
      ///

        /// 所选图层
      /// where条件
      ///
        public FeatureLayerDataTable GetFeature(FeatureLayer featureLayer, string whereClause)
        {
            if (featureLayer == null)
                return null;

            // Creates a where clause string.
            // Use % or * to find a string that contains an a character
            //string whereClause = featureLayer.DisplayColumnName + " like '%a%'";

            // Creates a instance of a query filter. Query filter uses the dragged map rectangle and
            // it will search for all features in layer index = 0, that are contained in this geometry.
            QueryFilter queryFilter = new QueryFilter(whereClause, true);

            // Querying the feature layer
            FeatureLayerDataTable featureLayerDataTable = featureLayer.GetDataTable(queryFilter);

            return featureLayerDataTable;

        }

        public FeatureDataReader GetDataReader(FeatureLayer featureLayer, string whereClause)
        {
            if (featureLayer == null)
                return null;

            QueryFilter queryFilter = new QueryFilter(whereClause, true);

            Geometry geometry = null;

            // Querying the feature layer
            FeatureDataReader reader = featureLayer.GetDataReader(queryFilter, null);
            return reader;
            /*
             *  while (reader.Read())
                  {
              // Retrieves the feature抯 geometry
                 geometry = reader.GetGeometry();

               if (geometry != null)
                // If geometry is valid, the map will rendered once for 100 milliseconds.
                  map1.FlashGeometry(Pens.Red, (SolidBrush)Brushes.Yellow, 15, 100, 1, geometry);
                    }

             */
        }

        ///


        /// 创建点
        ///

        ///
        ///
        public Point CreatePoint(double dx, double dy)
        {
            // Creates a new instance of a Point using some lat/lon coordinates
            // Latitud value
            //double dx = 34.058247;
            // Longitud value
            //double dy = -117.198104;
            // Converts a WSD84 coordinate to a Mobile coordinate
            Coordinate coordinate = map1.MapCache.SpatialReference.Wgs84ToMobileGeometry(dx, dy);
            // Creates a new instance of a point at a given coordinate
            ESRI.ArcGIS.Mobile.Point m_point = new ESRI.ArcGIS.Mobile.Point(coordinate);
            return m_point;
        }

    }
}

根据原作 https://pan.quark.cn/s/459657bcfd45 的源码改编 Classic-ML-Methods-Algo 引言 建立这个项目,是为了梳理和总结传统机器学习(Machine Learning)方法(methods)或者算法(algo),和各位同仁相互学习交流. 现在的深度学习本质上来自于传统的神经网络模型,很大程度上是传统机器学习的延续,同时也在不少时候需要结合传统方法来实现. 任何机器学习方法基本的流程结构都是通用的;使用的评价方法也基本通用;使用的一些数学知识也是通用的. 本文在梳理传统机器学习方法算法的同时也会顺便补充这些流程,数学上的知识以供参考. 机器学习 机器学习是人工智能(Artificial Intelligence)的一个分支,也是实现人工智能最重要的手段.区别于传统的基于规则(rule-based)的算法,机器学习可以从数据中获取知识,从而实现规定的任务[Ian Goodfellow and Yoshua Bengio and Aaron Courville的Deep Learning].这些知识可以分为四种: 总结(summarization) 预测(prediction) 估计(estimation) 假想验证(hypothesis testing) 机器学习主要关心的是预测[Varian在Big Data : New Tricks for Econometrics],预测的可以是连续性的输出变量,分类,聚类或者物品之间的有趣关联. 机器学习分类 根据数据配置(setting,是否有标签,可以是连续的也可以是离散的)和任务目标,我们可以将机器学习方法分为四种: 无监督(unsupervised) 训练数据没有给定...
本系统采用微信小程序作为前端交互界面,结合Spring Boot与Vue.js框架实现后端服务及管理后台的构建,形成一套完整的电子商务解决方案。该系统架构支持单一商户独立运营,亦兼容多商户入驻的平台模式,具备高度的灵活性与扩展性。 在技术实现上,后端以Java语言为核心,依托Spring Boot框架提供稳定的业务逻辑处理与数据接口服务;管理后台采用Vue.js进行开发,实现了直观高效的操作界面;前端微信小程序则为用户提供了便捷的移动端购物体验。整套系统各模块间紧密协作,功能链路完整闭环,已通过严格测试与优化,符合商业应用的标准要求。 系统设计注重业务场景的全面覆盖,不仅包含商品展示、交易流程、订单处理等核心电商功能,还集成了会员管理、营销工具、数据统计等辅助模块,能够满足不同规模商户的日常运营需求。其多店铺支持机制允许平台方对入驻商户进行统一管理,同时保障各店铺在品牌展示、商品销售及客户服务方面的独立运作空间。 该解决方案强调代码结构的规范性与可维护性,遵循企业级开发标准,确保了系统的长期稳定运行与后续功能迭代的可行性。整体而言,这是一套技术选型成熟、架构清晰、功能完备且可直接投入商用的电商平台系统。 资源来源于网络分享,仅用于学习交流使用,请勿用于商业,如有侵权请联系我删除!
考虑实时市场联动的电力零售商鲁棒定价策略(Matlab代码实现)内容概要:本文围绕“考虑实时市场联动的电力零售商鲁棒定价策略”展开,提出了一种基于鲁棒优化的电力零售定价模型,旨在应对电力市场中可再生能源出力不确定性及实时市场价格波动带来的风险。通过构建两阶段鲁棒优化模型,结合风光出力场景生成与负荷聚类分析,充分考虑了电力零售商在日前市场与实时市场之间的互动关系,实现了在不确定环境下的最优定价与购电决策。文中采用Matlab进行仿真验证,展示了所提策略在提升零售商利润稳定性与风险抵御能力方面的有效性。; 适合人群:具备一定电力系统基础知识和优化理论背景,熟悉Matlab编程,从事电力市场、能源管理、智能电网等相关领域研究的研究生、科研人员及行业工程师。; 使用场景及目标:①用于电力零售商在不确定性环境下制定稳健的定价与购电策略;②为电力市场风险管理、需求响应建模及新能源集成提供技术支持与仿真工具;③支撑学术研究中对鲁棒优化、场景生成、主从博弈等方法的应用与复现。; 阅读建议:建议结合文中提供的Matlab代码进行实践操作,重点关注模型构建逻辑、场景生成方法与求解算法实现,宜配合YALMIP等优化工具包进行调试与扩展,以深入理解鲁棒优化在电力市场决策中的实际应用。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值