# Draw a line between 2 different items on separate shape files

**URL:** <https://community.thinkgeo.com/t/draw-a-line-between-2-different-items-on-separate-shape-files/2247>\
**Category:** WinForms\
**Created:** [May 27, 2013, 5:26pm UTC](https://community.thinkgeo.com/t/draw-a-line-between-2-different-items-on-separate-shape-files/2247 "2013-05-27T17:26:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Scott1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@Scott1](https://community.thinkgeo.com/u/Scott1)\
**Post date:** [May 27, 2013, 5:26pm UTC](https://community.thinkgeo.com/t/draw-a-line-between-2-different-items-on-separate-shape-files/2247/1 "2013-05-27T17:26:46Z")

</div>

&nbsp;Hello,&nbsp;I&nbsp;have&nbsp;2&nbsp;different&nbsp;shape&nbsp;files&nbsp;I&nbsp;am&nbsp;loading.&nbsp;One&nbsp;is&nbsp;the&nbsp;locations&nbsp;of&nbsp;the&nbsp;top&nbsp;of&nbsp;a&nbsp;well,&nbsp;the&nbsp;other&nbsp;is&nbsp;the&nbsp;locations&nbsp;of&nbsp;the&nbsp;wells&nbsp;bottoms.&nbsp;Most&nbsp;of&nbsp;the&nbsp;wells&nbsp;are&nbsp;straight&nbsp;down&nbsp;so&nbsp;the&nbsp;top&nbsp;and&nbsp;bottom&nbsp;are&nbsp;on&nbsp;the&nbsp;same&nbsp;spot.&nbsp;But&nbsp;in&nbsp;some&nbsp;cases&nbsp;the&nbsp;wells&nbsp;are&nbsp;slanted&nbsp;and&nbsp;they&nbsp;are&nbsp;not.&nbsp;What&nbsp;I&nbsp;am&nbsp;looking&nbsp;to&nbsp;do&nbsp;is&nbsp;draw&nbsp;a&nbsp;line&nbsp;between&nbsp;those&nbsp;wells&nbsp;that&nbsp;are&nbsp;slanted.&nbsp;In&nbsp;some&nbsp;cases&nbsp;I&nbsp;will&nbsp;have&nbsp;a&nbsp;survey&nbsp;that&nbsp;will&nbsp;plot&nbsp;the&nbsp;line&nbsp;out&nbsp;between&nbsp;the&nbsp;two,&nbsp;but&nbsp;in&nbsp;many&nbsp;cases&nbsp;it&nbsp;will&nbsp;be&nbsp;a&nbsp;staight&nbsp;line.&nbsp;

How&nbsp;would&nbsp;I&nbsp;go&nbsp;about&nbsp;doing&nbsp;this&nbsp;with&nbsp;your&nbsp;map&nbsp;suite?&nbsp;

---

<div class="post-metadata">

**Author:** ![Johnny](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/johnny/32/19044_2.png) [@Johnny](https://community.thinkgeo.com/u/Johnny)\
**Post date:** [May 28, 2013, 9:02am UTC](https://community.thinkgeo.com/t/draw-a-line-between-2-different-items-on-separate-shape-files/2247/2 "2013-05-28T09:02:48Z")

</div>

Hi&nbsp;Scott,  
&nbsp;  
Thanks&nbsp;for&nbsp;your&nbsp;post,&nbsp;but&nbsp;I&nbsp;am&nbsp;sorry&nbsp;to&nbsp;say&nbsp;that&nbsp;I&nbsp;didn’t&nbsp;understand&nbsp;”&nbsp;In&nbsp;some&nbsp;cases&nbsp;I&nbsp;will&nbsp;have&nbsp;a&nbsp;survey&nbsp;that&nbsp;will&nbsp;plot&nbsp;the&nbsp;line&nbsp;out&nbsp;between&nbsp;the&nbsp;two,&nbsp;but&nbsp;in&nbsp;many&nbsp;cases&nbsp;it&nbsp;will&nbsp;be&nbsp;a&nbsp;staight&nbsp;line.”&nbsp;Would&nbsp;you&nbsp;please&nbsp;provide&nbsp;us&nbsp;an&nbsp;illustration&nbsp;picture&nbsp;to&nbsp;understand&nbsp;it&nbsp;better&nbsp;or&nbsp;any&nbsp;other&nbsp;information&nbsp;is&nbsp;appreciated.  
&nbsp;  
Waiting&nbsp;for&nbsp;your&nbsp;further&nbsp;information  
&nbsp;  
Johnny

---

<div class="post-metadata">

**Author:** ![Scott1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@Scott1](https://community.thinkgeo.com/u/Scott1)\
**Post date:** [May 28, 2013, 10:52am UTC](https://community.thinkgeo.com/t/draw-a-line-between-2-different-items-on-separate-shape-files/2247/3 "2013-05-28T10:52:07Z")

</div>

Thank&nbsp;you&nbsp;for&nbsp;your&nbsp;resoponce,&nbsp;I&nbsp;will&nbsp;try&nbsp;an&nbsp;clear&nbsp;up&nbsp;my&nbsp;question&nbsp;a&nbsp;little.&nbsp;

The&nbsp;image&nbsp;below&nbsp;shows&nbsp;2&nbsp;scenarios.&nbsp;Both&nbsp;drawings,&nbsp;left&nbsp;and&nbsp;right&nbsp;have&nbsp;5&nbsp;wells&nbsp;each,&nbsp;4&nbsp;of&nbsp;them&nbsp;are&nbsp;drilled&nbsp;straight&nbsp;down&nbsp;so&nbsp;the&nbsp;top&nbsp;and&nbsp;bottom&nbsp;locations&nbsp;are&nbsp;in&nbsp;the&nbsp;same&nbsp;spot.&nbsp;1&nbsp;of&nbsp;them&nbsp;on&nbsp;each&nbsp;side&nbsp;is&nbsp;a&nbsp;slant&nbsp;well&nbsp;drilled&nbsp;on&nbsp;an&nbsp;angle,&nbsp;so&nbsp;the&nbsp;top&nbsp;and&nbsp;bottom&nbsp;have&nbsp;different&nbsp;locations.

The&nbsp;image&nbsp;on&nbsp;the&nbsp;left&nbsp;I&nbsp;have&nbsp;circled&nbsp;the&nbsp;slant&nbsp;well&nbsp;with&nbsp;the&nbsp;top&nbsp;and&nbsp;bottom&nbsp;in&nbsp;a&nbsp;different&nbsp;position.&nbsp;There&nbsp;is&nbsp;no&nbsp;survey&nbsp;so&nbsp;we&nbsp;do&nbsp;not&nbsp;know&nbsp;the&nbsp;path&nbsp;that&nbsp;was&nbsp;taken&nbsp;to&nbsp;drill&nbsp;the&nbsp;hole&nbsp;so&nbsp;we&nbsp;just&nbsp;want&nbsp;to&nbsp;draw&nbsp;a&nbsp;straight&nbsp;line&nbsp;between&nbsp;the&nbsp;top&nbsp;of&nbsp;the&nbsp;well&nbsp;and&nbsp;the&nbsp;bottom.

The&nbsp;image&nbsp;on&nbsp;the&nbsp;right&nbsp;we&nbsp;do&nbsp;have&nbsp;a&nbsp;survey&nbsp;that&nbsp;tells&nbsp;us&nbsp;coordinats&nbsp;of&nbsp;the&nbsp;path&nbsp;taken&nbsp;to&nbsp;reach&nbsp;the&nbsp;bottom&nbsp;of&nbsp;the&nbsp;well&nbsp;so&nbsp;we&nbsp;will&nbsp;want&nbsp;to&nbsp;draw&nbsp;that&nbsp;path&nbsp;between&nbsp;the&nbsp;top&nbsp;of&nbsp;the&nbsp;well&nbsp;and&nbsp;the&nbsp;bottom.

&nbsp;

 ![](https://community.thinkgeo.com/uploads/default/original/2X/d/d1492758718e401641846d5613dabc5451022d5b.jpg)&nbsp;

&nbsp;

[Well\_shapefile\_question.jpg](https://community.thinkgeo.com/uploads/default/original/2X/d/d1492758718e401641846d5613dabc5451022d5b.jpg) (12.6 KB)

---

<div class="post-metadata">

**Author:** ![Howard](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/h/90ced4/32.png) [@Howard](https://community.thinkgeo.com/u/Howard)\
**Post date:** [May 30, 2013, 2:30am UTC](https://community.thinkgeo.com/t/draw-a-line-between-2-different-items-on-separate-shape-files/2247/4 "2013-05-30T02:30:08Z")

</div>

&nbsp;Hi&nbsp;Scott,

&nbsp;  
This&nbsp;is&nbsp;an&nbsp;interesting&nbsp;scenario.&nbsp;please&nbsp;see&nbsp;the&nbsp;attached&nbsp;sample,&nbsp;hope&nbsp;it&nbsp;gives&nbsp;you&nbsp;an&nbsp;idea&nbsp;to&nbsp;implement&nbsp;this&nbsp;scenario.&nbsp;

 ![](https://community.thinkgeo.com/uploads/default/original/2X/6/6d4b11c21188d86496d7c0e1218af7626e401e3c.png)  
&nbsp;  
In&nbsp;the&nbsp;sample,&nbsp;I'm&nbsp;not&nbsp;sure&nbsp;what&nbsp;would&nbsp;be&nbsp;the&nbsp;relationship&nbsp;between&nbsp;the&nbsp;top&nbsp;well&nbsp;spots&nbsp;and&nbsp;bottom&nbsp;well&nbsp;spots.&nbsp;I&nbsp;assume&nbsp;that&nbsp;the&nbsp;same&nbsp;well&nbsp;has&nbsp;same&nbsp;"RECID"&nbsp;value&nbsp;in&nbsp;the&nbsp;two&nbsp;seperate&nbsp;shapefiles.&nbsp;Maybe&nbsp;in&nbsp;the&nbsp;real&nbsp;scenario,&nbsp;it&nbsp;might&nbsp;be&nbsp;the&nbsp;same&nbsp;location&nbsp;etc.  
&nbsp;  
On&nbsp;the&nbsp;other&nbsp;hand,&nbsp;if&nbsp;there&nbsp;are&nbsp;too&nbsp;many&nbsp;wells,&nbsp;we&nbsp;need&nbsp;to&nbsp;consider&nbsp;the&nbsp;performance&nbsp;as&nbsp;well,&nbsp;maybe&nbsp;the&nbsp;track&nbsp;between&nbsp;the&nbsp;bottom&nbsp;and&nbsp;top&nbsp;should&nbsp;be&nbsp;pre-generated&nbsp;before&nbsp;running&nbsp;the&nbsp;app.&nbsp;In&nbsp;this&nbsp;case,&nbsp;we&nbsp;don't&nbsp;need&nbsp;to&nbsp;build&nbsp;the&nbsp;track&nbsp;dynamically&nbsp;and&nbsp;it&nbsp;enhances&nbsp;the&nbsp;performance&nbsp;alot.  
&nbsp;  
Hope&nbsp;it&nbsp;makes&nbsp;sense.  
&nbsp;  
Thanks,  
Howard  
  
[WellTracks.zip](https://community.thinkgeo.com/uploads/default/original/2X/3/32a882edb4a78a458450a47f1ad143f01d81cabc.zip) (14.6 KB)

---

<div class="post-metadata">

**Author:** ![Scott1](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/7feea3/32.png) [@Scott1](https://community.thinkgeo.com/u/Scott1)\
**Post date:** [May 30, 2013, 9:46am UTC](https://community.thinkgeo.com/t/draw-a-line-between-2-different-items-on-separate-shape-files/2247/5 "2013-05-30T09:46:52Z")

</div>

Thank&nbsp;you&nbsp;for&nbsp;your&nbsp;reply&nbsp;Howard,&nbsp;I&nbsp;think&nbsp;this&nbsp;will&nbsp;give&nbsp;me&nbsp;a&nbsp;great&nbsp;starting&nbsp;point.

---

<div class="post-metadata">

**Author:** ![Johnny](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/johnny/32/19044_2.png) [@Johnny](https://community.thinkgeo.com/u/Johnny)\
**Post date:** [June 3, 2013, 10:12am UTC](https://community.thinkgeo.com/t/draw-a-line-between-2-different-items-on-separate-shape-files/2247/6 "2013-06-03T10:12:54Z")

</div>

Hi&nbsp;Scott,&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;You&nbsp;are&nbsp;always&nbsp;welcome,&nbsp;if&nbsp;you&nbsp;have&nbsp;any&nbsp;more&nbsp;question,&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;me&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Best&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Johnny&nbsp;
