为了计算一条线的长度,你不需要毕达哥拉斯公式,只需使用 ObjectLen(obje, "m")
ObjectLen(obje, "m")
为了获得所需的数字位数,请查看函数 Format$ 。文档中的示例:
Format$
Format$( 12345, ",#") ' returns "12,345" Format$(-12345, ",#") ' returns "-12,345" Format$( 12345, "$#") ' returns "$12345" Format$(-12345, "$#") ' returns "-$12345" Format$( 12345.678, "$,#.##") ' returns "$12,345.68" Format$(-12345.678, "$,#.##") ' returns "-$12,345.68" Format$( 12345.678, "$,#.##;($,#.##)") 'returns "$12,345.68" Format$(-12345.678, "$,#.##;($,#.##)") 'returns "($12,345.68)" Format$(12345.6789, ",#.###") ' returns "12,345.679" Format$(12345.6789, ",#.#") ' returns "12,345.7" Format$(-12345.6789, "#.###E+00") ' returns "-1.235e+04" Format$( 0.054321, "#.###E+00") ' returns "5.432e-02" Format$(-12345.6789, "#.###E-00") ' returns "-1.235e04" Format$( 0.054321, "#.###E-00") ' returns "5.432e-02" Format$(0.054321, "#.##%") ' returns "5.43%" Format$(0.054321, "#.##\%") ' returns ".05%" Format$(0.054321, "0.##\%") ' returns "0.05%"
例如,在创建任何对象或执行计算之前,应设置坐标系
Set CoordSys Earth Projection 25, 1003, "m", 7.4395833333, 46.9524055555, 600000, 200000 Bounds (-99400000, -99800000) (100600000, 100200000)
请注意,你有 CoordSys 在几个地方,不要混合它们
CoordSys
Set Map ... CoordSys ...
Commit Table ... CoordSys...
SessionInfo( SESSION_INFO_COORDSYS_CLAUSE )