ArcObject Java API 開發概述

2021-08-30 19:10:58 字數 1384 閱讀 5657

:twisted: 1.跨平台

保持平台的相容性,資料和路徑的名稱要以小寫字母表示,路徑要使用相對路徑。

2.inte***ces

arcobject中介面的命名統一以i開頭,介面的**類命名在介面名稱後加上proxy,如下命名:

inte***ce iarea: iunknown public inte***ce iarea{}

public class iareaproxy implements iarea{}

arcgis api 提供了兩種訪問物件的方式:

/* point實現了ipoint這個介面,採用向上轉型的方式生成物件 */

ipoint ipoint = new com.esri.arcgis.geometry.point();

/* 直接例項化 */

point cpoint = new point();

注意:不能通過預設的**類來訪問物件,如下面方式:

ipointproxy proxypoint = new ipointproxy();//錯3.classes

arcobject提供了三種類:abstract classes, classes, and coclasses,abstract classes不可例項化,coclasses也稱comclasses,可以直接例項化,classes不可以直接例項化。

classes 類可以作為coclasses屬性被建立,如下示例**:

iworkspacefactory wf = new shapefileworkspacefactory(); ifeatureworkspace fw = new ifeatureworkspaceproxy(wf.openfromfile("\path\to\data", 0) );

/* create a feature class from featureworkspace. */

ifeatureclass fc = fw.openfeatureclass("featureclass name");

4.methods that take out parameters

關於轉型的問題,arcgis api不允許向子類陣列中傳遞超類型別,即使該陣列已經被轉換為超類型別。 下面是正確的出傳遞方法:igeometry geoarray = ;

tin.interpolateshape(breakline, geoarray, null);

/* cast the first array element as a polyline. this is* the equivalent of calling queryinte***ce on igeometry.*/

ipolyline firstpolyline = new ipolylineproxy(geoarray[0]);

電信物聯網平台ctwing對接開發 平台概述

本課時幫助大家快速熟悉和了解中國電信物聯網平台 通用使能平台是中國電信傾力打造的智慧型終端匯聚 應用開發執行服務和輕量級應用提供的物聯網平台,旨在降低物聯網應用開發的准入門檻,降低智慧型硬體的接入門檻,提供端到端的解決方案,服務於終端開發商 個人極客開發者 能力提供商 應用開發商以及集團內部各生態圈...

Important Concepts(重要概念)

important concepts 重要概念 你應該理解 libjingle 中以下的重要概念 signals 訊號 threads and messages 執行緒 訊息 naming conventions 命名約定 ssl support ssl 支援 connections 鏈結 tran...

編寫DirectShow Filters 概述

seeker 一 介紹directshow filter開發 本章提供開發乙個自定義directshow filter的簡單框架描述,也提供了鏈結到更詳細討論這些任務的主題。在閱讀本章之前,閱讀在about directshow主題,它描述了全面的directshow構架。1.directshow基...