Question

Combine a raster and list with same unique ID into a single report / PDF

  • 30 August 2019
  • 5 replies
  • 4 views

I used the transformer MapnikRasterizer to create a raster for a specific data set.

 

I want to combine this raster with a list that has the same the same unique ID into a single document.

 

How can I create this list and combine it with a raster into a single document?

 

For example, in the photo below:

I want a list showing the records of BW #SW-0127, BW# 316002, and BW# 318003 on the first page,

with a raster of the spatial extent (created with Mapnik Rasterizer) on the second page if possible

 

 


5 replies

Badge +3

@lobsterboy

You can create pagenumbers on the records.

Aggregate and then counter.

I used "pdf_page_number_" as Count Output Attribute

Your example would get 3 pagenumbers.

 

Now you need to insert pagenumbers for the rasters, to make em paired.

You can do that using attributecreator with these 2 expressions.

 

on one set (for instance your text objects): Value(pdf_page_number_)*2+2

and the other set: @Value(pdf_page_number_)+@Value(pdf_page_number_)*1+1

("pdf_page_number_": the underscore at end is to prevent conflict with the pdf-formatter, which uses this attribute)

This gives u alternating nrs. for a set ( uniqueid).

Create multipage by setting the pdf_page_number_ as Layer Name on the pdf writer.

 

(if you use a pdf-formatter, as I did, take care to not use "pdf_page_number" as the formatter will overwrite it. FME should allow attributes/parameters there..but they have not, alas.)

 

Inserted a sample script. It puts any district on right/even page and its neighbourhoods on the left/uneven page.alternatepagenumbering.fmwt

Badge +3

@lobsterboy

alternatepagenumbering.fmwt

Here is a annotated and cleaned version of the script.

Badge +3

added info:

 

2 page view cannot be set using fme (AFAIK).

But in acrobat pdf reader u can: view=>pageview=>display 2 pages

Badge +3

@lobsterboy

 

 

You could post your workbench and sampledata if script is not clear for you. Or at least sampledata.

 

Badge +3

@lobsterboy

 

Cannot donwload your workbench, get an error.

Try repost it? (firefox usualy works better then Explorer for this)

Reply