Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NTv2 Globogis vector transformation for Italy #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

agiudiceandrea
Copy link
Contributor

@agiudiceandrea agiudiceandrea commented Nov 13, 2019

I've slightly modified VectorIT_RER_ETRS89DirInv.py to create a vector transformation for Italy VectorIT_ITALY_ETRS89DirInv.py using the Globogis NTv2 grids.

It seems working, but I don't know if there are other changes to make in other parts of the code...

I'm unsure about these lines https://github.com/agiudiceandrea/naturalgis_ntv2_transformations/blob/b94b7b4da906bdefdecb6f98154fef29405a6b30/VectorIT_ITALY_ETRS89DirInv.py#L4-L22

and particularly this https://github.com/agiudiceandrea/naturalgis_ntv2_transformations/blob/b94b7b4da906bdefdecb6f98154fef29405a6b30/VectorIT_ITALY_ETRS89DirInv.py#L59

If all is ok with this code, I'll also try to create a RasterIT_ITALY_ETRS89DirInv.py.

By the way, I've found there's something not working properly in the ogr2ogr command for all the vector inverse transformations.
The log reports "Warning 6: dataset /vsistdout/ does not support layer creation option ENCODING" every time an inverse transformation is performed.
I wonder why /vsistdout/ and /vsistdin/ are needed in order to perform the vector inverse transformations and if we could avoid to use them.

I would also point out that two other NTv2 gridfiles are available for Italy at http://www.provincia.agrigento.it/flex/cm/pages/ServeBLOB.php/L/IT/IDPagina/309: these grids are created using the Geoportale Nazionale coordinate transform service http://www.pcn.minambiente.it/mattm/conversione-coordinate/ for ROMA40<->WGS84/ETRS89-ETRF89 and ED50<->WGS84/ETRS89-ETRF89
Could them be added to the gridfiles repository?

Partially fixes #29

@gioman
Copy link
Contributor

gioman commented Nov 14, 2019

I've slightly modified VectorIT_RER_ETRS89DirInv.py to create a vector transformation for Italy VectorIT_ITALY_ETRS89DirInv.py using the Globogis NTv2 grids.

It seems working, but I don't know if there are other changes to make in other parts of the code...

@agiudiceandrea it seems good to me, especially if you say it works :)

I'm unsure about these lines https://github.com/agiudiceandrea/naturalgis_ntv2_transformations/blob/b94b7b4da906bdefdecb6f98154fef29405a6b30/VectorIT_ITALY_ETRS89DirInv.py#L4-L22

I guess is to leave as it is, I'll add your name (and contact of you want) in the contributor list in the readme that will show also in the QGIS plugin manager.

and particularly this https://github.com/agiudiceandrea/naturalgis_ntv2_transformations/blob/b94b7b4da906bdefdecb6f98154fef29405a6b30/VectorIT_ITALY_ETRS89DirInv.py#L59

I guess it could become "itrervectortransform" for the case of the Emilia-Romagna grids and "itvectortransform" for the grids that work for the whole national territory.

If all is ok with this code, I'll also try to create a RasterIT_ITALY_ETRS89DirInv.py.

ok

By the way, I've found there's something not working properly in the ogr2ogr command for all the vector inverse transformations.
The log reports "Warning 6: dataset /vsistdout/ does not support layer creation option ENCODING" every time an inverse transformation is performed.
I wonder why /vsistdout/ and /vsistdin/ are needed in order to perform the vector inverse transformations and if we could avoid to use them.

The warning is harmless.

The reason why I added the /vsistdout/ and /vsistdin/ mechanism is the following:
if you do a transformation with ogr2ogr and a custom projection (that in this cases uses ntv2 grids) you never ends with a layer that has a precise EPSG code. So the trick was to output the transformed layer to vsistdout and then make a copy of it giving it a proper EPSG code. But this was done years ago, based on a now obsolete version of gdal/ogr, so maybe now things could work in a different way.

would also point out that two other NTv2 gridfiles are available for Italy at http://www.provincia.agrigento.it/flex/cm/pages/ServeBLOB.php/L/IT/IDPagina/309: these grids are created using the Geoportale Nazionale coordinate transform service http://www.pcn.minambiente.it/mattm/conversione-coordinate/ for ROMA40<->WGS84/ETRS89-ETRF89 and ED50<->WGS84/ETRS89-ETRF89
Could them be added to the gridfiles repository?

We can, but only if these grids are available with a license that clearly allow re-distribution.

@agiudiceandrea agiudiceandrea force-pushed the add-ntv2-globogis-italy-transf-vector branch from b94b7b4 to 58c6eed Compare November 14, 2019 18:06
@agiudiceandrea
Copy link
Contributor Author

See also OSGeo/proj-datumgrid#83 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add grids for Italy developed by Globogis
2 participants