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

fresh install qgis2leaf, qgis 2.6.1, raster export crashes #179

Closed
riccardoklinger opened this issue Dec 16, 2014 · 32 comments
Closed

fresh install qgis2leaf, qgis 2.6.1, raster export crashes #179

riccardoklinger opened this issue Dec 16, 2014 · 32 comments
Labels

Comments

@riccardoklinger
Copy link
Contributor

we saw this error before and it looks like there is still a bug in the gdal call. GDAL seems installed (as it shipped with QGIS and enable).
I still receive the error:

Traceback (most recent call last):
File "C:/Users/ricckli/.qgis2/python/plugins\qgis2leaf\qgis2leafdialog.py", line 295, in export2leaf
qgis2leaf_exec(self.outFileName, self.basemapName, self.basemapMeta, self.basemapAddress, self.width, self.height, self.extent, self.full_screen, self.layer_list, self.visible, self.opacity, self.encode2JSON,self.createcluster, self.webpage_name, self.webmap_head,self.webmap_subhead, self.legend,self.locate,self.address, self.precision, self.labels, self.labelshover)
File "C:/Users/ricckli/.qgis2/python/plugins\qgis2leaf\qgis2leaf_exec.py", line 493, in qgis2leaf_exec
dst_ds = driver.CreateCopy( out_raster, src_ds, 0 )
File "C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages\osgeo\gdal.py", line 395, in CreateCopy
return _gdal.Driver_CreateCopy(self, _args, *_kwargs)
ValueError: Received a NULL pointer.

Tested on Windows 7, QGIS 2.6.1 qgis2leaf V1.4.1

@riccardoklinger
Copy link
Contributor Author

It looks like the desired folder is not installed. GDAL functions like "near black" for raster data sets are working. The folder where the desired script is installed is probably located here: C:\Program Files\QGIS Brighton\apps\qgis\python\plugins\GdalTools

the gdal.py script is located here on my machine:

C:\Program Files\QGIS Brighton\apps\Python27\Lib\site-packages\osgeo

Unfortunately I don't define the gdal driver in my plugin. the error is determined here:

                            processing.runalg("gdalogr:warpreproject",str(in_raster),str(i.crs().authid()),"EPSG:4326",0,1,"",prov_raster)

I think it is a problem of the the way QGIS is installed. We should use the process described in the issue #168

@riccardoklinger
Copy link
Contributor Author

had the same issue on a fresh install on Ubuntu with QGIS 2.6.1:

An error has occured while executing Python code:

Traceback (most recent call last):
File "/home/ricckli/.qgis2/python/plugins/qgis2leaf/qgis2leafdialog.py", line 295, in export2leaf
qgis2leaf_exec(self.outFileName, self.basemapName, self.basemapMeta, self.basemapAddress, self.width, self.height, self.extent, self.full_screen, self.layer_list, self.visible, self.opacity, self.encode2JSON,self.createcluster, self.webpage_name, self.webmap_head,self.webmap_subhead, self.legend,self.locate,self.address, self.precision, self.labels, self.labelshover)
File "/home/ricckli/.qgis2/python/plugins/qgis2leaf/qgis2leaf_exec.py", line 493, in qgis2leaf_exec
dst_ds = driver.CreateCopy( out_raster, src_ds, 0 )
File "/usr/lib/python2.7/dist-packages/osgeo/gdal.py", line 400, in CreateCopy
return _gdal.Driver_CreateCopy(self, _args, *_kwargs)
ValueError: Received a NULL pointer.

@jkwchui
Copy link

jkwchui commented Jan 2, 2015

The same issue also shows up on a fresh install on OSX Yosemite (10.10.1), with QGIS 2.6.1:

Traceback (most recent call last):
File "/Users/jkwchui/.qgis2/python/plugins/qgis2leaf/qgis2leafdialog.py", line 295, in export2leaf
qgis2leaf_exec(self.outFileName, self.basemapName, self.basemapMeta, self.basemapAddress, self.width, self.height, self.extent, self.full_screen, self.layer_list, self.visible, self.opacity, self.encode2JSON,self.createcluster, self.webpage_name, self.webmap_head,self.webmap_subhead, self.legend,self.locate,self.address, self.precision, self.labels, self.labelshover)
File "/Users/jkwchui/.qgis2/python/plugins/qgis2leaf/qgis2leaf_exec.py", line 493, in qgis2leaf_exec
dst_ds = driver.CreateCopy( out_raster, src_ds, 0 )
File "/Library/Frameworks/GDAL.framework/Versions/1.11/Python/2.7/site-packages/osgeo/gdal.py", line 402, in CreateCopy
return _gdal.Driver_CreateCopy(self, _args, *_kwargs)
ValueError: Received a NULL pointer.

@nirvine
Copy link

nirvine commented Jan 7, 2015

I also get errors -
Using Windows 7. Qgis and qgis2leaf both current versions.
I have tested with tif, ecw and jpg image formats, but all give errors.
Directory structure does not seem to be the problem - python scripts are found and errors are in the scripts.

A fix would be very much appreciated - this is a great concept, and I would love to make it work!

Traceback (most recent call last):
File "C:/Users/Narelle/.qgis2/python/plugins\qgis2leaf\qgis2leafdialog.py", line 295, in export2leaf
qgis2leaf_exec(self.outFileName, self.basemapName, self.basemapMeta, self.basemapAddress, self.width, self.height, self.extent, self.full_screen, self.layer_list, self.visible, self.opacity, self.encode2JSON,self.createcluster, self.webpage_name, self.webmap_head,self.webmap_subhead, self.legend,self.locate,self.address, self.precision, self.labels, self.labelshover)
File "C:/Users/Narelle/.qgis2/python/plugins\qgis2leaf\qgis2leaf_exec.py", line 493, in qgis2leaf_exec
dst_ds = driver.CreateCopy( out_raster, src_ds, 0 )
File "C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages\osgeo\gdal.py", line 395, in CreateCopy
return _gdal.Driver_CreateCopy(self, _args, *_kwargs)
ValueError: Received a NULL pointer.

@riccardoklinger
Copy link
Contributor Author

Now it's woirking like a charm to me... strange tested in Win7, Version 1.4.1

@nirvine
Copy link

nirvine commented Jan 9, 2015

I tried again - same error. What parameters did you use? Something must have changed for it to get past the "Received a NULL pointer" error.

@tomchadwin
Copy link
Contributor

OK. If you can recreate with the test data, post a screenshot of your settings.

@nirvine
Copy link

nirvine commented Jan 10, 2015

I could recreate the error with the test data tif, but the jpg file exported OK.

Here is the error when I ran the process from the attached screenshot:
parameters_tif

An error has occured while executing Python code:

Traceback (most recent call last):
File "C:/Users/Narelle/.qgis2/python/plugins\qgis2leaf\qgis2leafdialog.py", line 295, in export2leaf
qgis2leaf_exec(self.outFileName, self.basemapName, self.basemapMeta, self.basemapAddress, self.width, self.height, self.extent, self.full_screen, self.layer_list, self.visible, self.opacity, self.encode2JSON,self.createcluster, self.webpage_name, self.webmap_head,self.webmap_subhead, self.legend,self.locate,self.address, self.precision, self.labels, self.labelshover)
File "C:/Users/Narelle/.qgis2/python/plugins\qgis2leaf\qgis2leaf_exec.py", line 493, in qgis2leaf_exec
dst_ds = driver.CreateCopy( out_raster, src_ds, 0 )
File "C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages\osgeo\gdal.py", line 395, in CreateCopy
return _gdal.Driver_CreateCopy(self, _args, *_kwargs)
ValueError: Received a NULL pointer.

Python version:
2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]

QGIS version:
2.6.1-Brighton Brighton, e2a51df

Python path: ['C:/PROGRA1/QGISBR1/apps/qgis/./python/plugins\processing', 'C:/PROGRA1/QGISBR1/apps/qgis/./python', u'C:/Users/Narelle/.qgis2/python', u'C:/Users/Narelle/.qgis2/python/plugins', 'C:/PROGRA1/QGISBR1/apps/qgis/./python/plugins', 'C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages\matplotlib-1.3.1-py2.7-win-amd64.egg', 'C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages\nose-1.3.3-py2.7.egg', 'C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages\tornado-4.0.1-py2.7-win-amd64.egg', 'C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages\backports.ssl_match_hostname-3.4.0.2-py2.7.egg', 'C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages\certifi-14.05.14-py2.7.egg', 'C:\PROGRA1\QGISBR1\bin\python27.zip', 'C:\PROGRA1\QGISBR1\apps\Python27\DLLs', 'C:\PROGRA1\QGISBR1\apps\Python27\lib', 'C:\PROGRA1\QGISBR1\apps\Python27\lib\plat-win', 'C:\PROGRA1\QGISBR1\apps\Python27\lib\lib-tk', 'C:\PROGRA1\QGISBR1\bin', 'C:\PROGRA1\QGISBR1\apps\Python27', 'C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages', 'C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages\PIL', 'C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages\jinja2-2.7.2-py2.7.egg', 'C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages\markupsafe-0.23-py2.7-win-amd64.egg', 'C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages\pytz-2012j-py2.7.egg', 'C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages\win32', 'C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages\win32\lib', 'C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages\Pythonwin', 'C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win-amd64.egg', 'C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages\six-1.3.0-py2.7.egg', 'C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages\wx-2.8-msw-unicode', 'C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages\xlrd-0.9.2-py2.7.egg', 'C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages\xlwt-0.7.5-py2.7.egg', 'C:\Users\Narelle.qgis2\python\plugins\MetaSearch\ext-libs', 'C:\PROGRA1\QGISBR1\apps\qgis\python\plugins\fTools\tools']

@riccardoklinger
Copy link
Contributor Author

Can you try to run the GDAL warp command from your toolbox and export the file by hand? Just want to check whether this works or not.

@riccardoklinger
Copy link
Contributor Author

Can this be an issue with chown/ user permissions?

@riccardoklinger
Copy link
Contributor Author

The whole process of exporting faster is two folded: creating a jpg copy of the file and use gdalwarp for reprojecting it to 4326. As the jpg works it's probably an issue with storing as jpg. But why?!

@nirvine
Copy link

nirvine commented Jan 10, 2015

gdal_warp

That works.
I will try again with my image.

@nirvine
Copy link

nirvine commented Jan 10, 2015

I have found two problems with my file:

  1. It does not have a CRS set, so I had to pick EPSG:32755 - WGS 84 / UTM zone 55S from the list.
  2. If I try to export in jpeg format, I get a message saying the format is not supported. The test data was exported as a tiff image. (I only typed the name as "n_33-133_gdal_export.jpg", not set the output format.

The complete error here is:
Output driver `JPEG' not recognised or does not support
direct output file creation. The following format drivers are configured
and support direct output:
GeoRaster: Oracle Spatial GeoRaster
VRT: Virtual Raster
GTiff: GeoTIFF
NITF: National Imagery Transmission Format
HFA: Erdas Imagine Images (.img)
ELAS: ELAS
MEM: In Memory Raster
BMP: MS Windows Device Independent Bitmap
PCIDSK: PCIDSK Database File
ILWIS: ILWIS Raster Map
SGI: SGI Image File Format 1.0
Leveller: Leveller heightfield
Terragen: Terragen heightfield
netCDF: Network Common Data Format
HDF4Image: HDF4 Dataset
ISIS2: USGS Astrogeology ISIS cube (Version 2)
ERS: ERMapper .ers Labelled
RMF: Raster Matrix Format
RST: Idrisi Raster A.1
INGR: Intergraph Raster
GSBG: Golden Software Binary Grid (.grd)
GS7BG: Golden Software 7 Binary Grid (.grd)
PNM: Portable Pixmap Format (netpbm)
ENVI: ENVI .hdr Labelled
EHdr: ESRI .hdr Labelled
PAux: PCI .aux Labelled
MFF: Vexcel MFF Raster
MFF2: Vexcel MFF2 (HKV) Raster
BT: VTP .bt (Binary Terrain) 1.3 Format
LAN: Erdas .LAN/.GIS
IDA: Image Data and Analysis
GTX: NOAA Vertical Datum .GTX
NTv2: NTv2 Datum Grid Shift
CTable2: CTable2 Datum Grid Shift
KRO: KOLOR Raw
ADRG: ARC Digitized Raster Graphics
SAGA: SAGA GIS Binary Grid (.sdat)

@tomchadwin
Copy link
Contributor

OK, so:

  1. Do we need to check whether a raster layer has a CRS, and reject it if not (or assume 4326 or something)?
  2. Do we need to check for the availability of JPEG before calling it with GDAL? Anyone know how?

On 2, how has that GDAL install lost JPEG capability?

@nirvine
Copy link

nirvine commented Jan 13, 2015

  1. Would it be possible to use the project CRS? If there is no CRS set for the image, that is what QGIS would use to display it.
  2. I did a search for issues about jpg export not being available, but there seem to be no reports. I did try "Save as Image" for the whole map project in jpg format, and this works. So the capability is there, just not where we want it!

@tomchadwin
Copy link
Contributor

@nirvine Your suggestion for 1 is a good one, so I'll look at that. Until I can recreate the issue (about to try now), I'm not sure about 2. Will report back.

To clarify, does your QGIS map contain the JPEG or the TIFF from the test data? Or were you saying that the JPEG works fine, but the TIFF fails?

@tomchadwin
Copy link
Contributor

Here's a very old reference which could possibly be relevant:

http://lists.maptools.org/pipermail/fwtools/2005-November/000218.html

So if the source raster is not JPEG, do we need to reproject with gdalwarp to something it can export to (something lossless like TIFF), and then gdal_translate to JPEG? Is that what #168 is proposing, as @riccardoklinger mentioned above?

@tomchadwin
Copy link
Contributor

A better reference:

http://trac.osgeo.org/gdal/wiki/FAQRaster#Whywontgdalwarporgdal_mergewritetomostformats

(found via: http://lists.osgeo.org/pipermail/gdal-dev/2009-November/022782.html)

So if the information on that page is still correct, we cannot gdalwarp -of jpeg. We will therefore have to do gdalwarp -of GTiff and then gdal_translate -of JPEG

@riccardoklinger
Copy link
Contributor Author

That is already done! As I have described, I first re project it as tiff and then create a jpg copy of it.

Von meinem iPhone gesendet

Am 19.01.2015 um 18:36 schrieb Tom Chadwin [email protected]:

A better reference:

http://trac.osgeo.org/gdal/wiki/FAQRaster#Whywontgdalwarporgdal_mergewritetomostformats

(found via: http://lists.osgeo.org/pipermail/gdal-dev/2009-November/022782.html)

So if the information on that page is still correct, we cannot gdalwarp -of jpeg. We will therefore have to do gdalwarp -of GTiff and then gdal_translate -of JPEG


Reply to this email directly or view it on GitHub.

@tomchadwin
Copy link
Contributor

@riccardoklinger And I do not get the error if I export the TIFF test data layer. It works fine.

Back to you, @nirvine, I'm afraid. Unless I can recreate the issue, I'm a bit stuck.

@nirvine
Copy link

nirvine commented Jan 19, 2015

Travelling at the moment - will try a few things tomorrow.

@nirvine
Copy link

nirvine commented Jan 24, 2015

I have tried converting the image to gtiff before export - same error.
I also tried reprojecting to WGS84 (which is the project CRS, and all the other layers are in WGS84) - same problem.

An error has occured while executing Python code:

Traceback (most recent call last):
File "C:/Users/Narelle/.qgis2/python/plugins\qgis2leaf\qgis2leafdialog.py", line 295, in export2leaf
qgis2leaf_exec(self.outFileName, self.basemapName, self.basemapMeta, self.basemapAddress, >self.width, self.height, self.extent, self.full_screen, self.layer_list, self.visible, self.opacity, >self.encode2JSON,self.createcluster, self.webpage_name, >self.webmap_head,self.webmap_subhead, self.legend,self.locate,self.address, self.precision, >self.labels, self.labelshover)
File "C:/Users/Narelle/.qgis2/python/plugins\qgis2leaf\qgis2leaf_exec.py", line 493, in >qgis2leaf_exec
dst_ds = driver.CreateCopy( out_raster, src_ds, 0 )
File "C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages\osgeo\gdal.py", line 395, in >CreateCopy
return _gdal.Driver_CreateCopy(self, args, *kwargs)
ValueError: Received a NULL pointer.

Looks like we are stuck.

@tomchadwin
Copy link
Contributor

Any chance you can Dropbox the file for us?

-------- Original message --------
From: Narelle Irvine
Date:24/01/2015 06:35 (GMT+00:00)
To: Geolicious/qgis2leaf
Cc: Tom Chadwin
Subject: Re: [qgis2leaf] fresh install qgis2leaf, qgis 2.6.1, raster export crashes (#179)

I have tried converting the image to gtiff before export - same error.
I also tried reprojecting to WGS84 (which is the project CRS, and all the other layers are in WGS84) - same problem.

An error has occured while executing Python code:

Traceback (most recent call last):
File "C:/Users/Narelle/.qgis2/python/plugins\qgis2leaf\qgis2leafdialog.py", line 295, in export2leaf
qgis2leaf_exec(self.outFileName, self.basemapName, self.basemapMeta, self.basemapAddress, >self.width, self.height, self.extent, self.full_screen, self.layer_list, self.visible, self.opacity, >self.encode2JSON,self.createcluster, self.webpage_name, >self.webmap_head,self.webmap_subhead, self.legend,self.locate,self.address, self.precision, >self.labels, self.labelshover)
File "C:/Users/Narelle/.qgis2/python/plugins\qgis2leaf\qgis2leaf_exec.py", line 493, in >qgis2leaf_exec
dst_ds = driver.CreateCopy( out_raster, src_ds, 0 )
File "C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages\osgeo\gdal.py", line 395, in >CreateCopy
return _gdal.Driver_CreateCopy(self, args, *kwargs)
ValueError: Received a NULL pointer.

Looks like we are stuck.


Reply to this email directly or view it on GitHubhttps://github.com//issues/179#issuecomment-71302837.

Tom Chadwin, ICT Manager
Telephone: 01434 611530 Mob:
Web: www.northumberlandnationalpark.org.ukhttp://www.northumberlandnationalpark.org.uk/

IMPORTANT NOTICE - Disclaimer - This communication is from Northumberland National Park Authority (NNPA).The Authority’s head office and principal place of business is Eastburn, South Park, Hexham, Northumberland, NE46 1BS, United Kingdom. If you are not the intended recipient(s) please note that any form of disclosure, distribution, copying or use of this communication or the information in it or in any attachments is strictly prohibited and may be unlawful. If you have received this communication in error, please delete the email and destroy any copies of it. Any views or opinions presented are solely those of the author and do not necessarily represent those of NNPA.Contractors or potential contractors are reminded that a formal Order or Contract is needed for NNPA to be bound by any offer or acceptance of terms for the supply of goods or services Although this email and any attachments are believed to be free of any virus or other defects which might affect any computer or IT system into which they are received, no responsibility is accepted by the NNPA for any loss or damage arising in any way from the receipt or use thereof. Computer systems of this Authority may be monitored and communications carried out on them recorded, to secure the effective operation of the system and for other lawful purpose.

@nirvine
Copy link

nirvine commented Jan 24, 2015

Shapefiles and tiff have been copied to
https://www.dropbox.com/sh/m3vnc2kzjn79fw8/AACTLVIVS6aGoGya1yX5k-T2a?dl=0

Many thanks,
Narelle.

On 24 January 2015 at 19:59, Tom Chadwin [email protected] wrote:

Any chance you can Dropbox the file for us?

-------- Original message --------
From: Narelle Irvine
Date:24/01/2015 06:35 (GMT+00:00)
To: Geolicious/qgis2leaf
Cc: Tom Chadwin
Subject: Re: [qgis2leaf] fresh install qgis2leaf, qgis 2.6.1, raster
export crashes (#179)

I have tried converting the image to gtiff before export - same error.
I also tried reprojecting to WGS84 (which is the project CRS, and all the
other layers are in WGS84) - same problem.

An error has occured while executing Python code:

Traceback (most recent call last):
File
"C:/Users/Narelle/.qgis2/python/plugins\qgis2leaf\qgis2leafdialog.py", line
295, in export2leaf
qgis2leaf_exec(self.outFileName, self.basemapName, self.basemapMeta,
self.basemapAddress, >self.width, self.height, self.extent,
self.full_screen, self.layer_list, self.visible, self.opacity,

self.encode2JSON,self.createcluster, self.webpage_name,
self.webmap_head,self.webmap_subhead,
self.legend,self.locate,self.address, self.precision, >self.labels,
self.labelshover)
File "C:/Users/Narelle/.qgis2/python/plugins\qgis2leaf\qgis2leaf_exec.py",
line 493, in >qgis2leaf_exec
dst_ds = driver.CreateCopy( out_raster, src_ds, 0 )
File "C:\PROGRA1\QGISBR1\apps\Python27\lib\site-packages\osgeo\gdal.py",
line 395, in >CreateCopy
return _gdal.Driver_CreateCopy(self, args, *kwargs)
ValueError: Received a NULL pointer.

Looks like we are stuck.


Reply to this email directly or view it on GitHub<
https://github.com/Geolicious/qgis2leaf/issues/179#issuecomment-71302837>.

Tom Chadwin, ICT Manager
Telephone: 01434 611530 Mob:
Web: www.northumberlandnationalpark.org.uk<
http://www.northumberlandnationalpark.org.uk/>

IMPORTANT NOTICE - Disclaimer - This communication is from Northumberland
National Park Authority (NNPA).The Authority’s head office and principal
place of business is Eastburn, South Park, Hexham, Northumberland, NE46
1BS, United Kingdom. If you are not the intended recipient(s) please note
that any form of disclosure, distribution, copying or use of this
communication or the information in it or in any attachments is strictly
prohibited and may be unlawful. If you have received this communication in
error, please delete the email and destroy any copies of it. Any views or
opinions presented are solely those of the author and do not necessarily
represent those of NNPA.Contractors or potential contractors are reminded
that a formal Order or Contract is needed for NNPA to be bound by any offer
or acceptance of terms for the supply of goods or services Although this
email and any attachments are believed to be free of any virus or other
defects which might affect any computer or IT system into which they are
received, no responsibility is accepted by the NNPA for any loss or damage
arising in any way from the receipt or use thereof. Computer systems of
this Authority may be monitored and communications carried out on them
recorded, to secure the effective operation of the system and for other
lawful purpose.


Reply to this email directly or view it on GitHub
#179 (comment)
.

Narelle Irvine

Ph. 0413592876

@tomchadwin
Copy link
Contributor

This is where my GIS ignorance shines. I see no .shp files, only the TIFF, and QPJ, PRJ, and CPG files for each layer. Should I be able to open these in QGIS, or are there some files missing?

@wildintellect
Copy link

I just ran some test on my own sample data (airphoto). It's the warp and the reprojection that are failing, even if the projection is clearly detected by QGIS. In my tests the only Raster that works is one that is a jpg in 4326 already. I used Warp and Translate from the Raster menu (GDALtools) to prepare all the tests. Ubuntu 14.04 QGIS 2.6.1 GDAL 1.11.1

Tiff 26942 fail
JPEG 26942 fail
Tiff 4326 fail
JPEG 4326 success

This seems to imply something isn't right with the calls to gdal.

Another thing I realized which might need to be another ticket, is that Rasters that are not Integer based 0-255 values will fail to convert to anything useful (I was using a float dem). Which makes sense since it's outside the range of values a JPEG can store, but also means there's some preprocessing that needs to happen.

@tomchadwin
Copy link
Contributor

@wildintellect Your non-8-bit raster issue has been raised in #168 - thanks.

@tomchadwin
Copy link
Contributor

@wildintellect @riccardoklinger Because I'm not very familiar with the raster side of things, I thought I'd ask for clarification on some details:

  1. Does the plug-in call GDAL directly, or via the QGIS API?
  2. Are we seeing different behaviour between command-line and QGIS calling of these functions?

riccardoklinger added a commit that referenced this issue Apr 14, 2015
@riccardoklinger
Copy link
Contributor Author

now I am using only qgis API funcions and it worked perfectly with diferent projections and types. please check

@nirvine
Copy link

nirvine commented Apr 15, 2015

I still get errors with tifs and jpgs. I have upgraded to Qgis 2.8.1 Wien

Tif error:
Traceback (most recent call last):
File "C:/Users/Narelle/.qgis2/python/plugins\qgis2leaf\qgis2leafdialog.py", line 297, in export2leaf
qgis2leaf_exec(self.outFileName, self.basemapName, self.basemapMeta, self.basemapAddress, self.width, self.height, self.extent, self.full_screen, self.layer_list, self.visible, self.opacity, self.encode2JSON,self.createcluster, self.webpage_name, self.webmap_head,self.webmap_subhead, self.legend,self.locate,self.address, self.precision, self.labels, self.labelshover, self.matchCRS, self.selected)
File "C:/Users/Narelle/.qgis2/python/plugins\qgis2leaf\qgis2leaf_exec.py", line 251, in qgis2leaf_exec
dst_ds = driver.CreateCopy( out_raster, src_ds, 0 )
File "C:\PROGRA1\QGISWI1\apps\Python27\lib\site-packages\osgeo\gdal.py", line 395, in CreateCopy
return _gdal.Driver_CreateCopy(self, _args, *_kwargs)
ValueError: Received a NULL pointer.

JPG Error - no file [filename].aux.xml

Both the tif and the jpg have been reprojected to WGS84.

@riccardoklinger
Copy link
Contributor Author

You need to download the current Github version of the plugin. the changes
are not pushed to the plugin repo at the moment. Which version of the
plugin is installed?


Geolicious GbR
Agentur für Geo-Kommunikation

Riccardo Klinger
Geschäftsführer

mobil: 0176 63437298
e-mail: [email protected]
web: www.geolicious.de

Geolicious GbR
c/o Daniel Kerkow
Binzstraße 48
13189 Berlin

Gesellschafter:
Riccardo Klinger
Daniel Kerkow
Jakob Hafner

Sitz der Gesellschaft: Berlin
Ust-ID: DE289107523

On Wed, Apr 15, 2015 at 3:35 PM, Narelle Irvine [email protected]
wrote:

I still get errors with tifs and jpgs. I have upgraded to Qgis 2.8.1 Wien

Tif error:
Traceback (most recent call last):
File
"C:/Users/Narelle/.qgis2/python/plugins\qgis2leaf\qgis2leafdialog.py", line
297, in export2leaf
qgis2leaf_exec(self.outFileName, self.basemapName, self.basemapMeta,
self.basemapAddress, self.width, self.height, self.extent,
self.full_screen, self.layer_list, self.visible, self.opacity,
self.encode2JSON,self.createcluster, self.webpage_name,
self.webmap_head,self.webmap_subhead, self.legend,self.locate,self.address,
self.precision, self.labels, self.labelshover, self.matchCRS, self.selected)
File "C:/Users/Narelle/.qgis2/python/plugins\qgis2leaf\qgis2leaf_exec.py",
line 251, in qgis2leaf_exec
dst_ds = driver.CreateCopy( out_raster, src_ds, 0 )
File "C:\PROGRA1\QGISWI1\apps\Python27\lib\site-packages\osgeo\gdal.py",
line 395, in CreateCopy
return _gdal.Driver_CreateCopy(self, _args, *_kwargs)
ValueError: Received a NULL pointer.

JPG Error - no file [filename].aux.xml

Both the tif and the jpg have been reprojected to WGS84.


Reply to this email directly or view it on GitHub
#179 (comment)
.

@nirvine
Copy link

nirvine commented Apr 15, 2015

I added the current version, and it works fine.
Many thanks :-)

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

No branches or pull requests

5 participants