Monthly Archives: August 2014

“could not build module UIKit”问题的解决

在使用xcode5.1.1 编译代码的时候,偶尔会遇到”could not build module UIKit”的提示。 解决问题的方法是删除ModuleCache 文件夹: /Users/YOURUSERNAME/Library/Developer/Xcode/DerivedData/ModuleCache

iOS Leave a comment

spatialite使用空间索引

spatialite提供了R*tree索引。 spatialite的空间索引需要显式的调用,而不像postGIS等那样默认调用。spatialite的空间索引是基于sqlite的virtual table技术实现的。 要使用spatialite的空间索引,首先要创建SpatialIndex表 CREATE VIRTUAL TABLE SpatialIndex USING VirtualSpatialIndex(); 创建索引: SELECT CreateSpatialIndex(‘councils’,’Geometry’) 使用索引: SELECT c.Name AS Name, SUM(s.sales) AS “Total Sales” FROM councils AS c, stores AS s WHERE ST_Contains(c.Geometry, s.Geometry) AND s.ROWID IN (SELECT ROWID FROM SpatialIndex WHERE f_table_name=’stores’ AND search_frame=c.Geometry) GROUP BY c.pk_uid; 注意,空间索引的显式调用 s.ROWID IN (SELECT ROWID FROM SpatialIndex WHERE f_table_name=’stores’ […]

gis Leave a comment

在Swift中使用ArcGIS runtime for ios

1 首先在ArcGIS Runtime SDK for iOS的安装目录创建一个Modules/module.modulemap文件(默认在~/Library/SDKs/ArcGIS/iOS/ArcGIS.framework目录下) 文件内容如下·:  framework module ArcGIS { umbrella header “ArcGIS.h” export * module * { export * } } 可以使用下面的脚本进行创建: #!/bin/bash mkdir -p ~/Library/SDKs/ArcGIS/iOS/ArcGIS.framework/Modules/ echo ZnJhbWV3b3JrIG1vZHVsZSBBcmNHSVMgewogIHVtYnJlbGxhIGhlYWRlciAiQXJjR0lTLmgiCgogIGV4cG9ydCAqCiAgbW9kdWxlICogeyBleHBvcnQgKiB9Cn0K | base64 -D -o ~/Library/SDKs/ArcGIS/iOS/ArcGIS.framework/Modules/module.modulemap 2 在项目中使用 import UIKit import ArcGIS var tileUrl = “http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer” var nycZipsUrl = “http://services.arcgis.com/OfH668nDRN7tbJh0/arcgis/rest/services/NYC_ZipCodes/FeatureServer/0″ var zipCodeLayerName = “Zipcodes” class ViewController: UIViewController, […]

Uncategorized Leave a comment