Re: [Qgis-user] Python script for QGIS

2019-12-27 Per discussione Ujaval Gandhi
 
Try gdal_calc

gdal_calc.py -A input.tif --A_band=1 -B input.tif --B_band=2 -C input.tif
--C_band=3 -D input.tif --D_band=4 --outfile=reclass.tif
--calc="(A==109)*(B==178)*(C==200)*(D==255) +
(A==138)*(B==193)*(C==212)*(D==255) + (A==161)*(B==205)*(C==220)*(D==255)"

This will set the 3 RGB values to 1 and rest all to 0.

Ujaval Gandhi
Spatial Thoughts 


On Fri, Dec 27, 2019 at 7:56 PM Nicolas Cadieux <
nicolas.cadi...@archeotec.ca> wrote:

> Hi,
> Yes, google “reclassify”. You can do it multiple ways.
> Nicolas
>
> > Le 27 déc. 2019 à 05:55, LE LAMER Romain  a écrit :
> >
> > Hi,
> > Is it possible via gdal_translate, or other gdal program, to binarize a
> tile?
> >
> > I would like the colors RGB 59,89,95,255 & 60,89,96,255  change to white
> (color entry 0) and that the other colors 109,178,200,255; 138,193,212,255
> & 161,205,220,255 change to black (color entry 1)
> >
> > I don't understand how to use the -b and / or -mask arguments in this
> code
> > l = 'gdal_translate -a_srs EPSG:4326 -a_ullr ' + ullr + f_in + f_out +
> '\n'
> >
> > Thanks
> > ___
> > Qgis-user mailing list
> > Qgis-user@lists.osgeo.org
> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [QGIS-it-user] Raster\Miscellanea\Merge

2019-12-27 Per discussione cesaregal
Si Ivano, la finestra di dialogo si nascondeva in background a quella di
QGIS.
Grazie

Cesare



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Italian-User-f5250612.html
___
QGIS-it-user mailing list
QGIS-it-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/qgis-it-user


Re: [Qgis-user] QGIS 3.10.1 Lost toolbox and tools

