📄 axwoman30.avx
字号:
Data: 00000707 07070707 07070707 07070707
Data: 07070707 07070707 00000000 04000000
Data: 00000000 80000080 00000080 80008000
Data: 00008000 80008080 0000c0c0 c000c0dc
Data: c000f0ca a600401c 08003300 00006600
Data: 00009900 0000cc00 00000033 00003333
Data: 00006633 00009933 0000cc33 0000ff33
Data: 00000066 00003366 00006666 00009966
Data: 0000cc66 0000ff66 00000099 00003399
Data: 00006699 00009999 0000cc99 0000ff99
Data: 000000cc 000033cc 000066cc 000099cc
Data: 0000cccc 0000ffcc 000033ff 000066ff
Data: 000099ff 0000ccff 00000000 33003300
Data: 33006600 33009900 3300cc00 3300ff00
Data: 33000033 33003333 33006633 33009933
Data: 3300cc33 3300ff33 33000066 33003366
Data: 33006666 33009966 3300cc66 3300ff66
Data: 33000099 33003399 33006699 33009999
Data: 3300cc99 3300ff99 330000cc 330033cc
Data: 330066cc 330099cc 3300cccc 3300ffcc
Data: 330000ff 330033ff 330066ff 330099ff
Data: 3300ccff 3300ffff 33000000 66003300
Data: 66006600 66009900 6600cc00 6600ff00
Data: 66000033 66003333 66006633 66009933
Data: 6600cc33 6600ff33 66000066 66003366
Data: 66006666 66009966 6600cc66 6600ff66
Data: 66000099 66003399 66006699 66009999
Data: 6600cc99 6600ff99 660000cc 660033cc
Data: 660066cc 660099cc 6600cccc 6600ffcc
Data: 660000ff 660033ff 660066ff 660099ff
Data: 6600ccff 6600ffff 66000000 99003300
Data: 99006600 99009900 9900cc00 9900ff00
Data: 99000033 99003333 99006633 99009933
Data: 9900cc33 9900ff33 99000066 99003366
Data: 99006666 99009966 9900cc66 9900ff66
Data: 99000099 99003399 99006699 99009999
Data: 9900cc99 9900ff99 990000cc 990033cc
Data: 990066cc 990099cc 9900cccc 9900ffcc
Data: 990000ff 990033ff 990066ff 990099ff
Data: 9900ccff 9900ffff 99000000 cc003300
Data: cc006600 cc009900 cc00cc00 cc00ff00
Data: cc000033 cc003333 cc006633 cc009933
Data: cc00cc33 cc00ff33 cc000066 cc003366
Data: cc006666 cc009966 cc00cc66 cc00ff66
Data: cc000099 cc003399 cc006699 cc009999
Data: cc00cc99 cc00ff99 cc0000cc cc0033cc
Data: cc0066cc cc0099cc cc00cccc cc00ffcc
Data: cc0000ff cc0033ff cc0066ff cc0099ff
Data: cc00ccff cc00ffff cc003300 ff006600
Data: ff009900 ff00cc00 ff000033 ff003333
Data: ff006633 ff009933 ff00cc33 ff00ff33
Data: ff000066 ff003366 ff006666 ff009966
Data: ff00cc66 ff00ff66 ff000099 ff003399
Data: ff006699 ff009999 ff00cc99 ff00ff99
Data: ff0000cc ff0033cc ff0066cc ff0099cc
Data: ff00cccc ff00ffcc ff0033ff ff0066ff
Data: ff0099ff ff00ccff ff000606 06000d0d
Data: 0d001313 13001a1a 1a002020 20002727
Data: 27002d2d 2d003434 34003b3b 3b004141
Data: 41004848 48004e4e 4e005555 55005b5b
Data: 5b006262 62006969 69006f6f 6f007676
Data: 76007c7c 7c008383 83008989 89009090
Data: 90009696 96009d9d 9d00a4a4 a400aaaa
Data: aa00b1b1 b100f0fb ff00a4a0 a0008080
Data: 80000000 ff0000ff 000000ff ff00ff00
Data: 0000ff00 ff00ffff 0000ffff ff000002
Data: 00080007 00200001 00020000 00000000
Data: 0000
)
(Numb.47
N: 22.00000000000000
)
(Script.48
Name: "Ax3.DoitLine"
SourceCode: "'*************************\n' this program intends to \n' calculate some parameters\n' used in Space Syntax\n'**************************\n\n' to get the GraphicList\ntheView = av.GetActiveDoc\ntheGraphicList = theView.GetGraphics\ntheGraphicList.Invalidate\n\nINIFINITY = 9999\n\n_shapeList = List.Make\n\nfor each aGraphic in theGraphicList\n aShape = aGraphic.GetShape\n _shapeList.Add(aShape)\nend\n\n_weightList = List.Make\n\n'' _adjacencyList = List.Make\n\n'' msgbox.info((_shapeList.Count*_shapeList.Count).asstring, \"CCCC\")\n\n
connectivityList = List.Make\ncontrolList = List.Make\nintegrationList = List.Make\nintegration_3List = List.Make\ntotalDepthList = List.Make\nthreeDepthList = List.make\n\n'***************************\n' to calculate connectivity \n' and put result in the\n' connectivityList, to set up\n' _weightList\n'***************************\n\ntheIndex = 0\nfor each theShape in _shapeList\n thetheIndex = 0\n connectivity = 0\n for each thetheShape in _shapeList\n if ((theShape.Intersects(thetheShape)) AND ((theShape=thetheShape).
not)) then\n connectivity = connectivity + 1\n end ' end if \n \n if (theShape = thetheShape) then\n _weightList.Add(0)\n elseif (theShape.Intersects(thetheShape)) then\n _weightList.Add(1)\n else\n _weightList.Add(INIFINITY)\n end 'end if\n \n '' neighbourList = List.Make\n '' neighbourList.Add(theShape)\n '' if(theShape.Intersects(thetheShape)) then\n '' neighbourList.Add(thetheShape)\n '' end \n \n thetheIndex = thetheIndex + 1 \n end ' end internal for \n
connectivityList.Add(connectivity)\n if (connectivity = 0) then\n MsgBox.Info( \"A line is isolated. This is not allowed\", \"Warning Message\" ) \n exit\n end \n '' _adjacencyList.Add(neighbourList)\n theIndex = theIndex + 1 \nend \n \n' msgbox.ListAsString(connectivityList, \"CCCC\", \"CCCC\") \n'****************************\n' to calculate control value\n' and integation by calling\n' Ax3.DoitLine.Depth\n'****************************\n\n' show percentage complete with enabled stop button\n\nav.ShowMsg(\"comp
uting...\")\nav.ShowStopButton \n\ntheIndex = 0\n\nfor each theShape in _shapeList\n'''' theShape = _shapeList.Get(0)\n thetheIndex = 0\n controlValue = 0\n totalDepth = 0\n for each thetheShape in _shapeList\n if (theShape.Intersects(thetheShape) AND (theShape = thetheShape).not) then\n \n ' compute control value\n connect_of_immNeighbour = connectivityList.Get(thetheIndex)\n controlValue = controlValue + (1/connect_of_immNeighbour) \n end 'end if\n \n thetheIndex = thetheIn
dex + 1\n end ' end internal for \n \n controlList.Add(controlValue)\n 'LList_of_adjacencyList = List.Make\n 'LList_of_adjacencyList = _List_of_adjacencyList.DeepClone\n \n theDepthList = av.Run(\"Ax3.DoitLine.Depth\", {theIndex})\n '_LList_of_adjacencyList = LList_of_adjacencyList.DeepClone\n \n '''' msgbox.Listasstring(theDepthList, \"CCCC\", \"CCCC\")\n '''' theDepthList = {12, 12, 12}\n\n totalDepthList.Add(theDepthList.Get(0))\n threeDepthList.Add(theDepthList.Get(1))\n\n '' msgbox.info(Depth.asstring, \"CCCC\"
)\n totalDepth = theDepthList.Get(0)\n threeDepth = theDepthList.Get(1)\n numLocalSpaces = theDepthList.Get(2)\n \n meanTotalDepth = totalDepth/(_shapeList.Count - 1)\n meanThreeDepth = threeDepth/(numLocalSpaces - 1)\n \n ' compute D-value\n number_of_spaces = _shapeList.Count\n theDvalue = av.Run(\"Ax3.Doit.Dvalue\", {number_of_spaces})\n theLocalDvalue = av.Run(\"Ax3.Doit.Dvalue\", {numLocalSpaces})\n \n integration = (theDvalue*(number_of_spaces-2))/(2*(meanTotalDepth-1)) \n integration_3 = (theLocalD
value*(numLocalSpaces-2))/(2*(meanThreeDepth-1))\n \n' msgbox.ListAsString(immimmNeighbourList, \"CCCC\", \"CCCC\")\n' msgbox.info(controlValue.AsString, \"CCCC\")\n \n integrationList.Add(integration)\n integration_3List.Add(integration_3)\n \n theIndex = theIndex + 1\n\n more = av.SetStatus(theIndex/_shapeList.Count*100)\n if (not more) then\n break\n end \nend\n\n'' msgbox.ListAsString(theDepthList, \"CCCC\", \"CCCC\")\n\n'***************************\n' convert line segment to\n' polyline and put into the\n' an attribute
table\n'***************************\n\ntheShapeType = Polyline\ntheCLoF = {}\n\nfor each g in theGraphicList\n if (g.GetShape.Is(Polyline)) then\n theCLoF.Add(g.GetShape)\n else\n g_polyline = g.GetShape.Aspolyline\n theCLoF.Add(g_polyline)\n end \nend \n\n'***************************\n' delete graphics before \n' showing theme\n'***************************\n\n'' theGraphicList.Empty\n\n\n'**********************\n' put compute result in \n' a table\n'**********************\n\n''** open a second view for the theme\nsec
ondView = View.Make\ntheWindow = secondView.GetWin\ntheWindow.Open\n\n'' theOutFileName = FileDialog.Put(\"Axialmap.shp\".AsFilename, \"*.*\", \"File\")\ntheOutFileName = FileDialog.Put(\"Axialmap.dbf\".AsFilename, \"*.*\", \"File\")\n\ntheFtab = Ftab.MakeNew(theOutFileName, Polyline)\n\nshapeField = theFtab.FindField(\"Shape\")\n\nindexField = Field.Make(\"Index\", #FIELD_SHORT, 5, 0)\nconnectivityField = Field.Make(\"Connectivity\", #FIELD_SHORT, 5, 0)\ncontrolField = Field.Make(\"Control\", #FIELD_FLOAT, 10, 5)\nintegrationField = Field.
Make(\"Integration\", #FIELD_FLOAT, 10, 5)\ntotal_depthField = Field.Make(\"Total_Depth\", #FIELD_FLOAT, 10, 2)\nthree_depthField = Field.Make(\"Three_Depth\", #FIELD_FLOAT, 10, 2)\nintegration_3Field = Field.Make(\"Integration_3\", #FIELD_FLOAT, 10, 5)\n\n\ntheFieldList = {indexField, connectivityField, controlField,\n integrationField, total_depthField, three_depthField, \n integration_3Field}\ntheFtab.AddFields (theFieldList)\n\nfor each i in 1..(_shapeList.Count)\n rec = theFtab.AddRecord\n \n
theFtab.SetValue(shapeField, rec, theCLoF.Get(i-1))\n theFtab.SetValue(indexField, rec, i)\n theFtab.SetValue(connectivityField, rec, connectivityList.Get(i-1))\n theFtab.SetValue(controlField, rec, controlList.Get(i-1))\n theFtab.SetValue(integrationField, rec, integrationList.Get(i-1))\n theFtab.SetValue(total_depthField, rec, totalDepthList.Get(i-1))\n theFTab.SetValue(three_depthField, rec, threeDepthList.Get(i-1))\n theFTab.SetValue(integration_3Field, rec, integration_3List.Get(i-1))\nend \n \ntheFThem
e = Ftheme.Make(theFtab)\n\nsecondView.AddTheme(theFTheme)\nsecondView.Invalidate\n\n''************************************\n' load bill's colour legend for axmap\n''************************************\ntheLegend = theFTheme.GetLegend\n\ntheLegend.SetLegendType(#LEGEND_TYPE_COLOR)\ntheLegend.Interval(theFTheme, \"Connectivity\", 9)\naLegendFile = \"c:\\esri\\av_gis30\\arcview\\ext32\\syntax_legend.avl\".AsFileName\ntheLegend.Load(aLegendFile, #LEGEND_LOADTYPE_SYMBOLS)\ntheFTheme.SetVisible(true)\n\n"
)
(Script.49
Name: "Ax3.DoitLine.Depth"
SourceCode: "v1 = SELF.Get(0)\n\n'***********************\n' initialize variables\n'***********************\n\nMAXNODES = _shapeList.Count\nINIFINITY = 9999\ntotalDepth = 0\nthreeDepth = 0\n\nw_element = 0\nv_element = 0\nu_element = 0\nw_u_element = 0\n\n'***********************\n' initialise Lists:\n' WList, VList, \n'***********************\n\nWList = List.Make\nVList = List.Make\nshortestDistanceList = List.Make\nnumber_of_wList = List.Make\ndepthList = List.Make\n\nfor each i in 0..(MAXNODES-1)\n VList.Add(i)\nend \n\n'************************
*\n\n WList.Insert(v1)\n\n'' msgbox.ListAsString(WList, \"DDDDD\", \"DDDDD\")\n\nfor each i in 0..(MAXNODES-1)\n shortestDistanceList.Add(0)\nend \n\nshortestDistanceList.Set(v1,0)\n\n'' msgbox.ListAsString(VList-WList, \"DDDDD\", \"DDDDD\")\n\nfor each u_element in (VList - WList)\n v1_u_element = (v1*MAXNODES) + u_element\n \n shortestDistanceList.Set(u_element, _weightList.Get(v1_u_element))\n '' shortestDistanceList.Set(u_element, 10)\n\nend\n\n'******************************************\n' now repeatedly enlarge WList until W
List\n' includes all vertex in VList\n'****************************************** \n\nwhile (WList.Count <> VList.Count)\n ''** find the vertex w>VList - WList at the minimum \n ''** distance from v1\n MinDistance = INIFINITY\n \n number_of_w = 0\n for each v_element in (VList - WList)\n if (shortestDistanceList.Get(v_element) < MinDistance) then\n MinDistance = shortestDistanceList.Get(v_element)\n w_element = v_element\n number_of_w = number_of_w + 1\n '' msgbox.info(number_of_w.asstring,
\"DDDD\")\n end '* end if\n '' msgbox.info(number_of_w.asstring, \"DDDD\")\n end '* end for\n \n ''** add w to WList\n number_of_wList.Add(number_of_w)\n WList.Add(w_element)\n \n ''** Update the shortest distance to vertex in V-W\n for each u_element in (VList - WList)\n w_u_element = w_element*MAXNODES + u_element\n minValue = av.Run(\"Ax3.Doit.Minimum\", \n {shortestDistanceList.Get(u_element),\n (shortestDistanceList.Get(w_element) + \n _
weightList.Get(w_u_element))})\n \n '' minValue = av.Run(\"Ax3.Doit.Minimum\", \n '' {shortestDistanceList.Get(u_element),\n '' (shortestDistanceList.Get(w_element) + \n '' 1000)})\n \n\n shortestDistanceList.Set(u_element, minValue)\n end '* end for\n totalDepth = totalDepth + MinDistance\n '' msgbox.info(MinDistance.asstring, \"DDDD\") \nend '* end while\n\n'' msgbox.listasstring(shortestDistanceList, \"DDDD\", \"DDDD\")\n \nthre
eDepth = 0\nnumber_of_localspace = 0\nfor each element in shortestDistanceList\n if (element < 3) then\n threeDepth = threeDepth + element\n number_of_localspace = number_of_localspace + 1\n end\nend\n\n'' msgbox.info(number_of_localspace.asstring, \"DDDD\")\n\ndepthList.Add(totalDepth)\ndepthList.Add(threeDepth)\ndepthList.Add(number_of_localspace)\n\nReturn depthList\n"
)
(Script.50
Name: "Ax3.Doit.Status"
SourceCode: "'---------------------------------\n'Ax3.Doit.Status\n'---------------------------------\nroot = SELF.Get(0)\nMAXNODES = SELF.Get(1)\n\nstatus = 0\nstatus_3 = 0\nlevel = 0\n\n'' check for wether or not adjacency list is right\n'' for each aList in _List_of_adjacencyList\n'' msgbox.ListAsString(aList, \"DDDD\", \"DDDD\")\n'' end \n\nCList = List.Make\nCList.Add(root)\n\nVList = List.Make\nelement = 0\nwhile (element < MAXNODES)\n VList.Add(element)\n element = element + 1\nend\n \n'' remove {root} from VList and all adjacency lists
\nVList = VList - {root}\nfor each adjacencyList in _List_of_adjacencyList\n theIndex = adjacencyList.FindbyValue(root)\n if (theIndex <> -1) then\n adjacencyList = adjacencyList.Remove(theIndex)\n end\nend \n\nnumber_of_localspace = 1\nwhile (CList.Count <> 0)\n level = level + 1\n DDList = List.Make\n \n neighbourList = List.Make\n for each element in CList\n neighbourList = neighbourList + _List_of_adjacencyList.Get(element)\n neighbourList.RemoveDuplicates\n end\n'' msgbox.info(neighbourList.Count.ass
tring, \"DDDD\")\n if (level < 3) Then\n number_of_localspace = number_of_localspace + neighbourList.Count\n end\n \n \n for each w in neighbourList\n DDList = DDList + {w}\n \n '' remove w from VList and all adjacency lists\n VList = VList - {w}\n for each adjacencyList in _List_of_adjacencyList\n theIndex = adjacencyList.FindbyValue(w)\n if (theIndex <> -1) then\n adjacencyList = adjacencyList.Remove(theIndex)\n end\n end \n \n if (level<3) Then\n status_3 = status_3
+ level\n end \n status = status + level\n end\n \n CList = DDList.DeepClone\nend '' end of while\n \nstatusList = List.Make\nstatusList.Add(status)\nstatusList.Add(status_3)\nstatusList.Add(number_of_localspace)\n\nReturn statusList\n"
)
(Script.51
Name: "Ax3.DoitPoint"
SourceCode: "'To get the GraphicList\ntheView = av.GetActiveDoc\ntheGraphicList = theView.GetGraphics\n\n' To contruct two lists for Polygons and Points respectively\npolygonList = List.Make\ncpList = List.Make\n\nfor each aGraphic in theGraphicList\n aShape = aGraphic.GetShape\n \n if (aShape.GetDimension = 2) then 'Polygons\n polygonList.Add(aShape)\n elseif (aShape.GetDimension = 0) then 'Points\n cpList.Add(aShape)\n end ' end if \nend ' end for\n\n'To fill the matrix represented by a list\n_matrixList = List
.Make\nfor each aPoint in cpList\n for each bPoint in cpList\n if (aPoint=bPoint) then\n _matrixList.add(0)\n continue\n end\n count = 0 'for avoiding adding the value more than once\n ab = Line.Make(aPoint, bPoint)\n\n for each aPolygon in polygonList\n if (((ab.Intersects(aPolygon)).Not)AND((aPoint = bPoint).Not)) then\n _matrixList.add(1)\n count = 1\n break\n end\n end\n if (count <> 1) then _matrixList.add(0) end\n end\nend\n\nconnectivityList = List.M
ake\ncontrolList = List.Make\nintegrationList = List.Make\nintegration_3List = List.Make\ntotalDepthList = List.Make\nthreeDepthList = List.Make\n_List_of_adjacencyList = List.Make\n\nFor each aPoint in cpList\n bIndex = 0\n connectivity = 0\n adjacencyList = List.Make\n \n For each bpoint in cpList\n ab = Line.Make(aPoint, bPoint)\n\n overlap = 0\n \n For each aPolygon in polygonList\n if (ab.Intersects(aPolygon)) then\n overlap = overlap + 1\n end 'end if\n end 'end for\n \n if ((
overlap = 0) AND ((aPoint = bPoint).not)) then\n connectivity = connectivity + 1\n adjacencyList.Add(bIndex)\n end 'end if\n \n bIndex = bIndex + 1\n end ''end internal for\n \n _List_of_adjacencyList.Add(adjacencyList)\n connectivityList.Add(connectivity)\n\nend ''end external for\n\n' to calculate control value and integration by calling Ax3.Doit.Status\nav.ShowMsg (\"Computing...\")\nav.ShowStopButton\n\naIndex = 0\nfor each aPoint in cpList\n bIndex = 0\n controlValue = 0\n totalDepth = 0\n for each bPoint
in cpList\n ab = Line.Make(aPoint, bPoint)\n overlap = 0\n \n For each aPolygon in polygonList\n if (ab.Intersects(aPolygon)) then\n overlap = overlap + 1\n end 'end if\n end 'end for\n \n if ((overlap = 0) AND ((aPoint = bPoint).not)) then\n connect_of_immNeighbour = connectivityList.Get(bIndex)\n controlValue = controlValue + (1/connect_of_immNeighbour)\n end ' end if\n\n bIndex = bIndex + 1\n end 'end internal for\n\n controlList.Add(con
trolValue)\n\n\n\n LList_of_adjacencyList = List.Make ''***\n LList_of_adjacencyList = _List_of_adjacencyList.DeepClone ''***\n length = (_matrixList.Count).sqrt\n \n theDepthList = av.Run(\"Ax3.Doit.Status\", {aIndex, length})\n\n _List_of_adjacencyList = LList_of_adjacencyList.DeepClone ''***\n\n totalDepthList.Add(theDepthList.Get(0))\n threeDepthList.Add(theDepthList.Get(1))\n\n totalDepth = theDepthList.Get(0)\n threeDepth = theDepthList.Get(1)\n numLocalSpaces = theDepthList.Get(2)\n\n meanTotalDepth = total
Depth/(length - 1)\n meanThreeDepth = threeDepth/(numLocalSpaces - 1)\n\n ' compute D-value\n number_of_spaces = length\n\n theDvalue = av.Run(\"Ax3.Doit.Dvalue\", {number_of_spaces})\n theLocalDvalue = av.Run(\"Ax3.Doit.Dvalue\", {numLocalSpaces})\n\n integration = (theDvalue*(number_of_spaces-2))/(2*(meanTotalDepth-1))\n integration_3 =(theLocalDvalue*(numLocalSpaces-2))/(2*(meanThreeDepth-1))\n\n integrationList.Add(integration)\n integration_3List.Add(integration_3)\n totalDepthList.Add(totalDepth)\n threeDepth
List.Add(threeDepth)\n\n aIndex = aIndex + 1\n\n more = av.SetStatus(aIndex/length*100)\n if (not more) then\n break\n end\nend\n\n'***************************\n' to put points into the\n' an attribute table\n'***************************\n\ntheShapeType = MultiPoint\ntheCLoF = {}\n\nfor each g in theGraphicList\n if (g.GetShape.getdimension=0) then\n theCloF.Add(g.GetShape.AsMultiPoint)\n end\n \nend\n\n'***************************\n' delete graphics before\n' showing theme\n'***************************\n\n'' theGrap
hicList.Empty\n\n'***************************\n' Show graphics such \n' connecting lines \n'***************************\n \n'**********************\n' put compute result in\n' a table\n'**********************\n\n''** open a second view for the theme\nsecondView = View.Make\ntheWindow = secondView.GetWin\ntheWindow.Open\ntheWindow.Activate\n\n\ntheOutFileName = FileDialog.Put(\"Point-map.dbf\".AsFilename, \"*.*\",\"File\")\ntheFtab = Ftab.MakeNew(theOutFileName, MultiPoint)\n\nshapeField = theFtab.FindField(\"Shape\")\nindexField = Field.
Make(\"Index\", #FIELD_SHORT, 5, 0)\nconnectivityField = Field.Make(\"Connectivity\", #FIELD_SHORT, 5, 0)\ncontrolField = Field.Make(\"Control\", #FIELD_FLOAT, 10, 5)\nintegrationField = Field.Make(\"Integration\", #FIELD_FLOAT, 10, 5)\ntotal_depthField = Field.Make(\"Total_Depth\", #FIELD_FLOAT, 10, 2)\nthree_depthField = Field.Make(\"Three_Depth\", #FIELD_FLOAT, 10, 2)\nintegration_3Field = Field.Make(\"Integration_3\", #FIELD_FLOAT, 10, 5)\n\ntheFieldList = {indexField, connectivityField, controlField,\n integra
tionField, total_depthField, three_depthField,\nintegration_3Field}\ntheFtab.AddFields (theFieldList)\n\nfor each i in 1..(cpList.Count)\n rec = theFtab.AddRecord\n\n theFtab.SetValue(shapeField, rec, theCLoF.Get(i-1))\n theFtab.SetValue(indexField, rec, i)\n theFtab.SetValue(connectivityField, rec, connectivityList.Get(i-1))\n theFtab.SetValue(controlField, rec, controlList.Get(i-1))\n theFtab.SetValue(integrationField, rec, integrationList.Get(i-1))\n theFtab.SetValue(total_DepthField, rec, totalDepthList.Get(
i-1))\n theFTab.SetValue(three_DepthField, rec, threeDepthList.Get(i-1))\n theFTab.SetValue(integration_3Field, rec, integration_3List.Get(i-1))\nend\n\ntheFTheme = Ftheme.Make(theFtab)\n\nsecondView.AddTheme(theFTheme)\n\n''************************************\n' load bill's colour legend for axmap\n''************************************\n\ntheLegend = theFTheme.GetLegend\n\ntheLegend.SetLegendType(#LEGEND_TYPE_COLOR)\ntheLegend.Interval(theFTheme, \"Connectivity\", 9)\naLegendFile = \"c:\\projArcvie\\Ax3Point_legend.avl\".AsF
ileName\ntheColorRamp = SymbolList.GetPredefined(#SYMLIST_TYPE_COLORRAMP).Get(0)\ntheLegend.GetSymbols.RampSavedColors(theColorRamp)\ntheFtheme.SetVisible(True)\n\n'linegList.SetDisplay(secondView.GetDisplay)\n'linegList.Draw\n\n'theView.GetWin.Activate\n'theWindow.Activate\n\n'theView.GetWin.Close\n\n'SecondView.Invalidate\n\n'theLegend.Load(aLegendFile, #LEGEND_LOADTYPE_SYMBOLS)\n'theView.Invalidate\n\n"
)
(Script.52
Name: "Ax3.Doit.PointDepth"
SourceCode: "v1 = av.Run(\"Ax3.Doit.PointDepth.numSelected\", \"\")\n\n'***********************\n' initialize variables\n'***********************\n\nMAXNODES = _shapeList.Count\nINIFINITY = 9999\ntotalDepth = 0\nthreeDepth = 0\n\n'***********************\n' initialise Lists:\n' WList, VList, \n'***********************\n\nWList = List.Make\nVList = List.Make\nshortestDistanceList = List.Make\nnumber_of_wList = List.Make\ndepthList = List.Make\n\nfor each i in 0..(MAXNODES-1)\n VList.Add(i)\nend \n\n'*************************\n\n WList.Insert(v1)\n\n''
msgbox.ListAsString(WList, \"DDDDD\", \"DDDDD\")\n\nfor each i in 0..(MAXNODES-1)\n shortestDistanceList.Add(0)\nend \n\nshortestDistanceList.Set(v1,0)\n\n'' msgbox.ListAsString(VList-WList, \"DDDDD\", \"DDDDD\")\n\nfor each u_element in (VList - WList)\n v1_u_element = (v1*MAXNODES) + u_element\n shortestDistanceList.Set(u_element, _weightList.Get(v1_u_element))\nend\n\n'******************************************\n' now repeatedly enlarge WList until WList\n' includes all vertex in VList\n'*************************************
***** \n\nwhile (WList.Count <> VList.Count)\n ''** find the vertex w>VList - WList at the minimum \n ''** distance from v1\n MinDistance = INIFINITY\n \n number_of_w = 0\n for each v_element in (VList - WList)\n if (shortestDistanceList.Get(v_element) < MinDistance) then\n MinDistance = shortestDistanceList.Get(v_element)\n w_element = v_element\n number_of_w = number_of_w + 1\n '' msgbox.info(number_of_w.asstring, \"DDDD\")\n end '* end if\n '' msgbox.info(number_of_w.asstring, \"DDDD\"
)\n end '* end for\n \n ''** add w to WList\n number_of_wList.Add(number_of_w)\n WList.Add(w_element)\n \n ''** Update the shortest distance to vertex in V-W\n for each u_element in (VList - WList)\n w_u_element = w_element*MAXNODES + u_element\n minValue = av.Run(\"Ax3.Doit.Minimum\", \n {shortestDistanceList.Get(u_element),\n (shortestDistanceList.Get(w_element) + \n _weightList.Get(w_u_element))})\n \n shortestDistanceList.Set(u
_element, minValue)\n end '* end for\n totalDepth = totalDepth + MinDistance\n '' msgbox.info(MinDistance.asstring, \"DDDD\") \nend '* end while\n\n''** put pointDepth into a table\ntheOutFileName = FileDialog.Put(\"Point_Depth.dbf\".AsFilename, \"*.*\", \"File\")\n\ntheFtab = Ftab.MakeNew(theOutFileName, Polyline)\n\nindexField = Field.Make(\"Index\", #FIELD_SHORT, 5, 0)\npoint_depthField = Field.Make(\"Point_Depth\", #FIELD_SHORT, 8, 0)\n\ntheFieldList = {indexField, point_depthField}\ntheFtab.AddFields (theFieldList)\n\nfor ea
ch i in 1..(_shapeList.Count)\n rec = theFtab.AddRecord\n \n theFtab.SetValue(indexField, rec, i)\n theFtab.SetValue(point_depthField, rec, shortestDistanceList.Get(i-1))\nend \n\n"
)
(Script.53
Name: "Ax3.PolylineTool"
SourceCode: "theView = av.GetActiveDoc\nl = theView.ReturnUserPolyLine\ntheTheme = theView.GetEditableTheme\n\nif (l.IsNull) then\n return nil\nelse\n if (theTheme <> nil) then\n theTheme.GetFtab.BeginTransaction\n thePrj = theView.GetProjection\n if (thePrj.IsNull.Not) then\n l = l.ReturnUnprojected(thePrj)\n end\n theField = theTheme.GetFTab.FindField(\"Shape\")\n rec = theTheme.GetFTab.AddRecord\n theTheme.GetFTab.SetValue(theField, rec, l)\n theTheme.GetFTab.GetSelection.ClearAll\n theTheme.GetFTab.Ge
tSelection.Set(rec)\n theTheme.GetFTab.UpdateSelection\n theTheme.GetFtab.EndTransaction\n else\n gl = GraphicShape.Make(l)\n theView.GetGraphics.UnselectAll\n gl.SetSelected(TRUE)\n theView.GetGraphics.Add(gl)\n end\n av.GetProject.SetModified(true)\nend"
)
(Script.54
Name: "Ax3.PolygoneTool"
SourceCode: "theView = av.GetActiveDoc\n\np = theView.ReturnUserPolygon\ntheTheme = theView.GetEditableTheme\n\nif (p.IsNull) then\n return nil\nelse\n if (theTheme <> nil) then\n theTheme.GetFTab.BeginTransaction\n thePrj = theView.GetProjection\n if (thePrj.IsNull.Not) then\n p = p.ReturnUnprojected(thePrj)\n end\n theField = theTheme.GetFTab.FindField(\"Shape\")\n rec = theTheme.GetFTab.AddRecord\n theTheme.GetFTab.SetValue(theField, rec, p)\n theTheme.GetFTab.GetSelection.ClearAll\n theTheme.GetFTab.Ge
tSelection.Set(rec)\n theTheme.GetFTab.UpdateSelection\n theTheme.GetFTab.EndTransaction\n else\n gp = GraphicShape.Make(p)\n theView.GetGraphics.UnselectAll\n gp.SetSelected(TRUE)\n theView.GetGraphics.Add(gp)\n end\n av.GetProject.SetModified(true)\nend\n"
)
(Script.55
Name: "Ax3.LineTool"
SourceCode: "theView = av.GetActiveDoc\nl = theView.ReturnUserLine\n' msgbox.info(l.AsString, \"CCCC\")\n\nif (l.IsNull) then\n return nil\nelse\n\n gl= GraphicShape.Make(l)\n theView.GetGraphics.UnselectAll\n gl.SetSelected(TRUE)\n theView.GetGraphics.Add(gl)\n av.GetProject.SetModified(true)\nend\n"
)
(Script.56
Name: "Ax3.PointTool"
SourceCode: "theView = av.GetActiveDoc\npt = theView.GetDisplay.ReturnUserPoint\ntheTheme = theView.GetEditableTheme\n'theSymbol.SetSize(12)\n\nif (theTheme <> nil) then\n thePrj = theView.GetProjection\n if (thePrj.IsNull.Not) then\n pt = pt.ReturnUnprojected(thePrj)\n 'pt = pt.ReturnProjected(thePrj)\n end\n \n theField = theTheme.GetFTab.FindField(\"Shape\")\n theTheme.GetFTab.BeginTransaction\n rec = theTheme.GetFTab.AddRecord\n theTheme.GetFTab.SetValue(theField, rec, pt)\n theTheme.GetFTab.EndTransaction\n theTheme.Ge
tFTab.GetSelection.ClearAll\n theTheme.GetFTab.GetSelection.Set(rec)\n theTheme.GetFTab.UpdateSelection\nelse\n gp = GraphicShape.Make(pt)\n theView.GetGraphics.UnselectAll\n gp.SetSelected(TRUE)\n theView.GetGraphics.Add(gp)\nend\nav.GetProject.SetModified(true)"
)
(Script.57
Name: "Ax3.RectangleTool"
SourceCode: "theView = av.GetActiveDoc\n\nr = theView.ReturnUserRect\ntheTheme = theView.GetEditableTheme\n\nif (r.IsNull) then\n return nil\nelse\n if (theTheme <> nil) then\n p = r.AsPolygon\n thePrj = theView.GetProjection\n if (thePrj.IsNull.Not) then\n p = p.ReturnUnprojected(thePrj)\n end\n theTheme.getFTab.BeginTransaction\n theField = theTheme.GetFTab.FindField(\"Shape\")\n rec = theTheme.GetFTab.AddRecord\n theTheme.GetFTab.SetValue(theField, rec, p)\n theTheme.GetFTab.EndTransaction\n theTheme.
GetFTab.GetSelection.ClearAll\n theTheme.GetFTab.GetSelection.Set(rec)\n theTheme.GetFTab.UpdateSelection\n else\n gr = GraphicShape.Make(r)\n theView.GetGraphics.UnselectAll\n gr.SetSelected(TRUE)\n theView.GetGraphics.Add(gr)\n end\n av.GetProject.SetModified(true)\nend"
)
(Script.58
Name: "Ax3.DoitPolygon"
SourceCode: "'To get the GraphicList\ntheView = av.GetActiveDoc\ntheGraphicList = theView.GetGraphics\n\n' To contruct two lists for rectangles and lines respectively\nrectList = List.Make\nlineList = List.Make\nrectgList = GraphicList.Make\nlinegList = GraphicList.Make\n\nfor each aGraphic in theGraphicList\n aShape = aGraphic.GetShape\n if (aShape.GetDimension = 2) then 'Rectangle\n rectList.Add(aShape)\n rectglist.Add(aGraphic)\n elseif (aShape.GetDimension = 1) then 'line\n lineList.Add(aShape)\n linegList.Add
(aGraphic) \n end\n \nend\n\n'To fill the matrix represented by a list\n_matrixList = List.Make\nfor each aRect in rectList\n for each bRect in rectList\n if (aRect=bRect) then\n _matrixList.add(0)\n continue\n end\n count = 0 'for avoiding adding the value more than once\n for each aLine in lineList\n if ((aRect.Intersects(aLine)) and (bRect.Intersects(aLine)))\nthen\n _matrixList.add(1)\n count = 1\n break\n end\n end\n if (count <> 1) then _matrixList
.add(0) end\n end\nend\n\n'''Msgbox.Info(matrixList.Count.asString, \"Matrix Length\")\n'''Msgbox.ListAsString ( matrixList, \"value\", \"Matrix\")\n\nconnectivityList = List.Make\ncontrolList = List.Make\nintegrationList = List.Make\nintegration_3List = List.Make\ntotalDepthList = List.Make\nthreeDepthList = List.Make\n\n'to calculate connectivity and put the results in the connectivityList\n_List_of_adjacencyList = List.Make\n\naIndex = 0\nfor each aRect in rectList\n bIndex = 0\n connectivity = 0\n adjacencyList = List.Make\n\n
for each bRect in rectList\n length = (_matrixList.Count).sqrt\n '''msgbox.info(length.asstring, \"WW\")\n element = _matrixList.Get((aIndex * length) + bIndex)\n connectivity = connectivity + element\n if (element <> 0) then adjacencyList.Add(bIndex) end\n\n bIndex = bIndex + 1\n end\n\n _List_of_adjacencyList.Add(adjacencyList)\n ''' msgbox.ListAsString (adjacencyList, \"WWW\", \"WWW\")\n ''' msgbox.info (connectivity.asstring, \"WWW\")\n connectivityList.Add(connectivity)\n if (connectivity = 0) the
n\n MsgBox.Info( \"A polygon is isolated. This is not allowed\", \"Warning Message\" ) \n exit\n end \n aIndex = aIndex + 1\nend\n\n' to calculate control value and integration by calling Ax3.Doit.Status\nav.ShowMsg (\"Computing...\")\nav.ShowStopButton\n\naIndex = 0\nfor each aRect in rectList\n bIndex = 0\n controlValue = 0\n totalDepth = 0\n for each bRect in rectList\n element = _matrixList.Get((aIndex * length) + bIndex)\n if (element <> 0) then\n '''msgbox.info(bIndex.asstring, \"WWW\")\n conn
ect_of_immNeighbour = connectivityList.Get(bIndex)\n controlValue = controlValue + (1/connect_of_immNeighbour)\n end ' end if\n\n bIndex = bIndex + 1\n end\n\n controlList.Add(controlValue)\n\n LList_of_adjacencyList = List.Make ''***\n LList_of_adjacencyList = _List_of_adjacencyList.DeepClone ''***\n\n theDepthList = av.Run(\"Ax3.Doit.Status\", {aIndex, length})\n''***\n\n _List_of_adjacencyList = LList_of_adjacencyList.DeepClone ''***\n\n totalDepthList.Add(theDepthList.Get(0))\n threeDepthList.Add(theDept
hList.Get(1))\n\n totalDepth = theDepthList.Get(0)\n threeDepth = theDepthList.Get(1)\n numLocalSpaces = theDepthList.Get(2)\n\n meanTotalDepth = totalDepth/(length - 1)\n meanThreeDepth = threeDepth/(numLocalSpaces - 1)\n\n ' compute D-value\n number_of_spaces = length\n\n theDvalue = av.Run(\"Ax3.Doit.Dvalue\", {number_of_spaces})\n theLocalDvalue = av.Run(\"Ax3.Doit.Dvalue\", {numLocalSpaces})\n\n integration = (theDvalue*(number_of_spaces-2))/(2*(meanTotalDepth-1))\n integration_3 =\n(theLocalDvalue*(numLocalSpac
es-2))/(2*(meanThreeDepth-1))\n\n integrationList.Add(integration)\n integration_3List.Add(integration_3)\n totalDepthList.Add(totalDepth)\n threeDepthList.Add(threeDepth)\n\n aIndex = aIndex + 1\n\n more = av.SetStatus(aIndex/length*100)\n if (not more) then\n break\n end\nend\n\n'' msgbox.ListAsString(theDepthList, \"CCCC\", \"CCCC\")\n\n'***************************\n' to put polygon into the\n' an attribute table\n'***************************\n\ntheShapeType = Polygon\ntheCLoF = {}\n\nfor each g in theGraphicList\n if (
g.GetShape.getdimension=2) then\n theCloF.Add(g.GetShape.AsPolygon)\n end\n \n end\n\n'***************************\n' delete graphics before\n' showing theme\n'***************************\n\n'' theGraphicList.Empty\n\n'***************************\n' Show graphics such \n' connecting lines \n'***************************\n \n'**********************\n' put compute result in\n' a table\n'**********************\n\n''** open a second view for the theme\nsecondView = View.Make\ntheWindow = secondView.GetWin\ntheWindow.Open\nth
eWindow.Activate\n\n'linegList.SetDisplay(secondView.GetDisplay)\n\n\n'For each aShape in lineList\n'l.SetDisplay(secondView.Getdisplay)\n'end\n\n'linegList.SetDisplay(secondView.GetDisplay)\n\ntheOutFileName = FileDialog.Put(\"Housing-map.dbf\".AsFilename, \"*.*\",\"File\")\ntheFtab = Ftab.MakeNew(theOutFileName, Polygon)\n\nshapeField = theFtab.FindField(\"Shape\")\nindexField = Field.Make(\"Index\", #FIELD_SHORT, 5, 0)\nconnectivityField = Field.Make(\"Connectivity\", #FIELD_SHORT, 5, 0)\ncontrolField = Field.Make(\"Control\", #FIELD_
FLOAT, 10, 5)\nintegrationField = Field.Make(\"Integration\", #FIELD_FLOAT, 10, 5)\ntotal_depthField = Field.Make(\"Total_Depth\", #FIELD_FLOAT, 10, 2)\nthree_depthField = Field.Make(\"Three_Depth\", #FIELD_FLOAT, 10, 2)\nintegration_3Field = Field.Make(\"Integration_3\", #FIELD_FLOAT, 10, 5)\n\ntheFieldList = {indexField, connectivityField, controlField,\n integrationField, total_depthField, three_depthField,\nintegration_3Field}\ntheFtab.AddFields (theFieldList)\n\nfor each i in 1..(rectList.Count)\n rec = th
eFtab.AddRecord\n\n theFtab.SetValue(shapeField, rec, theCLoF.Get(i-1))\n theFtab.SetValue(indexField, rec, i)\n theFtab.SetValue(connectivityField, rec, connectivityList.Get(i-1))\n theFtab.SetValue(controlField, rec, controlList.Get(i-1))\n theFtab.SetValue(integrationField, rec, integrationList.Get(i-1))\n theFtab.SetValue(total_DepthField, rec, totalDepthList.Get(i-1))\n theFTab.SetValue(three_DepthField, rec, threeDepthList.Get(i-1))\n theFTab.SetValue(integration_3Field, rec, integration_3List.Get(i-1)
)\nend\n\ntheFTheme = Ftheme.Make(theFtab)\n\nsecondView.AddTheme(theFTheme)\n\n''************************************\n' load bill's colour legend for axmap\n''************************************\n\ntheLegend = theFTheme.GetLegend\n\ntheLegend.SetLegendType(#LEGEND_TYPE_COLOR)\ntheLegend.Interval(theFTheme, \"Connectivity\", 9)\naLegendFile = \"c:\\projArcvie\\Ax3Polygon_legend.avl\".AsFileName\ntheColorRamp = SymbolList.GetPredefined(#SYMLIST_TYPE_COLORRAMP).Get(0)\ntheLegend.GetSymbols.RampSavedColors(theColorRamp)\ntheFtheme.
SetVisible(True)\n\nlinegList.SetDisplay(secondView.GetDisplay)\n'linegList.Draw\n'theWindow.Maximize\n\ntheView.GetWin.Activate\ntheWindow.Activate\n'theWindow.Maximize\ntheView.GetWin.Close\n\n'SecondView.Invalidate\n\n'theLegend.Load(aLegendFile, #LEGEND_LOADTYPE_SYMBOLS)\n'theView.Invalidate\n\n"
)
(Script.59
Name: "Ax3.CircleTool"
SourceCode: "theView = av.GetActiveDoc\n\nc = theView.ReturnUserCircle\ntheTheme = theView.GetEditableTheme\n\nif (c.IsNull) then\n return nil\nelse\n if (theTheme <> nil) then\n theTheme.GetFTab.BeginTransaction\n p = c.AsPolygon\n thePrj = theView.GetProjection\n if (thePrj.IsNull.Not) then\n p = p.ReturnUnprojected(thePrj)\n end\n theField = theTheme.GetFTab.FindField(\"Shape\")\n rec = theTheme.GetFTab.AddRecord\n theTheme.GetFTab.SetValue(theField, rec, p)\n theTheme.GetFTab.GetSelection.ClearAll\n
theTheme.GetFTab.GetSelection.Set(rec)\n theTheme.GetFTab.UpdateSelection\n theTheme.GetFTab.EndTransaction\n else\n gc = GraphicShape.Make(c)\n theView.GetGraphics.UnselectAll\n gc.SetSelected(TRUE)\n theView.GetGraphics.Add(gc)\n end\n av.GetProject.SetModified(true)\nend\n"
)
(Script.60
Name: "Ax3.DoitPolygon.Depth"
SourceCode: "v1 = SELF.Get(0)\n\n'***********************\n' initialize variables\n'***********************\n\n'MAXNODES = _shapeList.Count\nMAXNODES = _matrixList.Count\nINIFINITY = 9999\ntotalDepth = 0\nthreeDepth = 0\n\nw_element = 0\nv_element = 0\nu_element = 0\nw_u_element = 0\n\n'***********************\n' initialise Lists:\n' WList, VList, \n'***********************\n\nWList = List.Make\nVList = List.Make\nshortestDistanceList = List.Make\nnumber_of_wList = List.Make\ndepthList = List.Make\n\nfor each i in 0..(MAXNODES-1)\n VList.Add(i)\nen
d \n\n'*************************\n\n WList.Insert(v1)\n\n'' msgbox.ListAsString(WList, \"DDDDD\", \"DDDDD\")\n\nfor each i in 0..(MAXNODES-1)\n shortestDistanceList.Add(0)\nend \n\nshortestDistanceList.Set(v1,0)\n\n'' msgbox.ListAsString(VList-WList, \"DDDDD\", \"DDDDD\")\n\nfor each u_element in (VList - WList)\n v1_u_element = (v1*MAXNODES) + u_element\n \n 'shortestDistanceList.Set(u_element, _weightList.Get(v1_u_element))\n shortestDistanceList.Set(u_element, _List_of_AdjacencyList.Get(v1_u_element))\n\n '' shortestDistance
List.Set(u_element, 10)\n\nend\n\n'******************************************\n' now repeatedly enlarge WList until WList\n' includes all vertex in VList\n'****************************************** \n\nwhile (WList.Count <> VList.Count)\n ''** find the vertex w>VList - WList at the minimum \n ''** distance from v1\n MinDistance = INIFINITY\n \n number_of_w = 0\n for each v_element in (VList - WList)\n if (shortestDistanceList.Get(v_element) < MinDistance) then\n MinDistance = shortestDistanceList.Get(v_elem
ent)\n w_element = v_element\n number_of_w = number_of_w + 1\n '' msgbox.info(number_of_w.asstring, \"DDDD\")\n end '* end if\n '' msgbox.info(number_of_w.asstring, \"DDDD\")\n end '* end for\n \n ''** add w to WList\n number_of_wList.Add(number_of_w)\n WList.Add(w_element)\n \n ''** Update the shortest distance to vertex in V-W\n for each u_element in (VList - WList)\n w_u_element = w_element*MAXNODES + u_element\n minValue = av.Run(\"Ax3.Doit.Minimum\", \n {shortestDist
anceList.Get(u_element),\n (shortestDistanceList.Get(w_element) + \n _List_of_adjacencyList.Get(w_u_element))})\n \n '' minValue = av.Run(\"Ax3.Doit.Minimum\", \n '' {shortestDistanceList.Get(u_element),\n '' (shortes
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -