Question

Spatial xyz (points) to .jpg/png


Hi, I have a lot of profiles measured as xyz data (points) in RD coordinate system. It's an Excel with all the profiles, each profile has it's own name (1,2,3, etc). Is there a way to convert each profile to a separate .jpg/png file in FME?


8 replies

Userlevel 4
Badge +25

As long as the points each have the profile name it should be possible. No FME with me right now so thinking out loud... You probably want to create measures to get the length along the profile, then create vertexes with the measure as x and elevation as y.

Thanks! I'm going to try some. I'm not an experienced user yet but working hard on it. I'll be posting my findings :)

profielen-safe.xlsx

Here's my Excel with XYZ points and profile numbers. I'm not quite getting how to translate the xyz to xy with the MeasureGenerator. If you could help me with a basic scheme, it would be awesome.

Userlevel 4
Badge +25

Here you go. I've left off the image creation part, a MapnikRasterizer or ImageRasterizer will do that for you, you'll need to play with that a bit to get it to look the way you want.

profile.fmwt

So the key here is to form a line first so you can create measures, then chop the line into invidivual points and replace those geometries with new points where the x value is the measure (the length along the profile) and the y value is the original z value. Then rebuild the line.

Thanks so much! I'm having FME 2016 at work so I'm going to try at home with 2018. In 2016, it doesn't work because some Transformers are missing.

Your workbench works perfect! But, to get a graph plot with labeling, I'm not getting there yet. I'm using a PNG writer right now but I can't find the way to design the graph. Maybe it's because I'm new to this, but if you might help me with the last bit :) I would like to plot the string in "OMSCHRIJVING" vertical under each point because it describes the measured point.

Cheers :)

Userlevel 4
Badge +25

Sort of, I don't think FME can do vertical text, but with a few adaptions you can at least generate points matching the profile that have the OMSCHRIJVING attribute.

profile-v2.fmwt

I've done a lot of these kinds of profiles in the past (elevation profiles of running events to be exact) and generally just generated the profile line and a background grid in FME, exported it to Shape and styled it in my favourite cartographic application (to match the map I was making in there anyway). You may get good results with the MapnikRasterizer

-- edit --

Okay, so if you run the points through a TextAdder you can set a rotation there and then a TextStroker to create polygons that can be styled in the MapnikRasterizer. You need to do a lot of tweaking to size settings in both the TextAdder and TextStroker. I'm busy for the rest of the day but hopefully this helps you along a bit.

Thanks so much again, I'm going to figure out the last part.

Reply