# Create a Polyline shapefile from lat lon

**URL:** <https://mapwindow.discourse.group/t/create-a-polyline-shapefile-from-lat-lon/951>\
**Category:** Uncategorized\
**Created:** [March 19, 2021, 2:40am UTC](https://mapwindow.discourse.group/t/create-a-polyline-shapefile-from-lat-lon/951 "2021-03-19T02:40:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lang](https://avatars.discourse-cdn.com/v4/letter/l/0ea827/32.png) [@lang](https://mapwindow.discourse.group/u/lang)\
**Post date:** [March 19, 2021, 2:40am UTC](https://mapwindow.discourse.group/t/create-a-polyline-shapefile-from-lat-lon/951/1 "2021-03-19T02:40:31Z")

</div>

Hi Pmeem,

Can we create a polyline (I mean multiple line) shapefile? Any code to share? I can create a shapefile with a single line.

Thanks!

---

<div class="post-metadata">

**Author:** ![lang](https://avatars.discourse-cdn.com/v4/letter/l/0ea827/32.png) [@lang](https://mapwindow.discourse.group/u/lang)\
**Post date:** [March 21, 2021, 8:12pm UTC](https://mapwindow.discourse.group/t/create-a-polyline-shapefile-from-lat-lon/951/2 "2021-03-21T20:12:34Z")

</div>

Nobpdy has any thing to share with creating polyline shapefile?  
lang

---

<div class="post-metadata">

**Author:** ![jerryfaust](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/jerryfaust/32/378_2.png) [@jerryfaust](https://mapwindow.discourse.group/u/jerryfaust)\
**Post date:** [March 29, 2021, 5:48am UTC](https://mapwindow.discourse.group/t/create-a-polyline-shapefile-from-lat-lon/951/3 "2021-03-29T05:48:24Z")

</div>

Hello @lang

It’s not quite clear what you’re asking. If you simply want to create a Shapefile with multiple Shapes, each of which is a polyline, you can refer to the sample code to [create a Polygon shapefile](https://www.mapwindow.org/documentation/mapwingis4.9/_create_polygon_shapefile_8cs-example.html), with the only difference being that the Shapes you add would be polylines instead.

On the other hand, if you’re asking about multi-part polylines, where a single shape can consist of multiple parts, I don’t have a sample off-hand, but it would involve either the set\_Part or InsertPart methods of the Shape class, which you would call while adding points to the Shape.

I hope that helps.  
Jerry.

---

<div class="post-metadata">

**Author:** ![lang](https://avatars.discourse-cdn.com/v4/letter/l/0ea827/32.png) [@lang](https://mapwindow.discourse.group/u/lang)\
**Post date:** [April 4, 2021, 4:30pm UTC](https://mapwindow.discourse.group/t/create-a-polyline-shapefile-from-lat-lon/951/4 "2021-04-04T16:30:40Z")

</div>

Hi Jerry,  
Thanks for the guidance! I’ll do accordingly and let you know the result.  
lang

---

<div class="post-metadata">

**Author:** ![pmeems](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/pmeems/32/9_2.png) [@pmeems](https://mapwindow.discourse.group/u/pmeems)\
**Post date:** [January 13, 2022, 3:40pm UTC](https://mapwindow.discourse.group/t/create-a-polyline-shapefile-from-lat-lon/951/5 "2022-01-13T15:40:34Z")

</div>


