[QGIS-Developer] NTV2 Datum Transformations bug

2022-05-27 Thread Markus Mandl via QGIS-Developer





Good day,I always get the error with NTV2 (see attachment).Can anyone help me. Thanks Sincerely,Markus Mandl



QGIS-Version: 3.24.3-Tisler
QGIS-Codeversion: cf22b74e
Qt-Version: 5.15.3
Python-Version: 3.9.5
GDAL-Version: 3.4.3
GEOS-Version: 3.10.2-CAPI-1.16.0
PROJ-Version: Rel. 9.0.0, March 1st, 2022
PDAL-Version: 2.3.0 (git-version: 0a6ef5)
Algorithmus gestartet um: 2022-05-27T20:05:37
Algorithmus [AT] Direct and inverse Vector Tranformation startet…
Input parameters:
{ 'CRS' : 3, 'GRID' : 0, 'INPUT' : 'C:\\Users\\Markus 
Mandl\\Desktop\\100\\0009698267_100_dkmVGG_V2.shp', 'OUTPUT' : 
'TEMPORARY_OUTPUT', 'TRANSF' : 0 }

GDAL-Befehl:
ogr2ogr -s_srs "+proj=tmerc +lat_0=0 +lon_0=16.33 +k=1 +x_0=0 
+y_0=-500 +ellps=bessel +nadgrids=C:\\Users/Markus 
Mandl/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\ntv2_transformations\\grids\\AT_GIS_GRID.gsb
 +wktext +units=m +no_defs" -t_srs EPSG:4258 -f "GPKG" -lco ENCODING=UTF-8 
"C:/Users/Markus 
Mandl/AppData/Local/Temp/processing_oDFaNJ/ed84492698b742f7a28246b803b78e29/OUTPUT.gpkg"
 "C:\\Users\\Markus Mandl\\Desktop\\100\\0009698267_100_dkmVGG_V2.shp" 
0009698267_100_dkmVGG_V2
GDAL-Befehlsausgaben:
ERROR 1: PROJ: hgridshift: could not find required grid(s). 
ERROR 1: PROJ: pipeline: Pipeline: Bad step definition: proj=hgridshift (File 
not found or invalid)
Warning 6: dataset C:/Users/Markus 
Mandl/AppData/Local/Temp/processing_oDFaNJ/ed84492698b742f7a28246b803b78e29/OUTPUT.gpkg
 does not support layer creation option ENCODING
ERROR 1: PROJ: hgridshift: could not find required grid(s). 
ERROR 1: PROJ: pipeline: Pipeline: Bad step definition: proj=hgridshift (File 
not found or invalid)
ERROR 1: PROJ: hgridshift: could not find required grid(s). 
ERROR 1: PROJ: pipeline: Pipeline: Bad step definition: proj=hgridshift (File 
not found or invalid)
ERROR 1: PROJ: hgridshift: could not find required grid(s). 
ERROR 1: PROJ: pipeline: Pipeline: Bad step definition: proj=hgridshift (File 
not found or invalid)
ERROR 1: PROJ: hgridshift: could not find required grid(s). 
ERROR 1: PROJ: pipeline: Pipeline: Bad step definition: proj=hgridshift (File 
not found or invalid)
ERROR 1: PROJ: hgridshift: could not find required grid(s). 
ERROR 1: PROJ: pipeline: Pipeline: Bad step definition: proj=hgridshift (File 
not found or invalid)
ERROR 1: PROJ: hgridshift: could not find required grid(s). 
ERROR 1: PROJ: pipeline: Pipeline: Bad step definition: proj=hgridshift (File 
not found or invalid)
ERROR 1: PROJ: hgridshift: could not find required grid(s). 
ERROR 1: PROJ: pipeline: Pipeline: Bad step definition: proj=hgridshift (File 
not found or invalid)
ERROR 1: PROJ: hgridshift: could not find required grid(s). 
ERROR 1: PROJ: pipeline: Pipeline: Bad step definition: proj=hgridshift (File 
not found or invalid)
ERROR 1: PROJ: hgridshift: could not find required grid(s). 
ERROR 1: PROJ: pipeline: Pipeline: Bad step definition: proj=hgridshift (File 
not found or invalid)
ERROR 1: No operation matching criteria found for coordinate 
ERROR 1: No operation matching criteria found for coordinate 
ERROR 1: Failed to reproject feature 0 (geometry probably out of source or 
destination SRS). 
ERROR 1: Terminating translation prematurely after failed 
translation of layer 0009698267_100_dkmVGG_V2 (use -skipfailures to skip errors)
Prozeß lieferte Fehlercode 1
Execution completed in 0.43 seconds
Results:
{'OUTPUT': 'C:/Users/Markus '
'Mandl/AppData/Local/Temp/processing_oDFaNJ/ed84492698b742f7a28246b803b78e29/OUTPUT.gpkg'}

