Geotif format requirements?

Discuss all Arena 4D issues here.
max72
V.I.P Member
V.I.P Member
Posts: 688
Joined: Tue Feb 26, 2013 9:32 pm
Full Name: Massimo De Marchi
Company Details: Massimo De Marchi
Company Position Title: freelancer
Country: Italy
Skype Name: massimo_de_marchi
Contact:

Re: Geotif format requirements?

Post by max72 » Mon Jul 11, 2016 6:05 pm

I tried the same conversion with Qgis.
I opened the jp2, and exported as geotiff. No reprojection.
The resulting file is 234 MB, and it loads fine in Arena
https://dl.dropboxusercontent.com/u/102 ... eotiff.tif

Massimo
ing. Massimo De Marchi - +39 347 32 17 049 - www.studiodemarchi.net

max72
V.I.P Member
V.I.P Member
Posts: 688
Joined: Tue Feb 26, 2013 9:32 pm
Full Name: Massimo De Marchi
Company Details: Massimo De Marchi
Company Position Title: freelancer
Country: Italy
Skype Name: massimo_de_marchi
Contact:

Re: Geotif format requirements?

Post by max72 » Mon Jul 11, 2016 6:05 pm

I tried the same conversion with Qgis.
I opened the jp2, and exported as geotiff. No reprojection.
The resulting file is 234 MB, and it loads fine in Arena
https://dl.dropboxusercontent.com/u/102 ... eotiff.tif

Massimo
ing. Massimo De Marchi - +39 347 32 17 049 - www.studiodemarchi.net

jedfrechette
V.I.P Member
V.I.P Member
Posts: 847
Joined: Mon Jan 04, 2010 7:51 pm
Full Name: Jed Frechette
Company Details: Lidar Guys
Company Position Title: CEO and Lidar Supervisor
Country: USA
Linkedin Profile: Yes
Location: Albuquerque, NM
Been thanked: 1 time
Contact:

Re: Geotif format requirements?

Post by jedfrechette » Mon Jul 11, 2016 6:11 pm

Mark Christy wrote:As Massimo has managed to convert it ok it suggests that something in your conversion routine created an anomaly in the TIFF which our version of GDAL didn't like.
My conversion is stock GDAL (2.1.0):

Code: Select all

gdal_translate source.jp2 destination.tif
Here is the description of Massimo's version:

Code: Select all

Driver: GTiff/GeoTIFF
Files: _bis_m_3610757_ne_13_1_20140607_20140922.tif
Size is 6963, 8616
Coordinate System is:
PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.2572235604902,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Mercator_1SP"],
    PARAMETER["central_meridian",0],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m [email protected] +wktext  +no_defs"],
    AUTHORITY["EPSG","3857"]]
Origin = (-12015550.723992923000000,4317837.781578438400000)
Pixel Size = (1.000000000000000,-1.000000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=LZW
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (-12015550.724, 4317837.782) (107d56'15.10"W, 36d 7'30.08"N)
Lower Left  (-12015550.724, 4309221.782) (107d56'15.10"W, 36d 3'44.92"N)
Upper Right (-12008587.724, 4317837.782) (107d52'29.92"W, 36d 7'30.08"N)
Lower Right (-12008587.724, 4309221.782) (107d52'29.92"W, 36d 3'44.92"N)
Center      (-12012069.224, 4313529.782) (107d54'22.51"W, 36d 5'37.52"N)
Band 1 Block=6963x32 Type=Byte, ColorInterp=Red
Band 2 Block=6963x32 Type=Byte, ColorInterp=Green
Band 3 Block=6963x32 Type=Byte, ColorInterp=Blue
The main differences I see compared to my original test is that compression is enabled, accounting for the smaller file size, the Block sizes are different, and the 4th band (IR) has been stripped. Of these it looks like Block size may be the culprit. If I modify my conversion to manually set the block size I get a working file without changing anything else:

Code: Select all

gdal_translate -co BLOCKYSIZE=32 source.jp2 destination.tif
I'm not sure why reprojecting worked for me. Although, of course, by resizing the image it did change the block size, producing an image with block sizes of 7235x1.
Jed

Post Reply

Return to “Arena4D”