[GRASS-user] /usr/lib/grass/scripts/r.in.wms: line 439:
/usr/lib/grass/etc/r.in.wms/r.in.gdalwarp: Argument list too long
Hamish
hamish_b at yahoo.com
Wed May 27 02:29:08 EDT 2009
Paulo wrote:
> I was starting a project that needed a lot of srtms.
>
> So I though: Let's use the WMS!
>
> there I went, set region:
> rows: 82800
> cols: 57600
> cells: 4769280000
that is really really huge. Are you running 64bit ?
better would be to do it as a set of smaller tiles,
> so, 4673 GTIFF files later, I got this error:
> /usr/lib/grass/scripts/r.in.wms: line 439:
> /usr/lib/grass/etc/r.in.wms/r.in.gdalwarp: Argument list too long
>
> now the qiestions:
> 1. what happened?
r.in.gdalwarp input= :
"Raster file or files to be imported. If multiple files are
specified they will be patched together."
often the command line limit will be like 4096 chars. with 4673 map
files it just won't work.
> 2. how to overcome this?
smaller mouthfuls.
I thought there was something in /proc/sys/kernel which would give you
the limit but I'm not sure.
I would guess the effective max limit of input maps is about 200-500,
depending on name length.
> I have thought to manually join all 4673 files, but then
> there has to
> be a (much) better way. I am open to suggestions.
SRTM tiles are widely available as 1deg x 1deg chunks or bigger.
Use them instead of NASA's WMS.
by the way, the first thing it says on the OnEarth WMS web page is:
http://wms.jpl.nasa.gov/
"ATTENTION:
Due to server overloading, client applications are strongly advised to use the existing tile datasets wherever possible, as described in the Tiled WMS or Google Earth KML support
Frequent and repetitive requests for non-cached, small WMS tiles require an excessive amount of server resources and will be blocked in order to preserve server functionality. The OnEarth server is an experimental technology demonstrator and does not have enough resources to support these requests.
An alternative solution already exists in the form of tiled WMS
While sets of tiles with different sizes and alignment can be added when needed, for large datasets the duplication of storage, processing and data management resources is prohibitive."
ie the science divisions of many large US gov't departments are still
not funded very well, and we should take efforts not to abuse them.
Download tiles instead for such a big job... then maybe use r.patch
to combine them into 5x5 degree tiles. Processing should be much more
accurate and faster too.
you can set up some wget, curl, lftp, httrack script to download them
all for you. see the MODIS(?) grass wiki page for a hint.
Hamish
More information about the grass-user
mailing list