<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi I tried out some different ways an at the end I chose this way, not
python but you use the same commands I guess.<br>
<br>
<br>
-Concatenate four shapefiles:<br>
ogr2ogr filemerged.shp mdv07xx1.shp <br>
ogr2ogr -update -append filemerged.shp mdv07xx1.shp -nln filemerged<br>
ogr2ogr -update -append filemerged.shp mdv07xx2.shp -nln filemerged<br>
ogr2ogr -update -append filemerged.shp mdv07xx3.shp -nln filemerged<br>
ogr2ogr -update -append filemerged.shp mdv07xx4.shp -nln filemerged<br>
<br>
-Create an ARC/INFO textfile with one pixel representing the
window/region of intrest:<br>
<br>
the text file window.asc contains the following:<br>
<br>
ncols         1<br>
nrows         1<br>
xllcorner     1283000<br>
yllcorner     6403000<br>
cellsize      30000<br>
NODATA_value  -9999<br>
0<br>
<br>
-Increase the resolution on the ARC/Info window and convert i to Geotif:<br>
gdal_translate window.asc -of GTiff  -outsize 300 300
window_high_res.tif<br>
<br>
-Rasterize the shapefile onto the Geotif:<br>
gdal_rasterize -a shapefile_field_name -l _shape_file_layer
filemerged.shp window_high_resolution.tif<br>
<br>
-And last convert the high res Geotif to an ARC/Info ascii file:<br>
gdal_translate -of AAIGrid height_high_res.tif height_high_res.asc<br>
<br>
<br>
Good luck!<br>
<br>
-Jonas<br>
<br>
<pre class="moz-signature" cols="72">¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
Jonas Malmqvist
FS Dynamics AB
Jungmansgatan 31
SE-413 11 Göteborg
Sweden
Phone: +46 (0)31 720 71 45
Fax:   +46 (0)31 761 99 49
E-mail:        <a class="moz-txt-link-abbreviated" href="mailto:jonas.malmqvist@fsdynamics.se">jonas.malmqvist@fsdynamics.se</a>
</pre>
<br>
<br>
Oz Nahum wrote:
<blockquote
 cite="mid:6ec71d090909060407r3f7dbe60o9c233bd6cd4621eb@mail.gmail.com"
 type="cite">
  <div dir="ltr">Hi, <br>
I've been using gdal-rasterize for quite a while now in my python
scripts. It only posses on difficulty to me, since it forces me to use
the tiff format I need to create a template before creating the raster.
  <br>
Does any one know of a quick way of doing the template? Alternatively,
can I use other pathway to create ascii raster from shape files with
out the creation of templates ?<br>
  <br>
Can someone direct me to a python solution ? <br>
  <br>
Many thanks, <br>
Oz Nahum<br>
Graduate Student<br>
Center for Applied Geosciences<br>
University of Tuebingen<br clear="all">
  <br>
-- <br>
----<br>
           Imagine there's no countries<br>
           It isn't hard to do<br>
           Nothing to kill or die for<br>
           And no religion too<br>
           Imagine all the people<br>
           Living life in peace <br>
  <br>
  <br>
  </div>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></pre>
</blockquote>
</body>
</html>