0

I use OSGeo4W on Windows 7 (64 bit) and included libpng16.dll When I try

C:\OSGeo4W64\bin>gdal_polygonize star.png bla

I get the following error:

ERROR 4: `star.png' does not exist in the file system,
and is not recognised as a supported dataset name.
Unable to open star.png

I copied star.png into C:\OSGeo4W64\bin (this is where gdal_polygonize batch file, python file and compiled python file are located )

What is the mistake?

UPDATE: I found out that I get the same mistake with a TIFF file but it works on JPEGs. Maybe the library/module for PNGs can't be found?

  • 1
    I can't see any mistake and your command works for me. – user30184 Oct 29 '14 at 13:36
  • Try again with the full path name before star.png. – AndreJ Oct 29 '14 at 13:38
  • same :( I tried C:\OSGeo4W64\lib>gdal_polygonize C:\OSGeo4W64\bin\star.png bla – Selphiron Oct 29 '14 at 13:46
  • could it be caused by a wrong or missing environment variable ? I read that you usually add GDAL_DATA variable but I don't habe a gdal/data in my OSGeo4W64 directory.. – Selphiron Oct 29 '14 at 14:25
  • If you are working inside the OSGeo4W Shell, the environment is set correctly. This would apply to all GDAL routines. – AndreJ Oct 30 '14 at 4:51
0

I don't quite know why but when I accidentally typed .png twice (C:\OSGeo4W64\bin>gdal_polygonize star.png.png bla) it worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.