[Qgis-user] problems to split images
Bruce, Bob (CON)
Bob.Bruce at gov.mb.ca
Tue Mar 5 15:17:35 PST 2013
Jan,
Have you tried the Image Cutter plugin at: http://www.mappinggeek.ca/QGISPythonPlugins/image_cutter/indexInternet.html
You can install it from the repository at: http://www.mappinggeek.ca/QGISPythonPlugins/
We used it to tile images for maps.
It will work as long as you don't have any spaces in your path or file names.
Bob Bruce
-----Original Message-----
From: qgis-user-bounces at lists.osgeo.org [mailto:qgis-user-bounces at lists.osgeo.org] On Behalf Of Jan Tappenbeck
Sent: March-04-13 7:58 AM
To: qgis-mailingliste
Subject: [Qgis-user] problems to split images
hi !
i try to split a image into 4 new tiles by gdal_translate - the problem
is, that there was a border between the image in right-axis.
i create a little script for the work:
#!/bin/sh
#gdal_translate -projwin 360623.459101 5685603.57034 362500.0 5683500.0
-of GTiff
E:\datenlager_TAP\20130218_XXXXXX_RasterbildTransformation_GK2ETRS\ETRS\1988\1988.tif
E:/datenlager_TAP/20130218_XXXXXX_RasterbildTransformation_GK2ETRS/ETRS/1988/1988_1.tif
# Pfad-Angabe NICHT auf / endent!!!!
basic_path="E:/datenlager_TAP/20130218_XXXXXX_RasterbildTransformation_GK2ETRS/ETRS"
source_theme="1988"
source_path=${source_theme}
or_rechts="364769.1"
or_hoch="5685564.3"
# +----------------------+----------------------+
# | | +
# | | +
# | | +
# | | +
# | Bild 1 | Bild 2 +
# | | +
# | | +
# | | +
# +----------------------+----------------------+
# | | +
# | | +
# | | +
# | Bild 3 | Bild 4 +
# | | +
# | | +
# | | +
# | | +
# +----------------------+----------------------+
ul_rechts="360638.4"
ul_hoch="5681411.1"
# Trennpunkt in der Mitte
m_rechts="362500.00"
m_hoch="5683500.00"
source="$basic_path/$source_path/$source_theme"
echo
echo Name der Rasterbilddatei: ${source}.tif
echo
echo
echo THEMA: ${theme}
echo Bild 1
echo "${ul_hoch} - ${or_hoch} | ${m_rechts} - ${m_hoch}"
gdal_translate -projwin ${ul_rechts} ${or_hoch} ${m_rechts} ${m_hoch}
-of GTiff ${source}.tif ${source}_1.tif
echo Bild 2
echo "${m_rechts} - ${or_hoch} | ${or_rechts} - ${m_hoch}"
gdal_translate -projwin ${m_rechts} ${or_hoch} ${or_rechts} ${m_hoch}
-of GTiff ${source}.tif ${source}_2.tif
echo Bild 3
echo "${ul_rechts} - ${m_hoch} | ${m_rechts} - ${ul_hoch}"
gdal_translate -projwin ${ul_rechts} ${m_hoch} ${m_rechts} ${ul_hoch}
-of GTiff ${source}.tif ${source}_3.tif
echo Bild 4
echo "${m_rechts} - ${m_hoch} | ${or_rechts} - ${ul_hoch}"
gdal_translate -projwin ${m_rechts} ${m_hoch} ${or_rechts} ${ul_hoch}
-of GTiff ${source}.tif ${source}_4.tif
echo finish
echo
done
here is the log:
THEMA:
Bild 1
5681411.1 - 5685564.3 | 362500.00 - 5683500.00
Input file size is 6815, 6831
Computed -srcwin 57 132 2975 3299 from projected window.
0...10...20...30...40...50...60...70...80...90...100 - done.
Bild 2
362500.00 - 5685564.3 | 364769.1 - 5683500.00
Input file size is 6815, 6831
Computed -srcwin 3033 132 3627 3299 from projected window.
0...10...20...30...40...50...60...70...80...90...100 - done.
Bild 3
360638.4 - 5683500.00 | 362500.00 - 5681411.1
Input file size is 6815, 6831
Computed -srcwin 57 3431 2975 3339 from projected window.
0...10...20...30...40...50...60...70...80...90...100 - done.
Bild 4
362500.00 - 5683500.00 | 364769.1 - 5681411.1
Input file size is 6815, 6831
Computed -srcwin 3033 3431 3627 3339 from projected window.
0...10...20...30...40...50...60...70...80...90...100 - done.
finish
a image with the border you can find at (scale 1:500):
http://www.tappenbeck.net/qgis/jt_qgis_border_20130304.jpg
final some informations about the
****** images 1 ****
Driver: GTiff/GeoTIFF
Files:
E:/datenlager_tappenbeck/20130218_Wuelfrath_RasterbildTransformation_GK2ETRS/ETRS/1988/1988_1.tif
Size is 2975, 3299
Coordinate System is:
PROJCS["ETRS89 / UTM zone 32N",
GEOGCS["ETRS89",
DATUM["European_Terrestrial_Reference_System_1989",
SPHEROID["GRS 1980",6378137,298.2572221010002,
AUTHORITY["EPSG","7019"]],
AUTHORITY["EPSG","6258"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4258"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",9],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AUTHORITY["EPSG","25832"]]
Origin = (360637.965654098020000,5685564.494013113000000)
Pixel Size = (0.625645628251233,-0.625645628251233)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 360637.966, 5685564.494) ( 7d 0' 2.63"E, 51d18'15.52"N)
Lower Left ( 360637.966, 5683500.489) ( 7d 0' 5.53"E, 51d17' 8.75"N)
Upper Right ( 362499.261, 5685564.494) ( 7d 1'38.70"E, 51d18'17.15"N)
Lower Right ( 362499.261, 5683500.489) ( 7d 1'41.56"E, 51d17'10.38"N)
Center ( 361568.614, 5684532.492) ( 7d 0'52.11"E, 51d17'42.96"N)
Band 1 Block=2975x1 Type=Byte, ColorInterp=Red
Mask Flags: PER_DATASET ALPHA
Band 2 Block=2975x1 Type=Byte, ColorInterp=Green
Mask Flags: PER_DATASET ALPHA
Band 3 Block=2975x1 Type=Byte, ColorInterp=Blue
Mask Flags: PER_DATASET ALPHA
Band 4 Block=2975x1 Type=Byte, ColorInterp=Alpha
****** images 2 ****
Driver: GTiff/GeoTIFF
Files:
E:/datenlager_tappenbeck/20130218_Wuelfrath_RasterbildTransformation_GK2ETRS/ETRS/1988/1988_2.tif
Size is 3627, 3299
Coordinate System is:
PROJCS["ETRS89 / UTM zone 32N",
GEOGCS["ETRS89",
DATUM["European_Terrestrial_Reference_System_1989",
SPHEROID["GRS 1980",6378137,298.2572221010002,
AUTHORITY["EPSG","7019"]],
AUTHORITY["EPSG","6258"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4258"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",9],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AUTHORITY["EPSG","25832"]]
Origin = (362499.887043773720000,5685564.494013113000000)
Pixel Size = (0.625645628251233,-0.625645628251233)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 362499.887, 5685564.494) ( 7d 1'38.73"E, 51d18'17.16"N)
Lower Left ( 362499.887, 5683500.489) ( 7d 1'41.59"E, 51d17'10.38"N)
Upper Right ( 364769.104, 5685564.494) ( 7d 3'35.85"E, 51d18'19.11"N)
Lower Right ( 364769.104, 5683500.489) ( 7d 3'38.67"E, 51d17'12.34"N)
Center ( 363634.495, 5684532.492) ( 7d 2'38.71"E, 51d17'44.75"N)
Band 1 Block=3627x1 Type=Byte, ColorInterp=Red
Mask Flags: PER_DATASET ALPHA
Band 2 Block=3627x1 Type=Byte, ColorInterp=Green
Mask Flags: PER_DATASET ALPHA
Band 3 Block=3627x1 Type=Byte, ColorInterp=Blue
Mask Flags: PER_DATASET ALPHA
Band 4 Block=3627x1 Type=Byte, ColorInterp=Alpha
can someone help me to close the border...
regards Jan :-)
_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user
More information about the Qgis-user
mailing list