Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Updated 7-Jan-18 5:11am
Comments
Zaf Khan 27-Nov-12 14:24pm    
What version is your Log Ascii file?
nawr0s 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
Pete Walburn 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 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

Pete Walburn 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

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900