Re: [gdal-dev] Failure to convert to Airy
Right. I changed the signature and removed the CPLFree() and now in GMT it also ... half works. The middle warnings are print from GMT but the other come from GDAL and are like those you suppressed in your gdaltransform commit. So, I should try to catch this type of cases where one can do the direct transform but not the reverse. Any place where I can search what other then Airy have the same issue? echo 4.897 52.371 | mapproject -J+proj=airy ERROR 1: PROJ: proj_create: Error -50: malformed pipeline ERROR 6: Cannot find coordinate operations from `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["unknown",METHOD["PROJ airy"]],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' to `GEOGCRS["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]],CS[ellipsoidal,2],AXIS["longitude",east,ORDER[1],ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]],AXIS["latitude",north,ORDER[2],ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122' mapproject [ERROR]: Failed to create coordinate transformation between the following coordinate systems. This may be because they are not transformable, or because projection services (PROJ.4 DLL/.so) could not be loaded. mapproject [ERROR]: Source: PROJCS["unknown", GEOGCS["unknown", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]]], PROJECTION["custom_proj4"], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Easting",EAST], AXIS["Northing",NORTH], EXTENSION["PROJ4","+proj=airy +datum=WGS84 +wktext +no_defs"]] GEOGCS["unknown", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AXIS["Longitude",EAST], AXIS["Latitude",NORTH]] ERROR 10: Pointer 'hTransform' is NULL in 'OCTTransform'. ERROR 10: Pointer 'hTransform' is NULL in 'OCTTransform'. ERROR 10: Pointer 'hTransform' is NULL in 'OCTTransform'. ERROR 10: Pointer 'hTransform' is NULL in 'OCTTransform'. 328249.003313 4987937.10145 ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Failure to convert to Airy
> but raise the error when I change the order of the source and target (i.e. > create the inverse mapping) Sure, as that would trigger the non existing reverse operation. > > pSrcSRS = "+proj=airy +ellps=WGS84 +units=m" > pDstSRS = "+proj=latlong +datum=WGS84" > > In this case, it even raises an exception in VS debugger at line #63 > > CPLFree(pSrcSRS); CPLFree(pDstSRS); Those CPLFree() are super suspicious and should likely be removed. They are not present in other code paths. I suspect the correct signature for the function should be OGRCoordinateTransformationH gmt_OGRCoordinateTransformation( struct GMT_CTRL *GMT, const char *pSrcSRS, const char *pDstSRS); to avoid such issue. -- Spatialys - Geospatial professional services http://www.spatialys.com ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Failure to convert to Airy
I used the gdaltranslate example because I knew that it would much simpler for you to test but, as I said first, this issue was raised by a call to GDAL from GMT. Looked again into it and what happens is that the gmt_OGRCoordinateTransformation() call runs fine when pSrcSRS = "+proj=latlong +datum=WGS84" pDstSRS = "+proj=airy +ellps=WGS84 +units=m" but raise the error when I change the order of the source and target (i.e. create the inverse mapping) pSrcSRS = "+proj=airy +ellps=WGS84 +units=m" pDstSRS = "+proj=latlong +datum=WGS84" In this case, it even raises an exception in VS debugger at line #63 CPLFree(pSrcSRS); CPLFree(pDstSRS); |>On lundi 17 juin 2019 17:14:21 CEST Joaquim Manuel Freire Luís wrote: |>> Well, I call it via GMT but that test is in GMT for a while and it |>> used to pass. |>> |>> Anyway, I'll have to investigate this further because I rebuilt GDAL |>> and now the gdaltransform works, but when I call it from GMT is still fails. |>> |>> The code is |>> |>> https://github.com/GenericMappingTools/gmt/blob/master/src/gmt_ogrproj |>> .c#L27 |> |>gmt_OGRCoordinateTransformation(() isn't actually equivalent to |>gdaltransform, since it only creates the forward transformer. |>So that should, normally, work with both GDAL < 3 or GDAL >= 3 when going |>from longlat to airy. |> |>-- |>Spatialys - Geospatial professional services http://www.spatialys.com ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Failure to convert to Airy
On lundi 17 juin 2019 17:14:21 CEST Joaquim Manuel Freire Luís wrote: > Well, I call it via GMT but that test is in GMT for a while and it used to > pass. > > Anyway, I'll have to investigate this further because I rebuilt GDAL and now > the gdaltransform works, but when I call it from GMT is still fails. > > The code is > > https://github.com/GenericMappingTools/gmt/blob/master/src/gmt_ogrproj.c#L27 gmt_OGRCoordinateTransformation(() isn't actually equivalent to gdaltransform, since it only creates the forward transformer. So that should, normally, work with both GDAL < 3 or GDAL >= 3 when going from longlat to airy. -- Spatialys - Geospatial professional services http://www.spatialys.com ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] [SeasonOfDocs] Offers for GDAL documenting
Talking about basics... Most of the SDK we download to build drivers comes with an INSTALL file (.md or not) and that is what people usually look for when they decide that they need to download and build a FOSS. But GDAL doesn't have that. Yes, the information is there, somewhere but it would be nice to have it more accessible for newbies. From: gdal-dev on behalf of Even Rouault Sent: Monday, June 17, 2019 11:41 AM To: ea...@co.lincoln.or.us Cc: gdal-dev@lists.osgeo.org; Lynden Noye Subject: Re: [gdal-dev] [SeasonOfDocs] Offers for GDAL documenting On lundi 17 juin 2019 08:16:30 CEST Eli Adam wrote: > On Mon, Jun 17, 2019 at 5:43 AM Even Rouault wrote: > > Hi, > > > > this is really great news ! Given my experience with the project, I'm > > rather far from being representative of someone less familiar with it or > > with a non- developer profile, so thoughts from the broader GDAL > > community on what they feel is the most missing would be welcome. > > There are some things that are very basic that might make the > documentation more understandable to a beginner. I'm not sure if > these things are true or I've made them up or they are supposed to be > too obvious to state. > > -nln = New Layer Name > -nlt = New Layer Type > -a_srs = assign spatial reference system > -t_srs = target spatial reference system > -s_srs = source spatial reference system > > -ot = output type > -of = output format > > Are those true? If not, I've used them to better understand (and > remember) the options. Yes, they are true (or at least I've drawn the same conclusion as you :-)) -- Spatialys - Geospatial professional services http://www.spatialys.com ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Failure to convert to Airy
Well, I call it via GMT but that test is in GMT for a while and it used to pass. Anyway, I'll have to investigate this further because I rebuilt GDAL and now the gdaltransform works, but when I call it from GMT is still fails. The code is https://github.com/GenericMappingTools/gmt/blob/master/src/gmt_ogrproj.c#L27 and a quick debug shows that the failure occurs the second time that function is called. For some reason that I don't remember right now, I have to call it twice. (I've to go now for > 1 hour, so won't be able to reply in case of) |>-Original Message- |>From: Even Rouault |>Sent: Monday, June 17, 2019 6:00 PM |>To: Joaquim Manuel Freire Luís |>Cc: gdal-dev@lists.osgeo.org |>Subject: Re: [gdal-dev] Failure to convert to Airy |> |>> used to work before the GDAL3+PROJ6 combo. |> |>That would be surprising: with GDAL 2.4 and PROJ < 6, you also get an error, |>but with a different message: |> |>$ gdalinfo --version |>GDAL 2.4.1, released 2019/03/15 |> |>$ echo 4.897 52.371 | \ |> gdaltransform -s_srs +proj=longlat -t_srs "+proj=airy +wktext" |> |>ERROR 6: Failed to initialize PROJ pipeline from `+proj=airy +wktext' to ` |>+proj=longlat +ellps=WGS84 +no_defs': malformed pipeline |>328249.00331295 4987937.10144727 0 |> |> |>-- |>Spatialys - Geospatial professional services http://www.spatialys.com ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Failure to convert to Airy
> used to work before the GDAL3+PROJ6 combo. That would be surprising: with GDAL 2.4 and PROJ < 6, you also get an error, but with a different message: $ gdalinfo --version GDAL 2.4.1, released 2019/03/15 $ echo 4.897 52.371 | \ gdaltransform -s_srs +proj=longlat -t_srs "+proj=airy +wktext" ERROR 6: Failed to initialize PROJ pipeline from `+proj=airy +wktext' to ` +proj=longlat +ellps=WGS84 +no_defs': malformed pipeline 328249.00331295 4987937.10144727 0 -- Spatialys - Geospatial professional services http://www.spatialys.com ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Failure to convert to Airy
Thanks, This comes from our GMT tests and used to work before the GDAL3+PROJ6 combo. And funny that it also half works when I run it from Julia. But not from GMT. |>-Original Message- |>From: Even Rouault |>Sent: Monday, June 17, 2019 5:37 PM |>To: gdal-dev@lists.osgeo.org |>Cc: Joaquim Manuel Freire Luís |>Subject: Re: [gdal-dev] Failure to convert to Airy |> |>On lundi 17 juin 2019 16:08:36 CEST Joaquim Manuel Freire Luís wrote: |>> Even |>> |>> I'm seeing this failure with the airy conversion |>> |>> echo 4.897 52.371 | gdaltransform -s_srs +proj=longlat -t_srs |>> +proj=airy |>> |>> ERROR 1: PROJ: proj_create: Error -50: malformed pipeline ERROR 6: |>> Cannot find coordinate operations from |>> `PROJCRS["unknown",BASEGEOGCRS["unknown",DATUM["World Geodetic |>System |>> 1984",ELLIPSOID["WGS |>> |>84",6378137,298.257223563,LENGTHUNIT["metre",1]],ID["EPSG",6326]],PRIM |>> EM["G |>> |>reenwich",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8901]]],C |>> ONVERS |>> ION["unknown",METHOD["PROJ |>> airy"]],CS[Cartesian,2],AXIS["(E)",east,ORDER[1],LENGTHUNIT["metre",1, |>> ID["E |>> PSG",9001]]],AXIS["(N)",north,ORDER[2],LENGTHUNIT["metre",1,ID["EPSG", |>> 9001]] ]]' to `GEOGCRS["unknown",DATUM["World Geodetic System |>> 1984",ELLIPSOID["WGS |>> |>84",6378137,298.257223563,LENGTHUNIT["metre",1]],ID["EPSG",6326]],PRIM |>> EM["G |>> |>reenwich",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8901]],CS |>> [ellip |>> soidal,2],AXIS["longitude",east,ORDER[1],ANGLEUNIT["degree",0.01745329 |>> 251994 |>> 33,ID["EPSG",9122]]],AXIS["latitude",north,ORDER[2],ANGLEUNIT["degree" |>> ,0.017 4532925199433,ID["EPSG",9122' 328249.00331295 |>> 4987937.10144727 0 |>> |> |>Actually, this half works: you get the correct result, but with an error message. |>This is because the airy projection has no code in PROJ to compute its reverse |>operation, and gdaltransform logic instanciates both forward and reverse |>transformers. |>Error message, not relevant for your use case, shut off by |>https://github.com/OSGeo/gdal/commit/d1b68ad5f3adc3ec8f66a4a6dac5d765 |>5670a08c |>(which also fixes a real crashing bug when trying to use the null reverse |>method) |> |>Even |> |>-- |>Spatialys - Geospatial professional services http://www.spatialys.com ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Failure to convert to Airy
On lundi 17 juin 2019 16:08:36 CEST Joaquim Manuel Freire Luís wrote: > Even > > I'm seeing this failure with the airy conversion > > echo 4.897 52.371 | gdaltransform -s_srs +proj=longlat -t_srs +proj=airy > > ERROR 1: PROJ: proj_create: Error -50: malformed pipeline > ERROR 6: Cannot find coordinate operations from > `PROJCRS["unknown",BASEGEOGCRS["unknown",DATUM["World Geodetic System > 1984",ELLIPSOID["WGS > 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ID["EPSG",6326]],PRIMEM["G > reenwich",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8901]]],CONVERS > ION["unknown",METHOD["PROJ > airy"]],CS[Cartesian,2],AXIS["(E)",east,ORDER[1],LENGTHUNIT["metre",1,ID["E > PSG",9001]]],AXIS["(N)",north,ORDER[2],LENGTHUNIT["metre",1,ID["EPSG",9001]] > ]]' to `GEOGCRS["unknown",DATUM["World Geodetic System 1984",ELLIPSOID["WGS > 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ID["EPSG",6326]],PRIMEM["G > reenwich",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8901]],CS[ellip > soidal,2],AXIS["longitude",east,ORDER[1],ANGLEUNIT["degree",0.01745329251994 > 33,ID["EPSG",9122]]],AXIS["latitude",north,ORDER[2],ANGLEUNIT["degree",0.017 > 4532925199433,ID["EPSG",9122' 328249.00331295 4987937.10144727 0 > Actually, this half works: you get the correct result, but with an error message. This is because the airy projection has no code in PROJ to compute its reverse operation, and gdaltransform logic instanciates both forward and reverse transformers. Error message, not relevant for your use case, shut off by https://github.com/OSGeo/gdal/commit/d1b68ad5f3adc3ec8f66a4a6dac5d7655670a08c (which also fixes a real crashing bug when trying to use the null reverse method) Even -- Spatialys - Geospatial professional services http://www.spatialys.com ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Failure to convert to Airy
Even I'm seeing this failure with the airy conversion echo 4.897 52.371 | gdaltransform -s_srs +proj=longlat -t_srs +proj=airy ERROR 1: PROJ: proj_create: Error -50: malformed pipeline ERROR 6: Cannot find coordinate operations from `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["unknown",METHOD["PROJ airy"]],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' to `GEOGCRS["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]],CS[ellipsoidal,2],AXIS["longitude",east,ORDER[1],ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]],AXIS["latitude",north,ORDER[2],ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122' 328249.00331295 4987937.10144727 0 This is from a GDAL+PROJ6.1 build a couple weeks ago gdaltransform --version GDAL 3.1.0dev, released 2019/99/99 Others work well. For example echo 4.897 52.371 | gdaltransform -s_srs +proj=longlat -t_srs +proj=lagrng 253763.012478277 3354569.86001135 0 Joaquim ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] [SeasonOfDocs] Offers for GDAL documenting
On lundi 17 juin 2019 08:16:30 CEST Eli Adam wrote: > On Mon, Jun 17, 2019 at 5:43 AM Even Rouault wrote: > > Hi, > > > > this is really great news ! Given my experience with the project, I'm > > rather far from being representative of someone less familiar with it or > > with a non- developer profile, so thoughts from the broader GDAL > > community on what they feel is the most missing would be welcome. > > There are some things that are very basic that might make the > documentation more understandable to a beginner. I'm not sure if > these things are true or I've made them up or they are supposed to be > too obvious to state. > > -nln = New Layer Name > -nlt = New Layer Type > -a_srs = assign spatial reference system > -t_srs = target spatial reference system > -s_srs = source spatial reference system > > -ot = output type > -of = output format > > Are those true? If not, I've used them to better understand (and > remember) the options. Yes, they are true (or at least I've drawn the same conclusion as you :-)) -- Spatialys - Geospatial professional services http://www.spatialys.com ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] [SeasonOfDocs] Offers for GDAL documenting
On Mon, Jun 17, 2019 at 5:43 AM Even Rouault wrote: > > Hi, > > this is really great news ! Given my experience with the project, I'm rather > far from being representative of someone less familiar with it or with a non- > developer profile, so thoughts from the broader GDAL community on what they > feel is the most missing would be welcome. > There are some things that are very basic that might make the documentation more understandable to a beginner. I'm not sure if these things are true or I've made them up or they are supposed to be too obvious to state. -nln = New Layer Name -nlt = New Layer Type -a_srs = assign spatial reference system -t_srs = target spatial reference system -s_srs = source spatial reference system -ot = output type -of = output format Are those true? If not, I've used them to better understand (and remember) the options. Best regards, Eli > One thing I've in mind - this is rather a detail - is that we lost a bit of > content (build requirements for each driver) during the Sphinx migration, as > pointed out by > https://github.com/OSGeo/gdal/issues/1204#issuecomment-498624481 , so this > could be a potential task. > > More generally, I feel we might need more tutorial-like / how-to style > documentation. The current documentation is hopefully rather decent as a > reference guide, but lacking on the quick-start side. On the wiki, there are > some source of information, mostly from > https://trac.osgeo.org/gdal/wiki/UserDocs , that could be interesting to > migrate partly on the main documentation, but with a critical eye (some of the > hints might be outdated due to later improvements, etc) > > Lynden, perhaps you've also suggestions from your practice of the project and > its documentation on what you'd like to see added ? > > Even > > -- > Spatialys - Geospatial professional services > http://www.spatialys.com > ___ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/gdal-dev ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] [SeasonOfDocs] Offers for GDAL documenting
Hi, this is really great news ! Given my experience with the project, I'm rather far from being representative of someone less familiar with it or with a non- developer profile, so thoughts from the broader GDAL community on what they feel is the most missing would be welcome. One thing I've in mind - this is rather a detail - is that we lost a bit of content (build requirements for each driver) during the Sphinx migration, as pointed out by https://github.com/OSGeo/gdal/issues/1204#issuecomment-498624481 , so this could be a potential task. More generally, I feel we might need more tutorial-like / how-to style documentation. The current documentation is hopefully rather decent as a reference guide, but lacking on the quick-start side. On the wiki, there are some source of information, mostly from https://trac.osgeo.org/gdal/wiki/UserDocs , that could be interesting to migrate partly on the main documentation, but with a critical eye (some of the hints might be outdated due to later improvements, etc) Lynden, perhaps you've also suggestions from your practice of the project and its documentation on what you'd like to see added ? Even -- Spatialys - Geospatial professional services http://www.spatialys.com ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev
[gdal-dev] Issue when compiling gdal v2.1.2
Hello, I am trying to compile the gdal 2.1.2 and I have problems with the gcc. Do you know what gcc version is necessary to compile? Cheers, Jorge ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev