Still we had problems with the identification of rivers of yellowstone park map or any poly-line. Because poly-line doesn't have significant width to hover the mouse. It will be harder for a blind user to find out a river or stay on a river.
To solve this problem we need to implement buffering. Buffered rivers have significant width to hover on. That means we need to buffer a certain area along the river shore. Here is a reference link for more information about buffering:
http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=Buffer_%28Analysis%29
The sample code I found from ESRI resources, deals only with a selected feature. Here feature means a geometric shape (as: line, polyline, polygon, point etc.). So there is a feature selector user needs to enable first. Then the user needs to click on desired feature on the map and then click on the "do bufer" button. This button opens a new window with a slider to select a buffering distance.After pressing "ok" button, the selected feature along with the distance selected is covered by crossing line. This is called the buffered area.
This kind of buffering could not serve our purpose. Because one river is consisted of many poly-lines. So buffering a poly-line means buffering a portion of the river. Whether we wanted to buffer all the rivers at a time.
So we needed to write a new method for buffering. This method iterates though all the layers of the map and searches for poly-lines. If it finds a layer of poly-line, it starts buffering with a specified distance. This method is invoked only by pressing a button. There is no feature selection necessary. It continues buffering until all the poly-lines of the layer are buffered. The required time of buffering depends on the number of poly-lines. As for example the "usa.mxd" has 679 poly-lines for its "usHighways" layers and it takes 25 seconds. And the "yellowStone.mxd" has 1737 poly-lines for its "major-rivers" layer and it takes 55 seconds.
Here I am assuming that each layer has only one type of geometric feature. This method is much straight forward and requires less user involvement. Although the speed of buffering is still an issue.
No comments:
Post a Comment