<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri, sans-serif" size="2">
<div>Hello GDAL Experts,</div>
<div>We have a grid dataset that is in WGS84 decimal-second coordinates. The first problem is that when we run gdalinfo against this data, the coordinates systems comes out wrong i.e in decimal degrees rather than in decimal seconds:</div>
<div> </div>
<div>bash-2.05$ gdalinfo -noct /users/ds57201a/user3/rbda/de/uka30qs/dlu/grd/aa_ds_1</div>
<div>Driver: AIG/Arc/Info Binary Grid</div>
<div>Files: /users/ds57201a/user3/rbda/de/uka30qs/dlu/grd/aa_ds_1</div>
<div>       /users/ds57201a/user3/rbda/de/uka30qs/dlu/grd/aa_ds_1.aux.xml</div>
<div>       /users/ds57201a/user3/rbda/de/uka30qs/dlu/grd/aa_ds_1/hdr.adf</div>
<div>       /users/ds57201a/user3/rbda/de/uka30qs/dlu/grd/aa_ds_1/metadata.xml</div>
<div>       /users/ds57201a/user3/rbda/de/uka30qs/dlu/grd/aa_ds_1/prj.adf</div>
<div>       /users/ds57201a/user3/rbda/de/uka30qs/dlu/grd/aa_ds_1/w001001.adf</div>
<div>       /users/ds57201a/user3/rbda/de/uka30qs/dlu/grd/aa_ds_1/w001001x.adf</div>
<div>       /users/ds57201a/user3/rbda/de/uka30qs/dlu/grd/aa_ds_1/dblbnd.adf</div>
<div>       /users/ds57201a/user3/rbda/de/uka30qs/dlu/grd/aa_ds_1/sta.adf</div>
<div>       /users/ds57201a/user3/rbda/de/uka30qs/dlu/grd/aa_ds_1/vat.adf</div>
<div>Size is 1324, 936</div>
<div>Coordinate System is:</div>
<div>GEOGCS["WGS 84",</div>
<div>    DATUM["WGS_1984",</div>
<div>        SPHEROID["WGS 84",6378137,298.257223563,</div>
<div>            AUTHORITY["EPSG","7030"]],</div>
<div>        TOWGS84[0,0,0,0,0,0,0],</div>
<div>        AUTHORITY["EPSG","6326"]],</div>
<div>    PRIMEM["Greenwich",0,</div>
<div>        AUTHORITY["EPSG","8901"]],</div>
<div>    UNIT["degree",0.0174532925199433,</div>
<div>        AUTHORITY["EPSG","9108"]],</div>
<div>    AUTHORITY["EPSG","4326"]]</div>
<div>Origin = (5.984444444444445,50.945000000000000)</div>
<div>Pixel Size = (0.000277777777778,-0.000277777777778)</div>
<div>Corner Coordinates:</div>
<div>Upper Left  (   5.9844444,  50.9450000) (  5d59' 4.00"E, 50d56'42.00"N)</div>
<div>Lower Left  (   5.9844444,  50.6850000) (  5d59' 4.00"E, 50d41' 6.00"N)</div>
<div>Upper Right (   6.3522222,  50.9450000) (  6d21' 8.00"E, 50d56'42.00"N)</div>
<div>Lower Right (   6.3522222,  50.6850000) (  6d21' 8.00"E, 50d41' 6.00"N)</div>
<div>Center      (   6.1683333,  50.8150000) (  6d10' 6.00"E, 50d48'54.00"N)</div>
<div> </div>
<div>Source SRS should look like this:</div>
<div>GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["arc-second",0.000004848136811095,AUTHORITY["EPSG","9104"]],AUTHORITY["EPSG","4326"]]</div>
<div> </div>
<div>We know for sure that the data is in DS and not DD</div>
<div> </div>
<div>Now the real problem comes when we want to warp this dataset to a different SRS. Since GDAL already reads a wrong SRS on the input data, all transformations end up wrong. We tried to override this by forcing a source coordinate systems on the data using
gdal_translate, but to no avail:</div>
<div> </div>
<div>gdal_translate -of vrt -a_srs /users/ds57201a/user1/uka/ukatiler/config/projections/ds_4326.prj aachen.vrt test.vrt</div>
<div> </div>
<div>ds_4326.prj wkt:</div>
<div>GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["arc-second",0.000004848136811095,AUTHORITY["EPSG","9104"]],AUTHORITY["EPSG","4326"]]</div>
<div> </div>
<div>gdalwarp --debug on -wm 500 -wo SKIP_NOSOURCE=YES -wo NUM_THREADS=ALL_CPUS -wo OPTIMIZE_SIZE=TRUE -tr 1.0 1.0 -of vrt -s_srs ds_4326.prj -t_srs ds_4258.prj vrt_with_target_srs.vrt</div>
<div> </div>
<div>That command generated this result:</div>
<div> </div>
<div>GDAL: GDALOpen(/users/ds57201a/user3/rbda/de/uka30qs/dlu/grd/617bc9d0-52ce-11e3-9de2-f1b38c98f22b/uka_parameter/vrt_with_source_srs.vrt, this=44f20) succeeds as VRT.</div>
<div>OGRCT: PROJ >= 4.8.0 features enabled</div>
<div>OGRCT: Wrap source at 6.16833.</div>
<div>OGRCT: Source: +proj=longlat +ellps=WGS84 +no_defs</div>
<div>OGRCT: Target: +proj=longlat +ellps=GRS80 +no_defs</div>
<div>OGRCT: Wrap target at 6.16833.</div>
<div>OGRCT: Source: +proj=longlat +ellps=GRS80 +no_defs</div>
<div>OGRCT: Target: +proj=longlat +ellps=WGS84 +no_defs</div>
<div>OGRCT: Wrap source at 6.16833.</div>
<div>OGRCT: Source: +proj=longlat +ellps=WGS84 +no_defs</div>
<div>OGRCT: Target: +proj=longlat +ellps=GRS80 +no_defs</div>
<div>OGRCT: Wrap target at 6.16833.</div>
<div>OGRCT: Source: +proj=longlat +ellps=GRS80 +no_defs</div>
<div>OGRCT: Target: +proj=longlat +ellps=WGS84 +no_defs</div>
<div>Creating output file that is 0P x 0L.</div>
<div>ERROR 1: Attempt to create 0x0 dataset is illegal,sizes must be larger than zero.</div>
<div> </div>
<div>Gdalinfo on the warped dataset(when I don’t get the above error) shows this:</div>
<div>Corner Coordinates:</div>
<div>- Upper Left  (   30301.000,  187402.000) (Invalid angle,Invalid angle)</div>
<div>Lower Left  (   30301.000,  178241.000) (Invalid angle,Invalid angle)</div>
<div>Upper Right (   39346.000,  187402.000) (Invalid angle,Invalid angle)</div>
<div>Lower Right (   39346.000,  178241.000) (Invalid angle,Invalid angle)</div>
<div>Center      (   34823.500,  182821.500) (Invalid angle,Invalid angle)</div>
<div> </div>
<div>Is there anyone who has experienced the same thing or  knows how to deal with data in decimal seconds within GDAL?</div>
<div> </div>
<div> </div>
<div>Thanks and regards</div>
<div>Moses</div>
<div> </div>
</font>
</body>
</html>