Re: [gdal-dev] [Question] PROJ4String to WKT2 Transformations

2022-01-27 Thread Felipe Matas via gdal-dev
 Hi, Thx!, now is a lot more clear!, I have a shape with this CRS:
Coordinate Reference System:
  User input: WGS 84 / UTM zone 19S 
  wkt:
PROJCRS["WGS 84 / UTM zone 19S",
    BASEGEOGCRS["WGS 84",
    DATUM["World Geodetic System 1984",
    ELLIPSOID["WGS 84",6378137,298.257223563,
    LENGTHUNIT["metre",1]]],
    PRIMEM["Greenwich",0,
    ANGLEUNIT["degree",0.0174532925199433]],
    ID["EPSG",4326]],
    CONVERSION["UTM zone 19S",
    METHOD["Transverse Mercator",
    ID["EPSG",9807]],
    PARAMETER["Latitude of natural origin",0,
    ANGLEUNIT["Degree",0.0174532925199433],
    ID["EPSG",8801]],
    PARAMETER["Longitude of natural origin",-69,
    ANGLEUNIT["Degree",0.0174532925199433],
    ID["EPSG",8802]],
    PARAMETER["Scale factor at natural origin",0.9996,
    SCALEUNIT["unity",1],
    ID["EPSG",8805]],
    PARAMETER["False easting",50,
    LENGTHUNIT["metre",1],
    ID["EPSG",8806]],
    PARAMETER["False northing",1000,
    LENGTHUNIT["metre",1],
    ID["EPSG",8807]]],
    CS[Cartesian,2],
    AXIS["(E)",east,
    ORDER[1],
    LENGTHUNIT["metre",1]],
    AXIS["(N)",north,
    ORDER[2],
    LENGTHUNIT["metre",1]],
    ID["EPSG",32719]]
This CRS is a tranformation from WGS84 to   UTM zone 19S?, If is a 
transfomation, I don't know, if the data of the file is already transformed, 
or, the data will be transformed to  UTM zone 19S.
Because, in case it is already transform, to recover the original, I should 
rollback the transformation and set the WGS84 as the CRS to can use WKT2 in the 
right way. (skipping the WGS84 pivot)

Thx.
El martes, 11 de enero de 2022 12:15:14 a. m. GMT-3, Rahkonen Jukka (MML) 
 escribió:  
 
 
Hi,
 
  
 
The more or less same question seems to be asked some time ago in 
gis.stackexchange 
https://gis.stackexchange.com/questions/420378/can-we-construct-wkt2-from-proj4string-correctly.
 
  
 
-Jukka Rahkonen-
 
  
 
  
 
Lähettäjä: gdal-dev Puolesta Felipe Matas via 
gdal-dev
Lähetetty: maanantai 10. tammikuuta 2022 22.07
Vastaanottaja: gdal-dev@lists.osgeo.org
Aihe: [gdal-dev] [Question] PROJ4String to WKT2 Transformations
 
  
 
Hi hi, I was looking for someplace to ask about this, and I was in doubt is was 
here or in PROJ, but lets do a try.
 
  
 
Actually, probably I'm not the only one, I have some questions about how WKT2 
and PROJ4Strings are transformed.
 
  
 
>From what I read, a PROJ4String don't have enough info to construct a precise 
>WKT2, so, actually how PROJ4String is deprecated my main question is how to 
>construct the right WKT2, there is a lot o data stored in the old format, 
>there is usually no more information, and even the software/hardware that get 
>the data in some way save all of it with all the errors.
 
  
 
Actually, we can transform a old CRS to a WKT2:
 
  
 > st_crs("+type=crs +proj=utm +zone=19 +south +datum=WGS84 +units=m +no_defs 
 > +ellps=WGS84 +towgs84=0,0,0" + ) Coordinate Reference System:   User input: 
 > +type=crs +proj=utm +zone=19 +south +datum=WGS84 +units=m +no_defs 
 > +ellps=WGS84 +towgs84=0,0,0    wkt: BOUNDCRS[     SOURCECRS[     
 > PROJCRS["unknown",     BASEGEOGCRS["unknown",     
 > DATUM["World Geodetic System 1984",     ELLIPSOID["WGS 
 > 84",6378137,298.257223563,     LENGTHUNIT["metre",1]],   
 >   ID["EPSG",6326]],     PRIMEM["Greenwich",0,    
 >  ANGLEUNIT["degree",0.0174532925199433],     
 > ID["EPSG",8901]]],     CONVERSION["UTM zone 19S",     
 > METHOD["Transverse Mercator",     ID["EPSG",9807]],  
 >    PARAMETER["Latitude of natural origin",0,     
 > ANGLEUNIT["degree",0.0174532925199433],     
 > ID["EPSG",8801]],     PARAMETER["Longitude of natural 
 > origin",-69,     ANGLEUNIT["degree",0.0174532925199433], 
 >     ID["EPSG",8802]],     PARAMETER["Scale factor at 
 > natural origin",0.9996,     SCALEUNIT["unity",1],    
 >      ID["EPSG",8805]],     PARAMETER["False easting",50, 
 >    

Re: [gdal-dev] [Question] PROJ4String to WKT2 Transformations

2022-01-10 Thread Even Rouault

Felipe,

when using PROJ to transform a PROJ.4 string to WKT2, there's (as far as 
I can think of) no loss of information. Loss of information can occur in 
the other way round.


The main source of loss is that proj4 strings have a limited set of 
known datums, so sometimes you'll just have a +ellps without any 
+towgs84 or +nadgrids, which is underspecified.


When you've +ellps with +towgs84, datum transformations will be limited 
to using WGS84 as a pivot, whereas if you had a WKT2 string with the 
original datum name, PROJ could potentially avoid going through WGS84 
when doing datum transformation.


Here's with +datum=WGS84, your PROJ.4 string is fully qualified. You can 
remove the +ellps=WGS84 and +towgs84=0,0,0 which are completely 
redundant here.


Even

Le 10/01/2022 à 21:06, Felipe Matas via gdal-dev a écrit :
Hi hi, I was looking for someplace to ask about this, and I was in 
doubt is was here or in PROJ, but lets do a try.


Actually, probably I'm not the only one, I have some questions about 
how WKT2 and PROJ4Strings are transformed.


From what I read, a PROJ4String don't have enough info to construct a 
precise WKT2, so, actually how PROJ4String is deprecated my main 
question is how to construct the right WKT2, there is a lot o data 
stored in the old format, there is usually no more information, and 
even the software/hardware that get the data in some way save all of 
it with all the errors.


Actually, we can transform a old CRS to a WKT2:

|> st_crs("+type=crs +proj=utm +zone=19 +south +datum=WGS84 +units=m 
+no_defs +ellps=WGS84 +towgs84=0,0,0" + ) Coordinate Reference System: 
User input: +type=crs +proj=utm +zone=19 +south +datum=WGS84 +units=m 
+no_defs +ellps=WGS84 +towgs84=0,0,0 wkt: BOUNDCRS[ SOURCECRS[ 
PROJCRS["unknown", BASEGEOGCRS["unknown", DATUM["World Geodetic System 
1984", ELLIPSOID["WGS 84",6378137,298.257223563, 
LENGTHUNIT["metre",1]], ID["EPSG",6326]], PRIMEM["Greenwich",0, 
ANGLEUNIT["degree",0.0174532925199433], ID["EPSG",8901]]], 
CONVERSION["UTM zone 19S", METHOD["Transverse Mercator", 
ID["EPSG",9807]], PARAMETER["Latitude of natural origin",0, 
ANGLEUNIT["degree",0.0174532925199433], ID["EPSG",8801]], 
PARAMETER["Longitude of natural origin",-69, 
ANGLEUNIT["degree",0.0174532925199433], ID["EPSG",8802]], 
PARAMETER["Scale factor at natural origin",0.9996, 
SCALEUNIT["unity",1], ID["EPSG",8805]], PARAMETER["False 
easting",50, LENGTHUNIT["metre",1], ID["EPSG",8806]], 
PARAMETER["False northing",1000, LENGTHUNIT["metre",1], 
ID["EPSG",8807]], ID["EPSG",17019]], CS[Cartesian,2], AXIS["(E)",east, 
ORDER[1], LENGTHUNIT["metre",1, ID["EPSG",9001]]], AXIS["(N)",north, 
ORDER[2], LENGTHUNIT["metre",1, ID["EPSG",9001], TARGETCRS[ 
GEOGCRS["WGS 84", DATUM["World Geodetic System 1984", ELLIPSOID["WGS 
84",6378137,298.257223563, LENGTHUNIT["metre",1]]], 
PRIMEM["Greenwich",0, ANGLEUNIT["degree",0.0174532925199433]], 
CS[ellipsoidal,2], AXIS["latitude",north, ORDER[1], 
ANGLEUNIT["degree",0.0174532925199433]], AXIS["longitude",east, 
ORDER[2], ANGLEUNIT["degree",0.0174532925199433]], ID["EPSG",4326]]], 
ABRIDGEDTRANSFORMATION["Transformation from unknown to WGS84", 
METHOD["Geocentric translations (geog2D domain)", ID["EPSG",9603]], 
PARAMETER["X-axis translation",0, ID["EPSG",8605]], PARAMETER["Y-axis 
translation",0, ID["EPSG",8606]], PARAMETER["Z-axis translation",0, 
ID["EPSG",8607|


So, in some way, GDAL is able to cover this "breach" of information 
betwen PROJ4String and WKT2, but is not like the breach does not 
exist, it was just handled in some way, so, the lack of info, also 
means, there can be othe aproximations to that CRS.


Maybe I'm just confused, and mixing things the things I read, I'm just 
trying to figure it out, what and how would be the right 
transformation from proj4string to wkt2.


Thx.


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


--
http://www.spatialys.com
My software is free, but my time generally not.

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] [Question] PROJ4String to WKT2 Transformations

2022-01-10 Thread Rahkonen Jukka (MML)
Hi,

The more or less same question seems to be asked some time ago in 
gis.stackexchange 
https://gis.stackexchange.com/questions/420378/can-we-construct-wkt2-from-proj4string-correctly.

-Jukka Rahkonen-


Lähettäjä: gdal-dev  Puolesta Felipe Matas 
via gdal-dev
Lähetetty: maanantai 10. tammikuuta 2022 22.07
Vastaanottaja: gdal-dev@lists.osgeo.org
Aihe: [gdal-dev] [Question] PROJ4String to WKT2 Transformations

Hi hi, I was looking for someplace to ask about this, and I was in doubt is was 
here or in PROJ, but lets do a try.

Actually, probably I'm not the only one, I have some questions about how WKT2 
and PROJ4Strings are transformed.

From what I read, a PROJ4String don't have enough info to construct a precise 
WKT2, so, actually how PROJ4String is deprecated my main question is how to 
construct the right WKT2, there is a lot o data stored in the old format, there 
is usually no more information, and even the software/hardware that get the 
data in some way save all of it with all the errors.

Actually, we can transform a old CRS to a WKT2:


> st_crs("+type=crs +proj=utm +zone=19 +south +datum=WGS84 +units=m +no_defs 
> +ellps=WGS84 +towgs84=0,0,0"

+ )

Coordinate Reference System:

  User input: +type=crs +proj=utm +zone=19 +south +datum=WGS84 +units=m 
+no_defs +ellps=WGS84 +towgs84=0,0,0

  wkt:

BOUNDCRS[

SOURCECRS[

PROJCRS["unknown",

BASEGEOGCRS["unknown",

DATUM["World Geodetic System 1984",

ELLIPSOID["WGS 84",6378137,298.257223563,

LENGTHUNIT["metre",1]],

ID["EPSG",6326]],

PRIMEM["Greenwich",0,

ANGLEUNIT["degree",0.0174532925199433],

ID["EPSG",8901]]],

CONVERSION["UTM zone 19S",

METHOD["Transverse Mercator",

ID["EPSG",9807]],

PARAMETER["Latitude of natural origin",0,

ANGLEUNIT["degree",0.0174532925199433],

ID["EPSG",8801]],

PARAMETER["Longitude of natural origin",-69,

ANGLEUNIT["degree",0.0174532925199433],

ID["EPSG",8802]],

PARAMETER["Scale factor at natural origin",0.9996,

SCALEUNIT["unity",1],

ID["EPSG",8805]],

PARAMETER["False easting",50,

LENGTHUNIT["metre",1],

ID["EPSG",8806]],

PARAMETER["False northing",1000,

LENGTHUNIT["metre",1],

ID["EPSG",8807]],

ID["EPSG",17019]],

CS[Cartesian,2],

AXIS["(E)",east,

ORDER[1],

LENGTHUNIT["metre",1,

ID["EPSG",9001]]],

AXIS["(N)",north,

ORDER[2],

LENGTHUNIT["metre",1,

ID["EPSG",9001],

TARGETCRS[

GEOGCRS["WGS 84",

DATUM["World Geodetic System 1984",

ELLIPSOID["WGS 84",6378137,298.257223563,

LENGTHUNIT["metre",1]]],

PRIMEM["Greenwich",0,

ANGLEUNIT["degree",0.0174532925199433]],

CS[ellipsoidal,2],

AXIS["latitude",north,

ORDER[1],

ANGLEUNIT["degree",0.0174532925199433]],

AXIS["longitude",east,

ORDER[2],

ANGLEUNIT["degree",0.0174532925199433]],

ID["EPSG",4326]]],

ABRIDGEDTRANSFORMATION["Transformation from unknown to WGS84",

METHOD["Geocentric translations (geog2D domain)",

ID["EPSG",9603]],

PARAMETER["X-axis translation",0,

ID["EPSG",8605]],

PARAMETER["Y-axis translation",0,

ID["EPSG",8606]],

PARAMETER["Z-axis translation",0,

ID["EPSG",8607

So, in some way, GDAL is able to cover this "breach" of information betwen 
PROJ4String and WKT2, but is not like the breach does not exist, it was just 
handled in some way, so, the lack of info, also means, there can be othe 
aproximations to that CRS.

Maybe I'm just confused, and mixing things the things I read, I'm just trying 
to figure it out, what and how would be the right transformation from 
proj4string to wkt2.

Thx.

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev