<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>I Jan, <br><br>Thanks for making the script. If you want another you a algorithm to split the images you can use Orfeotoolbox in Sextante plugin. At least you save a lot of work instead of complete the script. <br><br>Best Regards,<br>Jose Santos<br><br><div><div id="SkyDrivePlaceholder"></div>> Date: Mon, 4 Mar 2013 14:58:13 +0100<br>> From: osm@tappenbeck.net<br>> To: qgis-user@lists.osgeo.org<br>> Subject: [Qgis-user] problems to split images<br>> <br>> hi !<br>> <br>> i try to split a image into 4 new tiles by gdal_translate - the problem <br>> is, that there was a border between the image in right-axis.<br>> <br>> i create a little script for the work:<br>> <br>> <br>> #!/bin/sh<br>> <br>> #gdal_translate -projwin 360623.459101 5685603.57034 362500.0 5683500.0 <br>> -of GTiff <br>> E:\datenlager_TAP\20130218_XXXXXX_RasterbildTransformation_GK2ETRS\ETRS\1988\1988.tif <br>> E:/datenlager_TAP/20130218_XXXXXX_RasterbildTransformation_GK2ETRS/ETRS/1988/1988_1.tif<br>> <br>>    # Pfad-Angabe NICHT auf / endent!!!!<br>>    <br>> basic_path="E:/datenlager_TAP/20130218_XXXXXX_RasterbildTransformation_GK2ETRS/ETRS"<br>>    source_theme="1988"<br>>    source_path=${source_theme}<br>> <br>> <br>>                                                  or_rechts="364769.1"<br>>                                                  or_hoch="5685564.3"<br>>    #   +----------------------+----------------------+<br>>    #   |                      |                      +<br>>    #   |                      |                      +<br>>    #   |                      |                      +<br>>    #   |                      |                      +<br>>    #   |       Bild 1         |       Bild 2         +<br>>    #   |                      |                      +<br>>    #   |                      |                      +<br>>    #   |                      |                      +<br>>    #   +----------------------+----------------------+<br>>    #   |                      |                      +<br>>    #   |                      |                      +<br>>    #   |                      |                      +<br>>    #   |        Bild 3        |       Bild 4         +<br>>    #   |                      |                      +<br>>    #   |                      |                      +<br>>    #   |                      |                      +<br>>    #   |                      |                      +<br>>    #   +----------------------+----------------------+<br>> <br>> ul_rechts="360638.4"<br>> ul_hoch="5681411.1"<br>> <br>> # Trennpunkt in der Mitte<br>> m_rechts="362500.00"<br>> m_hoch="5683500.00"<br>> <br>>    source="$basic_path/$source_path/$source_theme"<br>>    echo<br>>    echo Name der Rasterbilddatei: ${source}.tif<br>>    echo<br>>    echo<br>>    echo THEMA: ${theme}<br>> <br>>    echo Bild 1<br>>    echo "${ul_hoch} - ${or_hoch} | ${m_rechts} - ${m_hoch}"<br>>    gdal_translate -projwin ${ul_rechts} ${or_hoch} ${m_rechts} ${m_hoch} <br>> -of GTiff ${source}.tif ${source}_1.tif<br>> <br>>    echo Bild 2<br>>    echo "${m_rechts} - ${or_hoch} | ${or_rechts} - ${m_hoch}"<br>>    gdal_translate -projwin ${m_rechts} ${or_hoch} ${or_rechts} ${m_hoch} <br>> -of GTiff ${source}.tif ${source}_2.tif<br>> <br>>    echo Bild 3<br>>    echo "${ul_rechts} - ${m_hoch} | ${m_rechts} - ${ul_hoch}"<br>>    gdal_translate -projwin ${ul_rechts} ${m_hoch} ${m_rechts} ${ul_hoch} <br>> -of GTiff ${source}.tif ${source}_3.tif<br>> <br>>    echo Bild 4<br>>    echo "${m_rechts} - ${m_hoch} | ${or_rechts} - ${ul_hoch}"<br>>    gdal_translate -projwin ${m_rechts} ${m_hoch} ${or_rechts} ${ul_hoch} <br>> -of GTiff ${source}.tif ${source}_4.tif<br>> <br>>    echo finish<br>>    echo<br>>    done<br>> <br>> here is the log:<br>> <br>> THEMA:<br>> Bild 1<br>> 5681411.1 - 5685564.3 | 362500.00 - 5683500.00<br>> Input file size is 6815, 6831<br>> Computed -srcwin 57 132 2975 3299 from projected window.<br>> 0...10...20...30...40...50...60...70...80...90...100 - done.<br>> Bild 2<br>> 362500.00 - 5685564.3 | 364769.1 - 5683500.00<br>> Input file size is 6815, 6831<br>> Computed -srcwin 3033 132 3627 3299 from projected window.<br>> 0...10...20...30...40...50...60...70...80...90...100 - done.<br>> Bild 3<br>> 360638.4 - 5683500.00 | 362500.00 - 5681411.1<br>> Input file size is 6815, 6831<br>> Computed -srcwin 57 3431 2975 3339 from projected window.<br>> 0...10...20...30...40...50...60...70...80...90...100 - done.<br>> Bild 4<br>> 362500.00 - 5683500.00 | 364769.1 - 5681411.1<br>> Input file size is 6815, 6831<br>> Computed -srcwin 3033 3431 3627 3339 from projected window.<br>> 0...10...20...30...40...50...60...70...80...90...100 - done.<br>> finish<br>> <br>> a image with the border you can find at (scale 1:500):  <br>> http://www.tappenbeck.net/qgis/jt_qgis_border_20130304.jpg<br>> <br>> final some informations about the<br>> ****** images 1 ****<br>> Driver: GTiff/GeoTIFF<br>> Files: <br>> E:/datenlager_tappenbeck/20130218_Wuelfrath_RasterbildTransformation_GK2ETRS/ETRS/1988/1988_1.tif<br>> Size is 2975, 3299<br>> Coordinate System is:<br>> PROJCS["ETRS89 / UTM zone 32N",<br>>      GEOGCS["ETRS89",<br>>          DATUM["European_Terrestrial_Reference_System_1989",<br>>              SPHEROID["GRS 1980",6378137,298.2572221010002,<br>>                  AUTHORITY["EPSG","7019"]],<br>>              AUTHORITY["EPSG","6258"]],<br>>          PRIMEM["Greenwich",0],<br>>          UNIT["degree",0.0174532925199433],<br>>          AUTHORITY["EPSG","4258"]],<br>>      PROJECTION["Transverse_Mercator"],<br>>      PARAMETER["latitude_of_origin",0],<br>>      PARAMETER["central_meridian",9],<br>>      PARAMETER["scale_factor",0.9996],<br>>      PARAMETER["false_easting",500000],<br>>      PARAMETER["false_northing",0],<br>>      UNIT["metre",1,<br>>          AUTHORITY["EPSG","9001"]],<br>>      AUTHORITY["EPSG","25832"]]<br>> Origin = (360637.965654098020000,5685564.494013113000000)<br>> Pixel Size = (0.625645628251233,-0.625645628251233)<br>> Metadata:<br>>    AREA_OR_POINT=Area<br>> Image Structure Metadata:<br>>    INTERLEAVE=PIXEL<br>> Corner Coordinates:<br>> Upper Left  (  360637.966, 5685564.494) (  7d 0' 2.63"E, 51d18'15.52"N)<br>> Lower Left  (  360637.966, 5683500.489) (  7d 0' 5.53"E, 51d17' 8.75"N)<br>> Upper Right (  362499.261, 5685564.494) (  7d 1'38.70"E, 51d18'17.15"N)<br>> Lower Right (  362499.261, 5683500.489) (  7d 1'41.56"E, 51d17'10.38"N)<br>> Center      (  361568.614, 5684532.492) (  7d 0'52.11"E, 51d17'42.96"N)<br>> Band 1 Block=2975x1 Type=Byte, ColorInterp=Red<br>>    Mask Flags: PER_DATASET ALPHA<br>> Band 2 Block=2975x1 Type=Byte, ColorInterp=Green<br>>    Mask Flags: PER_DATASET ALPHA<br>> Band 3 Block=2975x1 Type=Byte, ColorInterp=Blue<br>>    Mask Flags: PER_DATASET ALPHA<br>> Band 4 Block=2975x1 Type=Byte, ColorInterp=Alpha<br>> <br>> <br>> ****** images 2 ****<br>> <br>> Driver: GTiff/GeoTIFF<br>> Files: <br>> E:/datenlager_tappenbeck/20130218_Wuelfrath_RasterbildTransformation_GK2ETRS/ETRS/1988/1988_2.tif<br>> Size is 3627, 3299<br>> Coordinate System is:<br>> PROJCS["ETRS89 / UTM zone 32N",<br>>      GEOGCS["ETRS89",<br>>          DATUM["European_Terrestrial_Reference_System_1989",<br>>              SPHEROID["GRS 1980",6378137,298.2572221010002,<br>>                  AUTHORITY["EPSG","7019"]],<br>>              AUTHORITY["EPSG","6258"]],<br>>          PRIMEM["Greenwich",0],<br>>          UNIT["degree",0.0174532925199433],<br>>          AUTHORITY["EPSG","4258"]],<br>>      PROJECTION["Transverse_Mercator"],<br>>      PARAMETER["latitude_of_origin",0],<br>>      PARAMETER["central_meridian",9],<br>>      PARAMETER["scale_factor",0.9996],<br>>      PARAMETER["false_easting",500000],<br>>      PARAMETER["false_northing",0],<br>>      UNIT["metre",1,<br>>          AUTHORITY["EPSG","9001"]],<br>>      AUTHORITY["EPSG","25832"]]<br>> Origin = (362499.887043773720000,5685564.494013113000000)<br>> Pixel Size = (0.625645628251233,-0.625645628251233)<br>> Metadata:<br>>    AREA_OR_POINT=Area<br>> Image Structure Metadata:<br>>    INTERLEAVE=PIXEL<br>> Corner Coordinates:<br>> Upper Left  (  362499.887, 5685564.494) (  7d 1'38.73"E, 51d18'17.16"N)<br>> Lower Left  (  362499.887, 5683500.489) (  7d 1'41.59"E, 51d17'10.38"N)<br>> Upper Right (  364769.104, 5685564.494) (  7d 3'35.85"E, 51d18'19.11"N)<br>> Lower Right (  364769.104, 5683500.489) (  7d 3'38.67"E, 51d17'12.34"N)<br>> Center      (  363634.495, 5684532.492) (  7d 2'38.71"E, 51d17'44.75"N)<br>> Band 1 Block=3627x1 Type=Byte, ColorInterp=Red<br>>    Mask Flags: PER_DATASET ALPHA<br>> Band 2 Block=3627x1 Type=Byte, ColorInterp=Green<br>>    Mask Flags: PER_DATASET ALPHA<br>> Band 3 Block=3627x1 Type=Byte, ColorInterp=Blue<br>>    Mask Flags: PER_DATASET ALPHA<br>> Band 4 Block=3627x1 Type=Byte, ColorInterp=Alpha<br>> <br>> can someone help me to close the border...<br>> <br>> regards Jan :-)<br>> _______________________________________________<br>> Qgis-user mailing list<br>> Qgis-user@lists.osgeo.org<br>> http://lists.osgeo.org/mailman/listinfo/qgis-user<br></div>                                        </div></body>
</html>