Request JAG3D solution from command line ? (Software)

Francis, Sonntag, 16. April 2017, 12:51 (vor 11 Tagen)

Hi,
I've tested JAG3D with success for a simple LSQ adjustment based on 4 known stations and respective distances. I would like to do same solution for plenty of new stations' coordinates and updated distances.

Is there a way to update data and invoke adjustment solution from a command line script or external s/w ? Maybe a library we could use in background ?

Thanks in advance
Francis

Avatar

Request JAG3D solution from command line ?

Micha ⌂, Bad Vilbel, Sonntag, 16. April 2017, 15:42 (vor 10 Tagen) @ Francis

Hi,

Is there a way to update data and invoke adjustment solution from a command line script or external s/w ? Maybe a library we could use in background ?

The Class ProjectDatabase in package com.derletztekick.geodesy.openadjustment.sql provides an additional main-method, see below. To use this method via command line, you have to manipulate JAG3D's HSQL-database by your application. If you need a special/individual implementation, please get in contact with Transfer Centre Applied Geodesy.

kind regards
Micha

 public static void main(String args[]) {
  System.setProperty("com.github.fommil.netlib.BLAS",   "com.github.fommil.netlib.F2jBLAS");
  System.setProperty("com.github.fommil.netlib.LAPACK", "com.github.fommil.netlib.F2jLAPACK");
  System.setProperty("com.github.fommil.netlib.ARPACK", "com.github.fommil.netlib.F2jARPACK");
 
  if (args.length > 0) {
   DataBase db = new HSQLDB(args[0]);
   ProjectDatabase dataBase = new ProjectDatabase(db);
   NetworkAdjustment adjustment = dataBase.getNetworkAdjustment();
   int state = adjustment.estimateModel();
   if (state != NetworkAdjustment.ERROR_FREE_ESTIMATION) {
    System.err.println("ERROR IN ADJUSTMENT!!!");
    System.exit(state);
   }
   else {
    state = dataBase.saveResults();
    if (state != ProjectDatabase.ERROR_FREE) {
     System.err.println("STORAGE ERROR!!!");
     System.exit(state);
    }
    System.out.println("ADJUSTMENT DONE...");
   }
  }
 }

--
kostenlose Scripte und Software nicht nur für Geodäten || Portal für Geodäten mit angeschlossenem Forum-Vermessung

RSS-Feed dieser Diskussion