r.in.gdal unclean import of southern UTM zone
|Reported by:||hamish||Owned by:|
after bringing in a GeoTiff? georef'd to UTM 48S with r.in.gdal I get a errors when trying to open the map:
WARNING: Raster map <Multichrom.red@user1> is in different zone (-48) than current region (48) WARNING: Unable to open raster map <Multichrom.red@user1> ERROR: Unable to open raster map <Multichrom.red>
location was created manually using the text based g.setproj.
r.in.gdal gave the "projection parameters appear to match" message.
G65> g.region -p projection: 1 (UTM) zone: 48 ... G65> g.proj -p -PROJ_INFO------------------------------------------------- name : UTM datum : wgs84 towgs84 : 0.000,0.000,0.000 proj : utm ellps : wgs84 a : 6378137.0000000000 es : 0.0066943800 f : 298.2572235630 south : defined zone : 48
GRASS 6.5svn, GDAL 1.5.2-3~bpo40+1 on Debian/etch.
... Coordinate System is: PROJCS["WGS 84 / UTM zone 48S", GEOGCS["WGS 84", DATUM["WGS_1984", ...
manually editing the $MAPSET/cellhd/ files to make the zone: line positive "fixes" it.
should the lib fn's automatically translate a cellhd negative zone number into PROJ_INFO's zone:+south: keys? cellhd can not use "south:" for utm zone as that's already used for the raster's southern bound. Should those two be allowed to get out of sync or is it less bad to just ignore the sign of the zone number in the raster's cellhd? If lib/gis/rd_cellhd.c is modified to allow negative zone numbers note that the uninit'd value of -1 would have to be adjusted to -255 or something outside the legal range.