Skip to main content
Solved

Reading LandXML CgPoints Feature info

  • December 18, 2019
  • 8 replies
  • 32 views

havmoejbv
Contributor
Forum|alt.badge.img+14

I have some LandXML files containing points (CgPoints) and lines (PlanFeature) with some attributes. As per the LandXML schema, the <CgPoints> are defined with the coordinate geometry as a <CgPoint>, and the attribute information as <Feature> with properties:

  <CgPoints>
    <CgPoint name="TRAU201" code="" oID="TRAU201">1256922.890706 84309.502725 165.818283</CgPoint>
    <Feature code="Gemini attributes">
      <Property label="S_OBJID" value="TRAU201"/>
      <Property label="S_FIELDCODE" value="41050"/>
    </Feature>
  </CgPoints>

What I am struggling with is to read the Feature information. The LandXML reader gives me an option read both CgPoints and CgPoint, but not Feature. CgPoint will give me the name, code and oID above, but my Feature attributes are not there... I need to extract the "S_FIELDCODE" value along with the geometry, but how?

Best answer by daveatsafe

Hi @havmoejbv,

I have created an enhancement request to add support for the <Feature> information to the LandXML reader, and will notify you if and when this has been implemented.

In the meantime, I am attaching a workspace that uses a combination of the LandXML and XML readers to extract the Feature info and merge it onto the LandXML features.

Read_LandXML_FeatureInfo.fmw

View original
Did this help you find an answer to your question?

8 replies

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • December 18, 2019

Hi @havmoejbv,

Would you mind sending me a sample of the LandXML data, so I can create an enhancement request for our development team, and perhaps figure out a workaround for you? If you don't want to make the data public, you can email to me directly: .


havmoejbv
Contributor
Forum|alt.badge.img+14
  • Author
  • Contributor
  • December 19, 2019

Example data attached: testdata.zip


havmoejbv
Contributor
Forum|alt.badge.img+14
  • Author
  • Contributor
  • December 19, 2019
daveatsafe wrote:

Hi @havmoejbv,

Would you mind sending me a sample of the LandXML data, so I can create an enhancement request for our development team, and perhaps figure out a workaround for you? If you don't want to make the data public, you can email to me directly: .

I noticed from the LandXML reader/writer documentation that <Feature> isn't on the list of supported element types, but as <CgPoint> is, I had hoped that ment I could get the attribute information out in some way.


daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • Best Answer
  • December 19, 2019

Hi @havmoejbv,

I have created an enhancement request to add support for the <Feature> information to the LandXML reader, and will notify you if and when this has been implemented.

In the meantime, I am attaching a workspace that uses a combination of the LandXML and XML readers to extract the Feature info and merge it onto the LandXML features.

Read_LandXML_FeatureInfo.fmw


havmoejbv
Contributor
Forum|alt.badge.img+14
  • Author
  • Contributor
  • December 20, 2019
daveatsafe wrote:

Hi @havmoejbv,

I have created an enhancement request to add support for the <Feature> information to the LandXML reader, and will notify you if and when this has been implemented.

In the meantime, I am attaching a workspace that uses a combination of the LandXML and XML readers to extract the Feature info and merge it onto the LandXML features.

Read_LandXML_FeatureInfo.fmw

Oh, nice! I figured it might be possible to do something with the XML reader, but I struggled with seeing just how. Guess I need to brush up on XML handling...

There is one question remaining from this: While the workspace manages to extract the <Feature> properties, I can't access them in e.g. AttributeManager, and they are not exported when writing to e.g. a geodatabase. They are listed in the Feature Information in inspector, but not in the Visual Preview table:

Also, not in an exported dataset:

In this export, the Cgpoint.oID is also missing. I figured the point in the field name could be an issue so I renamed it before exporting, but no dice. This is not a huge problem, as the value is identical to OID, but I wonder why it happens...


daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • January 8, 2020
havmoejbv wrote:

Oh, nice! I figured it might be possible to do something with the XML reader, but I struggled with seeing just how. Guess I need to brush up on XML handling...

There is one question remaining from this: While the workspace manages to extract the <Feature> properties, I can't access them in e.g. AttributeManager, and they are not exported when writing to e.g. a geodatabase. They are listed in the Feature Information in inspector, but not in the Visual Preview table:

Also, not in an exported dataset:

In this export, the Cgpoint.oID is also missing. I figured the point in the field name could be an issue so I renamed it before exporting, but no dice. This is not a huge problem, as the value is identical to OID, but I wonder why it happens...

Hi @havmoejbv,

Any attributes that appear in the Feature Information window, but not in Visual Preview table can be exposed to the workspace using the AttributeExposer transformer. This is needed sometimes when the name of the attribute is derived from the content of the input file rather than its schema.


muzhnasto
Contributor
Forum|alt.badge.img+12
  • Contributor
  • September 28, 2020
daveatsafe wrote:

Hi @havmoejbv,

I have created an enhancement request to add support for the <Feature> information to the LandXML reader, and will notify you if and when this has been implemented.

In the meantime, I am attaching a workspace that uses a combination of the LandXML and XML readers to extract the Feature info and merge it onto the LandXML features.

Read_LandXML_FeatureInfo.fmw

You can attach the Read_LandXML_FeatureInfo.fmw again, please.


LizAtSafe
Safer
Forum|alt.badge.img+15
  • Safer
  • September 28, 2020
muzhnasto wrote:

You can attach the Read_LandXML_FeatureInfo.fmw again, please.

Hi @muzhnasto​ I've fixed the download link in the original answer as well as attached it here. Thanks for reporting the missing file.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings