Save this PDF as:

Size: px
Start display at page:



1 A HOPFIED NEURAL NETWORK ALGORITHM FOR AUTOMATED NAME PLACEMENT FOR POINT FEATURE Fan Hong Zhang zuxun Du Daosheng The State key Lab. of,wtusm,39 Luoyu Road,Wuhan,Chna, Tel: , Fax: KEY WORDS: Hopfeld neural network, Energy functon, Map name placement. ABSTRACT Ths paper presents a method of addng label to the map especally for the pont feature. Ths method overcomes the shortcomng of tradtonal methods eg. Conflct-backtrackng method. Its kernel algorthm use the hopfleld neural network to fnd the best label poston for pont feature. The expermental results proves that ths algorthm has good permanence and hgh speed. PREFACE Map name s an mportant component of the map, whether labels n place or not plays an mportant role on the readablty and usefulness of a map. Thus far, the placement of cartographc names has been a manual process whch takes plenty of tme and energy. More recently, many dfferent algorthms have been developed to ad ths process. Among them are the prortes suggested by Yoel[Yoel,97] for the placement of names for pont feature, the nteger programmng s desgned for the placement of names for pont and lnear feature[zoraster, 986] and an expert system approach for dense-map name placement[doerschler, 989]. Yet the automaton of name placement has proved dffcult to be mplemented successfully. Because an automated name-placement system must select names from scalendependent databases and place them n a manner acceptably smlar to that of a traned cartographer. Latest research shows that the kernel problem of map name placement s a NP-hard problem, one way to solve ths problem s to try some way to decrease the complexty or mprove the effcency of problem n order to fnd the near-optmal poston n the user-tolerable tme. Ths paper regards ths problem of map name placement as a typcal combnatoral-optmal problem and propose to makes use of the neural network methods to fnd the best name poston of local or global for each map resdent feature. Compared wth those of the tradtonal conflct-trackng methods, ths method through experment turns out to be better and more effcent. EXPERIMENTAL DATA Our expermental data comes from the :5 Natonal Base Map Database and comprses 3 topographcal map sheets that are stored n the vector format of ARC/INFO. The map-no of the three maps are respectvely H-48-[0],H-48-[3] and H-48-[4], each of whch s stored nto 6 layers that nclude hydrogen, roads, vegetaton and admnstratve boundary. These data contan both the spatal features n the form of dgtal map and the attrbutes nformaton such as map name and the feature code n terms of the natonal standard encodng of geographc feature by whch we can easly dscern label attrbutes such as sze, style and spacng etc. The 3 map sheets contan respectvely 35,65 and 734 resdent ponts. The area of these maps s near Chendu cty, the captal of the Schuan Provnce n the west chna and s well-known for ts dense-populaton. Because map name placement n a dense map s more dffcult than n a sparse map, these 3 maps among our experment data can well serve as good representatves. 6 Internatonal Archves of Photogrammetry and Remote Sensng. Vol. XXXIII, Part B4. Amsterdam 000.

2 3 NAME PLACEMENT PRINCIPLE FOR POINT FEATURE Map features can be categorzed nto ponts, lnes and polygons n terms of ther spatal dstrbuton, and name placement of the three knds of geographc features wll conform to dfferent cartographc conventons. However, after studyng varous knds of maps and labelng procedures, we fnd the followng prncples s n common adaptable. () belong to prncple Label should refer unambguously to ts ntended referent feature. Namely the relaton of the label and the referent feature should be easly recognzed but not be confused wth the other nearby labels and other geographc feature. () avodng off prncple The label name should make away for mportant geographc features, but not overlap mportant features, especally the features or labels of the same color. (3) accustomed to prncple The character poston character order or so on should accord wth the readng custom of the readers. To Chnese readers readng permts some flexblty, not rgdly adherng to a left-to-rght scannng of words. Both vertcal and horzontal algnments are commonly used. The pont name placement algorthm s used to dentfy pont feature depcted by pctoral symbols. The pont symbol s centered on a sngle coordnate. Accordng to both the prncple of the above mentoned and the partcularty of the pont feature, the prncple sutable for pont feature was gven as follows. ()Accordng to the map-makng regulatons of :50000 topographc of the People s Republc of Chna, the procedure for automated name placement s developed. One of the eght ranked postons surroundng a feature symbol wth referencng fxed postonal weght s used to place a pont feature label. In order of preference, these postons are : to the rght of the symbol,above,to the left, below, above and to the rght, above and to the left,below and to the left, below and to the rght, showed n Fgure.Poston wth hgher weghts are preferred over postons wth lower weghts. ()Pont label should not overlap the placed label and any pont feature. (3)Pont label should not overlap the mportant lnear feature of the same color such as ralways and maor roads etc, Whle overlap s unavodable, efforts should be made to decrease t. (4)labels and labels must not overlap each other Fgure. Ranked label postons for pont feature (5)Label name and the referent features had better locate n the same sde of the nearby lnear feature and label name can not overlap boundary. 4 THE SOLUTION TO THE AUTOMATED NAME PLACEMENT FOR RESIDENT FEATURE Pont feature nvolves resdent flag pont and elevaton pont etc., among whch resdent s representatve for ts largest number and hghest densty, Accordng to the prncple of name placement for pont feature mentoned above, the followng strateges are taken to automate name placement for resdent of topographcal map. The total solutons contan the followng 3 stages: step : coarsely choose the canddate poston and determne the optmal level for every poston. Internatonal Archves of Photogrammetry and Remote Sensng. Vol. XXXIII, Part B4. Amsterdam

3 Frst of all, 8 avalable poston for every resdent are chosen, showed n Fgure, through evaluaton of readablty and belong to relatons of the 8 postons, a weght factor s gven for every possble poston and detaled method s depcted as follow. The weght of the canddate poston s the functon of the prmary weght and the secondary weght, that s : weght = the prmary weght * the secondary weght Specfy a basc weght from.0 to 0.93 correspondng to the prorty from hgh to low. Use a rectangle area to represent the area that a label name occupes and udge f the area wll overlap the mportant feature such as ralway, maor road and mnor road. Dfferent secondary weght factor s assgned accordngly. For example, f the label rectangle of one feature overlaps wth a ralway or a maor road, accordng to the extent of overlap, ts secondary weght should be assgned to 0., 0., 0.3 or 0.4 respectvely; In order to control overlap wth the mnor road, the secondary weght of 0.5,0.5,0.53 should be assgned for dfferent extent of overlap. Judge whether the label and the referent feature appears on the same sde of the boundary and whether the label overlap wth the boundary, To handle ths case, an approprate secondary factor should be desgnated. Step : construct a hopfeld network, set the ntal value for t and make t run. If necessary, make the network run many tmes, observe ts convergence, select the best results and record t. Step 3: after takng the prevous steps, local optmal processng s made so as to resolve the remanng conflcts between the resdents labels. Few remaned conflcts that have not yet been resolved n the end, wll be adusted and revsed manually. The core of the whole algorthm s step, that s to use hopfeld network to fnd the best local or global label poston for every resdent on topographcal map. Ths hopfeld approach runs the network n an teratve way that wll converge very fast avodng of many tmes backtrackng and the nested backtrackng of the tradtonal method, whch wll, as a result, mproves the effcency of the search algorthm. 5 THE ALGORITHM OF THE HOPFIELD NEURAL NETWORK TO FIND THE BEST LABEL POSITION FOR RESIDENT Hopfeld neural network s a one-level of feedback network, Let N, N, Nn stand for the n neural unt, W stands for the connecton weght from N to N. If we use W to represent the connecton strength between the n nodes, Hopfeld s symmetrc, then: W = W, {,, 3... n } For the contnung feedback network, when the network s workng, the relaton between the nput and the output can be represented n terms of the followng status equaton, among whch, g( ) s a contnung monotony ascendng functon wth up lmt, among whch sgmond or hyperbolc tangent functon most commonly used, U represents the nput of the neural unt, V represents the output of the neural unt I, I represents the bas of the neural network namely the stmulus comng from the external world. C du u = + WV + I dt t V = g( U ) If the evoluton of the equaton takes the asynchronous way, at any tme, only one status of one neural unt wll be changed. Suppose U(t) stands for the sum of all the nputs of the neural unt at the tme of t, V(t+) stands for the output status of ths neural unt at the tme of t+,then: U () t = W V () t + I V ( t+ ) = g( U ( t)) = g( W V ( t) + I ( t)) 64 Internatonal Archves of Photogrammetry and Remote Sensng. Vol. XXXIII, Part B4. Amsterdam 000.

