Confused about "raster file"

What is the issue or question you have?

I made my own LULC data using the landsat images and I drew my own polygons and ran maximum classification. I exported it to a tif file. I checked that rasters can be tif files however when I tried to import my LULC data to the InVEST model it did not accept it. Any idea why. I checked that the sample data is also tif files.

What do you expect to happen?

What have you tried so far?

Attach the logfile here:

Hi @reyesmariana -

Yes, you should be able to use TIFFs for rasters. Can you send us a screenshot of the InVEST model window so we can see the file name you’re entering, and the exact error message? Thanks.

~ Stacie

I made my own LULC map and it is raster I export it as TIFF but not sure why it cannot be accepted. thank you

Sincerely,

Mariana

Hi @reyesmariana , could you click on the red X and take a screenshot of that? It should tell you what the error message is there.

If that doesn’t work or isn’t clear, could you share the GeoTiff with us so we can take a closer look?

Thanks,
James


Guandu_20221026.tif (2.6 MB)

@reyesmariana thanks for posting the error. So which coordinate system does that raster have? As the User Guide notes “All spatial inputs must be in the same projected coordinate system and in linear meter units.”

~ Stacie

XY Coordinate System WGS_1984_UTM_Zone_51N
Linear Unit Meter (1.000000)

Can I ask if it was because my file is not processed as a GDAL? Thank you

Hi @reyesmariana just to build on @swolny’s comment, this raster is missing its spatial reference. When I look at the raster’s metadata, there is no spatial information associated with it:

Driver: GTiff/GeoTIFF
Files: /Users/jdouglass/Downloads/Guandu_20221026.tif
Size is 1052, 873
Metadata:
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
  TIFFTAG_XRESOLUTION=96
  TIFFTAG_YRESOLUTION=96
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,  873.0)
Upper Right ( 1052.0,    0.0)
Lower Right ( 1052.0,  873.0)
Center      (  526.0,  436.5)
Band 1 Block=1052x8 Type=Byte, ColorInterp=Red
Band 2 Block=1052x8 Type=Byte, ColorInterp=Green
Band 3 Block=1052x8 Type=Byte, ColorInterp=Blue

So in order to have this work in InVEST, this raster must have its spatial reference (origin, projection, etc.) included in the file itself. This can be done with GDAL, but can also be done with ArcGIS (though I’m not sure how to do that).

1 Like