arcgis

chunk a text database into N equal blocks and retain header

别等时光非礼了梦想. 提交于 2019-12-02 05:09:31
问题 I have several large (30+ million lines) text databases which I am cleaning up with the following code, I need to split the file into 1 million lines or less and retain the header line. I have looked at chunk and itertools but can't get a clear solution. It is to use in an arcgis model. == updated code as per response from icyrock.com import arcpy, os #fc = arcpy.GetParameter(0) #chunk_size = arcpy.GetParameter(1) # number of records in each dataset fc='input.txt' Name = fc[:fc.rfind('.')] fl

split a large text (xyz) database into x equal parts

蹲街弑〆低调 提交于 2019-12-02 04:15:23
问题 I want to split a large text database (~10 million lines). I can use a command like $ sed -i -e '4 s/(dB)//' -e '4 s/Best\ unit/Best_Unit/' -e '1,3 d' '/cygdrive/c/ Radio Mobile/Output/TRC_TestProcess/trc_longlands.txt' $ split -l 1000000 /cygdrive/P/2012/Job_044_DM_Radio_Propogation/Working/FinalPropogation/TRC_Longlands/trc_longlands.txt 1 The first line is to clean the databse and the next is to split it - but then the output files do not have the field names. How can I incorporate the

split a large text (xyz) database into x equal parts

流过昼夜 提交于 2019-12-02 02:18:44
I want to split a large text database (~10 million lines). I can use a command like $ sed -i -e '4 s/(dB)//' -e '4 s/Best\ unit/Best_Unit/' -e '1,3 d' '/cygdrive/c/ Radio Mobile/Output/TRC_TestProcess/trc_longlands.txt' $ split -l 1000000 /cygdrive/P/2012/Job_044_DM_Radio_Propogation/Working/FinalPropogation/TRC_Longlands/trc_longlands.txt 1 The first line is to clean the databse and the next is to split it - but then the output files do not have the field names. How can I incorporate the field names into each dataset and pipe a list which has the original file, new file name and line numbers

chunk a text database into N equal blocks and retain header

被刻印的时光 ゝ 提交于 2019-12-02 01:41:33
I have several large (30+ million lines) text databases which I am cleaning up with the following code, I need to split the file into 1 million lines or less and retain the header line. I have looked at chunk and itertools but can't get a clear solution. It is to use in an arcgis model. == updated code as per response from icyrock.com import arcpy, os #fc = arcpy.GetParameter(0) #chunk_size = arcpy.GetParameter(1) # number of records in each dataset fc='input.txt' Name = fc[:fc.rfind('.')] fl = Name+'_db.txt' with open(fc) as f: lines = f.readlines() lines[:] = lines[3:] lines[0] = lines[0]

ArcGIS API for JavaScript小白入门

空扰寡人 提交于 2019-12-01 22:18:08
简单理解就是:通过js调用arcgis相关的方法和通过html引入css等资源来展示地图,代码如下: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport"> <title>Intro to MapView - Create a 2D map - 4.8</title> <style> //设置显示区域的样式,地图全页面展示 html, body, #viewDiv { padding: 0; margin: 0; height: 100%; width: 100%; } </style> // 第一步:引入js文件和css样式表,本文使用了4.9版本 <link rel="stylesheet" href="https://js.arcgis.com/4.9/esri/css/main.css"> <script src="https://js.arcgis.com/4.9/"></script> //开始使用编辑js,实现加载地图效果 <script> // 第二步,导入需要的模块,这里引入了Map和MapView require([ "esri/Map", "esri/views/MapView" ], function(Map, MapView) { // 第三步

介绍ArcGIS中各种数据的打开方法——tin(栅格文件)

烂漫一生 提交于 2019-12-01 22:17:06
4、加载栅格文件 栅格数据是GIS中重要的数据源之一,如 卫星图像 、 扫描的地图 、 照片 等。 栅格数据常见的格式有Bmp、Tiff、Jpg、Grid等。 添加栅格数据主要使用Rasterlayer 组件类,以及IMap、ILayer、IRasterLayer接口等。Rasterlayer组件类实现了ILayer、IRasterlayer、TTable、IDataset等接口,主要用于栅格数据的打开、显示、操作状态等设置。 介绍一种 打开栅格文件的方法 核心代码: #region 添加TIN数据 private void 添加TIN数据toolStripLabel1_Click(object sender, EventArgs e) { //方法: AddTinFile(); } /// <summary> /// 加载栅格图层 /// </summary> private void AddTinFile() { this.Cursor = Cursors.WaitCursor; IWorkspaceFactory pWorkspaceFactory = new TinWorkspaceFactoryClass(); IWorkspace pWorkspace = pWorkspaceFactory.OpenFromFile(m_Path, 0); ITinWorkspace

介绍ArcGIS中各种数据的打开方法——mdb(个人数据库)

旧时模样 提交于 2019-12-01 22:15:18
3、打开存储在Access GeoDatabase的要素类 使用工作空间打开一个Access库中的一个要素类。 private void OpenWorkspaceFromFileAccess(string clsName, string DBPath) 定义函数OpenWorkspaceFromFileAccess,输入参数包括要素类名和该数据库文件所在的路径,返回值为打开该要素类获得的要素对象FeatureClass。 介绍一种 方法 #region 打开个人数据库中的要素 private void 打开个人数据库中的要素toolStripLabel2_Click(object sender, EventArgs e) { //方法: AddMDBFile(); } /// <summary> /// 方法:使用工作空间打开一个Access库中的一个要素类 /// </summary> private void AddMDBFile() { OpenFileDialog ofd = new OpenFileDialog(); ofd.Title = "打开个人数据库"; ofd.Filter = "Personal GDB(*.mdb)|*.mdb"; ofd.InitialDirectory = m_Path; if (ofd.ShowDialog() !=

介绍ArcGIS中各种数据的打开方法——shp(矢量文件)

淺唱寂寞╮ 提交于 2019-12-01 22:14:22
2、加载shp文件到地图控件 ShapeFile是一种矢量数据模型的计算机数据组织文件,用于在计算机上表达 矢量数据的计算机文件 。 加载ShapeFile文件最主要是:axMapControll控件对象所携带的AddShapeFile方法和Addlayer方法。 介绍两种 加载shp文件的方法 方法一:使用axMapControl1对象的AddShapeFile方法加载ShapeFile文件 //path——为shp文件的路径目录,fileName——不带后缀的文件名 axMapControl1.AddShapeFile(path, fileName); 方法二:使用axMapControl1对象的AddLayer方法加载ShapeFile文件 //调用AddLayer方法添加shp图层 this.axMapControl1.AddLayer(pFLayer as ILayer); 方法二添加shp文件需要用到Map、Dataset、FeatureLayer和FeatureClass等对象。这些对象一般用到的主要接口有IMap、IActiveView、IDataset、IFeatureLayer和IFeatureClass等。 小提示: IWorkspaceFactory 需要引用 using ESRI.ArcGIS.Geodatabase;

解决VS2017授权问题及没有Add ArcGIS License Checking问题

为君一笑 提交于 2019-12-01 21:38:35
内容源自:ArcGIS Engine+C#入门经典 老版本采用: 控件布局好后,需要对程序添加License许可。在Visual Studio的菜单栏上单击“项目”→单击“Add ArcGIS License Checking”,选择“ArcGIS Engine”,单击“OK”确认完成。 ​ 新版本采用: ​ 将AxLicenseControl拖到界面的任意位置,设置其“属性”(新版本和老版本在这里之后一致) ​ 授权时也需注意: ArcGIS的License中“产品”是不支持多选的,当多选时系统默认选择第一项,所以要根据需要进行单选。 这时仍会报错, ​ 我们需要在Program.cs中添加,以下代码: ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop); ​ 即可使用! ​ 来源: https://www.cnblogs.com/edcoder/p/11717601.html

地图js技术调研

三世轮回 提交于 2019-12-01 20:50:36
地图数据格式规范:geojson http://geojson.org/ 类型包括 Point , LineString , Polygon , MultiPoint , MultiLineString , and MultiPolygon等 geojson 1 2 3 4 5 6 7 8 9 10 { "type" : "Feature" , "geometry" : { "type" : "Point" , "coordinates" : [125.6, 10.1] }, "properties" : { "name" : "Dinagat Islands" } } 地图自定义方面,百度地图要优于高德, http://developer.baidu.com/map/custom/ 通过在线编辑器可以对地图背景、道路等要素进行自定义 百度mapv,数据可视化 http://nikai.us/weblog/map-visualization/ (待完善) 3d地图可视化,目前国内的地图开放平台还没有3d视图,智能在2d上做3d视觉转换 需要对2d->3d显示做相关调研 (基于地图的可视化组件cesium http://cesiumjs.org/ ) name link api intro demo 3d vpn open source OpenLayers /api