[gdal-dev] Fwd: Problem with gdal.Rasterize utility : argument GDALDatasetShadow in wrapper_GDALRasterizeDestName

François ALLAIN frallain at gmail.com
Thu Jul 14 14:43:22 PDT 2016


It did resolve this error, but now I've got this :

ERROR 10: Pointer 'hDS' is NULL in 'GDALGetProjectionRef'.

Warning 1: The input vector layer has a SRS, but the output raster dataset
SRS is unknown.
Ensure output raster dataset has the same SRS, otherwise results might be
incorrect.
ERROR 10: Pointer 'hDataset' is NULL in 'GDALGetRasterXSize'.

ERROR 10: Pointer 'hDataset' is NULL in 'GDALGetRasterYSize'.

ERROR 10: Pointer 'hDS' is NULL in 'GDALGetGeoTransform'.

Segmentation fault

I thought that the geotiff had a SRS :
$ gdalinfo my.tif
Driver: GTiff/GeoTIFF
Files: a.tif
Size is 256, 256
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (-76.460380554200000,45.450708220599999)
Pixel Size = (0.000000167637891,-0.000000117601953)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=DEFLATE
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  ( -76.4603806,  45.4507082) ( 76d27'37.37"W, 45d27' 2.55"N)
Lower Left  ( -76.4603806,  45.4506781) ( 76d27'37.37"W, 45d27' 2.44"N)
Upper Right ( -76.4603376,  45.4507082) ( 76d27'37.22"W, 45d27' 2.55"N)
Lower Right ( -76.4603376,  45.4506781) ( 76d27'37.22"W, 45d27' 2.44"N)
Center      ( -76.4603591,  45.4506932) ( 76d27'37.29"W, 45d27' 2.50"N)
Band 1 Block=256x8 Type=Byte, ColorInterp=Red
  Mask Flags: PER_DATASET ALPHA
Band 2 Block=256x8 Type=Byte, ColorInterp=Green
  Mask Flags: PER_DATASET ALPHA
Band 3 Block=256x8 Type=Byte, ColorInterp=Blue
  Mask Flags: PER_DATASET ALPHA
Band 4 Block=256x8 Type=Byte, ColorInterp=Alpha


$ cat my.geojson
{   "type": "FeatureCollection",
    "features": [{
        "type": "Feature",
            "properties": {
                "prop0": "value0"
            },
        "id": 0,
        "geometry": {
            "type": "Polygon",
            "coordinates": [
                  [
                    [
                        -76.4603750,
                        45.4506926
                    ],
                    [
                        -76.4603632,
                        45.4506998
                    ],
                    [
                        -76.4603522,
                        45.4506914
                    ],
                    [
                        -76.4603639,
                        45.4506845
                    ],
                    [
                        -76.4603750,
                        45.4506926
                    ]
                  ]
            ]
        }
    }]

Cheers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20160714/abf780ff/attachment.html>


More information about the gdal-dev mailing list