Git Product home page Git Product logo

naturalgis_ntv2_transformations's Introduction

A plugin for the QGIS Processing toolbox to allow users do Datum transformations with NTv2 grids

Developed by/for NaturalGIS

web: http://www.naturalgis.pt/

email: [email protected]

This plugin allows QGIS user to do easily direct/inverse Datum transformations (for vectors and rasters) using NTv2 grids. Available transformations are the ones supported by NTv2 grids that will be possible to redistribute legally with the plugin itself.

The plugin needs QGIS >= 3.4 to work.

This plugin is directly derived from https://github.com/qgispt/processing_pttransform originally developed by Alexander Bruy, Pedro Venâncio and NaturalGIS (http://www.naturalgis.pt/), with the support of the Portuguese QGIS user group (http://www.qgis.pt/).

If you have a NTv2 grid that can be legally redistributed and you would like to have it added to this plugin please file a feature request here:

https://github.com/NaturalGIS/ntv2_transformations/issues

Main contributors:

  • Alexander Bruy: developer of the QGIS/GDAL-OGR Processing based tools that gave the idea for this plugin, porting of the code to the QGIS 3 API
  • Pedro Venâncio ([email protected]): first version of the plugin specific for the Portuguese use case
  • Giovanni Manghi ([email protected]): addition of transformations for several countries other than Portugal

Other contributors:

Supported transformations:

  • Australia: AGD66 <==> GDA94 [EPSG:283XX] [A66_National_13_09_01.gsb]
  • Australia: AGD84 <==> GDA94 [EPSG:283XX] [National_84_02_07_01.gsb]

Source for Australian files:

https://github.com/icsm-au/transformation_grids

  • Austria: MGI [EPSG:4312] <==> ETRS89 [EPSG:4258] [AT_GIS_GRID.gsb]
  • MGI/Austria GK west [EPSG:31254] <==> ETRS89 [EPSG:4258] [AT_GIS_GRID.gsb]
  • MGI/Austria GK central [EPSG:31255] <==> ETRS89 [EPSG:4258] [AT_GIS_GRID.gsb]
  • MGI/Austria GK east [EPSG:31256] <==> ETRS89 [EPSG:4258] [AT_GIS_GRID.gsb]
  • MGI/Austria GK M28 [EPSG:31257] <==> ETRS89 [EPSG:4258] [AT_GIS_GRID.gsb]
  • MGI/Austria GK M31 [EPSG:31258] <==> ETRS89 [EPSG:4258] [AT_GIS_GRID.gsb]
  • MGI/Austria GK M34 [EPSG:31259] <==> ETRS89 [EPSG:4258] [AT_GIS_GRID.gsb]

Source for [AT_GIS_GRID.gsb], Bundesministerium für Wissenschaft, Forschung und Wirtschaft nachgeordnete Bundesbehörde mit den Aufgabenbereichen Vermessung und Geoinformation und Mess- und Eichwesen: http://www.bev.gv.at/portal/page?_pageid=713,2103845&_dad=portal&_schema=PORTAL

  • Catalonia: ED50/UTM 31N [EPSG:23031] <==> ETRS89/UTM zone 31N [EPSG:25831] [100800401.gsb]

Source for [100800401.gsb], Institut Cartogràfic i Geològic de Catalunya: http://www.icgc.cat/Administracio-i-empresa/Eines/Transformacio-de-coordenades-i-formats

  • Croatia: HDKS5/6 [Custom CRSs] <==> HTRS96/Croatia TM [EPSG:3765] [HRNTv2.gsb]

Source for [HRNTv2.gsb]: http://geosinjal.blogspot.pt/2012/12/kreiranje-ntv2-grid-datoteke-za.html

  • Germany: Gauss-Krüger zone 3 [EPSG:31467] <==> ETRS89 [EPSG:4258] [BETA2007.gsb]

Source for [BETA2007.gsb]: http://crs.bkg.bund.de/crseu/crs/descrtrans/BeTA/de_dhdn2etrs_beta.php

  • Italy (Emilia-Romagna): Monte Mario - GBO [EPSG:3003] <==> ETRS89 [EPSG:4258] [RER_AD400_MM_ETRS89_V1A.gsb]
  • Italy (Emilia-Romagna): UTM - ED50 [EPSG:23032] <==> ETRS89 [EPSG:4258] [RER_ED50_ETRS89_GPS7_K2.GSB]

Source for [RER_ED50_ETRS89_GPS7_K2.gsb] and [RER_AD400_MM_ETRS89_V1A.gsb]: http://geoportale.regione.emilia-romagna.it/it/services/servizi%20tecnici/servizio-di-conversione/grigliati-ntv2-rer-2013-la-trasformazione-di-coordinate-in-emilia-romagna

  • Netherlands: Amersfoort/RD [EPSG:28992] <==> ETRS89 [EPSG:4258] [rdtrans2008.gsb] and [naptrans2008.gtx]

Source for [rdtrans2008.gsb] and [naptrans2008.gtx]: http://www.kadaster.nl/web/Themas/Registraties/Rijksdriehoeksmeting/Transformatie-van-coordinaten.htm

  • Portugal (mainland): Datum 73 [EPSG:27493/ESRI:102161] <==> ETRS89/PT-TM06 [EPSG:3763] [pt73_e89.gsb] or [D73_ETRS89_geo.gsb]
  • Portugal (mainland): Datum 73 Militar [ESRI:102160] <==> ETRS89/PT-TM06 [EPSG:3763] [pt73_e89.gsb] or [D73_ETRS89_geo.gsb]
  • Portugal (mainland): Datum Lisboa [EPSG:20791/EPSG:5018/ESRI:102165] <==> ETRS89/PT-TM06 [EPSG:3763] [ptLX_e89.gsb] or [DLX_ETRS89_geo.gsb]
  • Portugal (mainland): Datum Lisboa Militar [EPSG:20790/ESRI:102164] <==> ETRS89/PT-TM06 [EPSG:3763] [ptLX_e89.gsb] or [DLX_ETRS89_geo.gsb]
  • Portugal (mainland): Datum Europeu 1950 (ED50) [EPSG:23029] <==> ETRS89/PT-TM06 [EPSG:3763] [ptED_e89.gsb]

Source for [pt73_e89.gsb], [ptED_e89.gsb] and [ptLX_e89.gsb], Prof. José Alberto Gonçalves: http://www.fc.up.pt/pessoas/jagoncal/coordenadas/

Source for [D73_ETRS89_geo.gsb] and [DLX_ETRS89_geo.gsb], Direção-Geral do Território: http://www.dgterritorio.pt/cartografia_e_geodesia/geodesia/transformacao_de_coordenadas/grelhas_em_ntv2/

  • Spain (mainland): ED50/UTM 29N [EPSG:23029] <==> ETRS89 [EPSG:4258] [PENR2009.gsb]
  • Spain (mainland): ED50/UTM 30N [EPSG:23030] <==> ETRS89 [EPSG:4258] [PENR2009.gsb]
  • Spain (mainland): ED50/UTM 31N [EPSG:23031] <==> ETRS89 [EPSG:4258] [PENR2009.gsb]

Source for [PENR2009.gsb]: http://www.ign.es/ign/layoutIn/herramientas.do

  • Switzerland: CH1903 [EPSG:21781] <==> ETRS89 [EPSG:4258] [chenyx06etrs.gsb]
  • Switzerland: CH1903 [EPSG:21781] <==> CH1903+ [EPSG:2056] [CHENYX06a.gsb]

Source for [chenyx06etrs.gsb] and [CHENYX06a.gsb]:

http://www.swisstopo.admin.ch/internet/swisstopo/en/home/products/software/products/chenyx06.html

  • UK: OSGB 1936/British National Grid [EPSG:27700] <==> ETRS89 [EPSG:4258] [OSTN02_NTv2.gsb]

Source for [OSTN02_NTv2.gsb]:

http://www.ordnancesurvey.co.uk/business-and-government/help-and-support/navigation-technology/os-net/ostn02-ntv2-format.html

naturalgis_ntv2_transformations's People

Contributors

agiudiceandrea avatar alexbruy avatar carlospsig avatar ecron avatar fernandinand avatar gioman avatar pedrovenancio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

naturalgis_ntv2_transformations's Issues

Costumize NTV2 Grid

I have produced some experimental NTV2 Grid and I would like to costumize one transformation with using that grid.
How can I do that?
Thank you

Issues with CH Swisstopo grids

http://www.swisstopo.admin.ch/internet/swisstopo/de/home/products/software/products/chenyx06.html

  • the transformation from CH1903 -> ETRS89 seems ok, the doubt is what is the epsg code of the etrs89 CRS here, 25832? 3044?
  • the transformation form CH1903->CH1903+ does not work well, probably what are the parameters/definitions of the CRS involved here? the ones I'm using are EPSG:2056 for ch1903+ and '+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel +nadgrids='path/to/CHENYX06a.gsb' +wktext +units=m +no_defs' for ch1903

NTv2_transformation for Bosnia and Herzegovina

Hello
I want to perform Ntv2 transformation between old and new CRS. Unfortunately new CRS is not in EPSG database. Here are parameters for old and new crs:
Old crs:
+proj=tmerc +lat_0=0 +lon_0=15 +k=0.9999 +x_0=5500000 +y_0=0 +ellps=bessel
+proj=tmerc +lat_0=0 +lon_0=18 +k=0.9999 +x_0=6500000 +y_0=0 +ellps=bessel
+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=7500000 +y_0=0 +ellps=bessel
New crs:
+proj=tmerc +lat_0=0 +lon_0=18 +k=0.9999 +x_0=500000 +y_0=0 +ellps=GRS80
Unfortunately I can't share NTv2 file, because I developed inside my dissertation, and it can't be shared until I get permission from geodetic authority.
Is it possible to add this to your plugin? Thanks

UnicodeEncodeError with QGIS 2.16

I'm getting an error when opening QGIS 2.16 if the plugin ntv2_transformations is activated. The error message is the following:

An error occurred during execution of following code:
import pyplugin_installer

UnicodeEncodeError: 'ascii' codec can't encode character u'\xe2' in position 195: ordinal not in range(128)

And then another error is displayed (which I guess is related to the previous one):

An error occurred during execution of following code:
pyplugin_installer.initPluginInstaller()

Traceback (most recent call last):
File "", line 1, in
NameError: name 'pyplugin_installer' is not defined

Python version:
2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]

QGIS version:
2.16.0-Nødebo 'Nødebo', d0b3e39

Error while outputting to temp layer

On QGIS 3.28, if outputting to temp layer (output field blank) it returns:

Saída do comando GDAL:
ERROR 4: sqlite3_open(C:/Users/giovanni/AppData/Local/Temp/processing_kaBdWZ/e496cf6c6b8246a4bcb075dd12332e3b/OUTPUT.gpkg) failed: unable to open database file 
ERROR 1: GPKG driver failed to create C:/Users/giovanni/AppData/Local/Temp/processing_kaBdWZ/e496cf6c6b8246a4bcb075dd12332e3b/OUTPUT.gpkg
O processo devolveu o código de erro 1

ImportError: cannot import name ogrConnectionString

From the last update I started to received this error on startup

_Couldn't load plugin 'ntv2_transformations'

ImportError: cannot import name ogrConnectionString
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 281, in loadPlugin
import(packageName)
File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 572, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/mmiler/.qgis2/python/plugins/ntv2_transformations/init.py", line 28, in
from ntv2_transformations.DETransformProviderPlugin import
File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 572, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/mmiler/.qgis2/python/plugins/ntv2_transformations/DETransformProviderPlugin.py", line 35, in
from ntv2_transformations.DETransformProvider import DETransformProvider
File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 572, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/mmiler/.qgis2/python/plugins/ntv2_transformations/DETransformProvider.py", line 36, in
from ntv2_transformations.VectorDE_GK3ETRS8932NDirInv import VectorDE_GK3ETRS8932NDirInv
File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 572, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/home/mmiler/.qgis2/python/plugins/ntv2_transformations/VectorDE_GK3ETRS8932NDirInv.py", line 50, in
from processing.tools.vector import ogrConnectionString, ogrLayerName
ImportError: cannot import name ogrConnectionString

Python version: 2.7.6 (default, Jun 22 2015, 18:01:27) [GCC 4.8.2]
QGIS version: 2.14.0-Essen Essen, exported

Python Path:
/home/mmiler/.qgis2/python/plugins/processing
/home/mmiler/.qgis2/python/plugins/opengeo/ext-libs/requests-2.0.1-py2.7.egg
/home/mmiler/.qgis2/python/plugins/opengeo/ext-libs/raven-3.5.1-py2.7.egg
/home/mmiler/.qgis2/python/plugins/opengeo/ext-libs/nose_html-1.1-py2.7.egg
/home/mmiler/.qgis2/python/plugins/opengeo/ext-libs/gsconfig-0.6.9-py2.7.egg
/home/mmiler/.qgis2/python/plugins/opengeo/ext-libs/gsimporter-0.1-py2.7.egg
/home/mmiler/.qgis2/python/plugins/opengeo/ext-libs/python_dateutil-2.2-py2.7.egg
/home/mmiler/.qgis2/python/plugins/opengeo/ext-libs/six-1.7.3-py2.7.egg
/home/mmiler/.qgis2/python/plugins/opengeo/ext-libs/lxml-3.3.5-py2.7-win32.egg
/home/mmiler/.qgis2/python/plugins/opengeo/ext-libs/httplib2-0.9-py2.7.egg
/home/mmiler/.qgis2/python/plugins/geoserverexplorer/ext-libs/python_dateutil-2.2-py2.7.egg
/home/mmiler/.qgis2/python/plugins/geoserverexplorer/ext-libs/six-1.10.0-py2.7.egg
/home/mmiler/.qgis2/python/plugins/geoserverexplorer/ext-libs/requests-2.5.0-py2.7.egg
/home/mmiler/.qgis2/python/plugins/geoserverexplorer/ext-libs/gsconfig-1.0.0-py2.7.egg
/home/mmiler/.qgis2/python/plugins/geoserverexplorer/ext-libs/gisdata-0.5.4-py2.7.egg
/home/mmiler/.qgis2/python/plugins/geoserverexplorer/ext-libs/httplib2-0.9-py2.7.egg
/home/mmiler/.qgis2/python/plugins/geoserverexplorer/ext-libs/gsimporter-1.0.0-py2.7.egg
/usr/share/qgis/python
/home/mmiler/.qgis2/python
/home/mmiler/.qgis2/python/plugins
/usr/share/qgis/python/plugins
/usr/lib/python2.7
/usr/lib/python2.7/plat-x86_64-linux-gnu
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/usr/local/lib/python2.7/dist-packages
/usr/local/lib/python2.7/dist-packages/FontTools
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages/PILcompat
/usr/lib/python2.7/dist-packages/gst-0.10
/usr/lib/python2.7/dist-packages/gtk-2.0
/usr/lib/pymodules/python2.7
/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode
/home/mmiler/.qgis2//python
/home/mmiler/.qgis2/python/plugins/mmqgis/forms
/home/mmiler/.qgis2/python/plugins/opengeo/ext-libs
/home/mmiler/.qgis2/python/plugins/geoserverexplorer/ext-libs
.
/home/mmiler/.qgis2/python/plugins/DigitizingTools/tools
/usr/share/qgis/python/plugins/fTools/tools
_
I am running QGIS 2.14.0 on Linux Mint

Thank you.

Error while executing Python code: UnicodeDecodeError

Hi,

trying to convert some vector data from EPSG:27700 to EPSG:4258, show this error:

An error has occurred while executing Python code:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 48: ordinal not in range(128)
Traceback (most recent call last):
File "C:/OSGEO41/apps/qgis/./python/plugins\processing\gui\AlgorithmDialog.py", line 223, in accept
if runalg(self.alg, self):
File "C:/OSGEO4
1/apps/qgis/./python/plugins\processing\gui\AlgorithmExecutor.py", line 51, in runalg
alg.execute(progress)
File "C:/OSGEO4~1/apps/qgis/./python/plugins\processing\core\GeoAlgorithm.py", line 217, in execute
unicode(e) + self.tr('\nSee log for more details'))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 48: ordinal not in range(128)

Python version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]
QGIS version: 2.14.1-Essen Essen, ea85bef

Test data:
teste.zip

Add transformation for Romania

https://www.cngcft.ro/index.php/ro/download/download/2-software/9-instalare-ntv2

It was published under GNU/GPL license.

Description translated from romanian with google translate.
"The National Center for Cartography provides users with the procedure to install the NTv2 coordinate transformation, from ETRS89 to Stereographic 1970 projection and vice versa, and the correction grid file for use in ArcGIS Desktop. The procedure is described in a .pdf file, and the patch grid is in binary format, with the extension .gsb, and is located in a directory named "Romania". The archive also contains the correction grid in ASCII format, with the extension .gsa, for possible implementation in another type of software. In the directory titled "CustomTransformations" is the file Stereo70_To_ETRS89_1.gtf resulting from implementing the NTv2 transformation in ArcGIS Desktop."

Instalare_NTv2_v1_1.zip

Croatia - ntv2 grid

We would appreciate if you consider putting Croatia to your plugin. NTV2 files (links at the bottom):

http://geosinjal.blogspot.com/2012/12/kreiranje-ntv2-grid-datoteke-za.html

We need transformations from HKDS Zone 5 & 6 (not in EPSG database) -

HDKS 5.zona:
+proj=tmerc +pm=greenwich +lat_0=0 +lon_0=15 +k=0.9999 +x_0=5500000 +y_0=0 +ellps=bessel +towgs84=550.499,164.116,475.142,5.80967,2.07902,-11.62386,0.99999445824 +units=m
HDKS 6.zona:
+proj=tmerc +pm=greenwich +lat_0=0 +lon_0=18 +k=0.9999 +x_0=6500000 +y_0=0 +ellps=bessel +towgs84=550.499,164.116,475.142,5.80967,2.07902,-11.62386,0.99999445824 +units=m

to HTRS96/Croatia TM - EPSG:3765

more on our projections:

http://wiki.osgeo.org/wiki/Croatia/Kratki_vodici/transformacija_koordinata_cs2cs

Grids for Australia

Hey folks

I'm doing some work with ICSM Australia and I have the current Australian grids working in your master branch, and will be implementing the new 2020 grid after its' release.

I note that the master branch requires QGIS 3.0, and wonder whether there is any way to backport to previous versions of QGIS? I'd like to create a PR soon and to get the Australian grids into the plugin soon, or at the latest, after the new datum is released (March-ish).

Is it possible to get a new version of the plugin released for QGIS 2.XX?

Add Grid for Germany, Bavaria

The Agency for Digitisation, High-Speed Internet and Surveying in Bavaria recently released grid (.gsb) files to perform very accurate transformations between following Coordinate Reference Systems:

  • Gauss-Krüger 4 (EPSG:5678 and EPSG:31468) to UTM32 (EPSG:25832) (and inverse)

GSB Files:
The grid spacing is 1 arc second (roughly 30 Meters), which makes the grid file very big (~3Gb).
You can find the download links with description at following official site: Information and Download Bavarian Government

Direct link (~1.03 GB): NTV2 Bayern

License:
The files are licensed under the Creative Commons Namensnennung-Keine Bearbeitung 3.0 Deutschland (CC-BY-ND). Additionally, the text states that the grid can be used both in internal and external applications.

Is there any chance that you might implement these files for an accurate transformation in Bavaria or are the files to big to be stored on your server?

Add Grids for Brazil

Hello!

The Brazilian grids can be download (bundled with software ProGrid) here: ftp://geoftp.ibge.gov.br/aplicativos/transformacao_coordenadas/

There is some information about that in: https://wiki.osgeo.org/wiki/Brazilian_Coordinate_Reference_Systems

I attached the files for convenience.

SAD96_003.GSB: EPSG:5527 -> EPSG:4674 (Transformation EPSG:5529)
SAD69_003.GSB: EPSG:4618 -> EPSG:4674 (Transformation EPSG:5528)
CA61_003.GSB: EPSG:5524 -> EPSG:4674 (Transformation EPSG:5525)
CA7072_003.GSB: EPSG:4225 -> EPSG:4674 (Transformation EPSG: 5526)

GridFiles.zip

I will look for some info about the grid file license.

Thanks!

Plugin does not show up

Hi there,
I am running QGIS Madeira and Bucuresti and in none of them, I can find the plugin after installation...
Can somebody please enlighten me?

Thank you

QgsProcessingException: Transformation to "ED50 UTM 29N [EPSG:23029]" only possible with grid from José Alberto Gonçalves

Hi @gioman

When trying to do the transformation to "ED50 UTM 29N [EPSG:23029]" with the grid from DGT, QGIS throws an error:

An error has occurred while executing Python code: 

_core.QgsProcessingException: Transformation to "ED50 UTM 29N [EPSG:23029]" only possible with grid from José Alberto Gonçalves 
Traceback (most recent call last):
  File "C:/OSGEO4~1/apps/qgis-rel-dev/./python/plugins\processing\algs\gdal\GdalAlgorithmDialog.py", line 136, in parametersHaveChanged
    commands = self.alg.getConsoleCommands(parameters, context, feedback, executing=False)
  File "C:/Users/pedro.venancio/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ntv2_transformations\RasterPT_ETR89PTTM06DirInv.py", line 127, in getConsoleCommands
    raise QgsProcessingException(text)
_core.QgsProcessingException: Transformation to "ED50 UTM 29N [EPSG:23029]" only possible with grid from José Alberto Gonçalves

Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] 
QGIS version: 3.8.2-Zanzibar Zanzibar, c5de09d490 
QGIS version: 3.8.2-Zanzibar
QGIS code revision: c5de09d490
Qt version: 5.11.2
GDAL version: 2.4.1
GEOS version: 3.7.2-CAPI-1.11.0 b55d2125
PROJ version: Rel. 5.2.0, September 15th, 2018
Processing algorithm…

Algorithm '[PT] Direct and inverse Raster Tranformation' starting…
Input parameters:
{ 'CRS' : 4, 'GRID' : 1, 'INPUT' : 'D:/SIG/MDT/SRTM/srtm_35_04_05_90m_cgiar_v4_3763_final_clip_relevo_sombreado.tif', 'OUTPUT' : 'TEMPORARY_OUTPUT', 'TRANSF' : 1 }

Traceback (most recent call last):
File "C:/OSGEO4~1/apps/qgis-rel-dev/./python/plugins\processing\algs\gdal\GdalAlgorithm.py", line 129, in processAlgorithm
commands = self.getConsoleCommands(parameters, context, feedback, executing=True)
File "C:/Users/pedro.venancio/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ntv2_transformations\RasterPT_ETR89PTTM06DirInv.py", line 127, in getConsoleCommands
raise QgsProcessingException(text)
_core.QgsProcessingException: Transformation to "ED50 UTM 29N [EPSG:23029]" only possible with grid from José Alberto Gonçalves

Execution failed after 0.01 seconds

Loading resulting layers
Algorithm '[PT] Direct and inverse Raster Tranformation' finished

This is expected, as for this transformation there is no grid from DGT.

The problem is the error, that can lead people to think that is a plugin or QGIS problem.

In the plugin old implementation, for QGIS 2.x, this was overcome using always the JAG grid, regardless the DGT grid be selected. If it is not possible to show a window reinforcing the information that the transformation to "ED50 UTM 29N [EPSG:23029]" is only possible with the grid from José Alberto Gonçalves, I think the same behavior than in QGIS 2.x is better than see the error, as the transformation is done with the best option actually available.

Can this be deployed to the QGIS 3 plugin repo?

I just searched in QGIS 3, and can't see the plugin in the list.

Has it been deployed? If not, can we deploy it? I'm hoping to merge the Australian transforms into the master branch now.

Activation issues.

A good day.

QGIS version
2.18.5
Review of the QGIS code
140a01f
Compiled against Qt
4.8.5
Running against Qt
4.8.5
Compiled against GDAL / OGR
2.1.3
Running against GDAL / OGR
2.1.3
Compiled against GEOS
3.5.0-CAPI-1.9.0
Running against GEOS
3.5.0-CAPI-1.9.0 r4084
PostgreSQL client version
9.2.4
SpatiaLite version
4.3.0
QWT version
5.2.3
PROJ.4 version
493
QScintilla2 version
2.7.2

complement:
Installed version: 0.13 (in C: \ Users \ Dkompras \ .qgis2 \ python \ plugins \ ntv2_transformations)
Available version: 0.13 (in Official QGIS Plugin Repository)

When activated the following message appears:
Wrong value for parameter "Msys folder"
Specified path does not exist:
E: / Qgis / apps \ msys

Apparently air restart is activated.
but it works?

Thank you.

Update the plugin to be compatible with the newest versions of GDAL and PROJ

After a first attempt (thanks @PedroVenancio) it seems that the ogr2ogr commands must be changed to something along the following lines:
ogr2ogr -s_srs EPSG:20790 -t_srs EPSG:3763 -ct "+proj=pipeline +step +inv +proj=tmerc +lat_0=39.6666666666667 +lon_0=1 +k=1 +x_0=200000 +y_0=300000 +ellps=intl +pm=lisbon +step +proj=hgridshift +grids=DLx_ETRS89_geo.gsb +step +proj=tmerc +lat_0=39.6682583333333 +lon_0=-8.13310833333333 +k=1 +x_0=0 +y_0=0 +ellps=GRS80" -f "ESRI Shapefile" -lco ENCODING=UTF-8 D:/Testes/postos_vigia/postos_vigia_rede_nacional_3763_17.shp D:\Testes\postos_vigia\postos_vigia_rede_nacional_20790.shp

where the "-ct" flag must be used (and is incompatible with GDAL 2.*).

Is unclear if an approach more similar to the one used with GDAL 2 can be used.

Error with inverse transformations

QGIS 3.28.

It seems something changed in GDAL (/vsistdout/ and /vsistdin/) as this command (example) does not work anymore:

ogr2ogr -s_srs EPSG:3763 -t_srs "+proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1 +x_0=180.598 +y_0=-86.99 +ellps=intl +nadgrids=C:\\Users/giovanni/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\ntv2_transformations\\grids\\D73_ETRS89_geo.gsb +wktext +units=m +no_defs" -f Geojson /vsistdout/ D:/Solos_Sul_25000/Solos_Sul_25000_ETRS.shp Solos_Sul_25000_ETRS -lco ENCODING=UTF-8 | ogr2ogr -f "GPKG" -a_srs EPSG:27493 C:/Users/giovanni/AppData/Local/Temp/processing_kaBdWZ/8500366e741e47bab08b1ad315e464f9/OUTPUT.gpkg /vsistdin/

ERROR 4: sqlite3_open(C:/Users/giovanni/AppData/Local/Temp/processing_kaBdWZ/8500366e741e47bab08b1ad315e464f9/OUTPUT.gpkg) failed: unable to open database file
ERROR 1: GPKG driver failed to create C:/Users/giovanni/AppData/Local/Temp/processing_kaBdWZ/8500366e741e47bab08b1ad315e464f9/OUTPUT.gpkg

Similar error when using SHP as final format.

It seems to work when using a physical intermediate datasource instead of stdout stdin

ogr2ogr -s_srs EPSG:3763 -t_srs "+proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111112 +k=1 +x_0=180.598 +y_0=-86.99 +ellps=intl +nadgrids=C:\\Users/giovanni/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins\\ntv2_transformations\\grids\\pt73_e89.gsb +wktext +units=m +no_defs" -f Geojson C:/Users/giovanni/AppData/Local/Temp/temp.geojson D:/Solos_Sul_25000/Solos_Sul_25000_ETRS.shp Solos_Sul_25000_ETRS -lco ENCODING=UTF-8 && ogr2ogr -f "ESRI Shapefile" -a_srs EPSG:27493 D:/teste3.shp C:/Users/giovanni/AppData/Local/Temp/temp.geojson

This could be a possible solution.

Inverse transformation for rasters (when GDAL 2 will be available and QGIS compiled against it)

When doing inverse transformations the resulting CRSs are usually then recognized as custom ones because of the custom parameters used in ogr2ogr/gdalwarp.

For vectors the workaround was to use a second ogr2ogr operation forcing the first output to the desired CRS using in the middle vsistdoutput/input and GeoJson.

For rasters the trick could work using VRT, but it does not.

Maybe from GDAL 2.0 it will be possible, see

http://lists.osgeo.org/pipermail/gdal-dev/2015-February/041094.html

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.