mapchete icon indicating copy to clipboard operation
mapchete copied to clipboard

Force `blockxsize` in gtiff.py to be int

Open Scartography opened this issue 3 years ago • 0 comments

When specified in metadata.json the blockxsize is a string and in Line 467 in gtiff.py it needs integer...so just add int(profileblockxsize) and be done with it

Traceback (most recent call last): File "/usr/local/bin/mapchete", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 829, in call return self.main(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/mapchete/cli/default/convert.py", line 119, in convert job = commands.convert( File "/usr/local/lib/python3.8/site-packages/mapchete/commands/_convert.py", line 309, in convert return execute( File "/usr/local/lib/python3.8/site-packages/mapchete/commands/_execute.py", line 143, in execute mp = mapchete.open( File "/usr/local/lib/python3.8/site-packages/mapchete/_core.py", line 93, in open return Mapchete(MapcheteConfig(some_input, **kwargs), with_cache=with_cache) File "/usr/local/lib/python3.8/site-packages/mapchete/config.py", line 324, in init self.output.prepare(process_area=self.area_at_zoom()) File "/usr/local/lib/python3.8/site-packages/mapchete/formats/default/gtiff.py", line 467, in prepare get_maximum_overview_level( File "/usr/local/lib/python3.8/site-packages/rasterio/rio/overview.py", line 55, in get_maximum_overview_level while min(width // overview_factor, height // overview_factor) > minsize: TypeError: '>' not supported between instances of 'int' and 'str'

Scartography avatar Jul 29 '22 14:07 Scartography