地理信息系统开发工具GISDK使用手册英文版第四部分FunctionList.doc
【精品文档】如有侵权,请联系网站删除,仅供学习与交流地理信息系统开发工具GISDK使用手册英文版第四部分FunctionList.精品文档.Abs()SummaryComputes the absolute value of a number.Syntaxrslt = Abs(real value)ArgumentContentsvalueAny numberReturnsA real number equal to the absolute value of value.See AlsoFunctionSummarySign()Computes the sign of a number.Acos()SummaryComputes the arccosine of a value.Syntaxrslt = Acos(real value)ArgumentContentsvalueAny number between -1.0 and +1.0ReturnsA real number equal to the angle in radians whose cosine is value.See AlsoFunctionSummaryCos()Computes the cosine of an angle expressed in radiansAsin()Computes the arcsine of a valueAtan()Computes the arctangent of a valueAcosh()SummaryComputes the hyperbolic arccosine of a value.Syntaxrslt = Acosh(real value)ArgumentContentsvalueAny number greater than or equal to 1.0ReturnsA real number equal to the number whose hyperbolic cosine is value.Error CodesError TypeMeaningError Value is less than 1.0See AlsoFunctionSummaryCosh()Computes the hyberbolic cosine of an angle expressed in radiansAsinh()Computes the hyperbolic arc sine of a valueAtanh()Computes the hyperbolic arc tangent of a numberAddAnnotation()SummaryAdds an annotation to a map or layout window.ChangesFrom Version 3.0 added a new annotation type, splined text, which is text that follows the path of a smoothed polyline or spline curve.Syntaxid = AddAnnotation(string window_spec, string type, array spec)ArgumentContentswindow_specThe type and name of the window containing the annotationtypeAnnotation typespecAn array of name-value pairs that define the annotationAnnotation TypeWindow TypeValid SpecificationsBitmapLayout, mapColor, Editable, File, Location (2 coords on a layout, a scope on a map)CircleLayout, mapEditable, Fill Color, Fill Style, Line Color, Line Style, Line Width, Location (a circle)CompassMapColor, Editable, Font, Index, Location (a scope)ContainerLayoutEditable, Location (2 coords)EditorLayoutColor, Drop Shadow, Editable, Font, Grid, Line Color, Line Style, Line Width, Location (2 coords), Shadow Color, ViewEllipseLayout, mapAngle, Editable, Fill Color, Fill Style, Line Color, Line Style, Line Width, Location (2 coords on a layout, a scope on a map)FigureLayoutDrop Shadow, Figure, Line Color, Line Style, Line Width, Location (2 coords), Shadow Color, WysiwygFont CharacterLayout, mapAngle, Color, Editable, Font, Index, Location (a coord)LabelMapAll the options appropriate for text, plus ID, LayerLegendLayout, mapEditable, Location (2 coords on a layout, a scope on a map), NameMapLayoutDrop Shadow, Editable, Fixed Scale, Line Color, Line Style, Line Width, Location (2 coords), Map, Scope, Shadow Color, WysiwygPolygonLayout, mapEditable, Fill Color, Fill Style, Line Color, Line Style, Line Width, PointsPolylineLayout, mapEditable, From Arrow, Line Color, Line Style, Line Width, Points, Smooth, To ArrowRectangleLayout, mapAngle, Editable, Fill Color, Fill Style, Line Color, Line Style, Line Width, Location (2 coords on a layout, a scope on a map), RoundedSplined TextLayout, mapEditable, Points, Font, Color, TextTextLayout, mapAngle, Color, Editable, Font, Framed, Frame Border Color, Frame Border Style, Frame Border Width, Frame Fill Color, Frame Fill Style, Frame Shield, Frame Type, Location (2 coords on layout, a scope on map or, for non-scaling text, a coord and an alignment string on map), TextSpecificationTypeContentsAngleRealThe counterclockwise rotation angle from horizontal (defaults to 0)ColorColorThe foreground colorDrop ShadowBooleanIndicates whether a drop shadow is displayed (defaults to false)EditableBooleanIndicates whether the annotation can be edited (defaults to false)FigureStringThe name of the figureFileStringThe path to the file containing the annotationFill ColorColorThe fill colorFill StyleFillstyleThe fill styleFixed ScaleBooleanIndicates whether the same map scale is used as in the original map window (defaults to false)FontStringThe name and size of the fontFramedBooleanIndicates whether a text item is displayed with a frame (defaults to false)Frame Border ColorColorThe frame border colorFrame Border StyleLinestyleThe frame border styleFrame Border WidthRealThe frame border width in pointsFrame Fill ColorColorThe frame background colorFrame Fill StyleFillstyleThe frame background fill styleFrame ShieldArrayThe highway shield definition (string font_name, array of (integer index, color) Frame TypeStringRectangle, Rounded Rectangle, Ellipse, ShieldFrom ArrowBooleanIndicates whether an arrow is drawn at the start of the polyline (defaults to false)GridBooleanIndicates whether a grid is displayed (defaults to false)IDIntegerID of the feature to labelIndexIntegerThe character value from the fontLayerStringName of the geographic layer containing the featureLine ColorColorThe line or border colorLine StyleLinestyleThe line or border styleLine WidthRealThe line or border width in pointsLocationArraySee table belowMapStringThe name of the mapNameStringThe name of the legendPointsArrayAn array of coordinates, X and Y on a layout or longitude and latitude on a mapRoundedBooleanIndicates whether the rectangle has rounded corners (defaults to false)ScopeScopeThe scope of the mapShadow ColorColorThe color of the drop shadowSmoothBooleanIndicates whether the polyline is smoothed by fitting a spline (defaults to false)TextStringThe actual text of a text annotationTo ArrowBooleanIndicates whether an arrow is drawn at the end of the polyline (defaults to false)WysiwygBooleanIndicates whether the map or figure added to the layout window is sized to look identical to the original map window (defaults to true)Location TypeWindow TypeCommentsScopeMapA compound variable with a center, width, and height; the angle is ignored. Use Scope() or ClickRectScope() to create a scope2 coordsLayoutCompound variables with an X and Y. Use Coord() to create a coord or ClickRect() to create a rectangle of 2 coordsA coordLayout, mapA compound variable with an X and Y on a layout or a lon and lat on a map. Use Coord() or ClickCoord() to create a coordA coord and an alignment stringMapThe coord is a compound variable with an X and Y on a layout or a lon and lat on a map; use Coord() to create a coord. The alignment string can be NW, N, NE, W, C, E, SW, S or SEA circleLayout, mapA compound variable with a radius and center. Use Circle() or ClickCircle() to create a circleReturnsThe integer id of the new annotation.Notes·When adding annotations to a map, Location is in longitude and latitude values.·When adding annotations to a layout, Location is in X and Y values measured in hundredths of a printer's point (1/7200ths of an inch) from the upper-left hand corner of the layout.·Bitmaps are scaled to fit within the Location coordinates.·Circle annotations are converted and stored as Ellipses.·View annotations are returned with the type Editor and their font color is returned with the Font Color specification.Examplesid = AddAnnotation("Map|U.S. States", "Bitmap", "File", "c:TransCADbmpflag.bmp","Location", ClickRectScope()window_name = "Map|" + GetMap()option_array = "Location" , Coord(750000,-430000) , "Font" , "Caliper Cartographic|14" , "Index" , 53 , "Color" , ColorRGB(0,0,65535) annotation_id = AddAnnotation(window_name,"Font Character",option_array)Error CodesError TypeMeaningNotFound The specified window does not existErrorThe annotation type or specification is invalidSee AlsoFunctionSummaryDuplicateAnnotation()Creates a copy of an annotationGetAnnotation() Returns the definition of an annotationMoveAnnotation()Moves an annotation to a new locationSetAnnotation()Modifies an existing annotation in a map or layout windowAddCDFLayer()SummaryAdds a layer from a compact geographic file to a map.Syntaxactual_lyr_name = AddCDFLayer(string map_name, string layer_name, string db_name, string db_layer_name)ArgumentContentsmap_nameThe name of the map to which the image is addedlayer_nameThe desired name for the layer in the mapdb_nameThe full path and file name of the geographic file that contains the layerdb_layer_nameThe layer name as defined in the geographic fileReturnsA string indicating the actual name of the layer, which is identical to layer_name unless the layer name is already in use.Notes·If the map_name is null, AddCDFLayer() adds the layer to the current map.·Adding a layer to a map does not set any display characteristics for the layer. In other words, the layer is not visible until display colors and styles are assigned.·TransCAD keeps track of geographic files and their layer names in the workspace, not just in individual map and dataview windows. The same geographic file can have the same layer name in different maps, but different geographic files cannot have the same layer name even if they are in different maps. In the latter case, TransCAD adds a colon and a sequence number to the desired layer name to make the actual layer name unique.·AddLayer() can also be used to add compact geographic files as layers.Examplegeo_file = "h:datacccntyl.cdf"lyrs = GetDBLayers(geo_file)new_lyr = AddCDFLayer("United States", "Counties", geo_file, lyrs1)Error CodesError TypeMeaningError The map or the specified geographic file does not exist; orthe file is not a valid geographic file; ordb_layer_name is not found in the file; orthe layer is already in the mapSee AlsoFunctionSummaryAddLayer()Adds a layer from a geographic file to a mapAddLayerEx()Adds a layer from a geographic file to a map, with control of the Read Only and Exclusive modesAddImageLayer()Adds an image layer to a mapDropLayer()Removes a layer from a mapAddIDField()SummaryAdds an ID field to an existing table.SyntaxAddIDField(string view_name, integer start, integer step, boolean indexed_flag, string newfldname, string where, array options)ArgumentContentsview_nameThe name of the view of a table; if omitted, the current table is usedstartThe index of the first element; if omitted, indexing starts at 1stepThe increment to use (the default is 1)indexed_flagIf the new ID field is to be a permanent index to the table (the default is "False")newfldnameThe proposed name of the new ID field (the default is "ID")whereIndicates where to place the new ID field. This can be "left" or "right", meaning the field will be the leftmost or rightmost field of the table, or "auto" (the default), which means the choice of leftmost or rightmost position will be made automaticallyNo options are currently supported.ReturnsThe actual name of the field that was added.Notes·If the table already has a field named newfldname, the name will be suffixed with ":1", ":2" etc., as necessary to obtain a unique field name.·When choosing leftmost/rightmost position automatically (where="auto"), the function takes into account the type of the database, and the currently indexed fields. The choice is made in such a way as to minimize the amount of re-indexing of the original fields.·The ID field is a long (4-byte) integer.Examplefld_name = AddIDField("MyTable", 1000, 1, "False", "NewID", "auto", )Error CodesError TypeMeaningNotFoundNo view with this name was found, or no current view was foundErrorThe table cannot be modifiedAddImageLayer()SummaryAdds an image layer to a map.Syntaxactual_lyr_name = AddImageLayer(string map_name, string layer_name, string file_name)ArgumentContentsmap_nameThe name of the map to which the image is addedlayer_nameThe desired name for the image layerfile_nameThe full path and file name of the image fileReturnsA string indicating the actual name of the layer; identical to layer_name unless the layer name is already in use.Notes·If the image is registered, it is displayed in its correct location.·If the image is not already registered, AddImageLayer() automatically fits it into the map window and registers it at that location.·TransCAD keeps track of geographic and image files and their layer names in the workspace, not just in individual map windows. The same image file can have the same layer name in different maps, but different geographic or image files cannot have the same layer name even if they are in different maps. In the latter case, TransCAD adds a colon and a sequence number to the desired layer name to make the actual layer name unique.Examplelyr = AddImageLayer("Map of New York", "Topo Map", "j:nycity.tif")Error CodesError TypeMeaningErrorThe image file is corrupt or in an unsupported formatNotFoundThe map or the specified image file does not existSee AlsoFunctionSummaryAddLayer()Adds a layer from a standard geographic file to a mapAddLayerEx()Adds a layer from a geographic file to a map, with control of the Read Only and Exclusive modesAddCDFLayer()Adds a layer from a compact format geographic file to a mapGetMapLayers()Gets a list of the layers in a mapDropLayer()Removes a layer from a mapAddLayer()SummaryAdds a layer from a geographic file to a map.Syntaxactual_lyr_name = AddLayer(string map_name, string layer_name, string db_name, string db_layer_name)ArgumentContentsmap_nameThe name of the map to which the layer is addedlayer_nameThe desired name for the layer in the mapdb_nameThe full path and file name of the geographic file that contains the layerdb_layer_nameThe layer name as defined in the geographic fileReturnsA string indicating the actual name of the layer, which is identical to layer_name unless the layer name is already in use.Notes·AddLayer() can add both standard and compact geographic files as layers.·If the map_name is null, AddLayer() adds the layer to the current map.·Adding a layer to a map does not set any display characteristics for the layer. In other words, the layer is not visible until display colors and styles are assigned.·TransCAD keeps track of geographic files and their layer names in the workspace, not just in individual map and dataview windows. The same geographic file can have the same layer name in different maps, but different geographic files cannot have the same layer name even if they are in different maps. In the latter case, TransCAD adds a colon and a sequence number to the desire