At 08:28 AM 5/28/2007 +0100, Keiko Saito wrote: >GSHAP data (the global seismic >hazard program)? I have downloaded the raw data with PGA values and the lat >long of the grids, but when i try to import the data into arcinfo as an >ASCII GRID file, the conversion process fails
The dataset available at http://www.seismo.ethz.ch/GSHAP/global/ is in the format Longitude, Latitude, Value. It is tab-delimited with "NaN" used for NoData values. The values are written row by row, top to bottom, in increments of 0.1 degree.
This is not the same as the ESRI "ASCII GRID" format. It is readily converted, though, by stripping the first two columns, changing "NaN" to a constant numeric value, and prepending a header. The header should read
ncols 3601 nrows 1491 xllcorner -167 yllcorner -62 cellsize 0.1 nodata_value -9.9
(Use any number outside the range 0..10 for the NoData value.) The resulting grid data set will occupy 23.32 MB on the disk (according to ArcCatalog).
If you like, I can supply a command-line executable to do the conversion, or you can write one yourself. The following source code, in AWK, illustrates the procedure.
Cheers, Bill Huber Quantitative Decisions # # Convert GSHPUB.DAT to ESRI ASCII GRID export format. # BEGIN { NoData = -9.9 XLLCorner = -167 XURCorner = 193 YLLCorner = -62 YURCorner = 87 CellSize = 0.1 NCols = (XURCorner - XLLCorner )/CellSize + 1 NRows = (YURCorner - YLLCorner )/CellSize + 1
print "ncols " NCols print "nrows " NRows print "xllcorner " XLLCorner print "yllcorner " YLLCorner print "cellsize " CellSize printf("nodata_value %s", NoData) } $2 != Y { print "" Y = $2 } { if ($3 == "NaN") Z = NoData else Z = $3 printf ("%s ", Z) } ### end of file ###
_______________________________________________ gislist mailing list gislist@lists.geocomm.com http://lists.geocomm.com/mailman/listinfo/gislist
_________________________________ This list is brought to you by The GeoCommunity http://www.geocomm.com/
|