Lade Ergebnis Layer
Die folgenden Layer wurden nicht erzeugt.
• C:/Users/Markus 
Mandl/AppData/Local/Temp/processing_oDFaNJ/ed84492698b742f7a28246b803b78e29/OUTPUT.gpkg
Im 'Protokoll-Fenster' im QGIS-Hauptfenster sind mehr Informationen zur 
Ausführung des Algorithmus zu finden.___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] sklearn error

2022-05-27 Thread Tyler Veinot via QGIS-Developer
Hugh,
I installed it all through the OSGeo4W installer, sklearn seems to install
by default; when I run help("modules") in QGIS pyconsole I get sklearn
returned in the list. Since I didn't install this myself I can only assume
it installed with the OSGeo4W installer. That said, when i updated my
installation sklearn seems to work. From QGIS pyconsole and Pycharm I can
run
import qgis, osgeo, sklearn
from sklearn import cluster, metrics
from sklearn.cluster import DBSCAN
from sklearn.metrics import silhouette_score
print('Qapla')
and the output prints 'Qapla'
I am assuming it is working now, not sure how much of the import is
necessary, I know when using Pycharm to use the geopandas from the OSGeo
installer I have to import qgis and qgis processing before import geopandas
as gp will work; or something to that effect.
Tyler

On Fri, May 27, 2022 at 11:06 AM Hugh Kelley  wrote:

> Hi Tyler, since I haven't seen anyone else respond I have a few
> questions/comments/suggestions.
>
> What OS are you using? It looks like windows based on the file paths.
> since sklearn has dependencies that require C bindings, you might have a
> much easier time doing your work in either a linux environment (WSL might
> be your easiest option), or using Anaconda.
>
> How are you installing sklearn? I don't believe conda is compatible with
> the way QGIS uses python, maybe others on the list will correct me about
> that.
>
> Possibly the most helpful thing I can suggest is not even bothering to try
> to install anything for python on windows with pip, it works for some of
> the basic libraries but most of the spatial libraries and probably the
> machine learning type stuff end up requiring wheel files that are just very
> difficult to get set up correctly.
>
> You might consider asking in a sklearn forum as this seems like more of a
> problem with sklearn than with qgis.
>
>
>
> On Thu, May 26, 2022 at 9:49 AM Tyler Veinot via QGIS-Developer <
> qgis-developer@lists.osgeo.org> wrote:
>
>> I am trying to use sklearn in QGIS python console, it is showing up as
>> installed and I can import modules from it but when I run script I get the
>> error message
>> "Traceback (most recent call last):
>>   File "C:\OSGeo4W\apps\Python39\lib\code.py", line 90, in runcode
>> exec(code, self.locals)
>>   File "", line 1, in 
>>   File "", line 6, in 
>>   File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 888, in
>> _import
>> mod = _builtin_import(name, globals, locals, fromlist, level)
>>   File
>> "C:\OSGeo4W\apps\Python39\lib\site-packages\sklearn\cluster\__init__.py",
>> line 6, in 
>> from ._spectral import spectral_clustering, SpectralClustering
>>   File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 888, in
>> _import
>> mod = _builtin_import(name, globals, locals, fromlist, level)
>>   File
>> "C:\OSGeo4W\apps\Python39\lib\site-packages\sklearn\cluster\_spectral.py",
>> line 15, in 
>> from ..metrics.pairwise import pairwise_kernels
>>   File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 888, in
>> _import
>> mod = _builtin_import(name, globals, locals, fromlist, level)
>>   File
>> "C:\OSGeo4W\apps\Python39\lib\site-packages\sklearn\metrics\__init__.py",
>> line 37, in 
>> from . import cluster
>>   File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 888, in
>> _import
>> mod = _builtin_import(name, globals, locals, fromlist, level)
>>   File
>> "C:\OSGeo4W\apps\Python39\lib\site-packages\sklearn\metrics\cluster\__init__.py",
>> line 8, in 
>> from ._supervised import adjusted_mutual_info_score
>>   File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 888, in
>> _import
>> mod = _builtin_import(name, globals, locals, fromlist, level)
>>   File
>> "C:\OSGeo4W\apps\Python39\lib\site-packages\sklearn\metrics\cluster\_supervised.py",
>> line 24, in 
>> from ._expected_mutual_info_fast import expected_mutual_information
>>   File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 888, in
>> _import
>> mod = _builtin_import(name, globals, locals, fromlist, level)
>> ModuleNotFoundError: No module named
>> 'sklearn.metrics.cluster._expected_mutual_info_fast'"
>> Has anyone had this issue and devised a work around?
>> ___
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>
>
> --
> Hugh Kelley
>
>
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [QGIS-Developer] sklearn error

