收藏 分销(赏)

地理信息系统开发工具GISDK使用手册英文版第二部分CallingGISDKFunctionsdoc资料.doc

上传人:丰**** 文档编号:4055225 上传时间:2024-07-26 格式:DOC 页数:165 大小:1.68MB
下载 相关 举报
地理信息系统开发工具GISDK使用手册英文版第二部分CallingGISDKFunctionsdoc资料.doc_第1页
第1页 / 共165页
地理信息系统开发工具GISDK使用手册英文版第二部分CallingGISDKFunctionsdoc资料.doc_第2页
第2页 / 共165页
地理信息系统开发工具GISDK使用手册英文版第二部分CallingGISDKFunctionsdoc资料.doc_第3页
第3页 / 共165页
地理信息系统开发工具GISDK使用手册英文版第二部分CallingGISDKFunctionsdoc资料.doc_第4页
第4页 / 共165页
地理信息系统开发工具GISDK使用手册英文版第二部分CallingGISDKFunctionsdoc资料.doc_第5页
第5页 / 共165页
点击查看更多>>
资源描述

1、此文档收集于网络,如有侵权请联系网站删除1 Common Calling Conventions31.1 Passing Null to Represent a Default Value41.2 Identifying Maps, Layers, and Selection Sets41.3 Identifying Views and Sets51.3 Identifying Fonts51.4 Identifying Windows61.5 Identifying Fields61.6 Using Boolean Values61.7 Using Options Arrays62 Usin

2、g GISDK Functions72.1 Windows82.1.1 Creating Windows92.1.2 Working with Windows102.1.3 Closing Windows112.1.4 Attaching Menus and Toolbars122.1.5 Window Macros122.1.6 Window Macros - An Example132.1.7 Saving and Loading Windows152.2 Maps172.2.1 Creating Maps182.2.2 Maps and Layers212.2.3 Layer Style

3、s and Settings262.2.4 User Interaction312.2.5 Themes322.2.6 Freehand Items (Annotations)372.2.7 Selection Sets382.2.8 Legends402.3 Geographic Data and Analysis412.3.1 Feature Coordinates412.3.2 Adding, Editing, and Deleting Features422.3.3 Importing and Exporting Geographic Data422.3.4 Working with

4、Geographic Files432.3.5 Spatial Analysis442.3.6 Triangulated Irregular Networks (TINs)462.4 Tables, Views, and Editors462.4.1 Tables and Views472.4.2 Editors492.4.3 Views, Layers, and Joined Views522.4.4 Reading and Writing Data572.4.5 Reading and Writing from Several Views642.4.6 Adding or Deleting

5、 Records652.4.7 Creating and Modifying Tables662.4.8 ODBC and Oracle Tables662.5 Networks672.5.1 Creating and Manipulating Networks682.5.2 Reading Information from a Network702.5.3 Networks and Network Settings712.5.4 Selecting Segments722.5.5 Updating a Network722.5.6 Solving Shortest Paths732.6 Ro

6、ute Systems752.6.1 Creating and Maintaining Route Systems762.6.2 Adding, Editing and Deleting Routes762.6.3 Getting Information About Routes and Stops772.6.4 Utility Functions for Developing Routes772.6.5 Route Display Settings772.6.6 Mileposts and Milepost Layers782.7 Matrices787.1 Creating and Man

7、aging Matrices797.2 Working with Matrix Editors847.3 Reading and Writing Matrix Data857.4 Working with Matrices877.5 User Interface Programming887.6 Math, String, and Array Manipulation947.7 Timers and Stopwatches977.8 Slide Shows & Snapshots987.9 Printing & Layouts997.10 Interprocess Communication1

8、013Using Projections and Coordinate Systems102Calling GISDK FunctionsThere are hundreds of GISDK functions that you can use to create maps, perform spatial analysis, and build custom applications. This section describes the common calling conventions, summarizes the GISDK functions by topic, and des

9、cribes them in detail alphabetically. There is also a discussion of how to use projections and coordinate systems.For more information, see.Common Calling Conventions Using GISDK Functions Using Projections and Coordinate Systems Listing of GISDK Functions 1 Common Calling ConventionsThis part of th

10、e on-line help identifies some common calling conventions that are shared by many GISDK functions.Function names begin with a verb, except:Some functions that would begin with Create and that return the named object have the Create dropped; for example, what would be CreateCircle() is just Circle()F

11、unctions that would begin with Convert or Compute have that dropped as well; for example, what would be ConvertRealToInt() is just RealToInt()Boolean functions take the form of a declaration rather than a command, such as CoordInMap()In addition, the following abbreviations are used:TermAbbreviation

12、IntegerIntGeographyGeoMinimumMinMaximumMaxDatabaseDB (for geographic files only)Dialog BoxDboxDescriptionDescInformationInfoFor more information, see.Passing Null to Represent a Default ValueIdentifying Maps, Layers, and Selection SetsIdentifying Views and SetsIdentifying FontsIdentifying WindowsIde

13、ntifying FieldsUsing Boolean ValuesUsing Options Arrays1.1 Passing Null to Represent a Default ValueMany GISDK functions interpret a null value for an argument to indicate that a default value should be used. For example, most GISDK functions that take a map name as an argument interpret null to mea

14、n the current map. The same applies to GISDK functions that take an editor name, a layout name, or a layer name. GISDK functions that affect display characteristics interpret null to mean no change. For example, calling SetIconColor() on a selection set with a null value for the color indicates that

15、 the color of features in the set should not be changed from the default for the layer.1.2 Identifying Maps, Layers, and Selection SetsGISDK functions that change layer styles accept several types of strings that identify the map, layer, and selection set to be modified. These strings use a vertical

16、 bar to separate the different parts of the string. Any of the following is acceptable:Syntax. What it means.mapname|layername|setnameModify the style of features in the named map, layer, and selection set layername|setnameModify the style of features in the named layer and selection set in the curr

17、ent mapsetnameModify the style of features in the named selection set for the current layer in the current map layername|Modify the style of features in the named layer in the current map nullModify the style of features in the current layer in the current mapA similar set of options is available fo

18、r setting the style of a theme class. The following are acceptable:Syntax. What it means.layername|themename|class_idModify the style of features in the named layer, theme and class themename|class_idModify the style of features in the named theme and class on the current layerSome display character

19、istics affect an entire layer and cannot be used on individual selection sets. For example, SetLayerVisibility() determines whether a layer is drawn in a map or not. For layer-wide display GISDK functions, you specify the map and layer you are changing in one of three ways:Syntax. What it means.mapn

20、ame|layernameModify the named layer in the named map layernameModify the named layer in the current map nullModify the current layer in the current map1.3 Identifying Views and SetsMany GISDK functions work with views and sets. For example, GetFirstRecord() gets the first record in a particular set

21、in a particular view. You specify which view and set you are using with a string that can have one of four formats:Syntax. What it means.viewname|setnameThe named view and selection setsetnameThe named selection set in the current viewviewname|All records in the named viewnullAll records in the curr

22、ent view 1.3 Identifying FontsSome GISDK functions require a font as an argument. In Caliper Script, a font specification is a string of the form:font_family_name|font_sizefont_family_name|Bold|font_sizefont_family_name|Italic|font_sizefont_family_name|Bold|Italic|font_sizeFont sizes are expressed i

