<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Just a brief follow up for posterity on the list...<div><br></div><div>I've completed my first run of updates on this script and it's looking pretty good.  Others welcomed to give feedback :)</div><div><br></div><div>It's been modularised now and also allows you to enter a field name to take the Z value from.</div><div><br></div><div>So Murat, it does everything you need now, so grab a fresh copy!</div><div><br></div><div>The only other improvement I can think of is to specify an output format and create a non-CSV output instead.  </div><div><br></div><div>Tyler</div><div><br><div><div>On 2013-01-31, at 7:45 AM, Tyler Mitchell wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><title>[gdal-dev] convert linestring to point data</title>
<meta content="text/html; charset=unicode" http-equiv="Content-Type">
<meta name="GENERATOR" content="MSHTML 9.00.8112.16457">
<div>
<div dir="ltr" id="idOWAReplyText78554">
<div dir="ltr"><font color="#000000" size="2" face="Arial">Hi Murat, </font></div>
<div dir="ltr"><font size="2" face="Arial">I put together a PYthon script that uses OGR, just for you actually :)</font></div>
<div dir="ltr"><font size="2" face="Arial"></font> </div>
<div dir="ltr"><a href="https://github.com/spatialguru/NME/blob/master/ogr_explode.py">https://github.com/spatialguru/NME/blob/master/ogr_explode.py</a></div>
<div dir="ltr"> </div>
<div dir="ltr">Run it like:</div>
<div dir="ltr">python ogr_explode.py e34c3_line.shp output.csv</div>
<div dir="ltr"> </div>
<div dir="ltr">It doesn't automatically create a shape file but you can convert from CSV to a shapefile with one more step.  But let me know first if this works for you.  Depending on how the Z or 3D dimension is stored, it may only have zeros in the third column of the CSV.  Try it and let me know!</div>
<div dir="ltr"> </div>
<div dir="ltr">Tyler</div></div>
<div dir="ltr"><br>
<hr tabindex="-1">
<font size="2" face="Tahoma"><b>From:</b> <a href="mailto:gdal-dev-bounces@lists.osgeo.org">gdal-dev-bounces@lists.osgeo.org</a> on behalf of Murat BEYHAN<br><b>Sent:</b> Thu 1/31/2013 7:41 AM<br><b>To:</b> <a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br><b>Subject:</b> [gdal-dev] convert linestring to point data<br></font><br></div>
<div><p><font size="2">Dear All,<br><br>I would like to convert linestring shape (.shp) file into point shape (.shp)<br>file using gdal. Is this made by gogr2ogr<br><br>ogr2ogr -f "ESRI Shapefile"  -nlt POINT e34c3_point.shp e34c3_line.shp<br>I have tried this but it gives an error<br>Please How can I do using command<br>I do this using qgis but I have to do using command.<br>Thanks<br>Murat<br><br><br>--<br>This message has been scanned for viruses and<br>dangerous content by MailScanner, and is<br>believed to be clean.<br><br>_______________________________________________<br>gdal-dev mailing list<br><a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></font></p></div></div>_______________________________________________<br>gdal-dev mailing list<br><a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>http://lists.osgeo.org/mailman/listinfo/gdal-dev</blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><br class="Apple-interchange-newline"><br></div><div><div style="text-align: left; "><table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="width: 1036px; position: static; z-index: auto; "><tbody><tr><td valign="top" style="padding-top: 0in; padding-right: 0in; padding-bottom: 0in; padding-left: 0in; "><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; line-height: 12pt; "><b><span style="font-size: 10pt; font-family: Arial, sans-serif; color: black; ">Tyler Mitchell</span></b><b><span style="font-size: 10pt; font-family: Arial, sans-serif; color: black; "><o:p></o:p></span></b></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; line-height: 12pt; "><span style="font-size: 10pt; font-family: Arial, sans-serif; color: rgb(102, 102, 102); ">Engineering Director <br>Actian Corporation</span><br></div></td></tr><tr style="height: 9pt; "><td valign="top" style="padding-top: 0in; padding-right: 0in; padding-bottom: 0in; padding-left: 0in; height: 9pt; "><font class="Apple-style-span" color="#0000ff" face="Arial, sans-serif"><span class="Apple-style-span" style="font-size: 13px; line-height: 16px; "><u><a href="mailto:tyler.mitchell@actian.com">tyler.mitchell@actian.com</a><br></u></span></font><br></td></tr><tr><td valign="top" style="padding-top: 0in; padding-right: 0in; padding-bottom: 0in; padding-left: 0in; "><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; line-height: 12pt; "><span class="Apple-style-span" style="font-family: Calibri, sans-serif; font-size: 15px; "><span style="font-size: 10pt; font-family: Arial, sans-serif; color: rgb(0, 150, 186); ">MOBILE </span></span><span class="Apple-style-span" style="font-family: Calibri, sans-serif; font-size: 15px; "><span style="font-size: 10pt; font-family: Arial, sans-serif; color: rgb(102, 102, 102); ">250-303-1831</span></span></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; line-height: 12pt; "><span style="font-size: 10pt; font-family: Arial, sans-serif; color: rgb(0, 150, 186); ">SKYPE</span><span style="font-size: 10pt; font-family: Arial, sans-serif; color: rgb(102, 102, 102); "> spatialguru</span><span style="font-size: 10pt; font-family: Arial, sans-serif; color: rgb(31, 73, 125); "><br></span><a href="http://www.actian.com/" target="_blank" style="color: blue; text-decoration: underline; "><span style="font-size: 10pt; font-family: Arial, sans-serif; color: rgb(227, 102, 36); ">www.actian.com<br></span></a></div></td></tr></tbody></table></div></div></span></span></div></span></div></span></span>
</div>
<br></div></body></html>