I have a folder with numerous .asc raster files that each accompanied by a corresponding .prj file. The file basename is the same for both files. The projection however can vary between all of them (they are currently in various different UTM projection).
What I want to achieve is to standardize the projection of all those individual raster files.My current approach is this bash-script
#!/bin/bashecho Starting Conversion to WGS84for f in *.asc; do echo Converting "$f"; echo To "${f%.asc}_wgs84.tif"; gdalwarp "$f" "${f%.asc}_wgs84.tif" -t_srs "+proj=longlat +ellps=WGS84"; doneecho Conversion finishedHowever the script fails for each file returning:
While typing this I am also working on a python script, which however does not seem to be as straight-forward as bash.
Help appreciated
call: gdalinfo grid2000.ascIt seems to fail even at the end?
Driver: AAIGrid/Arc/Info ASCII GridFiles: grid2000.asc grid2000.prjSize is 16, 16Coordinate System is
ROJCS["WGS_1984_UTM_Zone_30N", GEOGCS["GCS_WGS_1984", DATUM["WGS_1984", SPHEROID["WGS_84",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT["Degree",0.017453292519943295]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-3], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["Meter",1]]Origin = (565146.201264380943030,680158.854243048001081)Pixel Size = (30.000000000000000,-30.000000000000000)invalid request to pj_param, fatal
أكثر...
What I want to achieve is to standardize the projection of all those individual raster files.My current approach is this bash-script
#!/bin/bashecho Starting Conversion to WGS84for f in *.asc; do echo Converting "$f"; echo To "${f%.asc}_wgs84.tif"; gdalwarp "$f" "${f%.asc}_wgs84.tif" -t_srs "+proj=longlat +ellps=WGS84"; doneecho Conversion finishedHowever the script fails for each file returning:
"Invalid request to pj_param, fatal"
So I would like to see a bunch of reprojected .tif (or any other format) files that all have the same projection.
While typing this I am also working on a python script, which however does not seem to be as straight-forward as bash.
Help appreciated
call: gdalinfo grid2000.ascIt seems to fail even at the end?
Driver: AAIGrid/Arc/Info ASCII GridFiles: grid2000.asc grid2000.prjSize is 16, 16Coordinate System is
أكثر...