[gdal-dev] shape file to GMT dem file

Tyler Mitchell tyler.mitchell at actian.com
Tue Jan 29 14:11:34 PST 2013


Do you have elevation data stored in the source data somewhere?  You can convert lines to points using QGIS Vector tool -> Extract Nodes, but if you do not have elevation values stored in the attribute table for the lines, it won't help you :)

Feel free to share a zipped set of files with me (directly) if you want me to take a peek.

Tyler

On 2013-01-29, at 1:28 PM, Murat BEYHAN wrote:

> Dear Mitchell, 
> Thanks for repply me. 
> As you say I have to obtain point data first. If I would able to obtain xyz data it will be easy using GMT xyz2grd. 
> But my problem I could not do that. So I produced point data using ogr2ogr command and it is drawn by qgis well 
> The picture on this mail. Lines  belongs shapefile and points belongs GMT data. But there is a problem its atribute table are null 
> and ogrinfo gives 0.0 for the field structure. So is this normal or not. And I couldn't achieve to use gdal_grid using GMT data file. 
> Do you have any idea, please. 
> Thanks 
> 
> murat at murat:~/maps$ ogr2ogr -f "GMT" -nlt point test1.gmt e34c3_n.shp 
> murat at murat:~/maps$ ogrinfo -so -al test1.gmt 
> INFO: Open of `test1.gmt' 
>       using driver `GMT' successful. 
> 
> Layer name: test1 
> Geometry: Point 
> Feature Count: 341440 
> Extent: (697857.170000, 4597069.190000) - (708674.200000, 4611236.780000) 
> Layer SRS WKT: 
> (unknown) 
> UserId: Real (0.0) 
> FNODE_: Real (0.0) 
> TNODE_: Real (0.0) 
> LPOLY_: Real (0.0) 
> RPOLY_: Real (0.0) 
> LENGTH: Real (0.0) 
> CVRGE34C3#: Integer (0.0) 
> CVRGE34C3-: Integer (0.0) 
> DETAY: String (0.0) 
> SEMBOL: Integer (0.0) 
> YUKSEKLIK: Real (0.0) 
> 
> 
> 
> 
> 
> On Tue, 29 Jan 2013 12:05:17 -0800, Tyler Mitchell wrote 
> > gdal_grid command can convert OGR to GDAL formats, but you need to only have point data. Your line shape file won't work with it. 
> > So if you can convert your lines into a set of points, and you will need a Z or elevation point or attribute to point gdal_grid to. 
> > 
> > Perhaps you already have the point data in your grass dataset that you could export to GDAL.   But I also suspect you just do all you need to in grass itself. 
> > 
> > Tyler 
> > 
> > On 2013-01-29, at 11:04 AM, Murat BEYHAN wrote: 
>> 
>> > Dear All, 
>> > 
>> > Is it possible to obtain dem grid data from shapefile using gdal or ogr. 
>> > info about shape file as follows 
>> > 
>> > murat at murat:~/maps$ ogrinfo -so -al e34c3_n.shp 
>> > INFO: Open of `e34c3_n.shp' 
>> >      using driver `ESRI Shapefile' successful. 
>> > 
>> > Layer name: e34c3_n 
>> > Geometry: Line String 
>> > Feature Count: 4047 
>> > Extent: (697857.170000, 4597069.190000) - (708674.200000, 4611236.780000) 
>> > Layer SRS WKT: 
>> > (unknown) 
>> > UserId: Real (11.0) 
>> > FNODE_: Real (11.0) 
>> > TNODE_: Real (11.0) 
>> > LPOLY_: Real (11.0) 
>> > RPOLY_: Real (11.0) 
>> > LENGTH: Real (18.5) 
>> > CVRGE34C3#: Integer (5.0) 
>> > CVRGE34C3-: Integer (5.0) 
>> > DETAY: String (12.0) 
>> > SEMBOL: Integer (3.0) 
>> > YUKSEKLIK: Real (12.3) 
>> > 
>> > I have installed and use grass, GMT and qgis,  but I'm not good at GIS. My 
>> > purpose is to obtain slope map of topographic data. 
>> > 
>> > any suggestion appreciated. 
>> > Regards 
>> > 
>> > Murat 
>> > 
>> > -- 
>> > This message has been scanned for viruses and 
>> > dangerous content by MailScanner, and is 
>> > believed to be clean. 
>> > 
>> > _______________________________________________ 
>> > gdal-dev mailing list 
>> > gdal-dev at lists.osgeo.org 
>> > http://lists.osgeo.org/mailman/listinfo/gdal-dev 
>> >
> 
> > 
> > 
> > 
> > 
> > 
> 
> > 
> >
> 
> > Tyler Mitchell 
> > Engineering Director  
> > Actian Corporation 
> >
> tyler.mitchell at actian.com 
> > 
> >
> 
> > MOBILE 250-303-1831 
> > SKYPE spatialguru 
> > www.actian.com 
> >
> 
> > 
> > -- 
> > This message has been scanned for viruses and 
> > dangerous content by MailScanner, and is 
> > believed to be clean. 
> 
> 
> Murat Beyhan 
> Jeofizik Yük. Müh. 
> T.C. 
> BAŞBAKANLIK 
> Afet ve Acil Durum Yönetimi Başkanlığı 
> Deprem Dairesi Başkanlığı 
> Eskişehir Yolu 12. Km. Lodumlu/Ankara 
> Tel:+90 (312) 2872680-1550 
> 
> 
> -- 
> This message has been scanned for viruses and 
> dangerous content by MailScanner, and is 
> believed to be clean.
> <map.jpg>



Tyler Mitchell
Engineering Director 
Actian Corporation
tyler.mitchell at actian.com

MOBILE 250-303-1831
SKYPE spatialguru
www.actian.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130129/4b6324b8/attachment-0001.html>


More information about the gdal-dev mailing list