bugra9 / gdal3.js

Convert raster and vector geospatial data to various formats and coordinate systems entirely in the browser.
https://gdal3.js.org
GNU Lesser General Public License v2.1
300 stars 45 forks source link

Unknown option name '-a_ullr' #53

Closed mumumi closed 7 months ago

mumumi commented 1 year ago

When converting a png file without srs to a tif file with srs, we can use the command: gdal_translate in.png out.tif -a_srs EPSG:4326 -a_ullr ulx uly lrx lry ERROR 6: Unknown option name '-a_ullr' was thrown from gdal3.js

mumumi commented 1 year ago

Or any way to set coordinateTransform of a dataset?

you-knowww commented 10 months ago

I had the same issue and figured this out after much trial and error. The syntax for -a_ullr is like this: [ '-of', 'PDF', '-a_srs', 'EPSG:4326', '-a_ullr', ulx.toString(), uly.toString(), lrx.toString(), lry.toString()]

bugra9 commented 7 months ago

@you-knowww, thanks for the solution.