Skip to main content
Question

Geotiff and Clipper

  • October 10, 2013
  • 8 replies
  • 19 views

Hello,

 

 

I hope you can help me.

 

 

I try a geotiff in a polygon (dgn) to clip and output as a pdf.

 

The clipped-Inside part is ok, that is the picture, but outside is the background black but this should be white.

 

Give it  a way to change the color of the background?

 

8 replies

fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • October 10, 2013
Hi,

 

 

Since the standard background of a pdf is white I would change the nodata values (black) in to white, see the RasterBandNodataSetter transformer.

 


takashi
Contributor
Forum|alt.badge.img+21
  • Contributor
  • October 10, 2013
Hi,

 

 

If you transform the background part to a polygon geometry, I think the PDFStyler transformer can be used to set any color before drawing the polygon.

 

 

Takashi

  • Author
  • October 10, 2013
Thank für the answers.

 

 

I did it tried with the RasterBandNodataSetter.

 

In the DataInspector is it correct, but in the pdf is the background black again.

 

 

With the PDFstyler after the clipper is the background also black too.

 

 


  • Author
  • October 10, 2013

fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • October 10, 2013
Hi,

 

 

A way around it is to convert the black edge (0,0,0) into white (since the pdf  background is white) if you set the values 0 to nodata (RasterBandNodataSetter) and replace the values (RasterCellValueReplacer) to 255 (replace nodata = yes) you will get a white edge that doesnt show in pdf.

 

The only drawback is that if you have 0,0, 0 vlaues in the image  and not the edge you will also convert them to white.

 

The pdf styler doenst work on rasters and there might be a way better.

 

Hope this helps,

 

 

Itay

fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • October 10, 2013
Hi,

 

 

Another idea is to consider writing to a 3Dpdf, since there the background color can be set to black (see navigator window  > 3DPDF writer > Parameters > Background Color)

ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • October 10, 2013
I have never had much luck with setting nodata within a geospatial pdf.

 

 

If using raster backgrounds within a pdf I clip the required area and set the remaining background to b&w

 

 

e.g. https://docs.google.com/file/d/0B7MfZT7yLKF8eUE2VEZnWEhROVU/edit?usp=sharing

 

 

This approach may work for you depending on what you are trying to acheive.

  • Author
  • October 15, 2013
Thanks for the helpful and quick answers,

 

it works with the RasterCellValueReplacer. :o)

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