-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Hi @woensug-choi,
I tried using the Bathymetry_Converter tool to convert custom bathymetry .tif
files (downloaded from GEBCO and other sources) into a model usable for Gazebo simulation.
# Bathymetry Converter - automation script
###################################################################
PREFIX = 'MontereyBay'
SOURCE = 'bathymetry_source/gebco4.tif'
# Flag for single tile generation
ONE_TILE_AT_ORIGIN = True
# Mesh simplification level (0 ~ 3)
SIMPLIFICATION_LEVEL = 0
# Range
STARTLON = 84.8041667
STARTLAT = 8.5250000
ENDLON = 88.6250000
ENDLAT = 12.5041667
# Resolution
DLON = 0.004166666666667
DLAT = 0.004166666666667
OVERLON = 0.0005
OVERLAT = 0.0005
###################################################################
However, when using files other than the example ones provided in the tutorial, I encountered the following error during the conversion process:
ERROR 1: Ungridded dataset: At line 92, Y spacing was 469.489210. Expected 469.018320
0%| | 0/1 [00:13<?, ?it/s]
Traceback (most recent call last):
File "/home/mkbathy/workdir/mkbathy.py", line 155, in <module>
gdal.Translate(filename + '.tif', filename + '.asc', options='-of GTiff -a_srs EPSG:3857')
File "/opt/conda/envs/mkbathy/lib/python3.10/site-packages/osgeo/gdal.py", line 491, in Translate
return TranslateInternal(destName, srcDS, opts, callback, callback_data)
File "/opt/conda/envs/mkbathy/lib/python3.10/site-packages/osgeo/gdal.py", line 4674, in TranslateInternal
return _gdal.TranslateInternal(*args)
ValueError: Received a NULL pointer.
Steps to Reproduce
- Use a
.tif
bathymetry file from GEBCO (or other non-tutorial sources). - Attempt to convert using Bathymetry_Converter.
- Encounter GDAL error and crash.
Additional Information
- The files provided with the tutorial (for example, Monterey Bay) work fine.
- Other
.tif
files, trigger the above errors. - I am using:
- Ubuntu 22.04
- GDAL installed
- ROS 2 Humble
- Gazebo Harmonic
Request
Could you please guide if:
- There are any pre-processing steps required for the
.tif
files before feeding them to Bathymetry_Converter? - Or if the tool currently expects a specific formatting or spacing of the raster grids?
Also, if helpful, I am attaching the .tif
file here that causes the issue:
Gebco TIF File Link
Noaa TIF File Link
Thank you for this tool! Looking forward to your response.
Metadata
Metadata
Assignees
Labels
No labels