@enervance/insight-cim-model 0.0.234 → 0.0.235

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6689,6 +6689,9 @@ class ConverterIntegral7 {
6689
6689
  }
6690
6690
  exports.ConverterIntegral7 = ConverterIntegral7;
6691
6691
  function getGeoCoordinates(i7Data) {
6692
+ if (i7Data.bezeichner === 'Appelhülsen') {
6693
+ console.log();
6694
+ }
6692
6695
  /** Fall 1
6693
6696
  * geokoor_pl_breite_h && geokoor_pl_breite_m geokoor_pl_breite_s sind gepflegt */
6694
6697
  if (i7Data.geokoor_pl_breite_h && i7Data.geokoor_pl_breite_m && i7Data.geokoor_pl_breite_s &&
@@ -6710,20 +6713,15 @@ function getGeoCoordinates(i7Data) {
6710
6713
  * 3-degree Gauss-Kruger zone 3 */
6711
6714
  if (i7Data.geokoor_gk_rechts && i7Data.geokoor_gk_hoch) {
6712
6715
  let epsg = '';
6713
- const gkZone = String(i7Data.geokoor_gk_rechts).charAt(0);
6714
- switch (gkZone) {
6715
- case '2': {
6716
- epsg = 'EPSG:31466';
6717
- }
6718
- case '3': {
6719
- epsg = 'EPSG:31467';
6720
- }
6721
- case '4': {
6722
- epsg = 'EPSG:31468';
6723
- }
6724
- default: {
6725
- console.log(`Unbekanntes Gauss-Kruger Koordinatenformat ${gkZone}`);
6726
- }
6716
+ const gkZone = String(i7Data.geokoor_gk_rechts);
6717
+ if (/^(2[0-9]{6})/.test(gkZone)) {
6718
+ epsg = 'EPSG:31466';
6719
+ }
6720
+ else if (/^(3[0-9]{6})/.test(gkZone)) {
6721
+ epsg = 'EPSG:31467';
6722
+ }
6723
+ else if (/^(4[0-9]{6})/.test(gkZone)) {
6724
+ epsg = 'EPSG:31468';
6727
6725
  }
6728
6726
  const points = geodata_util_1.GeodataUtil.convertPoint(+i7Data.geokoor_gk_rechts, +i7Data.geokoor_gk_hoch, epsg);
6729
6727
  return [String(points[0]), String(points[1])];