[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"blog-\u002Fblog\u002Fuwi-to-gps-oil-gas-developer-guide":3},{"id":4,"title":5,"author":6,"body":7,"category":555,"cover":556,"date":557,"description":558,"extension":559,"meta":560,"navigation":561,"path":562,"seo":563,"stem":564,"tags":565,"__hash__":570},"blog\u002Fblog\u002Fuwi-to-gps-oil-gas-developer-guide.md","UWI to GPS: The O&G Developer's Guide to Unique Well Identifier Conversion","Township Canada",{"type":8,"value":9,"toc":537},"minimark",[10,19,22,27,30,35,124,137,140,144,147,155,161,169,172,175,183,195,203,207,210,225,231,238,246,250,253,258,265,268,272,282,289,293,306,310,321,325,328,332,340,343,359,362,368,372,380,433,436,443,447,455,463,471,479,483,486,502,506,509,526,533],[11,12,13,14,18],"p",{},"Your production database has 40,000 wells. Every record carries a Unique Well Identifier, something like ",[15,16,17],"code",{},"100\u002F06-32-048-07W5\u002F00",", and you need GPS coordinates for all of them. Maybe you're building a well-location dashboard, feeding a proximity model, or preparing a regulatory submission that requires a coordinates schedule. The UWI has the location encoded right inside it, but your downstream systems need latitude and longitude.",[11,20,21],{},"This guide covers how to extract the DLS location from a UWI, convert it to GPS coordinates using Township Canada, and scale that conversion from a single well to tens of thousands: through the web app, the Batch API, or directly in Snowflake SQL.",[23,24,26],"h2",{"id":25},"how-a-uwi-encodes-a-dls-location","How a UWI Encodes a DLS Location",[11,28,29],{},"A UWI is not an arbitrary tracking number. It encodes the well's surface location as a legal land description in the identifier itself. The format has three segments separated by slashes:",[11,31,32],{},[33,34,17],"strong",{},[36,37,38,54],"table",{},[39,40,41],"thead",{},[42,43,44,48,51],"tr",{},[45,46,47],"th",{},"Segment",[45,49,50],{},"Value",[45,52,53],{},"Meaning",[55,56,57,69,80,91,102,113],"tbody",{},[42,58,59,63,66],{},[60,61,62],"td",{},"Event sequence",[60,64,65],{},"100",[60,67,68],{},"Well type code (100 = oil well)",[42,70,71,74,77],{},[60,72,73],{},"LSD",[60,75,76],{},"06",[60,78,79],{},"Legal Subdivision 6 within the section",[42,81,82,85,88],{},[60,83,84],{},"Section",[60,86,87],{},"32",[60,89,90],{},"Section 32",[42,92,93,96,99],{},[60,94,95],{},"Township",[60,97,98],{},"048",[60,100,101],{},"Township 48",[42,103,104,107,110],{},[60,105,106],{},"Range",[60,108,109],{},"07W5",[60,111,112],{},"Range 7, West of the 5th Meridian",[42,114,115,118,121],{},[60,116,117],{},"Event suffix",[60,119,120],{},"00",[60,122,123],{},"First well event at this location",[11,125,126,127,130,131,136],{},"The middle segment, ",[15,128,129],{},"06-32-048-07W5",", is a standard ",[132,133,135],"a",{"href":134},"\u002Flearn\u002Fsystems\u002Fdls","DLS legal land description",". It pinpoints a specific 40-acre parcel: LSD 6 of Section 32, Township 48, Range 7, West of the 5th Meridian. That's near Drayton Valley in central Alberta, in a producing area of the Pembina oil field.",[11,138,139],{},"Every Alberta Energy Regulator (AER) well licence, every Petrinex production record, and every SK Ministry well file uses this same UWI structure. If you can parse the UWI, you can extract the surface location from any well record in western Canada without consulting an external database.",[23,141,143],{"id":142},"licence-format-vs-lsd-format","Licence Format vs. LSD Format",[11,145,146],{},"Not all UWIs look the same in practice. Two common formats circulate through production databases and regulatory exports:",[11,148,149,152,153],{},[33,150,151],{},"Slash-delimited (standard):"," ",[15,154,17],{},[11,156,157,158,160],{},"This is the canonical format from AER and Saskatchewan regulatory systems. The slashes clearly separate the three segments. Extracting the location means dropping the first segment (event sequence) and the last segment (event suffix), leaving ",[15,159,129],{},".",[11,162,163,152,166],{},[33,164,165],{},"Compact (no delimiters):",[15,167,168],{},"10006320480700",[11,170,171],{},"Some legacy databases and data vendors strip the slashes, hyphens, and meridian direction letter, compressing the UWI into a continuous numeric string. Parsing this requires knowing the fixed field widths: 3 digits for the event sequence, 2 for LSD, 2 for section, 3 for township, 2 for range, and 2 for the event suffix. The meridian is encoded differently depending on the system. Some embed it in the range field, others use a separate position.",[11,173,174],{},"A third variant appears in NTS-referenced areas of BC outside the Peace River block:",[11,176,177,152,180],{},[33,178,179],{},"NTS-based UWI:",[15,181,182],{},"100\u002F094B-12-A\u002F00",[11,184,185,186,189,190,194],{},"Here, the location segment ",[15,187,188],{},"094B-12-A"," is a ",[132,191,193],{"href":192},"\u002Flearn\u002Fsystems\u002Fnts","National Topographic System"," reference rather than a DLS reference. NTS-based UWIs are common for exploration wells in northern and central BC under the BC Energy Regulator. The extraction logic is the same (strip the event sequence and suffix), but the resulting location needs an NTS-to-GPS converter rather than a DLS one.",[11,196,197,198,202],{},"Township Canada parses all three formats. Enter a full UWI, and the converter identifies the location segment, validates it, and returns GPS coordinates. For the ",[132,199,201],{"href":200},"\u002Flearn\u002Fsystems\u002Fuwi","full UWI format reference",", including event sequence codes, suffix conventions, and zero-padding rules, the learn page covers every field in detail.",[23,204,206],{"id":205},"converting-a-single-uwi-to-gps","Converting a Single UWI to GPS",[11,208,209],{},"The simplest case: you have one UWI from a well licence and need GPS coordinates for a field visit or a regulatory cross-reference.",[11,211,212,213,215,216,220,221,224],{},"Enter the DLS location segment from the UWI, ",[15,214,129],{},", into the ",[132,217,219],{"href":218},"\u002F","Township Canada converter",". The result: approximately ",[33,222,223],{},"52.68°N, 114.93°W",", with the 40-acre parcel boundary rendered on the map. That's enough to confirm the well is in the Pembina field area west of Drayton Valley and to send coordinates to a field crew's navigation device.",[11,226,227,228,230],{},"You can also enter the full UWI (",[15,229,17],{},") directly. The converter strips the event sequence and suffix automatically.",[11,232,233],{},[234,235],"img",{"alt":236,"src":237},"Search by full UWI on the Energy Wells layer and open the well popup with licence, status, and operator details","\u002Fimages\u002Fblog\u002Fuwi-to-gps-oil-gas-developer-guide\u002Fwell-uwi-map-popup.png",[11,239,240,241,245],{},"For reverse lookups (you have GPS coordinates from a field device and need to confirm which LSD the well sits in), enter the coordinates and get back the corresponding legal land description. This is a common verification step when auditing well records: does the GPS position from the as-built survey match the LSD on the licence? The ",[132,242,244],{"href":243},"\u002Flearn\u002Fhow-to\u002Fgps-to-legal-land-description","GPS to legal land description guide"," walks through the reverse workflow.",[23,247,249],{"id":248},"handling-edge-cases-in-uwi-data","Handling Edge Cases in UWI Data",[11,251,252],{},"Production databases rarely contain clean, uniform UWI data. Here are the cases that trip up conversion workflows and how to handle them.",[254,255,257],"h3",{"id":256},"horizontal-and-directional-wells","Horizontal and Directional Wells",[11,259,260,261,264],{},"The UWI encodes the ",[33,262,263],{},"surface location",": where the wellhead sits on the ground. For horizontal wells, the bottom-hole location (where the wellbore terminates in the reservoir) can be in a completely different LSD, sometimes a different section or township entirely. A Montney horizontal well with a surface UWI in LSD 06-32-048-07W5 might have a bottom-hole location 3 km away in LSD 14-33-048-07W5.",[11,266,267],{},"When converting UWIs to GPS for a well map, the resulting coordinates represent the surface hole: the wellhead, not the toe of the lateral. If your analysis needs bottom-hole locations, those are tracked separately in regulatory databases (AER's ST37 report, for example) and require their own conversion pass.",[254,269,271],{"id":270},"re-entries-and-multi-event-wells","Re-entries and Multi-Event Wells",[11,273,274,275,277,278,281],{},"The event suffix distinguishes multiple wells at the same surface location. ",[15,276,17],{}," is the original well; ",[15,279,280],{},"100\u002F06-32-048-07W5\u002F02"," is a second well drilled from the same pad. Both UWIs resolve to the same GPS coordinates because they share a surface location. This is expected behaviour, not a data error.",[11,283,284,285,288],{},"For sidetrack wells (suffix ",[15,286,287],{},"01","), the surface coordinates are also identical to the parent well. The difference is downhole, not at surface.",[254,290,292],{"id":291},"fps-grid-wells-in-bc-and-the-nwt","FPS Grid Wells in BC and the NWT",[11,294,295,296,300,301,305],{},"Wells in the Northwest Territories and parts of northern BC use the ",[132,297,299],{"href":298},"\u002Flearn\u002Fsystems\u002Ffps","Federal Permit System (FPS) grid"," rather than DLS or NTS. FPS-based well identifiers follow a different structure, and conversion requires the ",[132,302,304],{"href":303},"\u002Fbc-nts-converter","BC NTS converter"," or the FPS-specific lookup. If your dataset spans multiple provinces or territories, expect a mix of DLS, NTS, and FPS location formats embedded in the UWI location segments.",[254,307,309],{"id":308},"multi-zone-wellbore-identifiers","Multi-Zone Wellbore Identifiers",[11,311,312,313,316,317,320],{},"Some legacy databases append zone designators or completion identifiers to the UWI. A record might appear as ",[15,314,315],{},"100\u002F06-32-048-07W5\u002F00 CARDIUM"," or ",[15,318,319],{},"100\u002F06-32-048-07W5\u002F00-C",". The location segment is the same. Only the completion metadata differs. When bulk-processing, strip trailing text after the event suffix before passing to a converter. Township Canada handles most common suffixed formats, but non-standard appended text can cause parse failures that show up in batch error reports.",[23,322,324],{"id":323},"batch-uwi-conversion-for-large-datasets","Batch UWI Conversion for Large Datasets",[11,326,327],{},"Single lookups work for a handful of wells. When you need coordinates for thousands of records (an annual well audit, a regional study, a database migration), you need batch processing.",[254,329,331],{"id":330},"csv-upload-through-the-web-app","CSV Upload Through the Web App",[11,333,334,335,339],{},"The ",[132,336,338],{"href":337},"\u002Fguides\u002Fbatch-conversion","batch conversion tool"," accepts a CSV file with a column of legal land descriptions (extracted from UWIs) and returns GPS coordinates for every row. Upload 5,000 DLS locations, get 5,000 coordinate pairs back in seconds. The output includes a processing summary that flags any descriptions that failed to resolve, catching transposition errors, invalid range numbers, or malformed inputs before they propagate downstream.",[11,341,342],{},"For a dataset of 12,000 wells from an AER public data extract, the workflow is:",[344,345,346,350,353,356],"ol",{},[347,348,349],"li",{},"Export the UWI column from your database",[347,351,352],{},"Parse out the DLS location segments (strip event sequence and suffix)",[347,354,355],{},"Upload the resulting CSV to the batch converter",[347,357,358],{},"Download results as CSV, Shapefile, GeoJSON, or KML",[11,360,361],{},"The batch converter also supports enrichment options: administrative boundaries (province, municipality), oil and gas field names, and soil characteristics. Toggle these on during conversion to get additional context columns alongside coordinates.",[11,363,364],{},[234,365],{"alt":366,"src":367},"Upload a CSV of well licence locations and convert them all at once","\u002Fimages\u002Fguides\u002Fbatch-conversion.webp",[254,369,371],{"id":370},"snowflake-sql-integration","Snowflake SQL Integration",[11,373,374,375,379],{},"If your well data lives in Snowflake, exporting to CSV and reimporting is a workflow you should not have to maintain. The ",[132,376,378],{"href":377},"\u002Fblog\u002Fsnowflake-dls-enrichment","Township Canada Snowflake integration"," runs DLS-to-GPS conversion directly inside SQL:",[381,382,387],"pre",{"className":383,"code":384,"language":385,"meta":386,"style":386},"language-sql shiki shiki-themes material-theme-lighter vitesse-light vitesse-dark","SELECT\n    well_id,\n    uwi,\n    TOWNSHIP_CONVERT(uwi_location):latitude::FLOAT AS latitude,\n    TOWNSHIP_CONVERT(uwi_location):longitude::FLOAT AS longitude\nFROM wells\nWHERE province = 'Alberta';\n","sql","",[15,388,389,397,403,409,415,421,427],{"__ignoreMap":386},[390,391,394],"span",{"class":392,"line":393},"line",1,[390,395,396],{},"SELECT\n",[390,398,400],{"class":392,"line":399},2,[390,401,402],{},"    well_id,\n",[390,404,406],{"class":392,"line":405},3,[390,407,408],{},"    uwi,\n",[390,410,412],{"class":392,"line":411},4,[390,413,414],{},"    TOWNSHIP_CONVERT(uwi_location):latitude::FLOAT AS latitude,\n",[390,416,418],{"class":392,"line":417},5,[390,419,420],{},"    TOWNSHIP_CONVERT(uwi_location):longitude::FLOAT AS longitude\n",[390,422,424],{"class":392,"line":423},6,[390,425,426],{},"FROM wells\n",[390,428,430],{"class":392,"line":429},7,[390,431,432],{},"WHERE province = 'Alberta';\n",[11,434,435],{},"No Python script, no CSV export, no broken data lineage. The function processes rows in batches of 100 through the Township Canada API and returns coordinates inline. A 12,000-row wells table processes in about two minutes.",[11,437,334,438,442],{},[132,439,441],{"href":440},"\u002Fguides\u002Fsnowflake-external-function","Snowflake External Function setup guide"," covers the full configuration: Lambda deployment, API Gateway, IAM roles, and Snowflake integration objects. A Databricks equivalent using a Python UDF is also documented in the same guide.",[254,444,446],{"id":445},"search-api-for-custom-integrations","Search API for Custom Integrations",[11,448,449,450,454],{},"For developers building UWI conversion into internal tools (a well-data pipeline, a field dispatch application, a regulatory filing system), the ",[132,451,453],{"href":452},"\u002Fapi","Township Canada API"," provides direct HTTP access to the same conversion engine:",[381,456,461],{"className":457,"code":459,"language":460},[458],"language-text","GET \u002Fapi\u002Fsearch?q=06-32-048-07W5\n","text",[15,462,459],{"__ignoreMap":386},[11,464,465,466,470],{},"The response includes GPS coordinates, province, and the parcel boundary as GeoJSON. API tiers scale from 1,000 requests per month (Build, $40\u002Fmonth) to 100,000 requests per month (Enterprise, $1,000\u002Fmonth). For batch processing through the API, the ",[132,467,469],{"href":468},"\u002Fguides\u002Fsearch-api-guide","Batch API endpoint"," accepts arrays of up to 100 descriptions per request.",[11,472,473,474,478],{},"For a detailed walkthrough of integrating the API into a data application, including authentication, error handling, and response parsing, the ",[132,475,477],{"href":476},"\u002Fblog\u002Fbuilding-with-canadian-land-data-api","developer integration guide"," covers common patterns with code examples.",[23,480,482],{"id":481},"when-accuracy-matters-most","When Accuracy Matters Most",[11,484,485],{},"A UWI encodes a 40-acre LSD. The GPS coordinates Township Canada returns represent the centre point of that parcel, accurate to the parcel centre, not to the wellhead itself. For most data workflows (mapping, proximity analysis, regulatory cross-referencing), centre-of-LSD accuracy is sufficient. For survey-grade wellhead positioning, the as-built survey from the drilling report is the authoritative source.",[11,487,488,489,492,493,495,496,492,499,501],{},"The more common accuracy risk is not precision. It's transposition. A range entered as ",[15,490,491],{},"06W5"," instead of ",[15,494,109],{}," moves the coordinates roughly 8 km west. A township entered as ",[15,497,498],{},"049",[15,500,98],{}," shifts the location 9.7 km north. In a dataset of 40,000 wells, even a 0.5% error rate means 200 wells plotted in the wrong location. Batch conversion with error flagging catches these before they reach a dashboard or a regulator.",[23,503,505],{"id":504},"from-uwi-to-coordinates-at-any-scale","From UWI to Coordinates at Any Scale",[11,507,508],{},"Whether you're converting a single UWI from a well licence or processing an entire provincial well inventory, the core operation is the same: extract the DLS location segment and convert it to GPS coordinates.",[11,510,511,512,514,515,517,518,521,522,525],{},"For single lookups and small batches, the ",[132,513,219],{"href":218}," handles UWI input directly. Enter the full identifier or just the location segment. For large datasets, the ",[132,516,338],{"href":337}," processes up to 5,000 records per job with CSV upload and multiple export formats. For warehouse-native conversion, the ",[132,519,520],{"href":377},"Snowflake integration"," keeps everything in SQL. And for developers building conversion into production systems, the ",[132,523,524],{"href":452},"API"," provides programmatic access at enterprise scale.",[11,527,528,532],{},[132,529,531],{"href":530},"\u002Fpricing","See pricing and plan options"," to find the right fit for your UWI conversion workflow.",[534,535,536],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":386,"searchDepth":399,"depth":399,"links":538},[539,540,541,542,548,553,554],{"id":25,"depth":399,"text":26},{"id":142,"depth":399,"text":143},{"id":205,"depth":399,"text":206},{"id":248,"depth":399,"text":249,"children":543},[544,545,546,547],{"id":256,"depth":405,"text":257},{"id":270,"depth":405,"text":271},{"id":291,"depth":405,"text":292},{"id":308,"depth":405,"text":309},{"id":323,"depth":399,"text":324,"children":549},[550,551,552],{"id":330,"depth":405,"text":331},{"id":370,"depth":405,"text":371},{"id":445,"depth":405,"text":446},{"id":481,"depth":399,"text":482},{"id":504,"depth":399,"text":505},"industry","\u002Fimages\u002Fblog\u002Fuwi-to-gps-oil-gas-developer-guide\u002Fcover.webp","2026-05-06","Convert Unique Well Identifiers to GPS coordinates at scale. UWI format breakdown, DLS extraction, batch workflows, and Snowflake SQL integration.","md",{},true,"\u002Fblog\u002Fuwi-to-gps-oil-gas-developer-guide",{"title":5,"description":558},"blog\u002Fuwi-to-gps-oil-gas-developer-guide",[566,567,524,568,569],"Oil and Gas","UWI","Batch Conversion","Snowflake","VEwbdxrnntVZXEk4qfWOLbklJXUe2JLaxR8ATJk9R9Q"]