openoereb / mgdm2oereb

House of the rules to trafo the (ili oereb) world
0 stars 0 forks source link

Bei «leeren» XTFs wird kein valides TRSF erzeugt #39

Closed weimir closed 1 year ago

weimir commented 1 year ago

Die Transformation mit "leeren" XTFs erzeugt kein valides TRSF, weil die beiden Tabellen "LegendeEintrag" und "Darstellungsdienst" aus dem externen Katalog mitgenommen werden.

vvmruder commented 1 year ago

Auf der branch integrate-geolink2oereb

erhalte ich folgendes (valides) XTF:

<?xml version="1.0" encoding="UTF-8"?>
<TRANSFER xmlns="http://www.interlis.ch/INTERLIS2.3">
  <HEADERSECTION SENDER="mgdm2oereb" VERSION="2.3">
    <MODELS>
      <MODEL NAME="CoordSys" VERSION="2015-11-24" URI="https://www.interlis.ch/models"/>
      <MODEL NAME="CatalogueObjects_V1" VERSION="2011-08-30" URI="https://www.geo.admin.ch"/>
      <MODEL NAME="CatalogueObjectTrees_V1" VERSION="2011-08-30" URI="https://www.geo.admin.ch"/>
      <MODEL NAME="InternationalCodes_V1" VERSION="2011-08-30" URI="https://www.geo.admin.ch"/>
      <MODEL NAME="Localisation_V1" VERSION="2011-08-30" URI="https://www.geo.admin.ch"/>
      <MODEL NAME="LocalisationCH_V1" VERSION="2011-08-30" URI="https://www.geo.admin.ch"/>
      <MODEL NAME="Dictionaries_V1" VERSION="2011-08-30" URI="https://www.geo.admin.ch"/>
      <MODEL NAME="DictionariesCH_V1" VERSION="2011-08-30" URI="https://www.geo.admin.ch"/>
      <MODEL NAME="Units" VERSION="2012-02-20" URI="https://www.interlis.ch/models"/>
      <MODEL NAME="OeREBKRM_V2_0" VERSION="2021-04-14" URI="https://models.geo.admin.ch/V_D/OeREB/"/>
      <MODEL NAME="CHAdminCodes_V1" VERSION="2011-08-30" URI="https://www.geo.admin.ch"/>
      <MODEL NAME="AdministrativeUnits_V1" VERSION="2011-08-30" URI="https://www.geo.admin.ch"/>
      <MODEL NAME="AdministrativeUnitsCH_V1" VERSION="2011-08-30" URI="https://www.geo.admin.ch"/>
      <MODEL NAME="GeometryCHLV03_V1" VERSION="2015-11-12" URI="https://www.geo.admin.ch"/>
      <MODEL NAME="GeometryCHLV95_V1" VERSION="2015-11-12" URI="https://www.geo.admin.ch"/>
      <MODEL NAME="OeREBKRMkvs_V2_0" VERSION="2021-04-14" URI="https://models.geo.admin.ch/V_D/OeREB/"/>
      <MODEL NAME="OeREBKRMtrsfr_V2_0" VERSION="2021-04-14" URI="https://models.geo.admin.ch/V_D/OeREB/"/>
    </MODELS>
  </HEADERSECTION>
  <DATASECTION>
    <OeREBKRMtrsfr_V2_0.Transferstruktur BID="ch.Planungszonen">
      <OeREBKRM_V2_0.Amt.Amt TID="AMT_fe47e307-6478-4015-a1fe-d39affb72485">
        <Name>
          <LocalisationCH_V1.MultilingualText>
            <LocalisedText>
              <LocalisationCH_V1.LocalisedText>
                <Language>de</Language>
                <Text>Grünenfelder und Partner AG</Text>
              </LocalisationCH_V1.LocalisedText>
            </LocalisedText>
          </LocalisationCH_V1.MultilingualText>
        </Name>
        <AmtImWeb>
          <OeREBKRM_V2_0.MultilingualUri>
            <LocalisedText>
              <OeREBKRM_V2_0.LocalisedUri>
                <Language>de</Language>
                <Text>https://de.gruenenfelder.ch/</Text>
              </OeREBKRM_V2_0.LocalisedUri>
            </LocalisedText>
          </OeREBKRM_V2_0.MultilingualUri>
        </AmtImWeb>
      </OeREBKRM_V2_0.Amt.Amt>
    </OeREBKRMtrsfr_V2_0.Transferstruktur>
  </DATASECTION>
</TRANSFER>

Wenn ich folgenden Befehl ausführe:

 docker run     --rm     -ti     -u $(id -u):$(id -g)     -v $(pwd):/app     -e MODEL="Planungszonen_V1_1"     -e THEME_CODE="ch.Planungszonen"     -e TARGET_BASKET_ID="ch.Planungszonen"     -e OEREBLEX_HOST="oereblex.gr.ch"     -e XTF_FILE="ch.Planungszonen.gr.mgdm_oereblex.v1_1.empty_zones.xtf"     -e CATALOG="ch.gr.OeREBKRMkvs_supplement.xml"     -e PYRAMID_OEREB_CONFIG_PATH="/app/config_gr.yaml"     mgdm2oereb-transformator:latest make clean mgdm2oereb-prepare-oereblex-docs-geolink2oereb mgdm2oereb-oereblex validate

Das wurde mit folgender Ausgangsdatei getestet: https://github.com/openoereb/mgdm2oereb/blob/master/data/ch.Planungszonen.gr.mgdm_oereblex.v1_1.empty_zones.xtf

Aus meiner Sicht ist das Resultat valide. Eventuell kannst du noch eine weitere MGDM-Ausgangsdatei bereitstellen, die ich testen soll.

weimir commented 1 year ago

Danke, ich habs nochmal getestet, jetzt hats geklappt. Da hatte ich wohl irgendwas übersehen..