citygml4j / citygml-tools

Collection of tools for processing CityGML files
Apache License 2.0
115 stars 18 forks source link

extract terrain intersection from LOD2 models? #40

Closed pcace closed 1 month ago

pcace commented 1 year ago

Hi, is there already some way to export the terrain intersection from LOD2 Files? i am trying to get the values from here (in a convenient way ;) ):

      <bldg:lod2TerrainIntersection>
        <gml:MultiCurve>
          <gml:curveMember>
            <gml:LineString>
              <gml:posList srsDimension="3">371139.98 5808526.986 68.01 371139.991 5808526.991 68.01 371140 5808526.995 68.01 371140.01 5808527 68.01 371140.378 5808527.169 68.01</gml:posList>
            </gml:LineString>
          </gml:curveMember>
          <gml:curveMember>
            <gml:LineString>
              <gml:posList srsDimension="3">371140.378 5808527.169 68.01 371140.809 5808527.245 68.01</gml:posList>
            </gml:LineString>
          </gml:curveMember>
        </gml:MultiCurve>
      </bldg:lod2TerrainIntersection>

Any idea would be great!

Thanks a lot!

clausnagel commented 1 year ago

Hm, not exactly sure what you want to achieve. I assume you don't want to parse the XML? Then maybe some regex to extract what you want? Or what about an XSL transformation?

pcace commented 1 year ago

Hi, yes you are right - i am trying to avoid parsing the xml - i do not really have experience with it and only had trouble when i tried^^. XSL transofrmation? never heared about it. I guess i will look into the XML parsing again :/ the goal would be to add the LOD2 terrainintersection to the geojson as a polyline as an attribute.. if you have any other idea i would be very happy to hear it! thanks anyways for your time!

clausnagel commented 1 month ago

Closing this issue as it is beyond the scope of citygml-tools.