-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gdalretile.py having problems with tiling #670
Comments
The map is "kantakartta" of the City of Helsinki, isn't it? Do you have a link for downloading a sample? |
Hi, That's true. I think you can download a sample from our Open data Geoserver. Here is the URL for that specific map tile. Reduce the WIDTH and HEIGHT parameter if the file is too large. That is maximum our Geoserver can render. |
Have you tried to use the same gdal_retile.py that gives good result with the new GDAL version? |
Tried the old version of gdal_retile.py and the grey row did not appear. Not sure but this must be some kind of version Id from the file |
I've downloaded the source image from the WMS link you provided and run the gdal_retile command you mentionned, and can't observe any artifact. I've also run it with the old version of gdal_retile you provide above, and the generated files are binary identical with the old and new gdal_retile. |
My mistake. Sorry for that. The original picture I'm using was 5000x5000 pixels width and height. Running the command I posted fo the 3000x3000 picture the 1 level is not retiled. If you run command below for the downloaded raster file gdal_retile -v -r bilinear -levels 4 -ps 1024 1024 -co "TILED=YES" -co "BLOCKXSIZE=256" -co "BLOCKYSIZE=256" -co "COMPRESS=LZW" -targetDir D:\TEMP\Imagepyramid D:\TEMP\test1.tif You should see the grey line in level 1 picture 1_1.tif. Or otherwise I'm doing something really wrong. I also uploaded 5000*5000 picture to our "dropbox". Press "Lataa" to download the zip-file https://kympbox.kkip.fi/kympboxd/download.aspx?hash=L4AN0Y3HCQPNFO7YWVVEIE8MJ2KY7XHJXRA1UJ2A |
I made a test with OSGeo4W (GDAL 2.2.4, released 2018/03/19) with the 5000x5000 image. I can see grey lines in tiles which are in sub-directories 2, 3, and 4 and created with your command. I do not quite understand what happens, but this command does not produce grey lines
|
It seems that revision 28001 is the first one that makes grey lines. Changeset is "a patch by pabercrombie" committed by Even I tried to read the code but unfortunately could not discover what goes wrong with computing the windows with the new code. |
Thanks Jukka for bisecting to the offending commit. That was helpful |
I upgraded Python version from 3.3.6 to 3.6.5 and GDAL version from 1.11.1 to 2.2.4 on my Windows 10 laptop (same actually happens with Windows Server 2012 with same Python and GDAL configuration). I’m using gdal_retile.py script for retiling Our rasterized Base map files for Geoserver ImagePyramid plugin. Unfortunately now it seems that this script makes grey pixel row at the end of the file. This did not happen in earlier configuration I had.
Below you find a screen shot from level 1, where the grey row is at the bottom of the image.
Below you find a screen shot from level 2, where the grey line runs through the image horizontally
Here is the command I’m running
gdal_retile -v -r bilinear -levels 4 -ps 2048 2048 -co "TILED=YES" -co "BLOCKXSIZE=256" -co "BLOCKYSIZE=256" -co "COMPRESS=LZW" -targetDir D:\TEMP\Imagepyramid D:\TEMP\test1.tif
I tried to change the resampling algorithm or leaving out the Blocksize or Compress parameters without any success. I tried the older versions we are using and the grey pixel row did not appear in the picture.
Here is the sample picture to reprodeuce the problem, unfortunately I had to convert TIF to JPG.
The text was updated successfully, but these errors were encountered: