Forum

Author Topic: What is RasterFormatNone stand for?  (Read 5042 times)

photoscan_user

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
What is RasterFormatNone stand for?
« on: July 10, 2018, 04:31:34 PM »
I want to export orthomap not in tiled format.

I wast thinking that RasterFormatNone will help me to do this, but I get error that it's not supported : RuntimeError: Unsupported raster format

Code: [Select]
chunk.exportOrthomosaic(path, dx=1e-07, dy=1e-07, format=PhotoScan.RasterFormat.RasterFormatNone, image_format=PhotoScan.ImageFormat.ImageFormatTIFF, tiff_overviews=False, white_background=False, write_kml=True)

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15228
    • View Profile
Re: What is RasterFormatNone stand for?
« Reply #1 on: July 10, 2018, 06:58:27 PM »
Hello photoscan_user.

If you wish to export the orthomosaic as single TIFF tile, then you should use:
Code: [Select]
format = PhotoScan.RasterFormat.RasterFormatTiles
Best regards,
Alexey Pasumansky,
Agisoft LLC

photoscan_user

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Re: What is RasterFormatNone stand for?
« Reply #2 on: July 11, 2018, 12:27:42 PM »
Yes RasterFormatTiles is my current approach, but when I try to view it via imagej for example it tells me that it's a tiled tiff format and can't open it, but I need 'ordinary' tiff.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15228
    • View Profile
Re: What is RasterFormatNone stand for?
« Reply #3 on: July 11, 2018, 01:13:37 PM »
Hello photoscan_user,

Can you provide the exact error message from imagej? Also does it happen even when tiff_overviews are disabled?
Best regards,
Alexey Pasumansky,
Agisoft LLC

photoscan_user

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Re: What is RasterFormatNone stand for?
« Reply #4 on: July 11, 2018, 03:07:45 PM »
ImageJ gives me error: 'ImageJ can't open tiled TIFFs'.

> Also does it happen even when tiff_overviews are disabled?
Yes.

I use:

Quote
chunk.exportOrthomosaic(path, dx=1e-07, dy=1e-07, format=PhotoScan.RasterFormat.RasterFormatTiles, image_format=PhotoScan.ImageFormat.ImageFormatTIFF, tiff_overviews=False, white_background=False, write_kml=True)

In log I see

Quote
ExportRaster: image_format = TIFF, path = orthophoto_1.tif, resolution_x = 1e-07, resolution_y = 1e-07, tiff_overviews = off, tile_height = 0, tile_width = 0, white_background = off, write_kml = on
generating 34045 x 15940 raster in 1 x 1 tiles

so looks like it's just 1 tile with size of full image.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15228
    • View Profile
Re: What is RasterFormatNone stand for?
« Reply #5 on: July 11, 2018, 03:59:37 PM »
Hello photoscan_user,

As far as I understand, ImageJ cannot open TIFFs represented internally as tiles. These tiles are used for more effective internal compression of the file (for example, compared to strip representation). And those internal tiles have nothing to do with the split in blocks feature and/or RasterFormatTiles option.

Currently we are not planning to implement strips option for TIFF export, so you can try to convert PhotoScan exported TIFFs to the required representation via ImageMagick or GDAL, for example. Or consider using some plugins for ImageJ - when looking on this error message I have found some recommendations to use BioFormats plug-in for ImageJ.
Best regards,
Alexey Pasumansky,
Agisoft LLC