Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I try to reference image and use them via WMS.

  1. Chouse project CRS to EPSG:900913
  2. Add OpenStreetMap source using gdal wms

      <Service name="TMS">
      <Cache />
  3. Reference some image using osm background, using EPSG:900913 as target crs
  4. Import generated tiffs into project. By default they was imported not in EPSG:900913 but in EPSG:3395
  5. Select EPSG:900913 for layer with imported image - after that image appear there it must be.
  6. Save project and try to get layer with referenced image via wms (qgis-mapserver was installed according tutorial)

I didn't see my referenced image. I check layer codes and so on. I try to get osm background (write both layers for wms layers parameter in different order) and get's only osm background.

Next thing I try - save gcp's and use gdal VRT

<VRTDataset rasterXSize="1800" rasterYSize="668">  
  <GCPList Projection="EPSG:900913">
    <GCP Id="1" Info="a" Pixel="64.0462" Line="589.346" X="4.17039e+06" Y="7.5036e+06" Z="0.0" />
    <GCP Id="2" Info="b" Pixel="64.8845" Line="72.4501" X="4.17039e+06" Y="7.50362e+06" Z="0.0" />
    <GCP Id="3" Info="c" Pixel="1746.68" Line="72.6177" X="4.17057e+06" Y="7.50365e+06" Z="0.0" />
    <GCP Id="4" Info="d" Pixel="1746.64" Line="589.724" X="17057e+06" Y="7.50362e+06" Z="0.0" />
  <VRTRasterBand dataType="Byte" band="1">
      <SourceFilename relativeToVRT="0">/home/dkiselev/desktop/123.jpg</SourceFilename>

In this case I have nothing, maybe GCP's didn't applyed to source image. Any way It was a try to find workaround.

Here is gdlainfo for resulting tif file:

gdalinfo /home/dkiselev/desktop/123_modified.tif 
Driver: GTiff/GeoTIFF
Files: /home/dkiselev/desktop/123_modified.tif
Size is 1920, 556
Coordinate System is:
PROJCS["Google Maps Global Mercator",
    GEOGCS["WGS 84",
            SPHEROID["WGS 84",6378137,298.257223563,
Origin = (4170378.687966782134026,7503652.570609360933304)
Pixel Size = (0.103459182316438,-0.103459182316438)
Image Structure Metadata:
Corner Coordinates:
Upper Left  ( 4170378.688, 7503652.571) ( 37d27'47.34"E, 55d54' 9.61"N)
Lower Left  ( 4170378.688, 7503595.047) ( 37d27'47.34"E, 55d54' 8.56"N)
Upper Right ( 4170577.330, 7503652.571) ( 37d27'53.76"E, 55d54' 9.61"N)
Lower Right ( 4170577.330, 7503595.047) ( 37d27'53.76"E, 55d54' 8.56"N)
Center      ( 4170478.009, 7503623.809) ( 37d27'50.55"E, 55d54' 9.09"N)
Band 1 Block=1920x1 Type=Byte, ColorInterp=Red
  NoData Value=0
Band 2 Block=1920x1 Type=Byte, ColorInterp=Green
  NoData Value=0
Band 3 Block=1920x1 Type=Byte, ColorInterp=Blue
  NoData Value=0

And qgis generated gdal script for it

gdal_translate -of GTiff -gcp 61.699 588.844 4.17039e+06 7.5036e+06 -gcp 67.0641 71.1088 4.17039e+06 7.50362e+06 -gcp 1750.37 71.1088 4.17057e+06 7.50365e+06 -gcp 1755.74 594.209 4.17057e+06 7.50363e+06 "/home/dkiselev/desktop/123.jpg" "/tmp/123.jpg"
gdalwarp -r near -order 1 -co COMPRESS=DEFLATE -dstalpha "/tmp/123.jpg" "/home/dkiselev/desktop/123_modified.tif"

So I try to use vrt as out format for gdal_translate and gdalwarp with rather same result: I can see correctly referenced image in qgis work window, but get's nothing via wms.

share|improve this question
What is the file format of the file you get after georeferencing? Can you show the GDALInfo about it? In <SourceFilename> you have spaces in the path - usually it is not good. –  SS_Rebelious Mar 18 '13 at 15:59
I try two ways with tif and gdal vrt as output format. By default qgis use tif. I add gdal script what I use, and gdalinfo out for resulting tif. Space in VRT - is just misspeling in stackexchange editor. –  dmitry.v.kiselev Mar 20 '13 at 15:29
Add: same tiff works properly under mapserver. –  dmitry.v.kiselev Mar 31 '13 at 8:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.