[gdal-dev] garbled output from gdaladdo in geopackage

2016-01-14 Thread Thomas Sevaldrud
Hi, I've been using the new GeoPackage raster support in 2.0.1, and have noticed some strange output from gdaladdo on certain datasets. When producing an overview tile which is on the edge of the dataset, so that it is not entirely covered by its child tiles, I get random data in the parts of

Re: [gdal-dev] garbled output from gdaladdo in geopackage

2016-01-14 Thread Thomas Sevaldrud
Ok, I've opened a ticket for it here: http://trac.osgeo.org/gdal/ticket/6309 - Thomas On Thu, Jan 14, 2016 at 12:27 PM, Even Rouault <even.roua...@spatialys.com> wrote: > Le jeudi 14 janvier 2016 12:07:44, Thomas Sevaldrud a écrit : > > Hi, > > > > I've been usin

[gdal-dev] GDALWarp on a specific overview of a dataset

2015-06-15 Thread Thomas Sevaldrud
Hi, I am having a bit of trouble with warping a dataset (an ECW file) with multiple overviews. The base file is huge, so I am selecting the overview that matches closest to my output resolution and makes an in-memory VRT of this, consisting of the overview bands of the original image. This seems

Re: [gdal-dev] GDALWarp on a specific overview of a dataset

2015-06-15 Thread Thomas Sevaldrud
2.0 there will be a new class for handling this, the GDALOverviewDaset. It's a bit early for me to move to 2.0 yet, but maybe I should just make a similar dataset type in my own project. Would that be more efficient than going via a VRT? - Thomas On Mon, Jun 15, 2015 at 12:07 PM, Thomas

Re: [gdal-dev] GDALWarp on a specific overview of a dataset

2015-06-15 Thread Thomas Sevaldrud
When using the same image in GeoTIFF with overviews, it works correctly, which may indicate something with the ECW drivers. I suppose it must be something triggered by something weird I'm doing though, or else I would think that other people would have the same problem. The weird thing is that if

Re: [gdal-dev] GDALWarp on a specific overview of a dataset

2015-06-15 Thread Thomas Sevaldrud
! - Thomas On Mon, Jun 15, 2015 at 4:06 PM, Even Rouault even.roua...@spatialys.com wrote: Le lundi 15 juin 2015 15:51:37, Thomas Sevaldrud a écrit : When using the same image in GeoTIFF with overviews, it works correctly, which may indicate something with the ECW drivers. I suppose it must

Re: [gdal-dev] GDALWarp API and paletted images

2015-06-12 Thread Thomas Sevaldrud
. Is this the best way to do it btw, or is it a better way to make use of overviews when cutting out and reprojecting parts of a big image? Thanks again for all your help :-) - Thomas On Fri, Jun 12, 2015 at 1:35 PM, Even Rouault even.roua...@spatialys.com wrote: Selon Thomas Sevaldrud tho

Re: [gdal-dev] GDALWarp API and paletted images

2015-06-12 Thread Thomas Sevaldrud
, or do I need to create an alpha channel in the input image as well? - Thomas On Thu, Jun 11, 2015 at 5:25 PM, Even Rouault even.roua...@spatialys.com wrote: Selon Thomas Sevaldrud tho...@silentwings.no: Great, thanks! I tried this, but got only a red image as result, so I guess only

Re: [gdal-dev] GDALWarp API and paletted images

2015-06-11 Thread Thomas Sevaldrud
Great, thanks! I tried this, but got only a red image as result, so I guess only the first channel was used. This is the relevant code, where _ds is the input paletted data set vrtDS = vrtDriver-Create(, origW, origH, 3, GDT_Byte, NULL); double geoTransform[6];

[gdal-dev] GDALWarp API and paletted images

2015-06-09 Thread Thomas Sevaldrud
Hi, I'm using the GDALWarp api from C++ to reproject and cut various input images. In general this works very well for my purposes, except that for paletted images I have to use NearestNeighbour resampling, I would like to use Bilinear or higher order resampling, and wonder if there is any way

[gdal-dev] GeoJSON coordinate values truncated to integers

2014-07-27 Thread Thomas Sevaldrud
(Sorry about the repost, I forgot the subject tag in the previous one..) Hi, I'm having a strange problem that appears to be related to the GeoJSON driver in GDAL 1.11.0 When reading a polygon geometry in geographical lat/lon coordinates, all my coordinate values are returned in integer degrees.

Re: [gdal-dev] GeoJSON coordinate values truncated to integers

2014-07-27 Thread Thomas Sevaldrud
after reading all fetures setlocale(LC_NUMERIC, old_locale); This is not the solution (I fixed it here http://trac.osgeo.org/gdal/ticket/5461) but some kind of workaround. Best regards, Dmitry 27.07.2014 15:40, Thomas Sevaldrud пишет: (Sorry about the repost, I forgot the subject tag

[gdal-dev] GeoJSON coordinate values truncated to integers

2014-07-26 Thread Thomas Sevaldrud
Hi, I'm having a strange problem that appears to be related to the GeoJSON driver in GDAL 1.11.0 When reading a polygon geometry in geographical lat/lon coordinates, all my coordinate values are returned in integer degrees. When using ogrinfo it dumps the coordinate values with correct decimals,

[gdal-dev] Crash when using custom error handler

2014-02-14 Thread Thomas Sevaldrud
Hi, I am having a very strange issue when trying to use a custom error handler in GDAL on windows. The following simple example illustrates it: #include cpl_error.h #include iostream using namespace std; static void logGDALError(CPLErr eErrClass, int err_no, const char *msg) { cerr

Re: [gdal-dev] Crash when using custom error handler

2014-02-14 Thread Thomas Sevaldrud
Ah, genious! It worked perfectly :-) Thanks a lot! - Thomas On Fri, Feb 14, 2014 at 12:51 PM, Even Rouault even.roua...@mines-paris.org wrote: Thomas, static void logGDALError(CPLErr eErrClass, int err_no, const char *msg) -- try inserting CPL_STDCALL, so : static void CPL_STDCALL

Re: [gdal-dev] Creating a VRT dataset from overviews in C++

2012-05-10 Thread Thomas Sevaldrud
Hi Dmitry, and thanks for your answer! I was actually looking at this patch earlier today, but I also wanted to see if I could solve it without patching. Will this patch be included in the official source? Is it possible to do it the way I described in the previous mail? Cheers, Thomas On