Code Monkey home page Code Monkey logo

django-warp's People

Contributors

enricofer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

hardienalfath

django-warp's Issues

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

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?

Issue install django-warp via pip

Hello @enricofer,

I'm having and issue trying to install django-warp on a Ubuntu 16.04 LTS (in VirtualBox Linux Host) update to date.
No problem installing dependencies but could not install Django 1.9, instead installed Django 2.0.2.

What am I missing? Could anyone care to help guide me?
Thanks in advance,
Best regards,

Here is the output of history:

25 python --version
28 python3
30 sudo apt-get install python3-pip
33 pip3 install --upgrade pip
34 pip3 install Django==2.0.2
35 python3
39 sudo -H pip3 install django-apps
43 sudo -H pip3 install django-http-proxy
44 sudo -H pip3 install django-slugify
45 sudo -H pip3 install python-slugify
46 sudo -H pip3 install django-imagekit
47 sudo -H pip3 install psycopg2
48 sudo apt-get install git
49 sudo -H pip3 install django-raster
50 sudo apt-get install gdal-bin ogre-1.9-tools
51 sudo -H pip3 install gdal
52 sudo apt-get install libgdal-dev
53 sudo -H pip3 install gdal
54 sudo apt-get install libgdal1-1.11.3-grass
55 sudo apt-get install libgdal1-dev
56 sudo -H pip3 install gdal
57 sudo apt-get install python-gdal
58 sudo -H pip3 install gdal
59 easy_install3 GDAL
61 sudo -H easy_install3 GDAL
62 sudo apt-get install python-dev
63 sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev libssl-dev
64 sudo easy_install greenlet
65 sudo -H easy_install3 greenlet
66 sudo -H easy_install3 gevent
68 sudo -H pip3 install gdal
71 sudo apt-get install build-essential autoconf libtool pkg-config python3-opengl python3-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 libgle3 python3-dev libssl-dev
73 sudo apt install python3-gdal
74 sudo -H pip3 install gdal
75 pip3 install django-warp
76 sud -H pip3 install django-warp
77 sudo -H pip3 install django-warp
79 sud -H pip3 install libspatialindex
80 sudo -H pip3 install libspatialindex
81 sudo apt install libspatialindex
82 sudo apt install libspatialindex-dev -f
83 sudo -H pip3 install django-warp
84 sudo apt install x86_64-linux-gnu-gcc
85 sudo apt install libx86sudo apt-get install libgdal1i libgdal1-dev libgdal-dev
86 sudo apt-get install libgdal1i libgdal1-dev libgdal-dev
87 sudo apt-get auto-remove
88 gdal-config --version
89 sudo -H pip3 install pygdal==1.11.3
90 sudo -H pip3 install pygdal
91 sudo pip3 install pygdal
92 sudo pip3 install pygdal==1.11.3.3
93 python3
94 sudo -H pip3 install django-warp
95 export CPLUS_INCLUDE_PATH=/usr/include/gdal
96 export C_INCLUDE_PATH=/usr/include/gdal
97 pip3 install GDAL
98 sudo -H pip3 install django-warp
99 pip3 install django-warp
100 sudo apt-get install python3 python-dev python3-dev build-essential libssl-dev libffi-dev libxml2-dev libxslt1-dev zlib1g-dev python-pip
101 sudo apt-get install python3 python-dev python3-dev build-essential libssl-dev libffi-dev libxml2-dev libxslt1-dev zlib1g-dev python3-pip
102 sudo -H pip3 install django-warp
103 sudo pip3 install django-warp
105 easy_install django-warp
106 sudo easy_install django-warp
107 sudo easy_install3 django-warp
108 sudo apt install gcc
109 sudo apt install shapelib
110 sudo easy_install3 django-warp
112 pip3 install Django==1.9
113 sudo pip3 install Django==1.9
114 sudo easy_install3 django-warp

Software Version Information:

mapwarper@mapwarper-web:~$ python
Python 2.7.12
(default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2

mapwarper@mapwarper-web:~$ python3
Python 3.5.2
(default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux

mapwarper@mapwarper-web:~$ pip --version
pip 9.0.1
from /home/mapwarper/.local/lib/python3.5/site-packages (python 3.5)

mapwarper@mapwarper-web:~$ pip freeze
amqp==2.2.2
apturl==0.5.2
beautifulsoup4==4.4.1
billiard==3.5.0.3
blinker==1.3
Brlapi==0.6.4
celery==4.1.0
chardet==2.3.0
checkbox-support==0.22
command-not-found==0.3
cryptography==1.2.3
defer==1.0.6
Django==2.0.2
django-appconf==1.0.2
django-apps==0.1.0
django-colorful==1.2
django-cors-headers==2.1.0
django-http-proxy==0.4.3
django-imagekit==4.0.2
django-raster==0.5
django-warp==0.5
feedparser==5.1.3
GDAL==1.11.3
greenlet==0.4.13
guacamole==0.9.2
html5lib==0.999
httplib2==0.9.1
idna==2.0
Jinja2==2.8
kombu==4.1.0
language-selector==0.1
louis==2.6.4
lxml==3.5.0
Mako==1.0.3
MarkupSafe==0.23
numpy==1.14.0
oauthlib==1.0.3
onboard==1.2.0
padme==1.1.1
pexpect==4.0.1
pilkit==2.0
Pillow==5.0.0
plainbox==0.25
psycopg2==2.7.4
ptyprocess==0.5
pyasn1==0.1.9
pycups==1.9.73
pycurl==7.43.0
pygdal==1.11.3.3
pygobject==3.20.0
PyJWT==1.3.0
PyOpenGL==3.0.2
pyparsing==2.2.0
python-apt==1.1.0b1
python-debian==0.1.27
python-slugify==1.2.4
python-systemd==231
pytz==2018.3
pyxdg==0.25
reportlab==3.3.0
requests==2.9.1
sessioninstaller==0.0.0
six==1.10.0
system-service==0.3
ubuntu-drivers-common==0.0.0
ufw==0.35
unattended-upgrades==0.1
Unidecode==1.0.22
unity-scope-calculator==0.1
unity-scope-chromiumbookmarks==0.1
unity-scope-colourlovers==0.1
unity-scope-devhelp==0.1
unity-scope-firefoxbookmarks==0.1
unity-scope-gdrive==0.7
unity-scope-manpages==0.1
unity-scope-openclipart==0.1
unity-scope-texdoc==0.1
unity-scope-tomboy==0.1
unity-scope-virtualbox==0.1
unity-scope-yelp==0.1
unity-scope-zotero==0.1
urllib3==1.13.1
usb-creator==0.3.0
vine==1.1.4
xdiagnose==3.8.4.1
xkit==0.0.0
XlsxWriter==0.7.3

Error msg when installing Django-warp:

mapwarper@mapwarper-web:~$ sudo pip3 install Django-warp
The directory '/home/mapwarper/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/mapwarper/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: Django-warp in /usr/local/lib/python3.5/dist-packages/django_warp-0.5-py3.5.egg
Requirement already satisfied: Django>=1.9 in /usr/local/lib/python3.5/dist-packages (from Django-warp)
Requirement already satisfied: psycopg2 in /usr/local/lib/python3.5/dist-packages (from Django-warp)
Requirement already satisfied: django-cors-headers in /usr/local/lib/python3.5/dist-packages (from Django-warp)
Requirement already satisfied: django-http-proxy in /usr/local/lib/python3.5/dist-packages (from Django-warp)
Requirement already satisfied: python-slugify in /usr/local/lib/python3.5/dist-packages (from Django-warp)
Requirement already satisfied: django-imagekit in /usr/local/lib/python3.5/dist-packages (from Django-warp)
Requirement already satisfied: django-raster in /usr/local/lib/python3.5/dist-packages (from Django-warp)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from Django-warp)
Collecting GDAL>=2.2.0 (from Django-warp)
Downloading GDAL-2.2.3.tar.gz (475kB)
100% |████████████████████████████████| 481kB 1.4MB/s
Requirement already satisfied: pytz in ./.local/lib/python3.5/site-packages (from Django>=1.9->Django-warp)
Requirement already satisfied: Unidecode>=0.04.16 in /usr/local/lib/python3.5/dist-packages (from python-slugify->Django-warp)
Requirement already satisfied: pilkit>=0.2.0 in /usr/local/lib/python3.5/dist-packages (from django-imagekit->Django-warp)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from django-imagekit->Django-warp)
Requirement already satisfied: django-appconf>=0.5 in /usr/local/lib/python3.5/dist-packages (from django-imagekit->Django-warp)
Requirement already satisfied: celery>=4.0.2 in /usr/local/lib/python3.5/dist-packages (from django-raster->Django-warp)
Requirement already satisfied: django-colorful>=1.0.1 in /usr/local/lib/python3.5/dist-packages (from django-raster->Django-warp)
Requirement already satisfied: Pillow>=4.1.1 in /usr/local/lib/python3.5/dist-packages (from django-raster->Django-warp)
Requirement already satisfied: numpy>=1.9.1 in /usr/local/lib/python3.5/dist-packages (from django-raster->Django-warp)
Requirement already satisfied: pyparsing>=2.2.0 in /usr/local/lib/python3.5/dist-packages (from django-raster->Django-warp)
Requirement already satisfied: kombu<5.0,>=4.0.2 in /usr/local/lib/python3.5/dist-packages (from celery>=4.0.2->django-raster->Django-warp)
Requirement already satisfied: billiard<3.6.0,>=3.5.0.2 in /usr/local/lib/python3.5/dist-packages (from celery>=4.0.2->django-raster->Django-warp)
Requirement already satisfied: amqp<3.0,>=2.1.4 in /usr/local/lib/python3.5/dist-packages (from kombu<5.0,>=4.0.2->celery>=4.0.2->django-raster->Django-warp)
Requirement already satisfied: vine>=1.1.3 in /usr/local/lib/python3.5/dist-packages (from amqp<3.0,>=2.1.4->kombu<5.0,>=4.0.2->celery>=4.0.2->django-raster->Django-warp)
Installing collected packages: GDAL
Found existing installation: GDAL 1.11.3
DEPRECATION: Uninstalling a distutils installed project (GDAL) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling GDAL-1.11.3:
Successfully uninstalled GDAL-1.11.3
Running setup.py install for GDAL ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-qtp2ebr0/GDAL/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-jghn6xsi-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.5
copying gdal.py -> build/lib.linux-x86_64-3.5
copying ogr.py -> build/lib.linux-x86_64-3.5
copying osr.py -> build/lib.linux-x86_64-3.5
copying gdalconst.py -> build/lib.linux-x86_64-3.5
copying gnm.py -> build/lib.linux-x86_64-3.5
copying gdalnumeric.py -> build/lib.linux-x86_64-3.5
creating build/lib.linux-x86_64-3.5/osgeo
copying osgeo/ogr.py -> build/lib.linux-x86_64-3.5/osgeo
copying osgeo/osr.py -> build/lib.linux-x86_64-3.5/osgeo
copying osgeo/gdalnumeric.py -> build/lib.linux-x86_64-3.5/osgeo
copying osgeo/gdalconst.py -> build/lib.linux-x86_64-3.5/osgeo
copying osgeo/init.py -> build/lib.linux-x86_64-3.5/osgeo
copying osgeo/gdal_array.py -> build/lib.linux-x86_64-3.5/osgeo
copying osgeo/gnm.py -> build/lib.linux-x86_64-3.5/osgeo
copying osgeo/gdal.py -> build/lib.linux-x86_64-3.5/osgeo
Fixing build/lib.linux-x86_64-3.5/gdal.py build/lib.linux-x86_64-3.5/ogr.py build/lib.linux-x86_64-3.5/osr.py build/lib.linux-x86_64-3.5/gdalconst.py build/lib.linux-x86_64-3.5/gnm.py build/lib.linux-x86_64-3.5/gdalnumeric.py build/lib.linux-x86_64-3.5/osgeo/ogr.py build/lib.linux-x86_64-3.5/osgeo/osr.py build/lib.linux-x86_64-3.5/osgeo/gdalnumeric.py build/lib.linux-x86_64-3.5/osgeo/gdalconst.py build/lib.linux-x86_64-3.5/osgeo/init.py build/lib.linux-x86_64-3.5/osgeo/gdal_array.py build/lib.linux-x86_64-3.5/osgeo/gnm.py build/lib.linux-x86_64-3.5/osgeo/gdal.py
Skipping optional fixer: ws_comma
Fixing build/lib.linux-x86_64-3.5/gdal.py build/lib.linux-x86_64-3.5/ogr.py build/lib.linux-x86_64-3.5/osr.py build/lib.linux-x86_64-3.5/gdalconst.py build/lib.linux-x86_64-3.5/gnm.py build/lib.linux-x86_64-3.5/gdalnumeric.py build/lib.linux-x86_64-3.5/osgeo/ogr.py build/lib.linux-x86_64-3.5/osgeo/osr.py build/lib.linux-x86_64-3.5/osgeo/gdalnumeric.py build/lib.linux-x86_64-3.5/osgeo/gdalconst.py build/lib.linux-x86_64-3.5/osgeo/init.py build/lib.linux-x86_64-3.5/osgeo/gdal_array.py build/lib.linux-x86_64-3.5/osgeo/gnm.py build/lib.linux-x86_64-3.5/osgeo/gdal.py
Skipping optional fixer: ws_comma
running build_ext
building 'osgeo._gdal' extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/extensions
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python3.5m -I/usr/local/lib/python3.5/dist-packages/numpy/core/include -I/usr/include -c extensions/gdal_wrap.cpp -o build/temp.linux-x86_64-3.5/extensions/gdal_wrap.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
extensions/gdal_wrap.cpp:3168:22: fatal error: cpl_port.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------

Rolling back uninstall of GDAL
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-qtp2ebr0/GDAL/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-jghn6xsi-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-qtp2ebr0/GDAL/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.