23、n points and can be real numbers, as in Times New Roman|Bold|17.5. Font family names must exactly match the names returned by GetFontNames().1.4 Identifying WindowsWhen you call a GISDK function that can be used on all types of windows (e.g., MinimizeWindow(), you must specify the window type as wel

24、l as the window name, as in Map|My First Map or Editor|Sales Data. To use one of these GISDK functions with the TransCAD program window, call the GISDK function with Frame| as the argument (e.g., MaximizeWindow(Frame|).1.5 Identifying FieldsAs described in more detail in Tables and Views, GISDK uses

25、 both field names and field specs (specifications) to identify fields in a view. Some GISDK functions require field names, while others require field specs. In general, GISDK functions that operate on a single view (e.g., GetFirstRecord() take field names. GISDK functions that operate on a layer (e.

26、g., CreateTheme() or on any view (e.g., JoinViews() take field specs. Refer to the documentation of an individual GISDK function to determine whether it takes field names or field specs.1.6 Using Boolean ValuesMany GISDK functions take boolean values (True or False) as arguments. Others return boole

27、an values. When passing a boolean value to a GISDK function, either as a parameter or as the value of an option, pass a string containing the word True or False. In general, a GISDK function that returns a boolean value returns a string, either True or False, but there are some GISDK functions that

28、return a different value, such as On or Off. Refer to the documentation for an individual GISDK function to determine its possible return values.1.7 Using Options ArraysMany GISDK functions take an array of options as a parameter. Each element in an options array is an array of two (or more) element

29、s. The first element in each sub-array is a string specifying the name of the option. The second (and subsequent) elements of a sub-array give the values for the option. For example, the following options array contains two options (Layer Name and Label) and their associated values:options_array =La

30、yer Name, CountiesLabel, Counties of the NortheastYou can use a dot notation to get, set, add, and remove options in options arrays. For more information, see Options Arrays and Dot Notation in Arrays.If you dont need to pass any options to a GISDK function, you can pass null for the options array.S

31、ome GISDK functions also return options arrays. In general, you should not rely on the order in which options appear in a returned options array. Instead, to locate specific options within an options array, use the GISDK functions:GISDK FunctionSummaryFindOption()Finds a particular option and its se

32、tting in an array of name-value pairsFindOptionValue()Finds the value of a particular option in an options arrayIn addition, some GISDK functions, like AddAnnotation() and GetAnnotation() accept or return information in the same format as an options array. You can use these same GISDK functions to m

33、anipulate these arrays.2 Using GISDK FunctionsThis section contains overviews of how you use GISDK functions to work with windows, maps, layers, editors, tables, and views, well as overviews GISDK functions for geographic data and analysis, networks, routes systems, matrices, and other tasks. Also a

34、ddressed are the key differences between the terminology used in TransCAD and the terminology used in GISDK.For more information, see.WindowsMapsGeographic Data and Analysis Tables and Views Networks Route Systems Matrices Other GISDK Functions2.1 WindowsGISDK lets you create, manipulate, and close

35、windows of five different types. You can control the location, size, and other settings for each window, save the contents of a window to a file, or open a file and create a window from its contents.You can also attach menus and toolbars to each and every window, and create macros that run automatic

36、ally either when a user clicks in a window to activate it, or when a user closes the window. These capabilities let you separately customize the interface for each window in your application. The Standard Interface, however, has only one menu system for all windows, and only one toolbar for each win

37、dow type.GISDK supports five types of windows: maps, editors (including dataviews), figures, layouts, and a special type of window called the frame. The frame is the TransCAD program window as it appears when no maps, editors, figures, or layouts are open.Every map, editor, figure, and layout has a

38、name that distinguishes it from all other windows of the same type. For example, your application could have six different windows as shown in the table:WindowTypeName1MapUS Streets2MapStates3MapUS Streets:14EditorUS Streets5 EditorState Data6LayoutUntitledNo two maps, editors, figures, or layouts c

39、an have the same name, although as indicated in the above example, a window of one type can have the same name as a window of another type. The windows in GISDK are also identified by name, where the window name is of the form window type|window name. For example, Map|US Streets, Editor|State Data,

40、and Layout|Untitled are all valid window names in the above example.Most window management GISDK functions can accept a null value for the window name. In this case, GISDK applies the function to the most recently activated map, editor, figure, or layout window. In addition, GISDK functions that wor

41、k on only one type of window (e.g., CloseMap() take the window name without the window type.For more information, see.Creating WindowsWorking with WindowsClosing WindowsControlling Window Size and LocationAttaching Menus and ToolbarsWindow MacrosSaving and Loading Windows2.1.1 Creating WindowsWindow

42、s are created by the following GISDK functions:GISDK FunctionSummaryCreateMap()Creates a new, empty map windowCreateEditor()Creates a new editor windowCreateEditorByQuery()Creates an editor displaying the results of an SQL queryCreateMatrixEditor() Creates a new matrix editor windowCreateFigure()Cre

43、ates a new figure windowCreateLayout()Creates a new layout windowOpenMap()Opens a map file and displays it in a map windowOpenMapFromAnnotation()Creates a new map window from a map that appears in a layoutOpenEditor()Creates an editor from a fileOpenEditorFromAnnotation()Creates a new editor window

44、from an editor that appears in a layoutOpenFigure()Creates a figure from a fileOpenFigureFromAnnotation()Creates a new figure window from a figure that appears in a layoutOpenLayout()Creates a layout from a fileThese GISDK functions all return the name of the map, editor, figure, or layout window th

45、at was created. These GISDK functions have numerous options that control how the window operates. Here is a quick summary:OptionWhat it doesMenuNames the menu that is associated with the windowToolbarNames the toolbar that is associated with the windowPositionSets the location of the upper-left corn

46、er of the window within the application windowSizeSets the size of the window within the application windowActivate MacroSpecifies the name of a macro that is run automatically when the window is activatedClose MacroSpecifies the name of a macro that is run automatically when the user closes the win

47、dow by choosing the Close option from the System menuSome of these options can be changed after a particular window is created. These options are described in detail in the topics that follow. The following GISDK functions are used to manage window options:GISDK FunctionWhat it doesGetMapOptions()Gets the value of options for a map windowSetMapOptions()S

展开阅读全文
相似文档                                   自信AI助手自信AI助手
猜你喜欢                                   自信AI导航自信AI导航
搜索标签

当前位置:首页 > 包罗万象 > 大杂烩

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        获赠5币

©2010-2024 宁波自信网络信息技术有限公司  版权所有

客服电话:4008-655-100  投诉/维权电话:4009-655-100

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :gzh.png    weibo.png    LOFTER.png 

客服