Solved

How do I create an Elevation profile?


Badge +14
  • Contributor
  • 120 replies

I was looking at ways to create Elevation profiles but did not find any transformers or other easy ways to do this in FME. Should I be searching for some other word?

I don't need anything fancy, the sources are some polylines and a DEM file. I would be happy with something as simple as a csv file as output.

icon

Best answer by jdh 9 June 2020, 19:19

View original

15 replies

Userlevel 3
Badge +17

Hi @aron

Perhaps try using the Chopper to convert your polyline features to a point at each vertex and use the PointOnRasterValueExtractor to get the elevation value from your DEM file. Note the output of the PointOnRasterValueExtractor is stored in a list and is not automatically exposed.

Userlevel 3
Badge +18

hi @aron , you could also create a surface from your DEM and drape the polylines (or points after chopping it) on that surface.

Once you got the 3D polylines, it might be worth taking a look at the ProfileGenerator on FME Hub: never tried it before but the transformers name sounds promising

Badge +14

hi @aron , you could also create a surface from your DEM and drape the polylines (or points after chopping it) on that surface.

Once you got the 3D polylines, it might be worth taking a look at the ProfileGenerator on FME Hub: never tried it before but the transformers name sounds promising

I took a look at the ProfileGenerator, but it had no documentation and I could not get it to work by just pointing the sources to it.

Userlevel 5
Badge +25

The ProfileGenerator was developed by me. It expects a 3d line as input, so if you use a SurfaceDraper to drape your lines over the DEM and then put those draped lines into the ProfileGenerator it should work. Let me know if you run into issues.

Badge +14

The ProfileGenerator was developed by me. It expects a 3d line as input, so if you use a SurfaceDraper to drape your lines over the DEM and then put those draped lines into the ProfileGenerator it should work. Let me know if you run into issues.

Hi @redgeographics

I have now had some time to fiddle with this some more. Next question, what does the ProfileGenerator output? :) I would like to ad a writer after it.

Userlevel 5
Badge +25

Hi @redgeographics

I have now had some time to fiddle with this some more. Next question, what does the ProfileGenerator output? :) I would like to ad a writer after it.

It generates a line feature with the x axis being the length along the path and the y axis being the elevation at every point.

 

I developed it for a specific project back then, so it may not be exactly what you need.

Badge +14
It generates a line feature with the x axis being the length along the path and the y axis being the elevation at every point.

 

I developed it for a specific project back then, so it may not be exactly what you need.

Thanks! No, that was not really what I was hoping for. I would like to utput something that could be sent to a spreadsheet/table to be styled later in Illustrator.

Userlevel 5
Badge +25

Thanks! No, that was not really what I was hoping for. I would like to utput something that could be sent to a spreadsheet/table to be styled later in Illustrator.

You can use a CoordinateExtractor after the ProfileGenerator to grab those coordinates (or edit the ProfileGenerator, I'm pretty sure internally I'm doing something along those lines already)

Badge +22

Here's a simplified workflow.

profile.fmw

Badge +14

Here's a simplified workflow.

profile.fmw

Beautiful!

Badge +1

2020-09-17_101730Hibou

Badge +6

Here's a simplified workflow.

profile.fmw

Hi @jdh​ !

Your solution looks interesting. I was wondering which role the Creator transformer was playing and which parameters some other transformers (VertexCreator and ChartGenerator) were using. If it is not a problem for you, could you share your workspace here? Thanks!

Best regards,

Olivier

Badge +22

Hi @jdh​ !

Your solution looks interesting. I was wondering which role the Creator transformer was playing and which parameters some other transformers (VertexCreator and ChartGenerator) were using. If it is not a problem for you, could you share your workspace here? Thanks!

Best regards,

Olivier

Hi Olivier,

 

Unfortunately I don't have the workspace anymore. Based on the screenshot, the creator is almost certainly just a trigger with a 3D line, since I didn't have a DEM for the surfaceDraper.

 

The vertexCreator would be the _distance attribute (from measureExtractor) for the x and the _height (z from coordinateExtractor) as the y. I assume the chartGenerator would be a Line type with the same attributes in the data series.

Badge +1

Hi @jdh​ !

Your solution looks interesting. I was wondering which role the Creator transformer was playing and which parameters some other transformers (VertexCreator and ChartGenerator) were using. If it is not a problem for you, could you share your workspace here? Thanks!

Best regards,

Olivier

it's not 100% what you were looking for. I just want to share my workbench to generate a proper profile from a 3D line. maybe it helps

Badge +6

Hi @jdh​ !

Your solution looks interesting. I was wondering which role the Creator transformer was playing and which parameters some other transformers (VertexCreator and ChartGenerator) were using. If it is not a problem for you, could you share your workspace here? Thanks!

Best regards,

Olivier

Thank you very much @stezi​ ! Thanks to your flow I was able to create one for my needs leading to a profile like this one:

River_profile

Reply