Avatar

Achskonvertierung *.040 --> *.GSI (Geodäsie/Vermessung)

MichaeL ⌂, Bad Vilbel, Thursday, 20.08.2009, 20:46 (vor 5573 Tagen) @ AWO

Hallo Andy,

ich habe eine 40er Datei, wo ich auch eine GSI-Datei zu habe, aus Deinem Ordner (von FLIP bekommen) gewandelt. Nachfolgend die Datei, die ich gelesen habe, was rausgekommen ist, die SOLL-Datei und ein Vergleich der Schlüsselwörter.

Am Ende noch die Methode, wie sie im Moment aussieht.


Folgende Eingangsdaten (von Dir):


04040  39996930       0   -20518930        0  2150519900  3431497165  5805669054
04040  40001683    4753           1    45000  2149045240  3431496057  5805664432
04040  40046683   45000      450000        0  2467355130  3431478709  5805623450
04040  40166471  119788      450000    45000   162014390  3431401750  5805664926
04040  40211471   45000           0        0   480324270  3431426442  5805701950
04040  40270487   59016          -1   -80000   480324270  3431466863  5805744950
04040  40321687   51200    -1250000        0   349944540  3431499245  5805784486
04040  40361195   39508    -1250000   -80000   148734880  3431514263  5805820850
04040  40405284   44089    -9000000        0    20870190  3431519002  5805864606
04040  40486210   80926          -1        0  3963626490  3431518017  5805945499
04040  40523894   37684    -4500000        0  3963626490  3431515865  5805983122
04040  40570748   46854    -4500000  -180000  3897341270  3431510761  5806029676
04040  40642748   72000           0        0  3846411690  3431495433  5806100004
04040  40698230   55482           0        0  3846411690  3431482177  5806153879
04040  40698231       1           0        0  3846411690  3431482177  5806153880

Die GSI, die ich daraus mache, lautet:


*41....+0000000000000040 42....+00000000HZALIGNM 43....+00000000STACOORD 
*11....+0000000039996930 71....+00000000000CURVE 72....-0000000020518930 72....+0000000000000NON 81..10+0000003431497165 82..10+0000005805669054 
*11....+0000000040001683 71....+00000000CURVEOUT 72....+0000000000000001 72....+0000000000045000 81..10+0000003431496057 82..10+0000005805664432 
*11....+0000000040046683 71....+00000000000CURVE 72....+0000000000450000 72....+0000000000000NON 81..10+0000003431478709 82..10+0000005805623450 
*11....+0000000040166471 71....+000000000SPIROUT 72....+0000000000450000 72....+0000000000045000 81..10+0000003431401750 82..10+0000005805664926 
*11....+0000000040211471 71....+00000000STRAIGHT 72....+0000000000000NON 72....+0000000000000NON 81..10+0000003431426442 82..10+0000005805701950 
*11....+0000000040270487 71....+00000000STRAIGHT 72....-0000000000000001 72....-0000000000080000 81..10+0000003431466863 82..10+0000005805744950 
*11....+0000000040321687 71....+00000000000CURVE 72....-0000000001250000 72....+0000000000000NON 81..10+0000003431499245 82..10+0000005805784486 
*11....+0000000040361195 71....+00000000STRAIGHT 72....-0000000001250000 72....-0000000000080000 81..10+0000003431514263 82..10+0000005805820850 
*11....+0000000040405284 71....+00000000000CURVE 72....-0000000009000000 72....+0000000000000NON 81..10+0000003431519002 82..10+0000005805864606 
*11....+0000000040486210 71....+00000000000CURVE 72....-0000000000000001 72....+0000000000000NON 81..10+0000003431518017 82..10+0000005805945499 
*11....+0000000040523894 71....+00000000000CURVE 72....-0000000004500000 72....+0000000000000NON 81..10+0000003431515865 82..10+0000005805983122 
*11....+0000000040570748 71....+000000000SPIROUT 72....-0000000004500000 72....-0000000000180000 81..10+0000003431510761 82..10+0000005806029676 
*11....+0000000040642748 71....+00000000STRAIGHT 72....+0000000000000NON 72....+0000000000000NON 81..10+0000003431495433 82..10+0000005806100004 
*11....+0000000040698230 71....+00000000STRAIGHT 72....+0000000000000NON 72....+0000000000000NON 81..10+0000003431482177 82..10+0000005806153879 
*11....+0000000040698231 71....+0000000000000EOP 72....+0000000000000NON 72....+0000000000000NON 81..10+0000003431482177 82..10+0000005806153880 


Die GSI, die entstehen solle, lautet aber:

*41....+0000000000ANr 40 42....+00000000HZALIGNM 43....+00000000STACOORD 
*11....+0000000039996930 71....+00000000000CURVE 72....-0000000002051893 73....+0000000000000NON 81..40+0000003431497165 82..40+0000005805669054 
*11....+0000000040001683 71....+0000000000SPIRIN 72....+0000000000045000 73....+0000000000000NON 81..40+0000003431496057 82..40+0000005805664432 
*11....+0000000040046683 71....+00000000000CURVE 72....+0000000000045000 73....+0000000000000NON 81..40+0000003431478709 82..40+0000005805623450 
*11....+0000000040166471 71....+000000000SPIROUT 72....+0000000000045000 73....+0000000000000NON 81..40+0000003431401750 82..40+0000005805664926 
*11....+0000000040211471 71....+00000000STRAIGHT 72....+0000000000000NON 73....+0000000000000NON 81..40+0000003431426442 82..40+0000005805701950 
*11....+0000000040270487 71....+0000000000SPIRIN 72....-0000000000080000 73....+0000000000000NON 81..40+0000003431466863 82..40+0000005805744950 
*11....+0000000040321687 71....+00000000000CURVE 72....-0000000000125000 73....+0000000000000NON 81..40+0000003431499245 82..40+0000005805784486 
*11....+0000000040361195 71....+00000000CURVEOUT 72....-0000000000125000 73....+0000000000000NON 74....-0000000000900000 81..40+0000003431514263 82..40+0000005805820850 
*11....+0000000040405284 71....+00000000000CURVE 72....-0000000000900000 73....+0000000000000NON 81..40+0000003431519002 82..40+0000005805864606 
*11....+0000000040486210 71....+00000000STRAIGHT 72....+0000000000000NON 73....+0000000000000NON 81..40+0000003431518017 82..40+0000005805945499 
*11....+0000000040523894 71....+00000000000CURVE 72....-0000000000450000 73....+0000000000000NON 81..40+0000003431515865 82..40+0000005805983122 
*11....+0000000040570748 71....+000000000SPIROUT 72....-0000000000180000 73....+0000000000000NON 81..40+0000003431510761 82..40+0000005806029676 
*11....+0000000040642748 71....+00000000STRAIGHT 72....+0000000000000NON 73....+0000000000000NON 81..40+0000003431495433 82..40+0000005806100004 
*11....+0000000040698230 71....+00000000STRAIGHT 72....+0000000000000NON 73....+0000000000000NON 81..40+0000003431482177 82..40+0000005806153879 
*11....+0000000040698231 71....+0000000000000EOP 72....+0000000000000NON 73....+0000000000000NON 81..40+0000003431482177 82..40+0000005806153880 

Direkter Vergleich:

HZALIGNM  HZALIGNM ok
   CURVE     CURVE ok
  SPIRIN  CURVEOUT FEHLER
   CURVE     CURVE OK
 SPIROUT   SPIROUT OK
STRAIGHT  STRAIGHT OK
  SPIRIN  STRAIGHT FEHLER
   CURVE     CURVE OK
CURVEOUT  STRAIGHT FEHLER
   CURVE     CURVE OK
STRAIGHT     CURVE FEHLER
   CURVE     CURVE OK
 SPIROUT   SPIROUT OK
STRAIGHT  STRAIGHT OK
STRAIGHT  STRAIGHT OK
     EOP       EOP OK

Die Methode sieht, mit Deiner gemachten Änderung, nun so aus:

private String getGSIStationKeyword(int stationNumber) {
  // letztes Element --> EOP
  if (stationNumber==this.countStations()-1)
   return "EOP"; 
 
  AxisStation preStation     = stationNumber > 0?this.getStation(stationNumber-1):null;
  AxisStation behindStation  = stationNumber < this.countStations()-1?this.getStation(stationNumber+1):null;
  AxisStation currentStation = this.getStation(stationNumber);
 
  if ( currentStation.getRadius() == 0 && currentStation.getClothoidParameter() != 0) {
   return "SPIRIN";
  }
 
  else if ( currentStation.getRadius() != 0 && currentStation.getClothoidParameter() == 0) {
   return "CURVE";
  }
 
  else if ( preStation != null && currentStation.getRadius() != 0 && currentStation.getClothoidParameter() != 0 && behindStation.getRadius() == 0)
   return "SPIROUT";
 
  else if ( preStation != null &&  currentStation.getRadius() != 0 && currentStation.getClothoidParameter() != 0 && preStation.getRadius() !=0 && behindStation.getRadius() !=0 && preStation.getRadius() < behindStation.getRadius() ) {
   return "CURVEOUT";
  }
  else //( currentStation.getRadius() == 0 && currentStation.getClothoidParameter() == 0) {
   return "STRAIGHT";
 
 }

Wie Du siehst, frage ich preStation != null ab. Ich mache es, um zu prüfen, ob es überhaupt ein Vorgänger gibt. Wenn preStation null ist, ist das aktuelle Element das erste und es gibt keinen Vorgänger - das nur zur Erklärung.

Ich hoffe, das hilft weiter.
Gruß Micha

P.S. Code 74 in der GSI habe ich auch noch nicht ganz kapier, wann kommt der?

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences


gesamter Thread:

 RSS-Feed dieser Diskussion