2022-05-27 Thread Hugh Kelley via QGIS-Developer
Hi Tyler, since I haven't seen anyone else respond I have a few
questions/comments/suggestions.

What OS are you using? It looks like windows based on the file paths. since
sklearn has dependencies that require C bindings, you might have a much
easier time doing your work in either a linux environment (WSL might be
your easiest option), or using Anaconda.

How are you installing sklearn? I don't believe conda is compatible with
the way QGIS uses python, maybe others on the list will correct me about
that.

Possibly the most helpful thing I can suggest is not even bothering to try
to install anything for python on windows with pip, it works for some of
the basic libraries but most of the spatial libraries and probably the
machine learning type stuff end up requiring wheel files that are just very
difficult to get set up correctly.

You might consider asking in a sklearn forum as this seems like more of a
problem with sklearn than with qgis.



On Thu, May 26, 2022 at 9:49 AM Tyler Veinot via QGIS-Developer <
qgis-developer@lists.osgeo.org> wrote:

> I am trying to use sklearn in QGIS python console, it is showing up as
> installed and I can import modules from it but when I run script I get the
> error message
> "Traceback (most recent call last):
>   File "C:\OSGeo4W\apps\Python39\lib\code.py", line 90, in runcode
> exec(code, self.locals)
>   File "", line 1, in 
>   File "", line 6, in 
>   File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 888, in
> _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
>   File
> "C:\OSGeo4W\apps\Python39\lib\site-packages\sklearn\cluster\__init__.py",
> line 6, in 
> from ._spectral import spectral_clustering, SpectralClustering
>   File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 888, in
> _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
>   File
> "C:\OSGeo4W\apps\Python39\lib\site-packages\sklearn\cluster\_spectral.py",
> line 15, in 
> from ..metrics.pairwise import pairwise_kernels
>   File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 888, in
> _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
>   File
> "C:\OSGeo4W\apps\Python39\lib\site-packages\sklearn\metrics\__init__.py",
> line 37, in 
> from . import cluster
>   File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 888, in
> _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
>   File
> "C:\OSGeo4W\apps\Python39\lib\site-packages\sklearn\metrics\cluster\__init__.py",
> line 8, in 
> from ._supervised import adjusted_mutual_info_score
>   File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 888, in
> _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
>   File
> "C:\OSGeo4W\apps\Python39\lib\site-packages\sklearn\metrics\cluster\_supervised.py",
> line 24, in 
> from ._expected_mutual_info_fast import expected_mutual_information
>   File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 888, in
> _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
> ModuleNotFoundError: No module named
> 'sklearn.metrics.cluster._expected_mutual_info_fast'"
> Has anyone had this issue and devised a work around?
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>


-- 
Hugh Kelley
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer