Skip to content
This repository was archived by the owner on Jun 9, 2018. It is now read-only.

gdal2tiles_parallel.py: error: Output formats allowed are PNG and JPEG #33

Open
Opadera opened this issue Nov 18, 2016 · 5 comments
Open

Comments

@Opadera
Copy link

Opadera commented Nov 18, 2016

When I try to run the command as given in the wiki:
python gdal2tiles_parallel.py -e -p mercator /data/raw/WhiteHorse.tif /data/tiles/mercator/WhiteHorse_tiles

i get the error:
gdal2tiles_parallel.py: error: Output formats allowed are PNG and JPEG

I tried to include --format JPEG as indicated here but I only get "Format Details" in the editor returned, no tiles created.
Any solutions to this?

Answer the following when submitting a ticket:

  • What is your platform (Windows/Linux): Windows 10
  • What is your architecture? (32 v. 64): 64
  • What version of GDAL are you using? 2.1
  • What are the steps to reproduce your issue? replace path/filename in the command
@shaystrong
Copy link

same problems here. Works fine in the v5.0 tag

@Robinlovelace
Copy link

Same problem here...

@mrgloom
Copy link

mrgloom commented Jan 17, 2017

Same on Linux

time gdalbuildvrt -srcnodata "0,0,0" orthomaps/$DATASET/global.vrt orthomaps/$DATASET/orthophoto_*.tif
GDAL_TO_TILES="/usr/bin/python /usr/bin/gdal2tiles_parallel.py"
time $GDAL_TO_TILES -z 0-$LEVELS_OF_DETAIL orthomaps/$DATASET/global.vrt tiles/gdal2tiles_parallel_$DATASET"_tiles"

Produced error:

Usage: gdal2tiles_parallel.py [options] input_file(s) [output]

gdal2tiles_parallel.py: error: Output formats allowed are PNG and JPEG

If I use time $GDAL_TO_TILES -z 0-$LEVELS_OF_DETAIL -v --format PNG orthomaps/$DATASET/global.vrt tiles/gdal2tiles_parallel_$DATASET"_tiles"
is just print some info and nothing happens:

Format Details:
  Short Name: PNG
  Long Name: Portable Network Graphics
  Extension: png
  Mime Type: image/png
  Help Topic: frmt_various.html#PNG
  Supports: CreateCopy() - Create dataset by copying another.
  Supports: Virtual IO - eg. /vsimem/
  Creation Datatypes: Byte UInt16

<CreationOptionList>
  <Option name="WORLDFILE" type="boolean" description="Create world file" />
  <Option name="ZLEVEL" type="int" description="DEFLATE compression level 1-9" default="6" />
</CreationOptionList>

Format Details:
  Short Name: PNG
  Long Name: Portable Network Graphics
  Extension: png
  Mime Type: image/png
  Help Topic: frmt_various.html#PNG
  Supports: CreateCopy() - Create dataset by copying another.
  Supports: Virtual IO - eg. /vsimem/
  Creation Datatypes: Byte UInt16

<CreationOptionList>
  <Option name="WORLDFILE" type="boolean" description="Create world file" />
  <Option name="ZLEVEL" type="int" description="DEFLATE compression level 1-9" default="6" />
</CreationOptionList>

@seripap
Copy link

seripap commented Feb 15, 2017

A quick fix is to hard code the output tile driver format. Not the best solution, but works fine for my use case.

@dvictori
Copy link

dvictori commented May 4, 2017

If I use the flag --format=PNG or --format=JPEG it works. I guess is just a matter of how to set the flag in the command line.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants