Skip to main content

Hello Forum,

 

Does FME Form have the concept of creating a layout which could then be saved as a image file or PDF?

 

So, think about how in QGIS I may bring several vector layers and some base mapping together and post to a ‘print layout’. Into that print layout would go the vector layers and base map. I may then add a title, north arrow, map, legend etc. I would then export that layout out as a png or PDF.

 

Does FME Form, have a similar concept. I’ve been looking in FME Form and running online searches but have found nothing, which is surprising.

 

Any thoughts?
 

Thanks,

Stuart

 

 

Have you looked at the mapnik rasteriser?


Yes, I have done. Yes, that rasterises the input geojson -note in my project the geojson will be of an individual small individual building polygon- but when I then write that to a PNG the output PNG is just a zoom-in of the entire polygon....

 

What I need instead is the ability to bring in a geojson dataset (in this case it’ll be an individual polygon) plus OS Maps WMTS base maps and place that into a ‘layout’ (think just how you may do so in QGIS). In that layout I would also add a crown copyright statement. I would then write it out as a png file.

 

You may be wondering why I don’t just do this in QGIS. That is because this request will form just part of a larger workspace that will be automated and run against ever changing input geojson files. Thanks


You need to look at setting the Ground Extents, at the moment it looks like it is set as Use input data ground extents.

In the past i’ve used the Mapnik Rasteriser to produce the map, then the PDFPageFormatter to put that on the page to add copyright statements, keys, title etc. (Actually i think it was so long ago that it predates the page formatter and you had to set pdf_frame_rectangle etc. on attributes). 

In 2025.1 there’s the DocumentPDF Writer which might be worth looking at if you have access to that version.

 

 


@ebygomm The issue with setting ground extents is that the input geojson will always be at a different locations. I need to automate this as much as possible and I wouldn’t have scope to go into the workspace on each occasion and specify the min/max x and y.

 

Do you know if FME Form has an equivalent function to the print layout function as is in QGIS? 

This is where I would read in an input geojson dataset (in this case it’ll be an individual polygon) and read in in OS Maps WMTS and place that into a ‘layout’. In that layout I would also add a crown copyright statement. I would then write the layout out as a png file. Thanks

 

 

 


The ground extents can be set by attributes. But it’s quite a lot of work to setup, as you have to work out scaling etc.. Things may have got easier, my experience was a long time ago. 


Thanks ​@ebygomm 

 

Does anyone else know if FME Form has an equivalent function to the print layout function as is in QGIS? This is where I would read in an input geojson dataset (in this case it’ll be an individual polygon) and read in in OS Maps WMTS and place that into a ‘layout’. In that layout I would also add a crown copyright statement. I would then write the layout out as a png file. Thanks


Combine all relevant data into a single raster.

Use a RasterExtractor to write the raster to a blob attribute, encoded for PNG.

Use an AttributeFileWriter to export the blob attribute to a PNG file.

 


To further expand on ​@ebygomm's suggestion: if you buffer your GeoJSON, then create a bounding box for that buffer and use that as an initiator for a FeatureReader that reads your base map from WMS or WMTS you can make the process pretty dynamic.

Here's an example workspace from our recent FME Raster training course:

 

And apologies for the Dutch annotations 😅 So what I'm doing is reading a bunch of lines from a Shapefile, buffer them and then create a single bounding box for those buffers (BoundingBoxAccumulator) which is then used to read from a folder of GeoTIFF's. Those are combined with the original lines in the MapnikRasterizer and written to a PNG.

Thanks to the buffering there is a decent amount of space around the lines.


Thank you to ​@redgeographics  and ​@geomancer 


Hi ​@scarter I up-vote the MapnikRasterizer. I recently needed that functionality and found it way better than what I had been using previously and updated an existing workflow with it. In that workflow I pair the MapnikRasterizer with a PDFPageFormatter. This really helps to create that “Template Feel” I think you are looking for right? Key thing like ​@ebygomm and ​@redgeographics pointed out is the Boundingbox. I have a bounding box to feed the MapnikRasterizer (extent of the feature of interest) and a bounding box for the PDFFormatter (zoom in and you can see) Both are for the extent of the feature of interest (screening feature).

MapnikRasterizer then to PDFPageFormatter. Several More layers are added to provide content and frames for the PDFFormatter.

With the Formatter you can position your inputs (spatial, text, etc) on the page and voila there is your template.
 

Template. Text is included for dynamic content
Final results: This would make any cartographer vomit :D...but it serves the purpose for automated reporting with templated information.

Hope that helps!