Opened 7 years ago
Closed 7 years ago
#4078 closed defect (fixed)
test_gdal_configured fails with GDAL 2.3.0-rc1
Reported by: | Bas Couwenberg | Owned by: | pramsey |
---|---|---|---|
Priority: | high | Milestone: | PostGIS 2.4.5 |
Component: | postgis | Version: | 2.4.x |
Keywords: | Cc: |
Description
The gdal test suite fails with GDAL 2.3.0-rc1:
Suite: gdal Test: test_gdal_configured ...ERROR 4: Unable to open EPSG support file gcs.csv. Try setting the GDAL_DATA environment variable to point to the directory containing EPSG csv files. FAILED 1. cu_gdal.c:28 - rt_util_gdal_configured() Test: test_gdal_drivers ...passed Test: test_gdal_rasterize ...passed Test: test_gdal_polygonize ...passed Test: test_raster_to_gdal ...Warning 1: Cannot find pcs.csv Warning 1: Cannot find datum.csv or gdal_datum.csv Warning 1: Cannot find ellipsoid.csv Warning 1: Cannot find prime_meridian.csv Warning 6: PNG driver doesn't support data type Float64. Only eight bit (Byte) and sixteen bit (UInt16) bands supported. Defaulting to Byte passed Test: test_gdal_to_raster ...passed Test: test_gdal_warp ...passed
The full buildlog is attached.
Attachments (1)
Change History (10)
by , 7 years ago
Attachment: | postgis_2.4.4+dfsg-2_amd64.build added |
---|
comment:1 by , 7 years ago
comment:2 by , 7 years ago
The gdal Debian package has used /usr/share/gdal/<GDAL_VERSION_MARJOR>.<GDAL_VERSION_MINOR>
for GDAL_DATA
for a very long time.
# ls -l $(gdal-config --datadir)/gcs.csv -rw-r--r-- 1 root root 54388 May 4 16:33 /usr/share/gdal/2.3/gcs.csv
CPLFinderInit()
is patched to use this path instead of /usr/share/gdal
.
I suspect this code path is not used in 2.3 any more.
comment:4 by , 7 years ago
Bas, I've just built Postgis trunk r16556 on a Debian testing with gdal 2.3.0-rc1 from experimental, and 'make check' in raster/test/cunit works fine. However I can reproduce the issue you have by setting GDAL_DATA to the empty string (contrary to not setting it at all), which must be interpreted by GDAL as equivalent to the current directory, so I suspect that must be your issue
comment:5 by , 7 years ago
Thanks for testing, Even. That seems to imply that something sets GDAL_DATA
, which the Debian package does not.
I'm currently building a new gdal
package which doesn't use the version specific data
& gdalplugins
directory any more. That doesn't have a lot of value now that only a single gdal-data
package can be installed (which provides /usr/share/gdal
).
Once that's ready I'll test this issue again.
comment:6 by , 7 years ago
Alternatively could you check the output of strace -f make check 2>&1 | grep csv
from raster/test/cunit to see in which directories it attempts to find the csv files ?
comment:7 by , 7 years ago
Running make check
via strace
in raster/test/cunit
works on my site too, but the running the tests as part of the Debian package build (via pg_virtualenv
) still fails.
Running that make check
invocation via strace
shows that gcs.csv
is loaded correctly, but other tests fail.
This is starting to look like a heisenbug.
comment:8 by , 7 years ago
test_gdal_configured
succeeds with the new gdal package, but two other tests now fail:
rt_gdalwarp .. failed (diff expected obtained: /tmp/pgis_reg/test_50_diff) rt_asraster .. failed (diff expected obtained: /tmp/pgis_reg/test_51_diff) ... --- rt_gdalwarp_expected 2018-04-06 05:05:52.000000000 +0000 +++ /tmp/pgis_reg/test_50_out 2018-05-07 20:41:43.339711352 +0000 @@ -1,40 +1,9 @@ NOTICE: table "raster_gdalwarp_src" does not exist, skipping NOTICE: table "raster_gdalwarp_dst" does not exist, skipping +ERROR: rt_raster_gdal_warp: Could not create GDAL transformation object for output dataset creation NOTICE: Values must be provided for both X and Y when specifying the scale. Returning original raster NOTICE: Values must be provided for both X and Y when specifying the scale. Returning original raster -NOTICE: Raster has default geotransform. Adjusting metadata for use of GDAL Warp API -NOTICE: Raster has default geotransform. Adjusting metadata for use of GDAL Warp API -NOTICE: Raster has default geotransform. Adjusting metadata for use of GDAL Warp API -NOTICE: Values must be provided for both X and Y when specifying the scale. Returning original raster -NOTICE: Values must be provided for both X and Y when specifying the scale. Returning original raster -0.0||||||||||||| -0.1|993310|12|12|1|1009.894|-1009.894|0.000|0.000|950732.188|1409281.783|t|t|t -0.10|992163|10|10|1|1000.000|-1000.000|0.000|0.000|-500000.000|600000.000|t|t|t -0.11|992163|11|10|1|1000.000|-1000.000|0.000|0.000|-500001.000|600000.000|t|t|t -0.12|992163|10|11|1|1000.000|-1000.000|0.000|0.000|-500000.000|600009.000|t|t|t -0.13|992163|11|11|1|1000.000|-1000.000|0.000|0.000|-500100.000|600950.000|t|t|t -0.14|992163|201|201|1|50.000|50.000|0.000|0.000|-500040.000|589957.000|t|t|t -0.15|992163|84|84|1|121.000|121.000|0.000|0.000|-500093.000|589875.000|t|t|t -0.16|993310|243|243|1|50.000|50.000|0.000|0.000|950710.000|1397157.000|t|t|t -0.17|993309|243|243|1|50.000|50.000|0.000|0.000|950760.000|1396957.000|t|t|t -0.18|992163|10|10|1|1000.000|-1000.000|3.000|3.000|-500030.000|600000.000|t|t|t -0.19|993310|12|12|1|1009.894|-1009.894|3.000|3.000|950691.792|1409281.783|t|t|t -0.2|993309|12|12|1|1009.916|-1009.916|0.000|0.000|950762.305|1409088.896|t|t|t -0.20|993309|12|12|1|1009.916|-1009.916|1.000|3.000|950742.107|1409088.896|t|t|t -0.21|993310|24|24|1|500.000|500.000|3.000|3.000|950657.188|1397356.783|t|t|t -0.22|993310|26|26|1|500.000|500.000|0.000|6.000|950452.000|1396632.000|t|t|t -0.23|984269|12|8|1|0.012|-0.012|0.000|0.000|-107.029|50.206|t|t|t -0.24|974269|12|8|1|0.012|-0.012|0.000|0.000|-107.029|50.206|t|t|t -0.25|0|5|5|1|2.000|-2.000|0.000|0.000|0.000|0.000|t|t|t -0.26|0|2|2|1|5.000|-5.000|0.000|0.000|0.000|0.000|t|t|t -0.27|0|100|100|1|0.100|-0.100|0.000|0.000|0.000|0.000|t|t|t -0.3|994269|12|8|1|0.012|-0.012|0.000|0.000|-107.029|50.206|t|t|t -0.4|993310|24|24|1|500.000|500.000|0.000|0.000|950732.188|1397281.783|t|t|t -0.5|992163|10|10|1|1000.000|-1000.000|0.000|0.000|-500000.000|600000.000|t|t|t -0.6|992163|10|10|1|1000.000|-1000.000|0.000|0.000|-500000.000|600000.000|t|t|t -0.7|992163|20|20|1|500.000|500.000|0.000|0.000|-500000.000|590000.000|t|t|t -0.8|992163|40|40|1|250.000|250.000|0.000|0.000|-500000.000|590000.000|t|t|t -0.9|992163|40|40|1|250.000|250.000|0.000|0.000|-500000.000|590000.000|t|t|t +ERROR: rt_raster_gdal_warp: Could not create GDAL transformation object for output dataset creation 1.0||||||||||||| 1.1|992163|10|10|1|1000.000|-1000.000|0.000|0.000|-500000.000|600000.000|t|t|t 1.10|992163|10|11|1|1000.000|-1000.000|0.000|0.000|-500000.000|600009.000|t|t|t @@ -61,21 +30,6 @@ 1.7|992163|40|40|1|250.000|250.000|0.000|0.000|-500000.000|590000.000|t|t|t 1.8|992163|10|10|1|1000.000|-1000.000|0.000|0.000|-500000.000|600000.000|t|t|t 1.9|992163|11|10|1|1000.000|-1000.000|0.000|0.000|-500001.000|600000.000|t|t|t -2.1|993310|12|12|1|1009.894|-1009.894|0.000|0.000|950732.188|1409281.783|t|t|t -2.10|993310|24|24|1|500.000|500.000|0.000|0.000|950732.188|1397281.783|t|t|t -2.11|993309|121|121|1|100.000|100.000|0.000|0.000|950762.305|1396988.896|t|t|t -2.12|993310|6|6|1|2000.000|2000.000|0.000|0.000|950732.188|1397281.783|t|t|t -2.13|993310|8|8|1|1500.000|1500.000|0.000|0.000|950732.188|1397281.783|t|t|t -2.14|993310|24|24|1|500.000|500.000|0.000|0.000|950732.188|1397281.783|t|t|t -2.15|993310|16|16|1|750.000|750.000|0.000|0.000|950732.188|1397281.783|t|t|t -2.2|993309|12|12|1|1009.916|-1009.916|0.000|0.000|950762.305|1409088.896|t|t|t -2.3|994269|12|8|1|0.012|-0.012|0.000|0.000|-107.029|50.206|t|t|t -2.4||||||||||||| -2.5|993310|12|12|1|1009.894|-1009.894|0.000|0.000|950732.188|1409281.783|t|t|t -2.6||||||||||||| -2.7|993310|12|12|1|1009.894|-1009.894|0.000|0.000|950732.188|1409281.783|t|t|t -2.8|993310|12|12|1|1009.894|-1009.894|0.000|0.000|950732.188|1409281.783|t|t|t -2.9|993310|12|12|1|1009.894|-1009.894|0.000|0.000|950732.188|1409281.783|t|t|t 3.1|992163|100|100|1|100.000|100.000|0.000|0.000|-500000.000|590000.000|t|t|t 3.2|992163|100|100|1|100.000|100.000|0.000|0.000|-500000.000|590000.000|t|t|t 3.3|992163|10|10|1|1000.000|-1000.000|0.000|0.000|-500000.000|600000.000|t|t|t @@ -115,8 +69,7 @@ 5.7|992163|10|11|1|1000.000|-1000.000|0.000|0.000|-500000.000|600991.000|t|t|t 5.8|992163|10|11|1|1000.000|-1000.000|0.000|0.000|-500000.000|600001.000|t|t|t 5.9|992163|10|11|1|1000.000|-1000.000|0.000|0.000|-500000.000|600009.000|t|t|t -NOTICE: The rasters (pixel corner coordinates) are not aligned -t|f|t +ERROR: rt_raster_gdal_warp: Could not create GDAL transformation object for output dataset creation NOTICE: Raster has default geotransform. Adjusting metadata for use of GDAL Warp API NOTICE: Raster has default geotransform. Adjusting metadata for use of GDAL Warp API NOTICE: Raster has default geotransform. Adjusting metadata for use of GDAL Warp API ### /tmp/pgis_reg/test_51_diff ### --- rt_asraster_expected 2018-04-06 05:05:52.000000000 +0000 +++ /tmp/pgis_reg/test_51_out 2018-05-07 20:41:44.119707831 +0000 @@ -10,55 +10,4 @@ NOTICE: The geometry's SRID (993310) is not the same as the raster's SRID (992163). The geometry will be transformed to the raster's projection NOTICE: The geometry's SRID (993310) is not the same as the raster's SRID (992163). The geometry will be transformed to the raster's projection NOTICE: The geometry's SRID (993310) is not the same as the raster's SRID (992163). The geometry will be transformed to the raster's projection -NOTICE: The rasters have different scales on the X axis -NOTICE: The rasters have different scales on the X axis -NOTICE: The rasters have different scales on the X axis -NOTICE: The rasters have different scales on the X axis -1.0|||||||||||||||| -1.1|993310|100|100|1|1406.537|-869.114|0.000|0.000|-175453.086|114987.661|8BUI|0.000|t|1.000|1.000| -1.10|993310|141|87|1|1000.000|-1000.000|0.000|0.000|-175453.086|114987.661|32BF|0.000|t|1.000|1.000| -1.11|993310|100|100|1|1406.537|-869.114|0.000|0.000|-175453.086|114987.661|8BSI|0.000|t|1.000|1.000| -1.12|993310|100|100|1|1406.537|-869.114|0.000|0.000|-175453.086|114987.661|16BUI|0.000|t|1.000|1.000| -1.13|993310|100|100|1|1406.537|-869.114|0.000|0.000|-175453.086|114987.661|32BF|0.000|t|255.000|255.000| -1.14|993310|100|100|1|1406.537|-869.114|0.000|0.000|-175453.086|114987.661|32BF|1.000|t|255.000|255.000| -1.15|993310|100|100|1|1406.537|-869.114|0.000|0.000|-175453.086|114987.661|8BUI|0.000|t|1.000|1.000| -1.16|993310|100|100|1|1406.537|-869.114|0.000|0.000|-175453.086|114987.661|32BF||t|0.000|255.000| -1.17|993310|141|87|2|1000.000|-1000.000|0.000|0.000|-175453.086|114987.661|32BF||t|0.000|255.000| -1.18|993310|10|10|2|14065.366|-8691.142|0.000|0.000|-175453.086|114987.661|8BUI|0.000|t|255.000|255.000| -1.19|993310|141|87|3|1000.000|-1000.000|0.000|0.000|-175453.086|114987.661|32BF||t|0.000|255.000| -1.2|993310|1407|869|1|100.000|-100.000|0.000|0.000|-175453.086|114987.661|8BUI|0.000|t|1.000|1.000| -1.20|993310|141|87|2|1000.000|-1000.000|0.000|0.000|-175453.086|114987.661|1BB|1.000|f||| -1.3|993310|500|500|1|281.307|-173.823|0.000|0.000|-175453.086|114987.661|8BUI|0.000|t|1.000|1.000| -1.4|993310|141|87|1|1000.000|-1000.000|0.000|0.000|-175453.086|114987.661|8BUI|0.000|t|1.000|1.000| -1.5|993310|141|87|1|1000.000|-1000.000|0.000|0.000|-175453.086|114987.661|8BSI|0.000|t|1.000|1.000| -1.6|993310|141|87|1|1000.000|-1000.000|0.000|0.000|-175453.086|114987.661|16BUI|0.000|t|1.000|1.000| -1.7|993310|1407|869|1|100.000|-100.000|0.000|0.000|-175453.086|114987.661|32BF|0.000|t|1.000|1.000| -1.8|993310|141|87|1|1000.000|-1000.000|0.000|0.000|-175453.086|114987.661|8BSI|0.000|t|1.000|1.000| -1.9|993310|141|87|1|1000.000|-1000.000|0.000|0.000|-175453.086|114987.661|16BUI|0.000|t|1.000|1.000| -2.0|||||||||||||||| -2.1|||||||||||||||| -2.2|993310|141|87|1|1000.000|-1000.000|0.000|0.000|-175400.000|115000.000|8BUI|0.000|t|255.000|255.000| -2.3|993310|141|87|1|1000.000|-1000.000|0.000|0.000|-170000.000|114988.000|8BUI|0.000|t|255.000|255.000| -2.4|993310|141|87|1|1000.000|-1000.000|0.000|0.000|-170000.000|110000.000|8BUI|0.000|t|255.000|255.000| -2.5|993310|141|87|1|1000.000|-1000.000|0.000|0.000|-179000.000|119000.000|8BUI|0.000|t|255.000|255.000| -2.6|993310|100|100|1|1406.537|-869.114|0.000|0.000|-179000.000|119000.000|8BUI|0.000|t|255.000|255.000| -2.7|993310|100|100|1|1406.537|-869.114|0.000|0.000|-179000.000|119000.000|8BUI|0.000|t|255.000|255.000| -3.0|||||||||||||||| -3.1|993310|100|100|1|1406.537|-869.114|0.000|0.000|-175453.086|114987.661|8BUI|0.000|t|255.000|255.000| -3.2|993310|100|100|1|1406.537|-869.114|0.000|0.000|-175453.086|114987.661|8BUI|0.000|t|255.000|255.000| -3.3|993310|100|100|1|1406.537|-869.114|1.000|0.000|-175565.609|114987.661|8BUI|0.000|t|255.000|255.000| -3.4|993310|100|100|1|1406.537|-869.114|0.000|1.000|-175453.086|114987.661|8BUI|0.000|t|255.000|255.000| -3.5|993310|101|101|1|1406.537|-869.114|10.000|-5.000|-176465.793|115491.747|8BUI|0.000|t|255.000|255.000| -3.6|993310|100|101|1|1406.537|-869.114|-5.000|10.000|-175453.086|114987.661|8BUI|0.000|t|255.000|255.000| -4.0|||||||||||||||| -4.1|992163|150|117|1|1000.000|-1000.000|0.000|0.000|-1898000.000|-412000.000|8BUI|0.000|t|1.000|1.000|t -4.10|993310|142|88|1|1000.000|-1000.000|0.000|0.000|-176100.000|115100.000|16BUI|0.000|t|13.000|13.000|f -4.11|993310|142|88|1|1000.000|-1000.000|0.000|0.000|-176100.000|115100.000|16BUI|0.000|t|13.000|13.000|f -4.2|992163|150|117|1|1000.000|-1000.000|0.000|0.000|-1898000.000|-412000.000|64BF|0.000|t|1.000|1.000|t -4.3|992163|150|117|1|1000.000|-1000.000|0.000|0.000|-1898000.000|-412000.000|16BUI|0.000|t|13.000|13.000|t -4.4|992163|150|117|1|1000.000|-1000.000|0.000|0.000|-1898000.000|-412000.000|16BUI||t|0.000|13.000|t -4.5|992163|150|117|1|1000.000|-1000.000|0.000|0.000|-1898000.000|-412000.000|16BUI|0.000|t|13.000|13.000|t -4.6|992163|150|117|1|1000.000|-1000.000|0.000|0.000|-1898000.000|-412000.000|16BUI||t|0.000|13.000|t -4.7|992163|150|117|1|1000.000|-1000.000|0.000|0.000|-1898000.000|-412000.000|16BUI|0.000|t|13.000|13.000|t -4.8|993310|142|88|1|1000.000|-1000.000|0.000|0.000|-176000.000|115000.000|16BUI|0.000|t|13.000|13.000|f -4.9|993310|142|88|1|1000.000|-1000.000|0.000|0.000|-176453.000|115987.000|16BUI|0.000|t|13.000|13.000|f +ERROR: rt_raster_gdal_warp: Could not create GDAL transformation object for output dataset creation
I think we can close this issue because test_gdal_configured
succeeds now, and leave the two failures for another time/ticket.
comment:9 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
It's working for me using latest postgis with latest gdal. Either your gdal package is missing the support files or postgis is not finding them.
Can you check if the package includes the EPSG files, like
gcs.csv
? In my installation they are installed in/usr/share/gdal
. If so, can you try setting the GDAL_DATA variable before running the tests with something likeGDAL_DATA=$(gdal-config --datadir) make check