[gdal-dev] save raster as point-vector file
Chaitanya kumar CH
chaitanya.ch at gmail.com
Sat Aug 13 02:05:57 EDT 2011
This is what I did to process evap_OBC.asc ...
1. Run the command "gdal2xyz.py -csv evap_OBC.asc evap_OBC.csv". I got a csv
2. Edited the file evap_OBC.csv to add the line "Longitude,Latitude,Value"
(without the quotes) at the beginning.
3. Created a file named evap_OBC.vrt with the following content...
<GeometryField encoding="PointFromColumns" x="Longitude"
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.
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.
2011/8/13 Mateusz Kędzior <matandked at gmail.com>
> Hi Chaitanya,
> I send only raster (without XYZ data).
> Best regards,
> W dniu 12 sierpnia 2011 16:02 użytkownik Chaitanya kumar CH <
> chaitanya.ch at gmail.com> napisał:
>> Send me a couple of your raster files. I'll process them and create a
>> step-by-step instructions including all the scripts I used.
>> 2011/8/12 Mateusz Kędzior <matandked at gmail.com>
>>> Hi Chaitanya,
>>> but there is no example with CSV file stored in local hard disc.
>>> I see an example with shp file - there is no full path to it...
>>> but as I tell, when I leave only filename of CSV and use ogrinfo tool on
>>> such VRT file, I get information about empty file without any geometry or
>>> tables on it.
>>> Best regards,
>>>> Refer to OGR's VRT format driver page.
>> Best regards,
>> Chaitanya kumar CH.
>> 17.2416N 80.1426E
Chaitanya kumar CH.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev