GeoTiff won't load
So I'm trying to load a GeoTiff into tilemill. When I try to add
the datasource I get the following error.
ry@mapbox:~/imagery$ ERROR 4:
`/home/ry/tilemill/files/.cache/0c8ccdf3dd195f9eb59887cc6d1a0875.tiff'
not recognised as a supported file format.
This is the output for gdalinfo on the file
ry@mapbox:~/imagery$ gdalinfo dallas.tiff
Driver: GTiff/GeoTIFF
Files: dallas.tiff
Size is 43163, 50580
Coordinate System is:
PROJCS["Google Maps Global Mercator",
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
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"]]]
Origin = (689191.371458544977941,3652676.769501760136336)
Pixel Size = (1.000000000000000,-1.000000000000000)
Metadata:
AREA_OR_POINT=Area Image Structure Metadata:
INTERLEAVE=PIXEL Corner Coordinates:
Upper Left ( 689191.371, 3652676.770) ( 6d11'28.00"E,
31d19'26.10"N)
Lower Left ( 689191.371, 3602096.770) ( 6d11'28.00"E,
30d55'58.99"N)
Upper Right ( 732354.371, 3652676.770) ( 6d34'43.86"E,
31d19'26.10"N)
Lower Right ( 732354.371, 3602096.770) ( 6d34'43.86"E,
30d55'58.99"N)
Center ( 710772.871, 3627386.770) ( 6d23' 5.93"E, 31d
7'43.28"N)
Band 1 Block=43163x1 Type=Byte, ColorInterp=Red
Band 2 Block=43163x1 Type=Byte, ColorInterp=Green
Band 3 Block=43163x1 Type=Byte, ColorInterp=Blue
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Dane on 24 May, 2011 11:18 PM
Hi Ry,
It looks like a bug in tilemill, whereby something is getting lost when you upload the tiff to tilemill.
What I recommend doing is getting the full/absolute path to the original geotiff and then pasting that as the input when loading the file into TileMill. This way it should be read from where it is without being moved.
3 Posted by rylincoln on 24 May, 2011 11:23 PM
Looks like maybe this is why? I compiled gdal from source to get ecw and mrsid support and after trying your suggestion i get...
ERROR 1: WARNING ! libtiff version mismatch : You're linking against libtiff 3.X but GDAL has been compiled against libtiff >= 4.0.0
[edit] also Thanks for your quick reply!
Support Staff 4 Posted by Dane on 24 May, 2011 11:41 PM
Yep, that is the problem. Basically the issue is that GDAL keeps an internal copy of libtiff and statically links against it by default. This is bad. So, if you are going to compile GDAL from source and still use other libraries that use libtiff (in the same running process) then you need to rebuild GDAL to play nice. To do this you do:
cd
./configure --with-libtiff=/usr/lib
That assumes that you built mapnik from source on linux and libmapnik linked to the system provided libtiff. You can check this with:
ldd /usr/local/lib/libmapnik2.so
5 Posted by rylincoln on 24 May, 2011 11:52 PM
Cool. I'm trying now.
ry@mapbox:~/gdal-1.8.0$ ./configure --with-ecw=yes --with-mrsid=/home/ry/mrsid/Raster_DSDK
--with-geotiff=/usr/lib--with-libtiff=/usr/libmake clean
make
make install
the results from ldd /usr/local/lib/libmapnik2.so show it being linked to libtiff.so.4 inside of /usr/lib
Thanks again for your help.
Will White closed this discussion on 27 May, 2011 06:02 PM.