# otbcli\_Rasterization error: Invalid dataset dimensions : 0 x 0

**URL:** <https://forum.orfeo-toolbox.org/t/otbcli-rasterization-error-invalid-dataset-dimensions-0-x-0/763>\
**Category:** OTB Usage\
**Created:** [September 6, 2020, 4:36pm UTC](https://forum.orfeo-toolbox.org/t/otbcli-rasterization-error-invalid-dataset-dimensions-0-x-0/763 "2020-09-06T16:36:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gmorphio](https://forum.orfeo-toolbox.org/letter_avatar_proxy/v4/letter/g/13edae/32.png) [@Gmorphio](https://forum.orfeo-toolbox.org/u/Gmorphio)\
**Post date:** [September 6, 2020, 4:36pm UTC](https://forum.orfeo-toolbox.org/t/otbcli-rasterization-error-invalid-dataset-dimensions-0-x-0/763/1 "2020-09-06T16:36:54Z")

</div>

Hello I am new to programming and orfeotoolbox and I am having an issue with otbcli\_Rasterization function. I am trying to rasterize a shapefile.

### Configuration setup

My system: macOS Catalina 10.15.5  
Version of the OTB: \*7.1.0  
Python version: 3.7.7

## Description of my issue

When i run:  
otbcli\_Rasterization -in logged\_trees.shp -out outfile.tif -spx 1. -spy 1.

I get this error message:

Writing outfile.tif…: 0% []  
ERROR 1: Invalid dataset dimensions : 0 x 0  
ERROR 10: Pointer ‘hDS’ is NULL in ‘GDALSetProjection’.  
ERROR 10: Pointer ‘hDS’ is NULL in ‘GDALGetRasterBand’.  
ERROR 10: Pointer ‘hBand’ is NULL in ‘GDALFillRaster’.  
ERROR 10: Pointer ‘hDS’ is NULL in ‘GDALSetGeoTransform’.  
Floating point exception (core dumped)

The error happens if I try to use the algorithm from the command line with Bash or with python3 also

---

<div class="post-metadata">

**Author:** ![Cedric](https://forum.orfeo-toolbox.org/letter_avatar_proxy/v4/letter/c/ecd19e/32.png) [@Cedric](https://forum.orfeo-toolbox.org/u/Cedric)\
**Post date:** [September 7, 2020, 7:42am UTC](https://forum.orfeo-toolbox.org/t/otbcli-rasterization-error-invalid-dataset-dimensions-0-x-0/763/2 "2020-09-07T07:42:03Z")

</div>

Hello,

This is weird, it looks like GDAL cannot create the output dataset. Can you provide the full log ? In particular the lines before the error, it should be something like :

```auto
2020-09-07 09:26:22 (INFO) Rasterization: Output origin: [407808, 4.88053e+06]
2020-09-07 09:26:22 (INFO) Rasterization: Output size: [10927, 9627]
2020-09-07 09:26:22 (INFO) Rasterization: Output spacing: [1, 1]
2020-09-07 09:26:22 (INFO): Estimated memory for full processing: 2006.38MB (avail.: 256 MB), optimal image partitioning: 8 blocks
2020-09-07 09:26:22 (INFO): File outfile.tif will be written in 12 blocks of 3632x3632 pixels

```

Cédric

---

<div class="post-metadata">

**Author:** ![Gmorphio](https://forum.orfeo-toolbox.org/letter_avatar_proxy/v4/letter/g/13edae/32.png) [@Gmorphio](https://forum.orfeo-toolbox.org/u/Gmorphio)\
**Post date:** [September 9, 2020, 4:21am UTC](https://forum.orfeo-toolbox.org/t/otbcli-rasterization-error-invalid-dataset-dimensions-0-x-0/763/3 "2020-09-09T04:21:51Z")

</div>

Hi Cédric

(base) ➜ ~ git:(master) ✗ otbcli\_Rasterization -in /Users/christurner/orfeo/scripts/results/logged\_tree\_truth.shp -out /Users/christurner/orfeo/scripts/results/logged\_tree\_truth.tif -spx 1. -spy 1.  
2020-09-08 21:19:57 (INFO) Rasterization: Default RAM limit for OTB is 256 MB  
2020-09-08 21:19:57 (INFO) Rasterization: GDAL maximum cache size is 819 MB  
2020-09-08 21:19:57 (INFO) Rasterization: OTB will use at most 8 threads  
2020-09-08 21:19:57 (INFO) Rasterization: Input dataset extent is (-70.2019, -12.3999) (-70.1997, -12.3988)  
2020-09-08 21:19:57 (INFO) Rasterization: Input dataset projection reference system is: GEOGCS[“WGS 84”,DATUM[“WGS\_1984”,SPHEROID[“WGS 84”,6378137,298.257223563,AUTHORITY[“EPSG”,“7030”]],AUTHORITY[“EPSG”,“6326”]],PRIMEM[“Greenwich”,0,AUTHORITY[“EPSG”,“8901”]],UNIT[“degree”,0.0174532925199433,AUTHORITY[“EPSG”,“9122”]],AXIS[“Latitude”,NORTH],AXIS[“Longitude”,EAST],AUTHORITY[“EPSG”,“4326”]]  
2020-09-08 21:19:57 (INFO) Rasterization: Output projection reference system is: GEOGCS[“WGS 84”,DATUM[“WGS\_1984”,SPHEROID[“WGS 84”,6378137,298.257223563,AUTHORITY[“EPSG”,“7030”]],AUTHORITY[“EPSG”,“6326”]],PRIMEM[“Greenwich”,0,AUTHORITY[“EPSG”,“8901”]],UNIT[“degree”,0.0174532925199433,AUTHORITY[“EPSG”,“9122”]],AXIS[“Latitude”,NORTH],AXIS[“Longitude”,EAST],AUTHORITY[“EPSG”,“4326”]]  
2020-09-08 21:19:57 (INFO) Rasterization: Output origin: [-69.7019, -11.8999]  
2020-09-08 21:19:57 (INFO) Rasterization: Output size: [0, 0]  
2020-09-08 21:19:57 (INFO) Rasterization: Output spacing: [1, 1]  
2020-09-08 21:19:57 (INFO): File /Users/christurner/orfeo/scripts/results/logged\_tree\_truth.tif will be written in 1073741824 blocks of 0x0 pixels  
Writing /Users/christurner/orfeo/scripts/results/logged\_tree\_truth.tif…: 0% []ERROR 1: Invalid dataset dimensions : 0 x 0  
ERROR 10: Pointer ‘hDS’ is NULL in ‘GDALSetProjection’.

ERROR 10: Pointer ‘hDS’ is NULL in ‘GDALGetRasterBand’.

ERROR 10: Pointer ‘hBand’ is NULL in ‘GDALFillRaster’.

ERROR 10: Pointer ‘hDS’ is NULL in ‘GDALSetGeoTransform’.

/Users/christurner/orfeo/OTB-7.1.0-Darwin64/bin/otbcli: line 55: 30085 Floating point exception: 8 OTB\_CLI\_LAUNCHER "@"
