Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
Hi
 
I need to have a Log ASCII Standard (LAS) file import routine for my Windows application so that I can import LAS files and associate the depth values with other data in my application.
 
I'm not sure if there is source code for this purpose readily available or not, but any help would be much appreciated. My application is in C#, but the importer can be in most other languages as I will (hopefully) be able to translate it.
 
Thanks,
 
Pete.
Posted 27-Nov-12 4:05am
Comments
Zaf Khan at 27-Nov-12 14:24pm
   
What version is your Log Ascii file?
nawr0s at 11-Sep-13 15:33pm
   
Hi Pete,
 
I saw your response to this post and I actually need the LAS loading application. Can you please send me the solution to (al.norris@ymail.com)?
 
Thank you,
N
Member 3717149 at 29-Nov-12 7:07am
   
I have version 1.2, 2.0 and 3.0 - I probably need to be able to import from all versions, but version 3.0 is probably the most important just now.
Zaf Khan at 29-Nov-12 13:21pm
   
Hello Pete,
 
Thank you for your reply, I have to be honest and admit I know nothing of drilling or wells or bores, but i'm prety sure I can import the data from a flat file,
 
After a quick glance at the file found on the CWLS website I have created a rough structure outline for the data fields, which i have included below. I may to shuffle some of the structures around but unless you can provide the data structure classes in which to persist the imported data, I will create structures based upon the outline below and you may need to cross reference them into the application structures you already have in your application.
 
Listing: Please exscuse any typo's as i roughed the file out in notepad,
and i've listed it here just to show how i broke down the LAS V3 document structure
 
Additionaly, Im having problems pasting stuff into these boxes,
so much so that i had to delete two posts.
So there is a possibility the formatting maybe all screwed up because of my in-experience on this website.
 
DataRules
Version
Wrap
Delimiter
DataRules
 
Well
StartIndex
EndIndex
Step
Null
Company
Field
Location
Country
Provovince
ServiceCompany
Date
UniqueWellId
Licence
ApplicationId
Latitude
Longitude
GeodaticDatum
UTMLocation
Well
 
LogParams
Runs
RunX where X is the run number
Runs
 
ZonedParams
NuetronMatrixDepthIntervalX where X is the run number
DensityMatrixDepthIntervalX where X is the run number
ZonedParams
 
ServiceCompanyParams
MaterialX 'type of material at depth X
MaterialDensityX 'density of material at depth X
ServiceCompanyParams
 
RunXParams 'parameters that occur once for each run
RunDepth
RunDate
DepthRef
DepthElevationRef
TotalDepthLogger
TotalDepthDriller
CasingBottomLogger
CasingBottomDriller
CasingSize
CasingWeight
BitSize
MudType
MudSource
MudDensity
MudViscosity
FluidLoss
PhFactor ' assume mud PH value
MudResistivity
MudTemperature
MudFiltrateResistivity
MudFiltrateTemperature
MudCakeResistivity
MudCakeTemperature
MaximumRecordedTemperature
CirculationStoppedDateTime
LoggerTaggedBottomDateTime
LoggingUnitId
LoggingHomeBase
LoggingRecordedBy
LoggingRecordedWitness
RunXParams
LogParams
 

 

'Im not sure about the meaning of some of the field names in this section
LogDefinition
Depth
DepthTransiTime 'SonicTransitTime
RHOB 'BulkDensity
NPHI 'NuetronPorosity
SFLU 'some form of shallow depth resistivity
SFLA 'some form of shallow depth resistivity
ILM 'some form of medium depth resistivity
ILD 'some form of deep depth resistivity
YoungsModules
CoreDescription
2D_Channels_Array
2DArrayElement
Element1
Element2
Element3
Element4
Element5
2DArrayElement
2D_Channels_Array
LogDefinition
 

 
DrillingDefinition
Depth
DepthCummulativeIncrement
HoursOfDriling
RateOfPenetration
WeightOnBit
RotationsPerMinute 'RPM
TorqueAmps
PumpPressure
TotalStrokesPerMinute
GallonsPerMinute
EffectiveCirculationDensity
TotalBarrelsReturned
DrillingDefinition
 

 
DrillingData
TO BE FINALISED
DrillingData
 

 
CoreDefinition
TO BE FINALISED
CoreDefinition
 

CoreDataX
TO BE FINALISED - One set of core data for each run
CoreDataX
 

InclinometryDefinition
MeasuredDepth
TrueVerticalDepth
BoreholeAzimuth
BoreholeDeviation
InclinometryDefinition
 
InclinometryData
TO BE FINALISED
InclinometryData
 
