<br><br><div class="gmail_quote">W dniu 13 sierpnia 2011 08:05 użytkownik Chaitanya kumar CH <span dir="ltr"><<a href="mailto:chaitanya.ch@gmail.com">chaitanya.ch@gmail.com</a>></span> napisał:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Mateusz,<br><br>This is what I did to process evap_OBC.asc ...<br><br>1. Run the command "gdal2xyz.py -csv evap_OBC.asc evap_OBC.csv". I got a csv file.<br>2. Edited the file evap_OBC.csv to add the line "Longitude,Latitude,Value" (without the quotes) at the beginning.<br>
</blockquote><div><br>This may be a source of problem...<br>I add in every CSV heading<br><br>Longitude,Latitude,Name<br><br>(Name instead of Value)<br><br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
3. Created a file named evap_OBC.vrt with the following content...<div class="im"><br><OGRVRTDataSource><br> <OGRVRTLayer name="evap_OBC"><br></div> <SrcDataSource>evap_OBC.csv</SrcDataSource><br>
<GeometryType>wkbPoint</GeometryType><div class="im"><br>
<GeometryField encoding="PointFromColumns" x="Longitude" y="Latitude"/><br> </OGRVRTLayer><br></OGRVRTDataSource><br></div>4. Run the command "ogr2ogr -select Value evap_OBC.shp evap_OBC.vrt". I got the file evap_OBC.shp and two other associated files.<br>
<br>In step 3, if I wanted to mention the absolute path instead of the relative path of the file 'evap_OBC.csv', I would have added the attribute 'relativeToVRT=0' to the SrcDataSource element like so.<br>
<SrcDataSource relativeToVRT="0">evap_OBC.csv</SrcDataSource></blockquote><div><br>So if I would like to insert absolute path I should add:<br> <SrcDataSource relativeToVRT="1">"/home/mateuszk/folder/evap_OBC.<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
csv"</SrcDataSource></blockquote><br><br><br>Thank You for support and patient.
</div></div>