3

I want to add a raster data source as a data store, based on a somewhat huge .tif file (> 200 MB, file permissions are correct). I select the respective file and when I save, I get an error:

    Could not list layers for this store, an error occurred retrieving them: 
Failed to create reader from file:data/geotiffs/tiffs/E/or11.tif and hints null

What can I do about that?


gdalinfo:

Driver: GTiff/GeoTIFF
Files: or11.tif
       or11.tfW
Size is 6132, 10026
Coordinate System is `'
Origin = (3456300.560000000055879,5559953.679999999701977)
Pixel Size = (0.080000000000009,-0.080000000000007)
Metadata:
  TIFFTAG_DATETIME=2004:04:06 12:44:10
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
  TIFFTAG_SOFTWARE=Adobe Photoshop 7.0
  TIFFTAG_XRESOLUTION=72
  TIFFTAG_YRESOLUTION=72
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  ( 3456300.560, 5559953.680) 
Lower Left  ( 3456300.560, 5559151.600) 
Upper Right ( 3456791.120, 5559953.680) 
Lower Right ( 3456791.120, 5559151.600) 
Center      ( 3456545.840, 5559552.640) 
Band 1 Block=6132x1 Type=Byte, ColorInterp=Red
Band 2 Block=6132x1 Type=Byte, ColorInterp=Green
Band 3 Block=6132x1 Type=Byte, ColorInterp=Blue
5
  • 3
    200MB is far from being huge for a GeoTiff. That is not the problem. Could you add the output of gdalinfo for that file and the full error stacktrace from the geoserver.log to the question ?
    – pLumo
    Commented Dec 21, 2017 at 9:54
  • Coordinate System is `' seems to be wrong. What CRS does the file have? Can you assign it with gdal_translate -a_srs EPSG:XXXX
    – pLumo
    Commented Dec 21, 2017 at 10:01
  • When I assign it, do I have to use the CRS the file was originally created for or can I change it to the CRS I want the file to be used with after import?
    – Lokomotywa
    Commented Dec 21, 2017 at 10:11
  • 1
    You can also change it, but then you need gdalwarp ? What is the right CRS ?
    – pLumo
    Commented Dec 21, 2017 at 10:12
  • Originally, it was EPSG:31467, but I need it in EPSG:4326
    – Lokomotywa
    Commented Dec 21, 2017 at 10:17

1 Answer 1

5

Your file seems to be missing a Coordinate Reference System (CRS). You need to add it to the data.

Just assign the SRS to the dataset:

gdal_translate -a_srs EPSG:31467 or11.tif or11_31467.tif

-OR-

Change the CRS:

gdalwarp -s_srs EPSG:31467 -t_srs EPSG:4326 or11.tif or11_4326.tif

Some performance hints:

Your data has blocksize of "Block=6132x1", which is not very good performance-wise. Add the following to either of the commands

-co TILED=YES -co BLOCKXSIZE=512 -co BLOCKYSIZE=512

For more performance improvement you should create overviews using gdaladdo

2
  • How can I install gdal_translate and gdalwarp in windows?
    – Lokomotywa
    Commented Dec 21, 2017 at 10:39
  • 2
    If gdalinfo works you should already have the other tools. I don't know exactly how to call them in Windows... I'm sure you'll find out ;-)
    – pLumo
    Commented Dec 21, 2017 at 10:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.