TestDefinition
TestDefNumber
TestDefTop
TestDefBottom
TestDefRecoveryDescription
TestDefFinalShutInPressure
TestDefBlowDescription
TestDefinition
 
TestData
TO BE FINALISED
TestData
 
TOPSDefinition
TOPSName
TOPSTopDepth
TOPSBottomDepth
TOPSData
TO BE FINALISED
TOPSData
TOPSDefinition
 

LogData
TO BE FINALISED
LogData
V3_LAS_Import_Structure
 
Member 3717149 at 30-Nov-12 4:56am
   
That's brilliant. I don't have structures for the LAS data in my application as yet. I currently have structures for storing pressure, temperature and time and so I need to be able to import LAS files to match up the depth valuse with the time values in my existing structures. So, I guess I'll have a structure for storing time and depth and will need to plot the pressure and temperature against depth rather than time (which I currently do). Not that you really need to know this - your structures will be great.
 
Pete
Zaf Khan at 4-Dec-12 7:55am
   
Hello again Pete,
 
I'm having some issues with the sample log ascii file im using to test the import routine. If its at all possible please provide 2 or 3 sample files I can import.
 
The issue im having is that some of the field names in the sample file do not comply with the information in the LAS 3 PDF which is at http://www.cwls.org/docs/LAS_3_File_Structure.PDF
 
its to do with the spacing between the end of the last character in the fieldname and the following period after the field name.
 
You can email the LAS 3.0 sample files in a zip to my member account here.
 
Thanks,
Pete Walburn at 7-Dec-12 10:17am
   
Hi,
 
I've only just had another look at this thread - I don't seem to be receiving emails when someone replies.
 
Maybe I'm blind, but I can't see how to send an email to our member account. I've zipped up a few LAS 3.0 files, but don't know where to send them.
 
Pete
Zaf Khan at 7-Dec-12 14:32pm
   
Hello Pete,
 
No i dont hink your blind, its just not an easy thing to find,
I tried to find out myself and spent close to an hour looking through the help (which isnt helpful)...
 
So i have posted this question here...
how to message another user
 
So when i get an answer there, i will be able to tell you how (if its possible at all) to message another user.
 
You can always contact me via www.drzed.com on the contact page and then i can send you my email address and recive the zipped sample log ascii files.
 
in the meantime i have emailed some of the websites that deal with that area (mining and logging and so far have recieved the ONLY following reply from one of sevral parties.
 
Basically I requested a DEFINITIVE list of the Mnemonics used in the log ascii standard v.30
 
REPLY
=====
Hi – LAS version 3.0 definition is at www.cwls.org . However most people use version 2.x. Recommended formats for both are on that site - ~V ~W, ~C, ~A are typical section designators for an LAS file. Others are documented on the XWLS site. The curve name mneumonics (eg ILD, SP, GR) are not part of the standard and are designated by the logging service company, digitizing company, or software user. There is no definitive list. Google ``log curve``+nmeumonic to find the current list from some service companies, but these are not up to date or complete, and may not be online.
 

 
Best Regards
Ross
 
Member 8790159 at 10-Jul-13 16:24pm
   
Hi Zaf and Pete..Were you able to implement that importer?I'm currently using LAS files in my application, and I have to convert them into flat files in order to import them..Can you help me on that since you already dealed with that..It would me very appreciated..Thanks
Pete Walburn at 18-Jul-13 9:43am
   
Hi,
 
I have an application (mainly written by Zaf) that allows the selection of a LAS file and then imports the dile and parses it into separate string and outputs into a listbox for display. It should be very easy to modify the code to put the data into any required structures.
 
The solution is written in C# in Visual Studio 2010. I have a zipped up file that I could send to you, but I'm not too sure how to get it to you.
 
Pete
Member 8790159 at 18-Jul-13 10:19am
   
Hi Pete,
Thank you so much.Can you send it to me via my hotmail adress (irnados@hotmail.com)..Or if it's too big,can you share it on dropbox.
Thanks again!

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Hi Guys,
 
I too am looking into creating a reader for LAS files.
Rather than reinvent the wheel Would it be possible to send me the code.
quentin.samuelson@royhill.com.au
 
Thanks
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 363
1 OriginalGriff 354
2 George Jonsson 248
3 Shemeemsha RA 148
4 Animesh Datta 130
0 OriginalGriff 6,179
1 Sergey Alexandrovich Kryukov 5,616
2 CPallini 4,770
3 George Jonsson 3,400
4 Gihan Liyanage 2,522


Advertise | Privacy | Mobile
Web03 | 2.8.140916.1 | Last Updated 17 Jul 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100