Register | Login
Attackpoint - performance and training tools for orienteering athletes

Discussion: TIFF formats in OCAD

in: Orienteering; Gear & Toys

Apr 17, 2019 2:56 PM # 
Hi all,

Does anyone have a definitive answer on what TIFF format(s)/bit depth/compression/whatever-the-hell-else OCAD 9 supports, please? Trying to automate a workflow, and the source images simply will not open in OCAD - I always get the helpful error message " Error in TIFF file."

The same files open happily (including honouring their georeferencing) in QGIS, so I'm reasonably sure the files themselves aren't corrupt.

TIA. :)
Apr 17, 2019 3:14 PM # 
LZW compression, or no compression is all it supports, no jpg compression. Make sure the file is only 3 bands.

Those are the normal issues I run into.
Apr 17, 2019 7:03 PM # 
In OCAD 8, georeferencing works fine for TIFF format (uncompressed as Ed says) with the georeference information *in the TIFF*, not as a separate world file (tfw typically for TIFF).

However, OpenOrienteeringMapper ("OOMapper"), handles lots of different formats (TIFF, jpg, png, etc), but (!!!) it ignores the "internal" georeference data in TIFF files, and requires instead an external world file (tfw, jgw, pgw, etc) for the different formats. I believe OCAD 9 handles jpg files (with jgw world file), but not png format. I think OCAD 10 is the earliest where png is allowed.

It's pretty easy to make the world files in QGIS when they're needed.
Apr 18, 2019 12:55 AM # 
Thanks Ed - I think the server is being too clever by half, which is hardly unusual for an ArcGIS server.

For clients accessing services via REST, compression is applied automatically based on the requested format type, regardless of the defined compression methods.


Loaded the file in Gimp, re-exported with no compression and it works fine. current workflow is:

  1. Grab image from ESRI server, ungeoreferenced (but with known coordinates obviously)

  2. Run through gdal_translate to re-reference it, using parameters:

    -of GTiff -a_srs EPSG:28350 -co COMPRESS=NONE -gcp {pixel1} {line1} {easting1} {northing1} -gcp {pixel2} {line2} {easting2} {northing2} "{infile}" "{outfile}"

The output of either step won't load in OCAD if I export it as a TIFF. :( Do you know if gdal_translate will output a 'nice' format using some arcane combination of flags? :)

@cedar - yeah, georeferencing the thing isn't the problem, QGIS is quite happy to believe it's in the right spot. It's OCAD being fussy with TIFF formats. My backup plan is to use JPG+JPW, but I hate having to give people two files because they *ALWAYS* ignore the world file and then email me back going "herp derp why is OCAD ignoring the georeferencing?" :)
Apr 18, 2019 1:11 AM # 
I run data through gdal_translate all the time and it works, so it shouldn't be too hard to get it to do what you want.
Can you give me a link to one of the files? I'll take a look at what my workflow does to it.
Apr 18, 2019 1:14 AM # 
also try -ot Byte to make sure its not floats
Apr 18, 2019 1:25 AM # 
also try -ot Byte to make sure its not floats

*BING* We have a winner. Thank you Ed, if I had any hair left I would have torn it out trying to find that. :)

*wanders off muttering about how even when you specify "unsigned 8-bit integer" to ESRI you still got "something-what-is-not-a-byte" *

Please login to add a message.