Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I hope this is the right place to ask this question

I recently endeavored to digitize a bunch of old maps and I aim to use NYPL's map-vectorizer tool that was written inside a Mac. The aforementioned code is linked below.

https://github.com/NYPL/map-vectorizer

My error was after meeting all dependencies it could not open the file-load-tiff script within GIMP-2.6 no matter which particular flavor of gimp (gimp, gimp-console, gimp-console-2.6, etc) and it keeps giving me the same error:

> Thresholdizing:
> ---------------
> test.ti/test.tif into threshold file: test.ti/test/test-threshold-tmp.tif
> 
> (gimp:17828): GLib-WARNING **: (/build/buildd/glib2.0- 2.32.3/./glib/gerror.c:390):g_error_new_valist: runtime check failed: (domain != 0)
> GIMP-Error: Execution error for procedure 'file-tiff-load':
> Could not open 'test.ti/test.tif' for reading: No such file or directory

> batch command experienced an execution error

> ERROR 4: `test.ti/test.tif' does not exist in the file system,
> and is not recognised as a supported dataset name.

> gdalinfo failed - unable to open 'test.ti/test.tif'.

Now I understand everything after the GIMP-error is just failscade - but I am totally new to gimp scripting and am unsure of how to ensure a stable connection between the multiple scripts that make up this tool and my Gimp installation. I have tried this across two machines, My Ubuntu VM sitting inside x64 windows 7 install and an ARM processor Chromebook running Precise Pangolin through Crouton.

Update 17/10/2013

There was a typo inside the nypl-create-threshold.scm which called file-tif-load. Also the invocation of GIMP was missing the flags -i and -b in config.py This can be fixed by adjusting the line:

    defaultgimp = '/usr/bin/gimp -i -b'

These two fixes have advanced me to a new error where the temporary generation of thresholdized tifs is breaking and deleting their .tmp files before allowing the rest of the script to use them.

man@squid:~/map-vectorizer$ ./vectorize_map.py test.tif 






NYPL Labs Map Vectorizer v0.1 
=============================
By: Mauricio Giraldo Arteaga @mgiraldo / @nypl_labs

GIMP executable path [/usr/bin/gimp]: 


Processing file: test.tif



Thresholdizing:
---------------
test.ti/test.tif into threshold file: test.ti/test/test-threshold-tmp.tif
batch command experienced an execution error



Geodata obtained:
-----------------
W -73.9968041
N 40.7219642
E -73.9955339
S 40.7205240


Applying to destination:
------------------------
ERROR 4: `test.ti/test/test-threshold-tmp.tif' does not exist in the file system,
and is not recognised as a supported dataset name.

GDALOpen failed - 4
`test.ti/test/test-threshold-tmp.tif' does not exist in the file system,
and is not recognised as a supported dataset name.


ERROR 4: `test.ti/test/test-wsg-tmp.tif' does not exist in the file system,
and is not recognised as a supported dataset name.


Polygonizing (coarse):
----------------------
ERROR 4: `test.ti/test/test-gdal-tmp.tif' does not exist in the file system,
and is not recognised as a supported dataset name.

Unable to open test.ti/test/test-gdal-tmp.tif

Splitting megapolygon file into chunks
--------------------------------------
Could not open shapefile

EDIT:

SCIENCE FACT: USE THE RIGHT VERSION.

updated to 2.8.6

It now works.

with this dudes help http://www.webupd8.org/2013/06/install-gimp-286-in-ubuntu-ppa.html

also to be noted: Precise Pangolin only maintains Gimp 2.6 in their repositories.

share|improve this question

1 Answer 1

A fix was submitted. Check the new version: https://github.com/NYPL/map-vectorizer

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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