Subscribe to this thread
Home - General / All posts - Connect two lat longs with a line
davebic9 post(s)
#05-Feb-21 14:59

This is something that seems pretty simple on the surface but for the life of me I can’t figure out how to do it. I have a table of horizontal oil and gas wells that have two lat long fields, surface hole location and bottom hole location, I would like to have a line connect the two that represents an approximation of the well path. I assume I use transform for this operation. Can anybody help me with this? Thanks in advance.

142 post(s)
#05-Feb-21 15:12

Hi Dave, I believe you can find helpful information in this thread: Joining point geometries to form a line


508 post(s)
#05-Feb-21 16:58

I assume that you have a table that contains both lat/lon positions and a geom field. You can then simply use the transform pane.

After that, create a drawing based on the table.

This is the SQL that does all the work.


  [geom] = GeomMakeSegment(VectorMakeX2(Coalesce([lonA], 0), Coalesce([latA], 0)), VectorMakeX2(Coalesce([lonB], 0), Coalesce([latB], 0)));




davebic9 post(s)
#09-Feb-21 02:48

Worked perfect. Thanks,

847 post(s)
#07-Feb-21 18:49

IF you are in Texas, and

IF you are looking at old well data, then

the Texas Railroad Commission has all those "horizontal" lines drawn for you. Go to their website, find the county to download, and get the shape files.

88 post(s)
#09-Feb-21 04:18

this is true. Texas RRC and other states have the surface and the bottom hole locations as well as the lines. I have done some work for other folks that use Manifold and they asked me to draw those lines because particular states do not have that data. So, posting this solution is very helpful to folks in oil/gas for this type of problem. Thanks.

Manifold User Community Use Agreement Copyright (C) 2007-2019 Manifold Software Limited. All rights reserved.