Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error : band 1 has no color table - Cannot georeference B&W images? #8

Open
soniok opened this issue Feb 15, 2018 · 1 comment
Open

Comments

@soniok
Copy link

soniok commented Feb 15, 2018

For those interrested in what images I'm using, they are non-georeferenced, .jp2(Jpeg2000) format, B&W historical orthophotos available from the French Geographic Institute. Available for free and are public domain.
IGN - Remonte Le Temps
Then I convert them to .PNG before uploading them to the site.


I get an error when I try to georeference a black and white image. My goal is to georeference mostly black and white, and a few colored images.

So here is my error:

Error : band 1 has no color table

Here is my temp fix, can we make it better?
Edit line 662:

  #expand = '-expand rgb'     <-- comment this line
  expand = ''                 <-- add this line underneath ^^

With the edit above, everything works fine.
Can @enricofer mod this correction to properly work for grayscale/B&W and color images?

@enricofer
Copy link
Owner

The only source image formats supported by the application are jpg and png. That's because the image is loaded in openlayers for registration points coupling that handles any web image format. The line you suggest to modify is needed to reclassify any source image type to a common rgb type. The scenario app use does not include multiband images because I think there are other powerful system to handle them. The typical source is an old scanner map in png or jpeg of b&w, grayscale or rgb type, so a png B&W should be processed without problem, but no tiffs or jp2 at all.
But It would interesting explore other possible workflows.

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

No branches or pull requests

2 participants