In the practical use of Python, if you are exposed to the Python sample program in basic plotting, are you puzzled? If you want to learn more about the Python sample program, click the following article. I hope you will gain some benefits.
Some Python example programs for basic surveying and plotting
I have been to IEU for more than half a year of surveying and mapping, and have learned more than n courses in the shortest time with a short-term training attitude.
Fortunately, zju, a bachelor's degree, has developed the habit of "good reading, not seeking for a thorough solution". However, if you give the formulas, you will never go deep into the derivation and then compile the program. In the future, it will be called directly. Sorry, IEU training does not allow computers to be used. The only smart electronic device around me is a Nokia N81. equipped with Symbian S60v3...
Mr. BigHead, a friend of the same class, studies the cross-platform python language. It is used for programming on the middleware of Windows Mobile. It is a pleasure to write on its slide-side keyboard every day. Lele is better than zlele, So I installed the py version on N81 and learned it in the same way. Within a few months, several small steps such as "Graph number calculation", "" ", and" computation of Approximate Adjustment of composite wires "(Modern Surveying) were arranged.
(1) Calculation of part numbers of scale topographic map series
[Function] enter the longitude and latitude to calculate the image number of the map at each scale of the point.
- [code]
Image number. Enter the longitude and latitude to calculate the image number of each scale.
- Def dfm2d (d, f, m ):
- Temp = m/60.0
- Temptemp = temp + f
- Res = d + temp/60.0
- Return res
- Def u (s ):
- Return s. decode ('utf8 ')
- Def gridnn (n, x, y, xs, xe, ys, ye ):
- Dx = (xe-xs)/(n + 0.0)
- Dy = (ye-ys)/(n + 0.0)
- For I in range (1, n + 1 ):
- If y> = (ye-I * dy ):
- Break
- Tempy = I
- For I in range (1, n + 1 ):
- If x <= (xs + I * dx ):
- Break
- Tempx = I
- Return (tempy-1) * n + tempx
- # Main
- Print u ('Welcome to use the \ n series scale topographic map to calculate the split number
\ NPowered by FanZhenzhen IEU Version 1.0 \ n ')
- Ld = int (raw_input (u ('input longitude L degree :')))
- Lf = int (raw_input (u ('input longitude L score :')))
- Lm = int (raw_input (u ('input longitude L seconds :')))
- Bd = int (raw_input (u ('input latitude Level B :')))
- Bf = int (raw_input (u ('input latitude score B :')))
- Bm = int (raw_input (u ('input latitude B seconds :')))
- L = dfm2d (Ld, Lf, Lm)
- B = dfm2d (Bd, Bf, Bm)
Calculate the million Image number
- Seq100_hang = int (B/4) + 1
- Seq100_lie = int (L/6) + 31
- Le100 = (Seq100_lie-30) * 6
- Bn100 = Seq100_hang * 4
- Print u ('1: 1 million image no '),
Seq100_hang, '-', Seq100_lie
The above article introduces the Python sample program.