[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"blog-\u002Fblog\u002Fuwi-to-gps-developers-guide":3},{"id":4,"title":5,"body":6,"cover":443,"date":444,"description":445,"extension":446,"meta":447,"navigation":451,"path":452,"seo":453,"stem":454,"tags":455,"__hash__":461},"blog\u002Fblog\u002Fuwi-to-gps-developers-guide.md","UWI to GPS: The O&G Developer's Guide to Unique Well Identifier Conversion",{"type":7,"value":8,"toc":431},"minimark",[9,18,26,31,34,37,46,50,57,60,64,164,171,175,178,201,204,210,217,221,224,245,264,270,280,284,287,292,304,307,313,316,320,327,368,371,375,386,394,397,404,408,411,414,417,427],[10,11,12,13,17],"p",{},"You have 10,000 rows of AER well data. Every row has a UWI in the format ",[14,15,16],"code",{},"100\u002F06-32-048-07W5\u002F00",". Your pipeline job needs GPS coordinates. You know the UWI encodes a legal land description, but you need to get from that identifier string to a lat\u002Flng pair — at scale, reliably, without a manual lookup for each record.",[10,19,20,21,25],{},"This is the core problem of ",[22,23,24],"strong",{},"UWI to GPS"," conversion in Canadian O&G data work. The format is deterministic: once you can parse it, conversion becomes a lookup problem, not a geometry problem. This guide covers the UWI structure, how to extract the location component, how to handle the common edge cases, and which batch workflow fits your stack.",[27,28,30],"h2",{"id":29},"what-a-uwi-encodes","What a UWI Encodes",[10,32,33],{},"A Unique Well Identifier is a standardized reference format developed by PTAC (Petroleum Technology Alliance of Canada) and adopted by every major Canadian energy regulator — the AER in Alberta, the BC Oil and Gas Commission, and Saskatchewan's Ministry of Energy and Resources.",[10,35,36],{},"The UWI is not just an administrative ID. It encodes the well's surface location directly inside the identifier. Parse it correctly and you already know where the well is before touching any external database.",[10,38,39,40,45],{},"The full format and regulatory context are documented at ",[41,42,44],"a",{"href":43},"\u002Flearn\u002Fsystems\u002Fuwi","Unique Well Identifiers (UWI) in Canada",". The short version: strip the prefix and sequence, and what remains is a DLS legal land description.",[27,47,49],{"id":48},"breaking-down-the-dls-format-uwi","Breaking Down the DLS-Format UWI",[10,51,52,53,56],{},"Most Canadian wells — those in Alberta, Saskatchewan, Manitoba, and the BC Peace River block — use UWIs built on the DLS (Dominion Land Survey) system. The format: ",[14,54,55],{},"[event prefix] \u002F [LSD location] \u002F [event sequence]",".",[10,58,59],{},"A concrete example:",[10,61,62],{},[22,63,16],{},[65,66,67,83],"table",{},[68,69,70],"thead",{},[71,72,73,77,80],"tr",{},[74,75,76],"th",{},"Segment",[74,78,79],{},"Value",[74,81,82],{},"Meaning",[84,85,86,98,109,120,131,142,153],"tbody",{},[71,87,88,92,95],{},[89,90,91],"td",{},"Event prefix",[89,93,94],{},"100",[89,96,97],{},"Location type — 100 = bottomhole at surface location",[71,99,100,103,106],{},[89,101,102],{},"LSD",[89,104,105],{},"06",[89,107,108],{},"Legal Subdivision 6 within Section 32",[71,110,111,114,117],{},[89,112,113],{},"Section",[89,115,116],{},"32",[89,118,119],{},"Section 32",[71,121,122,125,128],{},[89,123,124],{},"Township",[89,126,127],{},"048",[89,129,130],{},"Township 48",[71,132,133,136,139],{},[89,134,135],{},"Range",[89,137,138],{},"07",[89,140,141],{},"Range 7",[71,143,144,147,150],{},[89,145,146],{},"Meridian",[89,148,149],{},"W5",[89,151,152],{},"West of the 5th Meridian",[71,154,155,158,161],{},[89,156,157],{},"Event sequence",[89,159,160],{},"00",[89,162,163],{},"First event at this surface location",[10,165,166,167,170],{},"The location component — ",[22,168,169],{},"06-32-048-07W5"," — is a standard LSD legal land description. It identifies a specific 40-acre parcel in west-central Alberta. That parcel is what you convert to GPS coordinates.",[27,172,174],{"id":173},"converting-a-single-uwi-to-gps","Converting a Single UWI to GPS",[10,176,177],{},"For a one-off lookup, the steps are straightforward:",[179,180,181,188,194],"ol",{},[182,183,184,185],"li",{},"Extract the location component: take everything between the first and last ",[14,186,187],{},"\u002F",[182,189,190,191,193],{},"The result (",[14,192,169],{},") is the LSD you need",[182,195,196,197],{},"Enter it into Township Canada's search tool or the ",[41,198,200],{"href":199},"\u002Flearn\u002Fhow-to\u002Fwell-site-gps-coordinates-alberta","Alberta well site GPS converter",[10,202,203],{},"You get back the centre-point coordinates for that 40-acre parcel, calculated from official survey data. For O&G applications — field navigation, AER filings, GIS mapping — this is the coordinate you need.",[10,205,206,207,209],{},"If you're using the AER Wells layer in Township Canada (Business tier), you can also search by the full UWI string directly: ",[14,208,16],{},". The well appears as a pin on the DLS satellite map without any pre-parsing.",[10,211,212],{},[213,214],"img",{"alt":215,"src":216},"Search for a well location by UWI or LSD and see it plotted on the DLS grid","\u002Fimages\u002Fguides\u002Fsearch.webp",[27,218,220],{"id":219},"handling-the-edge-cases","Handling the Edge Cases",[10,222,223],{},"Not every UWI maps cleanly to a single LSD. A few patterns require attention before you run a batch job.",[10,225,226,229,230,232,233,236,237,240,241,244],{},[22,227,228],{},"Event prefix codes",": A prefix of ",[14,231,94],{}," means the bottomhole is at the surface location — straightforward. Prefix codes of ",[14,234,235],{},"102",", ",[14,238,239],{},"103",", and higher indicate the well is directional or horizontal, with the bottomhole in a different LSD than the surface. The location component in the UWI always refers to the ",[22,242,243],{},"surface location",". For directional wells, the bottomhole location is tracked separately in the wellbore record (UWBI format).",[10,246,247,250,251,236,254,236,257,260,261,263],{},[22,248,249],{},"Multiple events at one surface location",": The event sequence (",[14,252,253],{},"\u002F00",[14,255,256],{},"\u002F02",[14,258,259],{},"\u002F03",") tracks different completions or re-entry events at the same surface location. For ",[22,262,24],{}," purposes, all sequences at the same surface LSD return identical coordinates — the location component doesn't change between events.",[10,265,266,269],{},[22,267,268],{},"Re-entries and abandonments",": A well re-entered after regulatory abandonment gets a new event sequence number but keeps the original LSD. Parse and convert identically to the original well.",[10,271,272,275,276,56],{},[22,273,274],{},"NTS-format UWIs (BC and NWT)",": Wells outside the Peace River block in British Columbia, and wells in the Northwest Territories, use UWIs built on the National Topographic System rather than DLS. The location component looks different — it references an NTS map sheet and block rather than LSD\u002Fsection\u002Ftownship — but Township Canada converts NTS references to GPS the same way. Separate the NTS reference from the prefix and sequence, then submit it to the converter. For more on NTS grid references in a field context, see ",[41,277,279],{"href":278},"\u002Fblog\u002Fbc-nts-grid-references-convert-gps-field-work","BC NTS Grid References: How to Read Them and Convert to GPS",[27,281,283],{"id":282},"batch-uwi-conversion-for-large-datasets","Batch UWI Conversion for Large Datasets",[10,285,286],{},"Single-record lookups don't scale. For anything above a few dozen wells, one of these three workflows covers the common O&G data engineering scenarios.",[288,289,291],"h3",{"id":290},"csv-upload","CSV Upload",[10,293,294,295,299,300,303],{},"Township Canada's ",[41,296,298],{"href":297},"\u002Flearn\u002Fhow-to\u002Fbatch-convert-legal-land-descriptions","batch conversion tool"," accepts a CSV with a column of LSD descriptions. Pre-process your UWI list to extract the location component — ",[14,301,302],{},"SPLIT_PART(uwi, '\u002F', 2)"," in SQL, or equivalent — then upload the resulting LSD column.",[10,305,306],{},"Upload 500 LSDs, get 500 coordinate pairs back in seconds. The output includes a processing report that flags any descriptions that didn't resolve, so data entry errors in your source records surface before they reach the field or a regulatory submission.",[10,308,309],{},[213,310],{"alt":311,"src":312},"Upload a CSV of LSD descriptions from your UWI list and receive GPS coordinates for every row","\u002Fimages\u002Fguides\u002Fbatch-conversion.webp",[10,314,315],{},"This is the fastest path for land teams and data analysts who don't need programmatic integration — export from your source system, strip the UWI wrapper, upload, download results.",[288,317,319],{"id":318},"snowflake-sql","Snowflake SQL",[10,321,322,323,326],{},"If your well data lives in Snowflake, you can convert UWIs without exporting anything. Township Canada runs inside Snowflake via an External Function. After the initial setup (documented at ",[41,324,325],{"href":325},"\u002Fblog\u002Fconvert-legal-land-descriptions-snowflake-sql","), a query like:",[328,329,334],"pre",{"className":330,"code":331,"language":332,"meta":333,"style":333},"language-sql shiki shiki-themes material-theme-lighter vitesse-light vitesse-dark","SELECT\n  uwi,\n  TOWNSHIP_CONVERT(SPLIT_PART(uwi, '\u002F', 2)) AS gps_coordinates\nFROM well_records\nWHERE well_status = 'active'\n","sql","",[14,335,336,344,350,356,362],{"__ignoreMap":333},[337,338,341],"span",{"class":339,"line":340},"line",1,[337,342,343],{},"SELECT\n",[337,345,347],{"class":339,"line":346},2,[337,348,349],{},"  uwi,\n",[337,351,353],{"class":339,"line":352},3,[337,354,355],{},"  TOWNSHIP_CONVERT(SPLIT_PART(uwi, '\u002F', 2)) AS gps_coordinates\n",[337,357,359],{"class":339,"line":358},4,[337,360,361],{},"FROM well_records\n",[337,363,365],{"class":339,"line":364},5,[337,366,367],{},"WHERE well_status = 'active'\n",[10,369,370],{},"returns GPS coordinates directly in the warehouse — no file exports, no broken data lineage, no Python script maintaining a separate connection. For O&G data teams that already manage well records in Snowflake, this eliminates the conversion step entirely from ETL pipelines.",[288,372,374],{"id":373},"search-api-for-developer-integration","Search API for Developer Integration",[10,376,377,378,380,381,385],{},"For applications that need ",[22,379,24],{}," conversion in real time — a well status dashboard, a field dispatch tool, a custom regulatory portal — the ",[41,382,384],{"href":383},"\u002Fapi","Township Canada Search API"," accepts LSD strings and returns GPS coordinates as GeoJSON. Feed the parsed LSD component from each UWI into the API and you get a structured response with coordinates, parcel boundary polygon, and survey details.",[328,387,392],{"className":388,"code":390,"language":391},[389],"language-text","GET https:\u002F\u002Fapi.townshipcanada.com\u002Fsearch?q=06-32-048-07W5\nX-API-Key: your-api-key\n\n→ GeoJSON with lat\u002Flng, boundary polygon, province, survey system\n","text",[14,393,390],{"__ignoreMap":333},[10,395,396],{},"The Search API handles up to 10,000 requests per month at the Scale tier ($100\u002Fmonth). The Batch API accepts up to 100 LLDs per call with auto-chunking — better suited when you're processing large well lists programmatically rather than looking up individual records on demand.",[10,398,399,400,56],{},"For more on building applications with Canadian well location data, see ",[41,401,403],{"href":402},"\u002Fblog\u002Fbuilding-with-canadian-land-data-api","Building with Canadian Land Data: What the Legal Land Description API Does and Who Uses It",[27,405,407],{"id":406},"the-aer-wells-layer","The AER Wells Layer",[10,409,410],{},"If your workflow starts with well discovery rather than a known UWI list, the AER Wells layer in Township Canada offers a different entry point. It plots all 672,880+ AER-licensed Alberta wells on the DLS satellite map — searchable by UWI or by LSD — which eliminates the need to cross-reference AER OneStop and a DLS converter in separate tabs.",[10,412,413],{},"Toggle the layer from the map panel in the web app (Business tier), or query the well lookup API endpoint to retrieve the well's GPS location, licence status, and LSD by UWI. For surface lease review, field planning, and pre-site-visit checks, having both the well data and the DLS grid in one view is a meaningful time reduction compared to working across two systems.",[415,416],"hr",{},[10,418,419,420,423,424],{},"For O&G teams running high-volume well data pipelines, the ",[41,421,422],{"href":383},"Batch API"," at $200\u002Fmonth (Scale tier) handles 10,000 requests per month — enough for most quarterly processing cycles. ",[41,425,426],{"href":383},"See the full API pricing and documentation.",[428,429,430],"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":333,"searchDepth":346,"depth":346,"links":432},[433,434,435,436,437,442],{"id":29,"depth":346,"text":30},{"id":48,"depth":346,"text":49},{"id":173,"depth":346,"text":174},{"id":219,"depth":346,"text":220},{"id":282,"depth":346,"text":283,"children":438},[439,440,441],{"id":290,"depth":352,"text":291},{"id":318,"depth":352,"text":319},{"id":373,"depth":352,"text":374},{"id":406,"depth":346,"text":407},"\u002Fimages\u002Fblog\u002Fuwi-to-gps-developers-guide\u002Fcover.webp","2026-05-06","How to convert UWI to GPS coordinates at scale — parse the DLS location component, handle edge cases like horizontal wells and NTS-format identifiers, and run batch workflows via CSV, Snowflake SQL, or the Search API.","md",{"category":448,"hero_image":449,"author":450},"guides","https:\u002F\u002Fb9bukyyl5yuyveqq.public.blob.vercel-storage.com\u002Fimages\u002Fblog\u002F2026-05\u002F0d5172e5-37ee-4eba-82c0-5fddb6df75c7.jpeg","Township Canada",true,"\u002Fblog\u002Fuwi-to-gps-developers-guide",{"title":5,"description":445},"blog\u002Fuwi-to-gps-developers-guide",[456,457,458,459,460],"Oil & Gas","Alberta","UWI","API","Batch Conversion","WWE0z-ug2kuSoo8qiZj5XiCiAiFB1VXRRmwx4KLfY5E"]