otbcli_Rasterization error: Invalid dataset dimensions : 0 x 0

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

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 :

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

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 "@"