zsiki / GeoEasy

land surveying calculation, network adjustment, digital terrain models, regression calculation
http://digikom.hu/english/geo_easy_e.html
GNU General Public License v2.0
73 stars 34 forks source link

GNU Gama Export? #151

Closed zvezdochiot closed 3 years ago

zvezdochiot commented 3 years ago

Maybe when exporting to GNU Gama, not to write "rough" coordinates to points? Then GeoEasy would at least be a converter for such tasks (https://github.com/zsiki/GeoEasy/issues/150). https://github.com/zsiki/GeoEasy/blob/dca355d11fd97baedfa555b7e1782f68ed6b4d8a/src/xmlgeo.tcl#L1018-L1028 to

            if {$pcooopt == "noval"} {
                puts $xml "<point id=\"$pn\" adj=\"$adjxy\" />"
            } else {
                set pcoo [GetCoord $pn {38 37}]
                if {$pcoo == ""} {
                    set pcoo [GetCoord $pn {138 137}]
                    if {$pcoo == ""} {
                        puts $xml "<point id=\"$pn\" adj=\"$adjxy\" />"
                    } else {
                        puts $xml "<point id=\"$pn\" y=\"[format %.${decimals}f [GetVal 138 $pcoo]]\" x=\"[format %.${decimals}f [GetVal 137 $pcoo]]\" adj=\"$adjxy\" />"
                    }
                } else {
                    puts $xml "<point id=\"$pn\" y=\"[format %.${decimals}f [GetVal 38 $pcoo]]\" x=\"[format %.${decimals}f [GetVal 37 $pcoo]]\" adj=\"$adjxy\" />"
                }
            }
zvezdochiot commented 3 years ago

Hi @zsiki .

Calculate "Preliminary coordinates": prel Remove value "Preliminary coordinates": noval "GNU Gama export ..." gama-export There are no undefined points in the list!

zvezdochiot commented 3 years ago

Hi @zsiki .

See https://github.com/Geo-Linux-Calculations/GeoEasy/commit/8ce9455445b01bca7ca89d4a72aebae05fe4cfb7

zsiki commented 3 years ago

GeoEasy not only exports data to GNU Gama, it makes extensive checks on observations and preliminary coordinates. It helps early error detection of some type of errors (for example typo in point id). From my point of view it is the normal behavior.