Skip to main content
Solved

How to extract exact height from .gml file in a correct writer (in FME Workbench)?


Forum|alt.badge.img

am learning FME Workbench/ Data Inspector etc. But exactly I have a question, which I could use some help.

My question is: I am working with a GML file. It has uploaded in FME Data Inspector. From this file, which includes BRepSolid 3D objects, I would like to get the exact heights (as an feature). Than I want to save this data as a shapefile/geojson or something which I can than use in Qgis. Untill now I have not had any succes. Can you give me some tips or links to tutorial(s) to learn this?

Topics: heights / .gml file / into writer (for example shapefile)

Best answer by danilo_fme

Hi @nielsvhal ,

Thanks your data GML.

The Workspace attached is reading the GML ( feature Building ) and using the transformer BoundsExtractor ( like @takashi wrote here ) and extract the values Zmax and Zmin.

The next Step is calculating and generate a attribute height = Zmax - Zmin.

The Data Inspector:

The Writer is a Shapefile and I added the Attribute height.

Attached the Workspace.

Thanks, - workspace-gml-to-shp.fmw

Danilo

 

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

12 replies

danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • January 10, 2018

Hi @nielsvhal,

If you want to extract the attribute Z from your features, I believe you can use the transformer CoordinateExtractor.

This transformer is possible to extract coordinates X, Y and Z and generate attributes:

 

And after this transformer you map the attribute Z to Attribute in Shapefile.

Thanks,

Danilo


takashi
Influencer
  • January 10, 2018

Hi @nielsvhal, you can use the BoundsExtractor to extract minimum and maximum z coordinate of the feature, then calculate the height = zmax - zmin.


Forum|alt.badge.img
  • Author
  • January 11, 2018

@Danilo @Takashi, thank you. I will try to get the option BoundsExtractor work. It seems (looking at the name) a direct answer. I will let you know if it worked for me. Thanks again, Niels


Forum|alt.badge.img
  • Author
  • January 11, 2018

Hello, I tried to get it work. But untill now with no result. Can anybody help me out? It seems I can not find the solution on Youtube/Google etc. Hope anybody can give me the workflow in FME Workbench.


danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • January 11, 2018
nielsvhal wrote:

Hello, I tried to get it work. But untill now with no result. Can anybody help me out? It seems I can not find the solution on Youtube/Google etc. Hope anybody can give me the workflow in FME Workbench.

Could you share us your template Workspace (.FMWT )?

 

 

Thanks,

 

Danilo

 

 


Forum|alt.badge.img
  • Author
  • January 11, 2018

Nope, but maybe you can create a template :-). I have the .gml file available, than I created the BoundsExtractor with it. Unfortunalty without a result.


danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • January 11, 2018

I have an attribute containing multiline text where an arbitrary block of lines are repeated near the end of the data. I can't just remove duplicate lines, as an individual line might be have legitimate duplicates.

 

 

In the below example lines 2 and 15 are identical, but are correct, whereas the block of lines 17-23 are a repetition of lines 10-16, and need to be removed. The number of lines that are repeated varies, but there will always be at least one, and will include the last REV line before the footer. The footer data varies in length and content, but will never include a line beginning with REV.
SITE 1
REV 10-1P
REV 10-3D
SITE 2
REV 20-3V3
REV 20-3V4
REV 20-3V5
REV 20-3V6
REV 20-3W
REV 20-3X
REV 20-3X4
REV 20-3X5
REV 20-3X6
SITE 3
REV 10-1P
REV 10-1P1
REV 20-3X
REV 20-3X4
REV 20-3X5
REV 20-3X6
SITE 3
REV 10-1P
REV 10-1P1
Footer Data Here

The data is not in a text file that can be read bottom up, though I suppose if required it could be written to one and read back in


danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • Best Answer
  • January 11, 2018

Hi @nielsvhal ,

Thanks your data GML.

The Workspace attached is reading the GML ( feature Building ) and using the transformer BoundsExtractor ( like @takashi wrote here ) and extract the values Zmax and Zmin.

The next Step is calculating and generate a attribute height = Zmax - Zmin.

The Data Inspector:

The Writer is a Shapefile and I added the Attribute height.

Attached the Workspace.

Thanks, - workspace-gml-to-shp.fmw

Danilo

 


Forum|alt.badge.img
  • Author
  • January 11, 2018

@Danilo, thanks! Tomorrow morning I am going to let it work!


danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • January 11, 2018
nielsvhal wrote:

@Danilo, thanks! Tomorrow morning I am going to let it work!

Perfect @nielsvhal

 


Forum|alt.badge.img
  • Author
  • January 15, 2018

Hello Danilo,

 

Thank you. This evening I got it work!

 

Thank you for your help! I appreciate it.

 

 

Best regards,

 

Niels

danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • January 15, 2018
nielsvhal wrote:

Hello Danilo,

 

Thank you. This evening I got it work!

 

Thank you for your help! I appreciate it.

 

 

Best regards,

 

Niels
Hi @nielsvhal

 

 

I'm happy to help you :)

 

 

Thanks,

 

Danilo

 


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