International Journal of EmergingTrends & Technology in Computer Science(IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org
Volume 3, Issue 3, May June 2014 ISSN 2278-6856
Volume 3, Issue 3 May June 2014 Page 115
Abstract: Most of the cities are designed to have certain direction trend, the roads are extended around certain directions and always two directions that most probably occurred by streets. Virtual rotation of region maps is considered a proper, and sometimes a necessary step, during the process of network infrastructure design. Rotation is useful to simplify the involved calculations for finding the optimal routes. This auto alignment can be useful to make the the way of applying routing optimization algorithms easy. In this paper a new algorithm is introduced, it takes the spatial coordinates of streets nodes from the GIS region database, allocate the most frequent two perpendicular streets directions, then determine the required rotation angle to prepare a map such that the long & parallel streets extend as horizontal lines in the new map.
1. INTRODUCTION Most probably the alignment of any district of interest is not along the main coordinate axes of the geographic north-east system; it may be rotated toward any direction, as an example see figure (1). The arbitrary alignment of the studied area may cause many computational difficulties in some region partitioning stages and in the stage of allocating the network main branching points, and also in the stage of selecting the optimal path points. So, to simplify the computation process a virtual re- alignment is needed to make the principal alignment of the area along specific form; such that the longest roads of the area should be nearly horizontal (i.e., along the east). For purpose of network planning, the use of auto virtual alignment will greatly simplify the process of dividing the area into small sectors; such that each sector has a central feeding switch (or hup) which feeds services to the secondary branch hups.
Figure 1 Region real placement and tendency; it is drawn in Arc Map application A comprehensive survey we have done to find out the available tools for auto alignment of GIS maps, as result we found that the most of the available GIS tools depends on user interfere to determine the proper angle for alignment [1] [2] [3]. Also, during the survey we found many methods have been introduced to auto align raster image; the principal component analyses based methods are the most commonly used ones [4] [5].
2. PROPOSED ROTATION ALGORITHM Most of the planners of district maps draw the relevant GIS maps according to the available region size, dimensions, and direction; usually these parameters could be allocated depending on the four districts corners. Normally, when the main streets are planned they placed perpendicular or parallel to each others. So, a proper simple rotation process is useful to align the streets such that the longest ones become horizontal and others be vertical (most of them). The first step in our developed simple and fast virtual auto rotation algorithm is the calculation of streets direction angles, then determining the direction histogram. After that, the most redundant pair of perpendicular streets' directions is calculated; this step is accomplished by scanning all streets' segments records to find the two perpendicular angles bins that most of the streets have. As final step, the centroids (1& 2) of these two angles bins are determined. To decide which one of these two centroids represent the required alignment angle; then distribute the streets segments among the centroids angles (1) and its perpendicular (2 1+90) according to the closest angle criterion. Then, choose the angle (1 or 2) that leads to greater sum of segments lengths as the district direction angle. As a final step use the chosen angle () to rotate the area, as shown in figure (2). Algorithm (1) presents the applied steps of the rotation algorithm.
A.Original B. After alignment Figure 2 The region before & after rotation An Automatic Method for Rotating Urban Maps to Simplify Area Planning Tasks
Zahraa M. Matrood 1 , Loay E. George 2 and Faleh H. Mahmood 3
1 Baghdad University, College of Science, Al-SalamRoad, Karbala city, Iraq 2 Baghdad University, College of Science, University Complex, Aljaderia, Baghdad, Iraq 3 Baghdad University, College of Science, Remote Sensing Unit, AL-Karada, Baghdad, Iraq International Journal of EmergingTrends & Technology in Computer Science(IJETTCS) Web Site: www.ijettcs.org Email: editor@ijettcs.org Volume 3, Issue 3, May June 2014 ISSN 2278-6856
Volume 3, Issue 3 May June 2014 Page 116
Algorithm (1): Rotation algorithm Input: segment list Output: segment list after rotation Step 1: find minimum x and y for each segment xmin =SegR(0).x1 ymin =SegR(0).y1 For each segment i If xmin >SegR(i).x1 Then xmin =SegR(i).x1 If xmin >SegR(i).x2 Then xmin =SegR(i).x2 If ymin >SegR(i).y1 Then ymin =SegR(i).y1 If ymin >SegR(i).y2 Then ymin =SegR(i).y2 Next segment Step 2: calculate the histogram of angles of all streets segments His (-18 To 18) For each segment i j =CInt(SegRi.ang / 5) Hisj =Hisj+1 Next segment Step 3: Find the most redundant pair of perpendicular directions Max=0 For i =-18 To 0 Sm =Hisi+His i +18 If max <Sm Then j =I : Max =Sm End if Next i Step 4: pass over all segments and find those satisfy: Ang1 =j * 5 - 2.5 Ang2 =Ang1 +90 For each segment i If Abs (SegR(i).ang - Ang1) <=7.5 Then Sm1 =Sm1 +SegR(i).ang Sm2 =Sm2 +SegR(i).len N1 =N1 +1 ElseIf Abs (SegR(i).ang - Ang2) <=7.5 Then Sm3 =Sm2 +SegR(i).ang Sm4 =Sm4 +SegR(i).len N2 =N2 +1 End If Next segment Step 5: find the angle and length average If N1 >0 Then Sm1 =Sm1 / N1 Sm2 =Sm2 / N1 End if If n2 >0 Then Sm3 =Sm3 / n2 Sm4 =Sm4 / n2 End if Step 6: check which angle average is greater than the other If Sm2 >Sm4 Then Ang =Sm1 Else Ang =Sm3 Step 7: shift nodes to minx, minY and rotate with angle chosen in step 6 D2R =Atn(1) / 45 c =Cos (ang * D2R) s =Sin (ang * D2R) For each segment dx =SegR(i).x1 xmin dy =SegR(i).y1 - ymin rSegR(i).x1 =dx * c +dy * s +xmin rSegR(i).y1 =-dx * s +dy * c +ymin dx =SegR(i).x2 xmin dy =SegR(i).y2 ymin rSegR(i).x2 =dx * c +dy * s +xmin rSegR(i).y2 =-dx * s +dy * c +ymin Next segment End
Figure 3 Region real placement and tendency, it is drawn in Arc Map application
3. Experimental Results Figures (3 & 4), present the map of a district that drawn using ArcMap, this district map is passed through the proposed virtual auto alignment algorithm and the attained result is shown figure (5).
Figure 4 Region real placement and tendency; it is drawn in VB6 form
Figure 5 The region after rotation; it is drawn on VB6 form International Journal of EmergingTrends & Technology in Computer Science(IJETTCS) Web Site: www.ijettcs.org Email: editor@ijettcs.org Volume 3, Issue 3, May June 2014 ISSN 2278-6856
Volume 3, Issue 3 May June 2014 Page 117
4. Conclusions A tool to convert data from GIS system to Application development environment (like VB6) should be available; this tool should migrates data from geographic databases (shape files, personal geo-database, geo-database) to data form that easily could be to handled (like text files). Before implementing the algorithm, the data must be arranged and make sure that there are no errors during region planning stage. The proposed algorithm is possible to apply using any programming language because it depends on simple equations, and doesnt require high computational power. The elapsed processing time is a relatively short, nearly few seconds, for region with area equal to 3 or 4 square kilometers.
References [1] Paul Cote, "GIS Manual: GIS Tutorials and Resources", Harvard University - Graduate School of Design; [2] http://www.gsd.harvard.edu/gis/manual/projections/ [3] Amy Jillier, "Manual for Working with ArcGIS 10", Geographic Information Science, Information and Support, Michigan Technological University; [4] http://gis.mtu.edu/?p=490 [5] QGIS Documentation, QGIS 2.2; [6] http://www.qgis.org/en/docs/index.html#22 [7] Turgay Celik and Kai-Kuang Ma, "Fast object-based image registration using principal component analysis for super-resolution imaging", 5th International Conference on Visual Information Engineering (VIE 2008), 2008. [8] Fernando de la Torre and Minh Hoai Nguyen, "Parameterized Kernel Principal Component Analysis: Theory and Applications to Supervised and Unsupervised Image Alignment", Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, 2008.
Authors Dr. Loay E. George holds Ph.D in digital image processing, his main interests in multimedia & computer vision applications. He works as a teaching staff member in Baghdad University / College of Science.
Faleh H. Mahmood obtain the B.Sc, M.Sc., and Ph.D. degrees in Physics, Digital Image Processing and Remote Sensing from Baghdad University, College of Science, and Department of Physics in 1990, 2000 and 2008 respectively. Presently, I work as an Assistant Professor in the Baghdad University, College of Science, Remote Sensing Unit. My interest in the fields of image processing and remote sensing.