4 For the hopfeld network, the Lyapunov energy functon wll take the followng form: n n n E = TVV VI = = = U () t = W V () t + I V ( t+ ) = g( U ( t)) = g( W V ( t) + I ( t)) n n n E = TVV VI = = = It has been proved that hopfeld network s a non-lnear moton system. There exsts one or more mnmum pont or balancng pont. At some tme, after the status of every neural unt s gven and the ntal network status s set up, the status of the network wll change n the drecton of energy gradually decreasng n the lght of the workng equaton, and n the end, approach or reach the balanced status of the network, whch s the mnmum pont of the energy. Ths s convergence of the energy of the hopfeld neural network. In ths way, whle the energy functon s converged to a mnmum pont, the best soluton for the problem wll be produced. The problem of fndng the best label poston for resdent feature can be regarded as a combnatoral optmal problem, A hypotheszed map contans m resdents, and every resdent has n canddate ponts(such as, n = 8, 6 ). There are m n canddate ponts, and these resdents wll be lsted as a matrx n whch n canddate label postons of one resdent wll be lned as one row, altogether there are m row * n column, as showed n table. Consderng ths table as a matrx of m rows * n columns, m stands for the number of the resdents, n stands for the canddate label poston for every resdent. If we correspond one canddate label poston to one neural unt, thus we can construct a hopfeld neural network that comprses m n neural unt. In order to defne the energy functon, we descrbe the problem as the the sum of constrant condton and the optmal goals as follows: 3 canddate label poston Resdent pont # # 3# 4# 5# 6# 7# 8# # # # # # Table canddate label poston for resdent Constrant condton: every resdent can choose only one label poston. The most optmal goal: the number of overlappng between two label rectangle area s the smallest. Accordng to the above constrant condton and the most optmal goal, we can gve out the energy functon of the network as follows. B E = V + A k l (,,, ) D k lvv Of the above equaton, the frst tem represents the constrant condton, and only one label poston s allowed for one resdent feature. When ths condton s met, the frst tem wll be equal to 0. The second tem s optmal goal, D(,,k,l) s specfed as follow: Internatonal Archves of Photogrammetry and Remote Sensng. Vol. XXXIII, Part B4. Amsterdam

5 (,, k, l) D = whenv 0 whenv,, V V overlap do not each over overlap each other Thus the second tem s the multpled number of the overlap between every two label rectangles, f the choce of label poston s the most optmal, E can reach the mnmum value, and f the choce of label poston s more optmal, E can reach the smaller value. By comparng the energy functon wth the standard energy functon, the connectng weght between unt and unt wll be determned as: ( ) T = AD,, k, l Bδ...( ) δ,,, = = 0 I = B...( ) Because W T,letW T,, =, then the runnng equaton wll be derved as follow:,, du dt V u = + ( AD(,, k, l) Bδ, ) V + B...( 3) τ ( ) = g u...( 4) Here we adopt sgmod functon as the I/O functon of the neural unt, and s the subscrpt,whch stands for the neural unt of th label poston of the th resdent. g(a) Fgure. sgmod functon g The detaled calculaton procedure and the teratve step are lsted below: ()The ntal value s set up n the lght of the above gudelne ()Calculate the output of every neural unt V ( t ) (3)Put V ( t ) 0 nto(),calculate du dt t t = 0 0 accordng to V g( u ) = (4)Accordng to equaton u ( t + t) = u ( t ) + t = t t, calculate u ( t t) (5)Return to step (). du dt of the next tme pont. 66 Internatonal Archves of Photogrammetry and Remote Sensng. Vol. XXXIII, Part B4. Amsterdam 000.

6 6 V EXPERIMENTAL RESULTS AND COCLUSION Experence of runnng the equaton shows that whle an approprate parameter and an approprate constant of the tme τ are specfed, the network wll converge normally to a satsfactory end status. Fgure 3. Results of automated name placement for resdent feature Our orgnal spatal data can not be drectly used n our algorthm. These map data must take preprocessng before beng avalable. The preprocessng operatons consst of the symbolzaton of map feature, the converson of vector feature to raster format, the codng of feature and the overlay of the raster maps. Besdes, raster spatal nformaton wll be wrtten nto dfferent bnary fles n terms of ther feature type. Meanwhle, the attrbute nformaton of the name wll be read out of the source fle and be wrtten nto a bnary fle to be easly used The label poston for the resdents, after 0 tmes of teraton of the neural network, we can reduce the conflct number The 3 maps comprse 35, 65 and 734 resdents features respectvely. Makng use of the above algorthm to fnd to 96, 97 and 3. After the local optmzaton and adustment, all conflcts are resolved, the runnng tme wll be respectvely 9, and 5 mnutes. The result s satsfactory. Fgure 3 shows the result of addng resdent label to h-48- [0] wth ths algorthm. The expermental results show that the neural network method can be used to solve the combnatoral optmal problem ncludng fndng the best label poston. Because the network can converge swftly, therefore complex problem wth combnatoral exploson danger can be converted to a smple problem, whch wll largely mprove the effcency of algorthm. The problems of name placement dffer sgnfcantly among the three categores. The approach to the placement of names for ponts s relatvely easer than lnear and areal features. In our experment, we merely consder resdent feature so that the problem can be smplfed. Now we are dong further research to make our algorthm more powerful so as to solve more problems and sut more cases. Internatonal Archves of Photogrammetry and Remote Sensng. Vol. XXXIII, Part B4. Amsterdam

7 REFERNENCES Hersch,S.A.,98, An Algorthm for Automatc Name Placement Around Pont Data. The Amercan Cartographer, vol 9., No., pp 5-7. Ann,J. And Freeman.H.,983, A Program for Automatc Name Placement, Proceedngs of Auto-Carto VI, Vol., pp Lee R.Ebnger and M. Goulette, 990, Non-nteractve Automated Names Placement for the 990 Decenal Census., cartography and Geographc Informaton systems, Vol. 7, No., pp Doerschler,J.,and H.Freeman,989, An Expert System for Dense-Map Name Placement.,Proceedngs of Auto-Carto 9,pp Steven Zoraster,986, Interger Programmng Appled to the Map Label Placement Problem., Cartographca, Vol.3, No.3, pp6-7. Cormely,R.G.,985, An LP Relaxaton Procedure for Annotaton Pont Feature Usng Interactve Graphcs. Proceedngs of Auto-Carto 7,pp Dacd S. Johnson, Umt Basoglu,989, The Use of Artfcal Intellgence n The Automated Placement of Cartographc Names, Proceedngs of Auto-Carto 9. Freeman,H., and J. Ahn,984, AUTOMAP: An Expert System for Automatc Map Name Placement.,Proceedngs of the Frst Internatonal Symposum on Spatal data Handlng, pp Marks J, Shebar S.,,99, The Computatonal Complexty of Cartographc Label placement, Techncal Report, Harvard Unversty. Yoel,P.,97, The logc of Automated Map Letterng.,The cartographc Journal, vol. 9,n.,pp James E. Mower,993, Automated Feature and Name Placement On Parallel Computers, Cartography and Geographc Informaton Systems, Vol.0, No., pp Zoraster,S.,99, Expert Systems and the Map Label Placement Problem. Cartographca, vol. 8, no., pp Internatonal Archves of Photogrammetry and Remote Sensng. Vol. XXXIII, Part B4. Amsterdam 000.