--
You received this message because you are subscribed to the Google Groups "RSGISLib Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-suppo...@googlegroups.com.
To post to this group, send email to rsgislib...@googlegroups.com.
Visit this group at https://groups.google.com/group/rsgislib-support.
For more options, visit https://groups.google.com/d/optout.
Hi Beatriz,This looks like a bug, will fix for the next release. I’ve opened an issue about it: https://bitbucket.org/petebunting/rsgislib/issues/45/consistency-of-name-for-gdal-formatUntil the next release, a quick fix would be to edit the file /home/beatriz/anaconda3/envs/osgeo/lib/python3.5/site-packages/rsgislib/rastergis/ratutils.py on line 1171 and change from:vectorutils.rasterise2Image(classShpFile, clumpsImg, classImgFile, gdalFormat=“KEA", burnVal=classIntVal)to:vectorutils.rasterise2Image(classShpFile, clumpsImg, classImgFile, “KEA”, burnVal=classIntVal)As Nathan suggested.Thanks,Dan
On 24 Aug 2017, at 22:42, Nathan Thomas <nmtho...@gmail.com> wrote:
Hi Beatriz,What if you just try:vectorutils.rasterise2Image(classShpFile, clumpsImg, classImgFile, ‘KEA', ‘classIntVal’)as in the example in the docs: http://www.rsgislib.org/rsgislib_vectorutils.html?highlight=rasterise2image#rsgislib.vectorutils.rasterise2ImageNathan
On Aug 24, 2017, at 2:38 PM, Beatriz Pierri Daunt <beat...@gmail.com> wrote:vectorutils.rasterise2Image(classShpFile, clumpsImg, classImgFile, gdalFormat="KEA", burnVal=classIntVal)
--
You received this message because you are subscribed to the Google Groups "RSGISLib Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-support+unsubscribe@googlegroups.com.
To post to this group, send email to rsgislib-support@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "RSGISLib Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-suppo...@googlegroups.com.
To post to this group, send email to rsgislib...@googlegroups.com.
Begin forwarded message:From: Nathan Thomas <nmtho...@gmail.com>Subject: Re: [rsgislib-support] Help _TypeError_rasterise2Image() got an unexpected keyword argument 'gdalFormat'Date: 2 December 2017 at 14:51:57 GMT-8To: Felipe Dantas <felipera...@gmail.com>sorry, I should have given a better explanation.Change the line:
vectorutils.rasterise2Image(classShpFile, clumpsImg, classImgFile, gdalFormat="KEA", burnVal=classIntVal)
to:
vectorutils.rasterise2Image(classShpFile, clumpsImg, classImgFile, "KEA", burnVal=classIntVal)
It should be in the code “classificaobjetorf.py” on line 44.(Its in chapter 5 on page 46.)Nathan
classesDict = dict()classesDict['Agricultura'] = [1, './07_treinamento/Amostras/agricultura.shp']classesDict['Agua'] = [2, './07_treinamento/Amostras/agua.shp']classesDict['AreaUrbana'] = [3, './07_treinamento/Amostras/area_urbana.shp']classesDict['Queimada'] = [4, './07_treinamento/Amostras/queimada.shp']classesDict['Queimada'] = [5, './07_treinamento/Amostras/sombra.shp']classesDict['Sombra'] = [6, './07_treinamento/Amostras/solo_exposto.shp']classesDict['VegetacaoArborea'] = [7, './07_treinamento/Amostras/vegetacao_arborea.shp']classesDict['VeetacaoMista'] = [8, './07_treinamento/Amostras/vegetacao_mista.shp']tmpPath = './tmp'classesIntColIn = 'ClassInt'classesNameCol = 'ClassStr'ratutils.populateClumpsWithClassTraining(clumpsImg, classesDict, tmpPath, classesIntColIn, classesNameCol)
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-support+unsub...@googlegroups.com.
(geobia) mappa@mappapc:~/github/L590$ python PerformObjClass.py Started .0..10..20..30..40..50..60..70..80..90. Complete.Started .0..10..20..30..40..50..60..70..80..90. Complete.
Writing Stats (Mean, ) to Output RAT
Started .0..10..20..30..40..50..60..70..80..90. Complete.Started .0..10..20..30..40..50..60..70..80..90. Complete.
Writing Stats (Mean, ) to Output RAT
Started .0..10..20..30..40..50..60..70..80..90. Complete.Started .0..10..20..30..40..50..60..70..80..90. Complete.
Writing Stats (Mean, ) to Output RATTraceback (most recent call last):
File "PerformObjClass.py", line 56, in <module> ratutils.populateClumpsWithClassTraining(clumpsImg, classesDict, tmpPath, classesIntColIn, classesNameCol) File "/home/mappa/.conda/envs/geobia/lib/python3.6/site-packages/rsgislib/rastergis/ratutils.py", line 1171, in populateClumpsWithClassTraining
vectorutils.rasterise2Image(classShpFile, clumpsImg, classImgFile, gdalFormat="KEA", burnVal=classIntVal)TypeError: rasterise2Image() got an unexpected keyword argument 'gdalFormat'
File "PerformObjClass.py", line 56, in <module>ratutils.populateClumpsWithClassTraining(clumpsImg, classesDict, tmpPath, classesIntColIn, classesNameCol)File "/home/mappa/.conda/envs/geobia/lib/python3.6/site-packages/rsgislib/rastergis/ratutils.py", line 1171, in populateClumpsWithClassTrainingvectorutils.rasterise2Image(classShpFile, clumpsImg, classImgFile, gdalFormat="KEA", burnVal=classIntVal)TypeError: rasterise2Image() got an unexpected keyword argument ‘gdalFormat'
On 2 Dec 2017, at 16:28, Nathan Thomas <nmtho...@gmail.com> wrote:Ok, I think the problem here is in the source code. I think populateClumpsWithTraining calls raserize2Image and thats where the bug is.An immediate solution could be the following:1) Find the source code for ratutils.pymine is located in /Users/Nathan/miniconda3/pkgs/rsgislib-3.3.1-py35_1/lib/python3.5/site-packages/rsgislib/rastergisin ratutils.py look for the line: vectorutils.rasterise2Image(classShpFile, clumpsImg, classImgFile, gdalFormat="KEA", burnVal=classIntVal)it should be on line 1171. Here change gdalFormat=“KEA” to “KEA”NathanOn 2 Dec 2017, at 16:14, Felipe Dantas <felipera...@gmail.com> wrote:My script is the same as the one in Chapter 5.2It just exececuta the following command: ratutils.populateClumpsWithClassTraining (clumpsImg, classesDict, tmpPath, classesIntColIn, classesNameCol)Anyway follow my attached script
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-support+unsubscribe...@googlegroups.com.
To post to this group, send email to rsgislib...@googlegroups.com.
Visit this group at https://groups.google.com/group/rsgislib-support.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "RSGISLib Support" group.
To post to this group, send email to rsgislib-support@googlegroups.com.To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-support+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/rsgislib-support.
For more options, visit https://groups.google.com/d/optout.
<PerformObjClass.py>--Felipe Ramos DantasGraduado em Tecnologia em GeoprocessamentoTécnico de Laboratório - Geoprocessamento no IFPI
Hi all,
This bug has been fixed. I can’t remember exactly when but we have just created a new pull request for the next release so hopefully this week we’ll have that up on conda-forge.
Best wishes,
Pete
****************************************************
* Dr Pete Bunting
* Reader in Remote Sensing
* Earth Observation and Ecosystem Dynamics Group
* Department of Geography and Earth Sciences
* Aberystwyth University
* Aberystwyth
* Ceredigion
* SY23 3DB
* UK
*
* Ph: +44 (0) 1970 622615
* Mob: +44 (0) 7917 842743
* Email: p...@aber.ac.uk
* ORCID: http://orcid.org/0000-0002-7435-0148
****************************************************
"Please consider the environment before printing this email or any documents attached”
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-suppo...@googlegroups.com.
To post to this group, send email to rsgislib...@googlegroups.com.
Visit this group at https://groups.google.com/group/rsgislib-support.
For more options, visit https://groups.google.com/d/optout.
--
Felipe Ramos Dantas
Graduado em Tecnologia em Geoprocessamento
Técnico de Laboratório - Geoprocessamento no IFPI
<PerformObjClass.py>