ArcGIS Pro SDK 公共设施网络
公共设施网络获取公共设施网络从表中获取公共设施网络1234567891011121314151617181920212223public static UtilityNetwork GetUtilityNetworkFromTable(Table table){ UtilityNetwork utilityNetwork = null; if (table.IsControllerDatasetSupported()) { // Tables can belong to multiple controller datasets, but at most one of them will be a UtilityNetwork IReadOnlyList<Dataset> controllerDatasets = table.GetControllerDatasets(); foreach (Dataset controllerDataset in controllerDatasets) { if (con ...
ArcGIS Pro SDK 共享
共享ArcGIS 项目管理器:获取当前活动门户12var active_portal = ArcGISPortalManager.Current.GetActivePortal();string uri = active_portal.PortalUri.ToString();
ArcGIS 项目管理器:获取所有门户的列表123var portals = ArcGISPortalManager.Current.GetPortals();//Make a list of all the Urisvar portalUris = portals.Select(p => p.PortalUri.ToString()).ToList();
ArcGIS 项目管理器:将门户添加到门户列表12var portalUri = new Uri("http://myportal.esri.com/portal/", UriKind.Absolute);ArcGISPortalManager.Current.AddPortal(portalUri);
ArcGIS 项目管理 ...
ArcGIS Pro SDK 地图探索
地图探索地图视图测试视图是否为 3D 视图1234567891011public bool IsView3D(){ //Get the active map view. var mapView = MapView.Active; if (mapView == null) return false; //Return whether the viewing mode is SceneLocal or SceneGlobal return mapView.ViewingMode == ArcGIS.Core.CIM.MapViewingMode.SceneLocal || mapView.ViewingMode == ArcGIS.Core.CIM.MapViewingMode.SceneGlobal;}
设置查看模式1234567891011public void SetViewingModeToSceneLocal(){ //Get the active map view. var mapView = MapView. ...
ArcGIS Pro SDK 地图创作-体素图层
地图创作-体素图层创建体素图层检查是否可以创建体素图层1234567//Map must be a local scenebool canCreateVoxel = (MapView.Active.ViewingMode == MapViewingMode.SceneLocal);if (canCreateVoxel){ //TODO - use the voxel api methods}
创建体素图层1234567891011121314151617181920212223242526272829//Must be on the QueuedTask.Run()//Must be a .NetCDF file for voxelsvar url = @"C:\MyData\AirQuality_Redlands.nc";var cim_connection = new CIMVoxelDataConnection(){ URI = url};//Create a VoxelLayerCreationParam ...
ArcGIS Pro SDK 地图创作
地图创作地图获取活动地图1Map map = MapView.Active.Map;
使用默认底图图层创建新地图12345await QueuedTask.Run(() =>{ var map = MapFactory.Instance.CreateMap(mapName, basemap: Basemap.ProjectDefault); //TODO: use the map...});
在工程中查找地图并将其打开123456789101112131415161718192021public static async Task<Map> FindOpenExistingMapAsync(string mapName){ return await QueuedTask.Run(async () => { Map map = null; Project proj = Project.Current; //Finding the first project item with name matc ...
ArcGIS Pro SDK 布局-报告
布局-报告报告项目项获取当前项目中的所有报表12345var projectReports = Project.Current.GetItems<ReportProjectItem>();foreach (var reportItem in projectReports){ //Do Something with the report}
获取特定报告12ReportProjectItem reportProjItem = Project.Current.GetItems<ReportProjectItem>().FirstOrDefault(item => item.Name.Equals(reportName));Report report = reportProjItem?.GetReport();
在新视图中打开报表项目项1234567891011//Open a report project item in a new view.//A report project item may exist but it may no ...
ArcGIS Pro SDK 布局
布局布局项目项参考布局项目项及其关联布局1234567891011//Reference layout project items and their associated layout.//A layout project item is an item that appears in the Layouts//folder in the Catalog pane.//Reference all the layout project itemsIEnumerable<LayoutProjectItem> layouts = Project.Current.GetItems<LayoutProjectItem>();//Or reference a specific layout project item by nameLayoutProjectItem layoutItem = Project.Current.GetItems<LayoutProjectItem>() ...
ArcGIS Pro SDK 图形图层
图形图层常规创建图形图层123456789101112131415161718192021222324var map = MapView.Active.Map;if (map.MapType != MapType.Map) return;// not 2Dvar gl_param = new GraphicsLayerCreationParams { Name = "Graphics Layer" };QueuedTask.Run(() =>{ //By default will be added to the top of the TOC var graphicsLayer = LayerFactory.Instance.CreateLayer<ArcGIS.Desktop.Mapping.GraphicsLayer>(gl_param, map); //Add to the bottom of the TOC gl_param.MapMemberIndex = -1; //bottom LayerFac ...
ArcGIS Pro SDK 地理处理
地理处理常规如何执行模型工具123456789101112// get the model tool's parameter syntax from the model's helpstring input_roads = @"C:\data\Input.gdb\PlanA_Roads"; string buff_dist_field = "Distance"; // use values from a field string input_vegetation = @"C:\data\Input.gdb\vegetation"; string output_data = @"C:\data\Output.gdb\ClippedFC2"; // the model name is ExtractVegetation string tool_path = @"C:\data\MB\Models.tbx\ExtractVeget ...
ArcGIS Pro SDK 几何
几何空间参考构造空间参考 - 从已知 ID123456789101112131415// Use a builder convenience method or use a builder constructor.// Builder convenience methods don't need to run on the MCT.SpatialReference sr3857 = SpatialReferenceBuilder.CreateSpatialReference(3857);// Builder constructors need to run on the MCT.ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>{ using (SpatialReferenceBuilder srBuilder = new SpatialReferenceBuilder(3857)) { // do something with the builder sr385 ...
ArcGIS Pro SDK 地理数据库
地理数据库地理数据库和数据存储打开给定路径的文件地理数据库123456789101112131415161718192021public async Task OpenFileGDB(){ try { await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() => { // Opens a file geodatabase. This will open the geodatabase if the folder exists and contains a valid geodatabase. using ( Geodatabase geodatabase = new Geodatabase(new FileGeodatabaseConnectionPath(new Uri(@"C:\Data\LocalGovernment.gdb")))) { // Use ...
ArcGIS Pro SDK 编辑
编辑编辑操作方法编辑操作创建要素123456789101112131415161718192021222324252627var createFeatures = new EditOperation();createFeatures.Name = "Create Features";//Create a feature with a polygonvar token = createFeatures.Create(featureLayer, polygon);if (createFeatures.IsSucceeded){ // token.ObjectID wll be populated with the objectID of the created feature after Execute has been successful}//Do a create features and set attributesvar attributes = new Dictionary<string, object>();attribu ...
ArcGIS Pro SDK 核心主机
核心主机初始化核心主机1234567891011121314151617181920212223242526272829303132333435using ArcGIS.Core.Data;//There must be a reference to ArcGIS.CoreHost.dllusing ArcGIS.Core.Hosting;class Program { //[STAThread] must be present on the Application entry point [STAThread] static void Main(string[] args) { //Call Host.Initialize before constructing any objects from ArcGIS.Core try { Host.Initialize(); } catch (Exception e) { / ...
ArcGIS Pro SDK 内容
内容项目创建一个空项目123//Create an empty project. The project will be created in the default folder//It will be named MyProject1, MyProject2, or similar...await Project.CreateAsync();
创建具有指定名称的新项目12345678//Settings used to create a new projectCreateProjectSettings projectSettings = new CreateProjectSettings(){ //Sets the name of the project that will be created Name = @"C:\Data\MyProject1\MyProject1.aprx"};//Create the new projectawait Project.CreateAsync(projectSettings);
使用 Pro ...
ArcGIS Pro SDK 框架
框架如何在停靠窗格可见或隐藏时订阅和取消订阅事件1234567891011121314151617181920private SubscriptionToken _eventToken = null;// Called when the visibility of the DockPane changes.protected override void OnShow(bool isVisible){ if (isVisible && _eventToken == null) //Subscribe to event when dockpane is visible { _eventToken = MapSelectionChangedEvent.Subscribe(OnMapSelectionChangedEvent); } if (!isVisible && _eventToken != null) //Unsubscribe as the dockpane closes. { MapSel ...
MySQL Explain详解
MySQL Explain详解在日常工作中,我们会有时会开慢查询去记录一些执行时间比较久的SQL语句,找出这些SQL语句并不意味着完事了,些时我们常常用到explain这个命令来查看一个这些SQL语句的执行计划,查看该SQL语句有没有使用上了索引,有没有做全表扫描,这都可以通过explain命令来查看。所以我们深入了解MySQL的基于开销的优化器,还可以获得很多可能被优化器考虑到的访问策略的细节,以及当运行SQL语句时哪种策略预计会被优化器采用。
1234-- 实际SQL,查找用户名为Jefabc的员工select * from emp where name = 'Jefabc';-- 查看SQL是否使用索引,前面加上explain即可explain select * from emp where name = 'Jefabc';
expain出来的信息有10列,分别是id、select_type、table、type、possible_keys、key、key_len、ref、rows、Extra
概要描述:id:选择标识符select_t ...
MySQL 存储过程
MySQL存储过程1.1 CREATE PROCEDURE (创建)12345678910111213141516CREATE PROCEDURE 存储过程名 ( 参数列表 )BEGIN SQL语句代码块END# 注意:# 由括号包围的参数列必须总是存在。如果没有参数,也该使用一个空参数列()。每个参数默认都是一个IN参数。要指定为其它参数,可在参数名之前使用关键词 OUT或INOUT# 在mysql客户端定义存储过程的时候使用delimiter命令来把语句定界符从;变为//。# 当使用delimiter命令时,你应该避免使用反斜杠(‘"’)字符,因为那是MySQL的转义字符。# 如:delimiter //CREATE PROCEDURE simpleproc (OUT param1 INT)BEGIN SELECT COUNT(\*) INTO param1 FROM t;END//# Query OK, 0 rows affected (0.00 sec)
1.2 ALTER PROCEDURE (修改)12ALTER PROCEDURE 存储过 ...
C# OleDB 操作 MDB 数据库
1 新建数据库1234567891011121314string path = AppDomain.CurrentDomain.BaseDirectory + "\\test.mdb";ADOX.CatalogClass catalog = new ADOX.CatalogClass();try{ string connectionStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + ";Jet OLEDB:Database Password=admin123;Jet OLEDB:Engine Type=5;"; object v = catalog.Create(connectionStr); //OleDbConnection conn = new OleDbConnection(connectionStr); //conn.Open(); //conn.Close();}catch(Exception ...
Typora
1 安装Typora v1.2.42 替换 app.asar 文件下载链接
3 输入任意邮箱号与序列号邮箱随便输入一个即可,然后复制下面的序列号(序列号也可参考破解补丁),粘贴进输入框:
序列号:E8Q9Y5-KXMTL5-7578SL-4S5XKS4S5XKS
SQL总结
1 基础1.1 创建数据库1CREATE DATABASE 数据库名
1.2 删除数据库1DROP DATABASE 数据库名
1.3 备份sql server12345--- 创建 备份数据的 deviceUSE masterEXEC sp_addumpdevice 'disk', 'testBack', 'c:\mssql7backup\MyNwind_1.dat'--- 开始 备份BACKUP DATABASE pubs TO testBack
1.4 创建表1CREATE TABLE 表名(字段名1 字段类型1 [not null] [primary key],字段名2 字段类型2 [not null],..)
根据已有的表创建新表:
123--- 使用旧表创建新表CREATE TABLE 新表名 LIKE 旧表名 CREATE TABLE 新表名 AS SELECT 字段名1,字段名2… from 旧表名 definition only
1.5 删除表1DROP TABLE 表名
1.6 增加列1A ...
数据库根据已有表创建新表
根据已有表创建新表通用123create table tb(id serial, name varchar(10));insert into tb(name) values('a'),('b'),('c');create table tb2 as select * from tb;
PG12select * into tb3 from tb;create table tb4 (like tb); --只创建表结构
��
Spring Boot 注解大全
1、@SpringBootApplication
一般不会主动去使用它,但是要知道它是一个组合注解,@Configuration 、@EnableAutoConfiguration 、@ComponentScan 注解的集合。
2、@Configuration
用@Configuration注释类表明是一个配置类,允许在 Spring 上下文中注册额外的 bean 或导入其他配置类。
3、@EnableAutoConfiguration
该注解就是用来开启自动配置的,自动配置原理 —> 【跳转】
4、@ComponentScan
@ComponentScan用于类或接口上主要是指定扫描路径,spring会把指定路径下带有指定注解的类自动装配到bean容器里。会被自动装配的注解包括@Controller、 @Service、@Component、@Repository等等。其作用等同于<context:component-scan base-package=”com.xxx.xxx” />配置。
5、@Autowired、@Qualifier
@ ...