[Gdal-dev] gdal_rasterize - can't make it work

Maciek Sieczka werchowyna at epf.pl
Tue May 23 15:10:24 EDT 2006


Hi!

Using Gdal CVS & Grass 6.1, both CVS 2006.23.05 and gdal-grass 1.3.1.2.

There is a tiff [1] and a shapefile [2]. They have the same extent (see
the attached png - black is raster, red is vector). I want to burn the
shapefile into the raster:

$ gdal_rasterize -a CAT -l cieki05 cieki05/cieki05.shp rast.tif
0100 - done.

But nothing happens - when the rast.tif is displayed it looks
untouched. The value range of rast.tif is still 1-1 (like in [1],
before gdal_rasterize).

What am I doing wrong?



[1]

$ gdalinfo rast.tif -mm
Driver: GTiff/GeoTIFF
Size is 678, 901
Coordinate System is:
PROJCS["WGS 84 / UTM zone 33N",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.2572235629972,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",15],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","32633"]]
Origin = (596040.000000,5684380.000000)
Pixel Size = (10.00000000,-10.00000000)
Metadata:
  AREA_OR_POINT=Area
Corner Coordinates:
Upper Left  (  596040.000, 5684380.000) ( 16d22'39.70"E, 51d18'9.45"N)
Lower Left  (  596040.000, 5675370.000) ( 16d22'30.99"E, 51d13'17.87"N)
Upper Right (  602820.000, 5684380.000) ( 16d28'29.71"E, 51d18'5.18"N)
Lower Right (  602820.000, 5675370.000) ( 16d28'20.39"E, 51d13'13.61"N)
Center      (  599430.000, 5679875.000) ( 16d25'30.19"E, 51d15'41.56"N)
Band 1 Block=678x12 Type=Byte, ColorInterp=Gray
    Computed Min/Max=1.000,1.000
  NoData Value=0
  Metadata:
    COLOR_TABLE_RULES_COUNT=0



[2]

$ john at quercus:~$ ogrinfo -al -so cieki05/cieki05.shp
INFO: Open of `cieki05/cieki05.shp'
using driver `ESRI Shapefile' successful.

Layer name: cieki05
Geometry: Line String
Feature Count: 186
Extent: (596043.921384, 5675372.016568) - (602814.546338,
5684374.847224) Layer SRS WKT:
PROJCS["WGS_1984_UTM_Zone_33N",
    GEOGCS["GCS_WGS_1984",
        DATUM["WGS_1984",
            SPHEROID["wgs84",6378137,298.257223563]],
        PRIMEM["Greenwich",0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",15],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["Meter",1]]
CAT: Real (11.0)
NAZWA: String (80.0)
KOMENT: String (80.0)
NUMBER: Real (11.0)
NEXT: Real (11.0)
odwr: Real (11.0)


Maciek


--------------------
W polskim Internecie s? setki milion?w stron. My przekazujemy Tobie tylko najlepsze z nich!
http://katalog.panoramainternetu.pl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdal_rasterize.png
Type: image/png
Size: 1419 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20060523/c9126e4c/gdal_rasterize.png


More information about the Gdal-dev mailing list