Skip to main content
Question

How to write Raster-Files with a World-File using the FeatureWriter with Generic-Format

  • March 29, 2016
  • 4 replies
  • 198 views

Hello there!

I have tried to write several raster files (TIF, PNG, ..) using the FeatureWriter with the "Generic"-Format which works pretty well unless no WorldFile (tfw, wld, ...) is beeing created.

Is there a way to tell the Writer to create a world file for the raster files?

Thanks a lot! Regards Jacob

This was the configuration I used:

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

takashi
Celebrity
  • March 29, 2016

Hi @jakobhagenauer, possibly a format attribute can be used to control world file creation.

If the destination format is JPEG, for example, add an attribute called "jpeg_world_file_generation" to the raster feature and set "yes" to its value. For the PNGRASTER format, the name is "pngraster_world_file_generation", and so on.

I think every raster format that supports world file has a similar format attribute. To know the attribute name, see the "Feature Representation" section in the help doc for each format. Then, you can add all of them to the raster feature beforehand, so that the FeatureWriter will write a world file for any possible format.

Hope this helps.


takashi
Celebrity
  • March 29, 2016

Hi @jakobhagenauer, possibly a format attribute can be used to control world file creation.

If the destination format is JPEG, for example, add an attribute called "jpeg_world_file_generation" to the raster feature and set "yes" to its value. For the PNGRASTER format, the name is "pngraster_world_file_generation", and so on.

I think every raster format that supports world file has a similar format attribute. To know the attribute name, see the "Feature Representation" section in the help doc for each format. Then, you can add all of them to the raster feature beforehand, so that the FeatureWriter will write a world file for any possible format.

Hope this helps.

It seems that the name of attribute that controls world file generation is "<lowercase format name>_world_file_generation". If it's correct, the BulkAttributeRenamer can be used to rename the format attribute depending on the specified format at run-time, like this. Assume that the destination format name is given via a user parameter called "FORMAT".


mark2atsafe
Safer
Forum|alt.badge.img+59
  • Safer
  • March 30, 2016

To set a parameter for a format used in the Generic Writer, you need to add a Writer of the same format. If you set the parameter there the Generic Writer will use it. It doesn't matter that no data is being written to that format.

I created a quick demo movie (http://screencast.com/t/tE6iqGYez2P)


lifalin2016
Supporter
Forum|alt.badge.img+40
  • Supporter
  • November 13, 2018

Hi @jakobhagenauer, possibly a format attribute can be used to control world file creation.

If the destination format is JPEG, for example, add an attribute called "jpeg_world_file_generation" to the raster feature and set "yes" to its value. For the PNGRASTER format, the name is "pngraster_world_file_generation", and so on.

I think every raster format that supports world file has a similar format attribute. To know the attribute name, see the "Feature Representation" section in the help doc for each format. Then, you can add all of them to the raster feature beforehand, so that the FeatureWriter will write a world file for any possible format.

Hope this helps.

No, the possibility of writing a world file per raster is fixed per format. Some can, most cannot. The "Format Attributes" in FeatureWriter shows what is possible. I tried it with "ecw" and it didn't work, so alas, no hidden capability to conjure up.