2019-12-27 Per discussione Ian Turton
Delete
/home/nick/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QuickWKT/*.py
and try again

Ian

On Fri, 27 Dec 2019 at 15:36, Nick Hopton  wrote:

> For the last few days QGIS has been starting without loading the Toolbox or
> Vector and Raster tools. I get this Python warning:
>
> traceback: File "", line 1, in
>   File "/usr/lib/python3/dist-packages/qgis/utils.py", line
> 359,
> in startPlugin
>   plugins[packageName].initGui()
>   File
>
> "/home/nick/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QuickWKT/QuickWKT.py",
> line 68, in initGui
>   self.dlg = QuickWKTDialog()
>   File
>
> "/home/nick/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QuickWKT/QuickWKTDialog.py",
> line 51, in __init__
>   uic.loadUi(ui_path, self)
>   File "/usr/lib/python3/dist-packages/PyQt5/uic/__init__.py",
> line 226, in loadUi
>   return DynamicUILoader(package).loadUi(uifile, baseinstance,
> resource_suffix)
>   File
> "/usr/lib/python3/dist-packages/PyQt5/uic/Loader/loader.py", line 51, in
> __init__
>   UIParser.__init__(self, QtCore, QtGui, QtWidgets,
> LoaderCreatorPolicy(package))
>   File "/usr/lib/python3/dist-packages/PyQt5/uic/uiparser.py",
> line 177, in __init__
>   self.factory = QObjectCreator(creatorPolicy)
>   File
> "/usr/lib/python3/dist-packages/PyQt5/uic/objcreator.py",
> line 85, in __init__
>   if self.load_plugin(filename, plugin_globals, plugin_locals):
>   File
> "/usr/lib/python3/dist-packages/PyQt5/uic/objcreator.py",
> line 152, in load_plugin
>   plugin = open(filename, 'rU')
>
> System and software details:
>
> QGIS version
> 3.10.1-A Coruña
> QGIS code revision ef24c526da
> Compiled against Qt 5.9.5
> Running against Qt 5.9.5
> Compiled against GDAL/OGR 2.2.3
> Running against GDAL/OGR 2.2.3
> Compiled against GEOS 3.6.2-CAPI-1.10.2
> Running against GEOS 3.6.2-CAPI-1.10.2 4d2925d6
> Compiled against SQLite 3.22.0
> Running against SQLite 3.22.0
> PostgreSQL Client Version 10.10 (Ubuntu 10.10-0ubuntu0.18.04.1)
> SpatiaLite Version 4.3.0a
> QWT Version 6.1.3
> QScintilla2 Version 2.10.2
> PROJ.4 Version 493
> OS Version
>
> Ubuntu 18.04.3 LTS
>
> Active python plugins
> AzimuthMeasurement;
> QPackage;
> valuetool;
> quick_map_services;
> FreehandRasterGeoreferencer;
> CSMapMaker;
> clipper;
> TlugProcessing;
> Qgis2threejs;
> profiletool;
> processing_whitebox;
> raster_tracer;
> pointsamplingtool;
> batch_hillshader-master;
> LAStools;
> excel_sync;
> qgsAzimuth;
> QuickWKT;
> mmqgis;
> qgis2web;
> TomBio;
> db_manager;
> MetaSearch
>
> Wondering what if anything I can do about this?
>
> Regards,
> Nick.
>
>
>
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user



-- 
Ian Turton
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] QGIS 3.10.1 Lost toolbox and tools

2019-12-27 Per discussione Nick Hopton
For the last few days QGIS has been starting without loading the Toolbox or
Vector and Raster tools. I get this Python warning:

traceback: File "", line 1, in 
  File "/usr/lib/python3/dist-packages/qgis/utils.py", line 359,
in startPlugin
  plugins[packageName].initGui()
  File
"/home/nick/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QuickWKT/QuickWKT.py",
line 68, in initGui
  self.dlg = QuickWKTDialog()
  File
"/home/nick/.local/share/QGIS/QGIS3/profiles/default/python/plugins/QuickWKT/QuickWKTDialog.py",
line 51, in __init__
  uic.loadUi(ui_path, self)
  File "/usr/lib/python3/dist-packages/PyQt5/uic/__init__.py",
line 226, in loadUi
  return DynamicUILoader(package).loadUi(uifile, baseinstance,
resource_suffix)
  File
"/usr/lib/python3/dist-packages/PyQt5/uic/Loader/loader.py", line 51, in
__init__
  UIParser.__init__(self, QtCore, QtGui, QtWidgets,
LoaderCreatorPolicy(package))
  File "/usr/lib/python3/dist-packages/PyQt5/uic/uiparser.py",
line 177, in __init__
  self.factory = QObjectCreator(creatorPolicy)
  File "/usr/lib/python3/dist-packages/PyQt5/uic/objcreator.py",
line 85, in __init__
  if self.load_plugin(filename, plugin_globals, plugin_locals):
  File "/usr/lib/python3/dist-packages/PyQt5/uic/objcreator.py",
line 152, in load_plugin
  plugin = open(filename, 'rU')

System and software details:

QGIS version
3.10.1-A Coruña
QGIS code revision ef24c526da
Compiled against Qt 5.9.5
Running against Qt 5.9.5
Compiled against GDAL/OGR 2.2.3
Running against GDAL/OGR 2.2.3
Compiled against GEOS 3.6.2-CAPI-1.10.2
Running against GEOS 3.6.2-CAPI-1.10.2 4d2925d6
Compiled against SQLite 3.22.0
Running against SQLite 3.22.0
PostgreSQL Client Version 10.10 (Ubuntu 10.10-0ubuntu0.18.04.1)
SpatiaLite Version 4.3.0a
QWT Version 6.1.3
QScintilla2 Version 2.10.2
PROJ.4 Version 493
OS Version

Ubuntu 18.04.3 LTS

Active python plugins
AzimuthMeasurement; 
QPackage; 
valuetool; 
quick_map_services; 
FreehandRasterGeoreferencer; 
CSMapMaker; 
clipper; 
TlugProcessing; 
Qgis2threejs; 
profiletool; 
processing_whitebox; 
raster_tracer; 
pointsamplingtool; 
batch_hillshader-master; 
LAStools; 
excel_sync; 
qgsAzimuth; 
QuickWKT; 
mmqgis; 
qgis2web; 
TomBio; 
db_manager; 
MetaSearch

Wondering what if anything I can do about this?

Regards,
Nick.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Python script for QGIS

2019-12-27 Per discussione Nicolas Cadieux
Hi,
Yes, google “reclassify”. You can do it multiple ways.
Nicolas

> Le 27 déc. 2019 à 05:55, LE LAMER Romain  a écrit :
> 
> Hi,
> Is it possible via gdal_translate, or other gdal program, to binarize a tile?
> 
> I would like the colors RGB 59,89,95,255 & 60,89,96,255  change to white 
> (color entry 0) and that the other colors 109,178,200,255; 138,193,212,255 & 
> 161,205,220,255 change to black (color entry 1)
> 
> I don't understand how to use the -b and / or -mask arguments in this code
> l = 'gdal_translate -a_srs EPSG:4326 -a_ullr ' + ullr + f_in + f_out + '\n'
> 
> Thanks
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Python script for QGIS

2019-12-27 Per discussione LE LAMER Romain
Hi,
Is it possible via gdal_translate, or other gdal program, to binarize a tile?

I would like the colors RGB 59,89,95,255 & 60,89,96,255  change to white (color 
entry 0) and that the other colors 109,178,200,255; 138,193,212,255 & 
161,205,220,255 change to black (color entry 1)

I don't understand how to use the -b and / or -mask arguments in this code
l = 'gdal_translate -a_srs EPSG:4326 -a_ullr ' + ullr + f_in + f_out + '\n'

Thanks
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user