[gdal-dev] convert linestring to point data

Tyler Mitchell tyler.mitchell at actian.com
Thu Jan 31 23:28:50 PST 2013


Just a brief follow up for posterity on the list...

I've completed my first run of updates on this script and it's looking pretty good.  Others welcomed to give feedback :)

It's been modularised now and also allows you to enter a field name to take the Z value from.

So Murat, it does everything you need now, so grab a fresh copy!

The only other improvement I can think of is to specify an output format and create a non-CSV output instead.  

Tyler

On 2013-01-31, at 7:45 AM, Tyler Mitchell wrote:

> Hi Murat,
> I put together a PYthon script that uses OGR, just for you actually :)
>  
> https://github.com/spatialguru/NME/blob/master/ogr_explode.py
>  
> Run it like:
> python ogr_explode.py e34c3_line.shp output.csv
>  
> 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!
>  
> Tyler
> 
> From: gdal-dev-bounces at lists.osgeo.org on behalf of Murat BEYHAN
> Sent: Thu 1/31/2013 7:41 AM
> To: gdal-dev at lists.osgeo.org
> Subject: [gdal-dev] convert linestring to point data
> 
> Dear All,
> 
> I would like to convert linestring shape (.shp) file into point shape (.shp)
> file using gdal. Is this made by gogr2ogr
> 
> ogr2ogr -f "ESRI Shapefile"  -nlt POINT e34c3_point.shp e34c3_line.shp
> I have tried this but it gives an error
> Please How can I do using command
> I do this using qgis but I have to do using command.
> Thanks
> 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
> 
> _______________________________________________
> 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

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


More information about the gdal-dev mailing list