Re: [Ubuntu] cpp and python codes not able to access gdal library

2016-10-24 Thread alassane toure
Angelos,
Adding the following to the code  works...

sys.path.insert(0,"/usr/lib/python2.7/dist-packages")
is there any other way  to avoid adding this line?

Regards,
Alassane

On Mon, Oct 24, 2016 at 9:03 AM, Angelos Tzotsos <gcpp.kal...@gmail.com>
wrote:

> Hi,
>
> Sorry for the delayed response.
> Is this issue still open?
>
> Best,
> Angelos
>
>
> On 10/14/2016 03:23 PM, alassane toure wrote:
>
>> Not sure how to obtain the installed version for python-gdal but here is
>> how i installed it (if that can help)
>>
>> sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
>> sudo apt-get update
>> sudo apt-get install python-gdal
>>
>> Thanks for your suggestions
>>
>> Alassane
>>
>> On Fri, Oct 14, 2016 at 8:16 AM, alassane toure <atou...@gmail.com>
>> wrote:
>>
>> GDAL is 1.11.2 as I had other issues with 2.1.0. and python-gdal has to be
>>> the most recent one.  I will let you know as soon i get on the server.
>>>
>>> Thanks.
>>>
>>> Alassane
>>>
>>> On Fri, Oct 14, 2016 at 4:28 AM, Angelos Tzotsos <gcpp.kal...@gmail.com>
>>> wrote:
>>>
>>> Hi,
>>>>
>>>> Can you please list the versions of libgdal and python-gdal that are
>>>> installed on your machine?
>>>>
>>>> Best,
>>>> Angelos
>>>>
>>>>
>>>> On 10/14/2016 06:41 AM, alassane toure wrote:
>>>>
>>>> Even,
>>>>
>>>> I tried the followings but the response did not change...
>>>>
>>>> sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
>>>> sudo apt-get update
>>>> sudo apt-get install python-gdal
>>>>
>>>> Any suggestions?
>>>> Thanks,
>>>> Alassane
>>>>
>>>> On Thu, Sep 8, 2016 at 3:51 AM, Even Rouault <
>>>> even.roua...@spatialys.com> <even.roua...@spatialys.com>
>>>>
>>>> wrote:
>>>>
>>>>
>>>> Alassane,
>>>>
>>>>
>>>> I developed a gdal code on my local machine and it worked.  Having gdal
>>>>
>>>> and
>>>>
>>>> g++ working on the server my compilation of the same code resulted in
>>>> the
>>>> following response...
>>>>
>>>>   gcc -o applymask applymask.cpp -I /usr/include/gdal -lgdal -lm
>>>> applymask.cpp: In function âint main(int, char**)â:
>>>> applymask.cpp:63:95: warning: ignoring return value of âCPLErr
>>>> GDALRasterBand::RasterIO(GDALRWFlag, int, int, int, int, void*, int,
>>>>
>>>> int,
>>>>
>>>> GDALDataType, GSpacing, GSpacing, GDALRasterIOExtraArg*)â, declared with
>>>> attribute warn_unused_result [-Wunused-result]
>>>>   Band->RasterIO( GF_Read, 0, iLine,nXSize, 1, inScanline,
>>>> nXSize,
>>>> 1, GDT_Float32,0, 0 );
>>>>
>>>> ^
>>>> applymask.cpp:64:101: warning: ignoring return value of âCPLErr
>>>> GDALRasterBand::RasterIO(GDALRWFlag, int, int, int, int, void*, int,
>>>>
>>>> int,
>>>>
>>>> GDALDataType, GSpacing, GSpacing, GDALRasterIOExtraArg*)â, declared with
>>>> attribute warn_unused_result [-Wunused-result]
>>>>   maskBand->RasterIO( GF_Read, 0, iLine,nXSize, 1, maskScanline,
>>>> nXSize, 1, GDT_Float32,0, 0 );
>>>>
>>>>   ^
>>>> applymask.cpp:75:94: warning: ignoring return value of âCPLErr
>>>> GDALRasterBand::RasterIO(GDALRWFlag, int, int, int, int, void*, int,
>>>>
>>>> int,
>>>>
>>>> GDALDataType, GSpacing, GSpacing, GDALRasterIOExtraArg*)â, declared with
>>>> attribute warn_unused_result [-Wunused-result]
>>>> outBand->RasterIO( GF_Write, 0, iLine,nXSize, 1, outScanline,
>>>> nXSize,
>>>>
>>>> 1,
>>>>
>>>> GDT_Float32,0, 0 );
>>>>
>>>>
>>>> The warning says it all. You use GDALRasterBand::RasterIO() but do not
>>>> check
>>>> the return value. You probably don't get it on your local machine since
>>>> it
>>>> might use an older version of GDAL where this method wasn't tagged with
>>>> the
>>>> warn_unused_result attribute.
>>>>
>>>> The right fix is to check the return value and do something appropriate.
>>>> Or you
>>>> can silence the warning by enclosing the calls in
>>>> CPL_IGNORE_RET_VAL(...)
>>>>
>>>>
>>>> Also, my python code does not import all refered libraries including
>>>>
>>>> gdal.
>>>>
>>>>File "/usr/local/bin/CD4DEM.py", line 12, in 
>>>>  import gdalImportError: No module named gdal
>>>>
>>>> Did you install the python-gdal package ?
>>>>
>>>> Even
>>>>
>>>> --
>>>> Spatialys - Geospatial professional serviceshttp://www.spatialys.com
>>>>
>>>>
>>>>
>>>> ___
>>>> UbuntuGIS mailing listUbuntu@lists.osgeo.orghttp://
>>>> lists.osgeo.org/mailman/listinfo/ubuntuhttp://trac.
>>>> osgeo.org/ubuntugis/wiki
>>>>
>>>>
>>>>
>>>> --
>>>> Angelos Tzotsos, PhD
>>>> OSGeo Charter Memberhttp://users.ntua.gr/tzotsos
>>>>
>>>>
>>>>
>
> --
> Angelos Tzotsos, PhD
> OSGeo Charter Member
> http://users.ntua.gr/tzotsos
>
>
___
UbuntuGIS mailing list
Ubuntu@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/ubuntu
http://trac.osgeo.org/ubuntugis/wiki

Re: [Ubuntu] cpp and python codes not able to access gdal library

2016-10-14 Thread alassane toure
GDAL is 1.11.2 as I had other issues with 2.1.0. and python-gdal has to be
the most recent one.  I will let you know as soon i get on the server.

Thanks.

Alassane

On Fri, Oct 14, 2016 at 4:28 AM, Angelos Tzotsos <gcpp.kal...@gmail.com>
wrote:

> Hi,
>
> Can you please list the versions of libgdal and python-gdal that are
> installed on your machine?
>
> Best,
> Angelos
>
>
> On 10/14/2016 06:41 AM, alassane toure wrote:
>
> Even,
>
> I tried the followings but the response did not change...
>
> sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
> sudo apt-get update
> sudo apt-get install python-gdal
>
> Any suggestions?
> Thanks,
> Alassane
>
> On Thu, Sep 8, 2016 at 3:51 AM, Even Rouault <even.roua...@spatialys.com> 
> <even.roua...@spatialys.com>
> wrote:
>
>
> Alassane,
>
>
> I developed a gdal code on my local machine and it worked.  Having gdal
>
> and
>
> g++ working on the server my compilation of the same code resulted in the
> following response...
>
>  gcc -o applymask applymask.cpp -I /usr/include/gdal -lgdal -lm
> applymask.cpp: In function âint main(int, char**)â:
> applymask.cpp:63:95: warning: ignoring return value of âCPLErr
> GDALRasterBand::RasterIO(GDALRWFlag, int, int, int, int, void*, int,
>
> int,
>
> GDALDataType, GSpacing, GSpacing, GDALRasterIOExtraArg*)â, declared with
> attribute warn_unused_result [-Wunused-result]
>  Band->RasterIO( GF_Read, 0, iLine,nXSize, 1, inScanline, nXSize,
> 1, GDT_Float32,0, 0 );
>
>^
> applymask.cpp:64:101: warning: ignoring return value of âCPLErr
> GDALRasterBand::RasterIO(GDALRWFlag, int, int, int, int, void*, int,
>
> int,
>
> GDALDataType, GSpacing, GSpacing, GDALRasterIOExtraArg*)â, declared with
> attribute warn_unused_result [-Wunused-result]
>  maskBand->RasterIO( GF_Read, 0, iLine,nXSize, 1, maskScanline,
> nXSize, 1, GDT_Float32,0, 0 );
>
>  ^
> applymask.cpp:75:94: warning: ignoring return value of âCPLErr
> GDALRasterBand::RasterIO(GDALRWFlag, int, int, int, int, void*, int,
>
> int,
>
> GDALDataType, GSpacing, GSpacing, GDALRasterIOExtraArg*)â, declared with
> attribute warn_unused_result [-Wunused-result]
>outBand->RasterIO( GF_Write, 0, iLine,nXSize, 1, outScanline, nXSize,
>
> 1,
>
> GDT_Float32,0, 0 );
>
>
> The warning says it all. You use GDALRasterBand::RasterIO() but do not
> check
> the return value. You probably don't get it on your local machine since it
> might use an older version of GDAL where this method wasn't tagged with the
> warn_unused_result attribute.
>
> The right fix is to check the return value and do something appropriate.
> Or you
> can silence the warning by enclosing the calls in CPL_IGNORE_RET_VAL(...)
>
>
> Also, my python code does not import all refered libraries including
>
> gdal.
>
>   File "/usr/local/bin/CD4DEM.py", line 12, in 
> import gdalImportError: No module named gdal
>
> Did you install the python-gdal package ?
>
> Even
>
> --
> Spatialys - Geospatial professional serviceshttp://www.spatialys.com
>
>
>
> ___
> UbuntuGIS mailing 
> listUbuntu@lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/ubuntuhttp://trac.osgeo.org/ubuntugis/wiki
>
>
>
> --
> Angelos Tzotsos, PhD
> OSGeo Charter Memberhttp://users.ntua.gr/tzotsos
>
>
___
UbuntuGIS mailing list
Ubuntu@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/ubuntu
http://trac.osgeo.org/ubuntugis/wiki

