So I just tried the above commands on a brand new Ubuntu 22.04 install.
When I did "sudo add-apt-repository ppa:ubuntugis/ppa" I got this error:

E: The repository 'https://ppa.launchpadcontent.net/ubuntugis/ppa/ubuntu jammy
Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore
disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration
details.

All the other commands worked but I guess they used another repo.
https://pastebin.com/CkXUf3Si is the output I got back when I did the sudo
apt-get install stuff (I tried to add it as an attachment to the email but
apparently mailman rejects messages with attachments > 100kb).

Anyway, after all that, I'm still getting the same error.

I can make a video, from start to finish, showing the issue. I install
Ubuntu 22.04 on WSL2 from the Windows App Store and then I tell Ubuntu what
username I want to use and then I type in the commands. And then I copy the
TIF into the shared directory (\\wsl.localhost\Ubuntu-22.04\home\ubuntu)
and then I try the gdal2tiles command...

On Wed, Nov 9, 2022 at 4:24 PM Even Rouault <even.roua...@spatialys.com>
wrote:

> The GDAL version from ppa:ubuntugis/ppa on Ubuntu 20.04 is:
>
> GDAL 3.3.2, released 2021/09/01
>
> So there must be a mix of GDAL versions on your system if you have GDAL
> 3.4.3
> Le 09/11/2022 à 23:13, Terra Frost a écrit :
>
> I installed the GDAL suite of tools by doing the following:
>
> sudo add-apt-repository ppa:ubuntugis/ppa
> sudo apt-get update
> sudo apt-get install gdal-bin
> sudo apt-get install libgdal-dev
>
> I'm running Ubuntu 20.04 and when I do gdal2tiles --version I get "GDAL
> 3.4.3, released 2022/04/22"
>
> On Wed, Nov 9, 2022 at 11:01 AM Even Rouault <even.roua...@spatialys.com>
> wrote:
>
>> Terra,
>>
>> you didn't specify how you got GDAL and PROJ, and which versions of those
>> you use.
>>
>> Make sure to solve the "proj_create_from_database: Cannot find proj.db"
>> error. Check if the PROJ_LIB environment is set and if it points to the
>> directory where proj.db is placed
>>
>> The "free(): invalid pointer" error could also suggest that you have
>> several PROJ versions that are linked at runtime by GDAL.
>>
>> Even
>> Le 09/11/2022 à 17:54, Terra Frost a écrit :
>>
>> I have two TIFs that I'm able to run gdal2tiles on without issue,
>> however, when I do gdal_merge I am unable to do gdal2tiles on the
>> result. When I did gdal_merge on the two TIFs I got this warning:
>>
>> Warning 1: PROJ: proj_create_from_database: Cannot find proj.db
>> Warning 1: The definition of projected CRS EPSG:3857 got from GeoTIFF
>> keys is not the same as the one from the EPSG registry, which may cause
>> issues during reprojection operations. Set GTIFF_SRS_SOURCE configuration
>> option to EPSG to use official parameters (overriding the ones from GeoTIFF
>> keys), or to GEOKEYS to use custom values from GeoTIFF keys and drop the
>> EPSG code.
>> Warning 1: PROJ: proj_create_from_database: Cannot find proj.db
>> Warning 1: The definition of projected CRS EPSG:3857 got from GeoTIFF
>> keys is not the same as the one from the EPSG registry, which may cause
>> issues during reprojection operations. Set GTIFF_SRS_SOURCE configuration
>> option to EPSG to use official parameters (overriding the ones from GeoTIFF
>> keys), or to GEOKEYS to use custom values from GeoTIFF keys and drop the
>> EPSG code.
>> 0...10...20...30...40...50...60...70...80...90...100 - done.
>>
>>
>> Despite the warning the two TIFs merged without issue, however, when I
>> try to run gdal2tiles on the merged TIF I get this error:
>>
>> Traceback (most recent call last):
>>   File "/usr/bin/gdal2tiles.py", line 16, in <module>
>>     sys.exit(main(sys.argv))
>>   File "/usr/lib/python3/dist-packages/osgeo_utils/gdal2tiles.py", line
>> 3314, in main
>>     single_threaded_tiling(input_file, output_folder, options)
>>   File "/usr/lib/python3/dist-packages/osgeo_utils/gdal2tiles.py", line
>> 3229, in single_threaded_tiling
>>     conf, tile_details = worker_tile_details(input_file, output_folder,
>> options)
>>   File "/usr/lib/python3/dist-packages/osgeo_utils/gdal2tiles.py", line
>> 3145, in worker_tile_details
>>     gdal2tiles.open_input()
>>   File "/usr/lib/python3/dist-packages/osgeo_utils/gdal2tiles.py", line
>> 1797, in open_input
>>     self.warped_input_dataset = reproject_dataset(
>>   File "/usr/lib/python3/dist-packages/osgeo_utils/gdal2tiles.py", line
>> 987, in reproject_dataset
>>     to_dataset = gdal.AutoCreateWarpedVRT(from_dataset,
>>   File "/usr/lib/python3/dist-packages/osgeo/gdal.py", line 3976, in
>> AutoCreateWarpedVRT
>>     return _gdal.AutoCreateWarpedVRT(*args)
>> RuntimeError: Cannot find coordinate operations from
>> `ENGCRS["WGS_1984_Web_Mercator_Auxiliary_Sphere",EDATUM[""],CS[Cartesian,2],AXIS["easting",east,ORDER[1],LENGTHUNIT["metre",1,ID["EPSG",9001]]],AXIS["northing",north,ORDER[2],LENGTHUNIT["metre",1,ID["EPSG",9001]]]]'
>> to `EPSG:3857'
>> free(): invalid pointer
>> Aborted
>>
>>
>> When I do gdalinfo on the merged TIF I get this:
>>
>> Corner Coordinates:
>> Upper Left  (-10880978.065, 3538629.874)
>> Lower Left  (-10880978.065, 3537702.774)
>> Upper Right (-10880302.765, 3538629.874)
>> Lower Right (-10880302.765, 3537702.774)
>> Center      (-10880640.415, 3538166.324)
>>
>> When I do gdalinfo on the two TIFs that I merged I get this:
>>
>> Upper Left  (-10880811.355, 3538629.874)
>> Lower Left  (-10880811.355, 3538052.574)
>> Upper Right (-10880302.755, 3538629.874)
>> Lower Right (-10880302.755, 3538052.574)
>> Center      (-10880557.055, 3538341.224)
>>
>>
>> ...and...
>>
>> Upper Left  (-10880978.065, 3538273.090)
>> Lower Left  (-10880978.065, 3537702.790)
>> Upper Right (-10880474.265, 3538273.090)
>> Lower Right (-10880474.265, 3537702.790)
>> Center      (-10880726.165, 3537987.940)
>>
>>
>> Any ideas?
>>
>> _______________________________________________
>> gdal-dev mailing 
>> listgdal-dev@lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>> -- http://www.spatialys.com
>> My software is free, but my time generally not.
>>
>> -- 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

Reply via email to