Frank,
with great pleasure I have seen the extension of the HDF driver to
use the GRing to derive corner coordinates. Just yesterday I was
trying the same based on scripts.
The problem: after a make distclean, recompile the following
happens:
gdalwarp
HDF4_EOS:EOS_GRID:"MYD10A1.A2004244.h18v04.004.2004256140521.hdf":MOD_Grid_Snow_500m:Day_Tile_Snow_Cover
test.tif
Creating output file that is 2400P x 2400L.
:0...10...20...30...40...50...60...70...80...90...100 - done.
gdalinfo test.tif
Driver: GTiff/GeoTIFF
Size is 2400, 2400
Coordinate System is:
PROJCS["unnamed",
GEOGCS["Unknown datum based upon the custom spheroid",
DATUM["unknown",
SPHEROID["unnamed",6371007.181,1]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Sinusoidal"],
PARAMETER["longitude_of_center",0],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]]]
Origin = (0.000000,5559752.598333)
Pixel Size = (463.31271653,-463.31271653)
Corner Coordinates:
Segmentation fault
(gdb) r test.tif
Starting program: /var/local/bin/gdalinfo test.tif
Driver: GTiff/GeoTIFF
Size is 2400, 2400
Coordinate System is:
PROJCS["unnamed",
GEOGCS["Unknown datum based upon the custom spheroid",
DATUM["unknown",
SPHEROID["unnamed",6371007.181,1]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Sinusoidal"],
PARAMETER["longitude_of_center",0],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]]]
Origin = (0.000000,5559752.598333)
Pixel Size = (463.31271653,-463.31271653)
Corner Coordinates:
Program received signal SIGSEGV, Segmentation fault.
0x4075c7c9 in free () from /lib/tls/libc.so.6
(gdb) bt
#0 0x4075c7c9 in free () from /lib/tls/libc.so.6
#1 0x404ef25b in pj_dalloc () from /usr/local/lib/libogdi31.so
#2 0x404fd0d8 in freeup () from /usr/local/lib/libogdi31.so
#3 0x404ee60d in pj_free () from /usr/local/lib/libogdi31.so
#4 0x404ee58b in pj_init () from /usr/local/lib/libogdi31.so
#5 0x40b5d1d5 in pj_init_plus (definition=Variable "definition" is not available.
) at pj_init.c:206
#6 0x402d8a8d in OGRProj4CT::Initialize(OGRSpatialReference*,
OGRSpatialReference*) (this=Variable "this" is not available.
)
at ogrct.cpp:478
#7 0x402d8593 in OGRCreateCoordinateTransformation(OGRSpatialReference*,
OGRSpatialReference*) (
poSource=0x8080d88, poTarget=0x807bcc8) at ogrct.cpp:353
#8 0x402d8610 in OCTNewCoordinateTransformation (hSourceSRS=0x8080d88,
hTargetSRS=0x807bcc8)
at ogrct.cpp:372
#9 0x0804a511 in GDALInfoReportCorner (hDataset=0x8052378,
corner_name=0x804a8a2 "Upper Left", x=0, y=0)
at gdalinfo.c:574
#10 0x08049b06 in main (argc=2, argv=0x804f648) at gdalinfo.c:343
I'll upload the test.tif compressed.
Best regards
Markus