[Ubuntu] python-grass code not working on ubuntu

2016-09-16 Thread alassane toure
group,
I believe i installed grass70 on my server as the main interface comes up
when i issue "grass70". However, when i execute a python-grass code, the
response is ...
ERROR:  ERROR: Please install the GRASS GIS development package

ERROR: Cannot find GRASS GIS 7 start script (grass70 --config path)

Your suggestion is appreciated.


Regards,

Alassane
___
UbuntuGIS mailing list
Ubuntu@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/ubuntu
http://trac.osgeo.org/ubuntugis/wiki

Re: [Ubuntu] gdal 1.9.1 installation

2014-11-22 Thread alassane toure
Johan
Further to a compilation issue (see previous emails) since I was unable to
uninstall gdal, I uninstalled ubuntu and cleaned related partitions from my
windows machine.  I now have the new ubuntu version installed and followed
your instruction:

%sudo apt-get install libgdal-dev

The gdal installation went ok but when I compile a simple program, the
following error came up..

%gcc -o test imagescale.cpp -I /usr/include/gdal -lgdal -lm
gcc: error trying to exec 'cc1plus': execvp: No such file or directory

your thoughts/help is appreciated.

Regards,
Alassane


On Tue, Nov 4, 2014 at 12:15 PM, alassane toure atou...@gmail.com wrote:

 It appears no uninstall script was provided!

 Any thoughts to go around this?

 THanks,

 On Tue, Nov 4, 2014 at 9:57 AM, alassane toure atou...@gmail.com wrote:

 Johan,
 uninstall command is not working

 alassane@Achile:~/Downloads/gdal-1.11.1$ sudo make uninstall
 make: *** No rule to make target `uninstall'.  Stop.

 Any thoughts?


 On Tue, Nov 4, 2014 at 9:46 AM, Johan Van de Wauw 
 johan.vandew...@gmail.com wrote:

 It looks like you messed up with your two versions of gdal: using a
 different version of gdal than the one you linked to .

 Better uninstall your self installed version [ sudo make uninstall ].
 Than compile again.

 Johan

 On Tue, Nov 4, 2014 at 5:43 PM, alassane toure atou...@gmail.com
 wrote:
  Group,
  Any thoughts on how to fix the following error (no version information
  available) resulting from running a gdal executable?
 
  ./mosaic_test /home/alassane/Data/IPDSData/testAOI.tif
  /home/alassane/Data/IPDSData/testbg.tif
  /home/alassane/Data/IPDSData/testmask.tif
  /home/alassane/Data/IPDSData/colorcode.tif
  /home/alassane/Data/IPDSData/eqbt.tif
 /home/alassane/Data/IPDSData/stdbt.tif
  /home/alassane/Data/IPDSData/eqbt.dat
 /home/alassane/Data/IPDSData/stdbt.dat
  ./mosaic_test: /usr/local/lib/libgdal.so.1: no version information
 available
  (required by ./mosaic_test)
 
  Thanks,
  Alassane
 
  On Mon, Nov 3, 2014 at 5:17 PM, alassane toure atou...@gmail.com
 wrote:
 
  Hi Johan
  I had a program working ok with the previous gdal version but i am it
 is
  displaying the following errors...
 
  ./mosaic_test /home/alassane/Data/IPDSData/testAOI.tif
  /home/alassane/Data/IPDSData/testbg.tif
  /home/alassane/Data/IPDSData/testmask.tif
  /home/alassane/Data/IPDSData/colorcode.tif
  /home/alassane/Data/IPDSData/eqbt.tif
 /home/alassane/Data/IPDSData/stdbt.tif
  /home/alassane/Data/IPDSData/eqbt.dat
 /home/alassane/Data/IPDSData/stdbt.dat
  ./mosaic_test: /usr/local/lib/libgdal.so.1: no version information
  available (required by ./mosaic_test)
 
  Same error when compiled under the new gdal version!  Any thoughts?
 
  Thanks,
 
 
  On Mon, Nov 3, 2014 at 2:22 PM, alassane toure atou...@gmail.com
 wrote:
 
  No error as a result!!!  Thank you very much!
 
  On Mon, Nov 3, 2014 at 2:15 PM, Johan Van de Wauw
  johan.vandew...@gmail.com wrote:
 
  On Mon, Nov 3, 2014 at 10:00 PM, alassane toure atou...@gmail.com
  wrote:
   Please find attached the code and associated error after
   compilation...
  
   gcc -o test imagescale.cpp -I /usr/include/gdal -lgdal
   /usr/bin/ld: /tmp/ccrySeCX.o: undefined reference to symbol
   'floor@@GLIBC_2.2.5'
   //lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO
 missing
   from
   command line
   collect2: error: ld returned 1 exit status
 
  You are missing libmath, add -lm (previous versions of gcc had this
  automatically):
  gcc -o test imagescale.cpp -I /usr/include/gdal -lgdal -lm
 
  
  
   On Mon, Nov 3, 2014 at 1:41 PM, Johan Van de Wauw
   johan.vandew...@gmail.com wrote:
  
   Please include the error. And possibly also the file if it is no
   secret, will help you get a much better answer.
  
   Johan
  
   BTW: keep the ubuntugis list in cc, other people may benefit from
   reading how we solved your problem.
  
   On Mon, Nov 3, 2014 at 9:39 PM, alassane toure 
 atou...@gmail.com
   wrote:
Hi Johan,
I am not a sophisticated user of gdal.  I am looking for the
easiest way
to
have the compiler running.  As such, I followed your
 instruction by
running
the version included in ubuntu sudo apt-get install
 libgdal-dev
but
the
compilation of the program test.cpp did not work.  This issue
started
when i
install the latest ubuntu version.
   
Again, thanks for your insight!
   
On Mon, Nov 3, 2014 at 1:26 PM, Johan Van de Wauw
johan.vandew...@gmail.com wrote:
   
Hello Alassane,
   
First of all, you should tell us what you actually want to
achieve.
You may be better of using the gdal libraries which are
 already
part
of ubuntu rather than compiling your own version.
   
If you want to use the version of gdal included in ubuntu
 install
the
package libgdal-dev . You can do so using your favorite
 package
manager or using the command prompt: sudo apt-get install
libgdal-dev

Re: [Ubuntu] gdal 1.9.1 installation

2014-11-03 Thread alassane toure
Group,
I downloaded the gdal version 1.11.1 and followed instructions provided in
http://trac.osgeo.org/gdal/wiki/BuildingOnUnix

% cd gdal
% ./configure
% make
% su
Password: 
# make install
# exit

All went well but without a 'su' credential, I was unable to complete
the installation.
I am running windows and unix on the same machine with the same access
username and password.  Do i need to create a su account

or is there another way to have the gdal compiler working again?

I appreciate your help

Regards,
Alassane



On Thu, May 24, 2012 at 1:16 PM, Alassane Toure atou...@gmail.com wrote:

 Group,
 I need help to install GDAL 1.9.1 on Ubuntu 12.04.  I first downloaded
 gdal-1.9.1.tar.gz, uncompressed it and executed  ./configure.  Where do I
 go from here?

 Thanks for your help

___
UbuntuGIS mailing list
Ubuntu@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/ubuntu
http://trac.osgeo.org/ubuntugis/wiki

[Ubuntu] runtime error on one machine but not the other

2012-08-15 Thread Alassane Toure

Group,

I created a gdal program and the executable works well on my machine but 
not on a colleague's machine.  The program fuses two tif files but 
generates the following error...


(0,490) of size 8763x1 on raster of 107x77.
ERROR 5: 
/var/www/mapdata/gsp/results/1_vegwork_l5041036_03620110524_15_08_2012_1_39_12_output_bg.tif, 
band 1: Access window out of range in RasterIO().  Requested


The compiled program on the problem machine does not work on that 
machine but runs fine on my machine!


Any idea out there?  I would appreciate your comments/suggestions.

Regards,

Alassane


___
UbuntuGIS mailing list
Ubuntu@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/ubuntu
http://trac.osgeo.org/ubuntugis/wiki


Re: [Ubuntu] gdal 1.9.1 installation

2012-05-29 Thread Alassane Toure

On 05/29/2012 06:17 AM, Nick Ves wrote:

apt-cache show libgdal-dev

Nick,
We are making little progress.  I issued sudo apt-get install 
libgdal1libgdal-dev and checked the version installed which was 
version 1.9.0.  However, no 1.9.0 library version was available in 
/usr/lib directory.  As a result, when compiling a program, the system 
response was/usr/bin/ld: cannot find -lgdal1.9.0.  The command used 
for compilation was gcc -o test mygdalprogram.cpp -I /usr/include/gdal 
-lgdal1.9.0.


Any more thoughts?

Again thanks,

Alassane
___
UbuntuGIS mailing list
Ubuntu@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/ubuntu
http://trac.osgeo.org/ubuntugis/wiki


Re: [Ubuntu] gdal 1.9.1 installation

2012-05-29 Thread Alassane Toure

On 05/29/2012 12:24 PM, Etienne Tourigny wrote:

you have to link with -lgdal

On Tue, May 29, 2012 at 1:56 PM, Alassane Toureatou...@gmail.com  wrote:

On 05/29/2012 06:17 AM, Nick Ves wrote:

apt-cache show libgdal-dev

Nick,
We are making little progress.  I issued sudo apt-get install libgdal1
libgdal-dev and checked the version installed which was version 1.9.0.
However, no 1.9.0 library version was available in /usr/lib directory.  As
a result, when compiling a program, the system response was /usr/bin/ld:
cannot find -lgdal1.9.0.  The command used for compilation was gcc -o test
mygdalprogram.cpp -I /usr/include/gdal -lgdal1.9.0.

Any more thoughts?

Again thanks,

Alassane

___
UbuntuGIS mailing list
Ubuntu@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/ubuntu
http://trac.osgeo.org/ubuntugis/wiki


Etienne,
Problem solved!  Thanks to all of you for your valuable inputs.

Alassane
___
UbuntuGIS mailing list
Ubuntu@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/ubuntu
http://trac.osgeo.org/ubuntugis/wiki


[Ubuntu] gdal 1.9.1 installation

2012-05-24 Thread Alassane Toure

Group,
I need help to install GDAL 1.9.1 on Ubuntu 12.04.  I first downloaded 
gdal-1.9.1.tar.gz, uncompressed it and executed  ./configure.  Where do 
I go from here?


Thanks for your help
___
UbuntuGIS mailing list
Ubuntu@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/ubuntu
http://trac.osgeo.org/ubuntugis/wiki


Re: [Ubuntu] gdal 1.9.1 installation

2012-05-24 Thread Alassane Toure

Roland,
I followed the steps as suggested by the link and a couple of errors 
came up after issuing make




-rpath /usr/local/lib \
-no-undefined \
-version-info 17:1:16
libtool: link: unable to infer tagged configuration
libtool: link: specify a tag with `--tag'
make[1]: *** [libgdal.la] Error 1
make[1]: Leaving directory `/home/alassane/Downloads/gdal-1.9.1'
make: *** [check-lib] Error 2



Any suggestion to fix this?

Again thanks,

Alassane


On 05/24/2012 02:21 PM, Roland van Laar wrote:

On 05/24/2012 09:16 PM, Alassane Toure wrote:

Group,
I need help to install GDAL 1.9.1 on Ubuntu 12.04.  I first 
downloaded gdal-1.9.1.tar.gz, uncompressed it and executed  
./configure.  Where do I go from here?


Have you read: http://trac.osgeo.org/gdal/wiki/BuildingOnUnix
It contains the information needed for building GDAL.

Roland



Thanks for your help
___
UbuntuGIS mailing list
Ubuntu@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/ubuntu
http://trac.osgeo.org/ubuntugis/wiki




___
UbuntuGIS mailing list
Ubuntu@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/ubuntu
http://trac.osgeo.org/ubuntugis/wiki