Re: [gdal-dev] ENVI Rotation Bug Fix

2017-07-12 Thread Guillaume Pasero
Hi, I have tried to use GDAL 2.2 in OTB. I have some issues with output images in the ENVI format. Some of the images I use have : A geotransform with an origin, for instance : geotransform = {10,   1,   0,   10,  0,   1} No map projection (the image c

Re: [gdal-dev] ENVI Rotation Bug Fix

2017-03-01 Thread Kurt Schwehr
Even, I already do direct tests with jp2kakdataset_test.cc with bazel and it works great. I can directly probe the methods without worrying about any other mechanism getting between the test and the class. e.g. I can directly mess with Identify, Open and any helpers. I can also do things like d

Re: [gdal-dev] ENVI Rotation Bug Fix

2017-03-01 Thread Even Rouault
Kurt, I don't think the ENVIDataset class is exported (and that's a good thing), so direct testing of the class might only be possible if you build without --with-hide-internal-symbols. Why can't you test through the public GDAL API instead of directly depnding on implementation details ? Act

Re: [gdal-dev] ENVI Rotation Bug Fix

2017-03-01 Thread Kurt Schwehr
Warning... I did a cleanup pass and split out the class definitions into a header to allow direct C++ testing. https://trac.osgeo.org/gdal/changeset/37530 https://trac.osgeo.org/gdal/changeset/37514 https://trac.osgeo.org/gdal/changeset/37510 I haven't written that testing yet, but it will be sim

Re: [gdal-dev] ENVI Rotation Bug Fix

2017-03-01 Thread Damian Dixon
Hi Taylor, M_PI is defined pretty much everywhere. The only compiler that you have to jump through hoops to get it is Visual Studio where you have to define '#define _USE_MATH_DEFINES'. As Even has mentioned it's also defined in the GDAL portability header. The main reason the use of atan jumped

Re: [gdal-dev] ENVI Rotation Bug Fix

2017-02-27 Thread Taylor Alexander Brown
I have pushed the requested changes to a pull request: https://github.com/OSGeo/gdal/pull/197 Taylor On 02/27/2017 02:20 PM, Even Rouault wrote: > On lundi 27 février 2017 14:12:46 CET Brown, Taylor Alexander wrote: > >> Damian, > >> > >> I agree that it would be preferable to use a predefine

Re: [gdal-dev] ENVI Rotation Bug Fix

2017-02-27 Thread Even Rouault
On lundi 27 février 2017 14:12:46 CET Brown, Taylor Alexander wrote: > Damian, > > I agree that it would be preferable to use a predefined constant. However, > I was under the impression that M_PI is a compiler extension and not part > of standard C++, so I wanted to make sure it was compatible. I

Re: [gdal-dev] ENVI Rotation Bug Fix

2017-02-27 Thread Brown, Taylor Alexander
Damian, I agree that it would be preferable to use a predefined constant. However, I was under the impression that M_PI is a compiler extension and not part of standard C++, so I wanted to make sure it was compatible. If using M_PI is acceptable, I would be happy to change it. I will be submitting

Re: [gdal-dev] ENVI Rotation Bug Fix

2017-02-27 Thread Damian Dixon
Hi Taylor, I'm just lurking on the mailing list myself. I had a look at the code changes, as this is one of the formats I'm interested in, and one point springs out at me: const double PI = atan(1.0) * 4; I find this line potentially a confusing way to define PI, particularly when you combine i

Re: [gdal-dev] ENVI Rotation Bug Fix

2017-02-27 Thread Even Rouault
On lundi 27 février 2017 03:55:54 CET Taylor Alexander Brown wrote: > Greetings GDAL Community, > > I am developing an application [0] to process georeferenced raster > hyperspectral imagery in ENVI format from NASA's Airborne > Visual/Infrared Imaging Spectrometer (AVIRIS) [1]. > > The `map info

[gdal-dev] ENVI Rotation Bug Fix

2017-02-27 Thread Taylor Alexander Brown
Greetings GDAL Community, I am developing an application [0] to process georeferenced raster hyperspectral imagery in ENVI format from NASA's Airborne Visual/Infrared Imaging Spectrometer (AVIRIS) [1]. The `map info` section of the header files contain an undocumented [2] rotation field which is