Preparing to Release Alfa Alberta Data
OK, it’s done. The ST1s have finally been digested — using the abbreviated methodology described in Inspiration — and the initial round of Alberta data is (almost) ready for the Alfa Test Drive community. The KMLs have been generated, and the process of slimming them down so they can be readily served off the website is underway. Shouldn’t be more than a day or two before the Alberta data is ready for its first public viewing.
The size of the Alberta data set, while expected to be large, still came as a bit of a shock. There are about 150,000 unique wells referenced in the ST1s, and now found in the Intellog database. When these are put in the format ready to be served on Google Earth, it’s well over 10,000 KML files, and 535 megabytes of data — hence the need to slim the data set down, somewhat, prior to release.
Given it’s likely the paging strategy will have to be modified to accommodate the large amount of Alberta data, a new collection of instances in base.ZoomLevel was created, with its own parent in base.ZoomLevelCollection. This was also an opportunity to clean up the naming of the zoom levels. Z0 is now the lowest (loosest) level of zoom, whereas Z7 is the highest (tighest). It just seemed to make more sense than the patchwork of the names in the first collection of zoom levels.
When all was said and done, the stored procedure E.getWellGroupKml had slowed down again, and it was traced to the E.WellDetail() table-valued, user-defined function. In response, E.WellDetailBounded() was created, which is very similar to E.WellDetail(), except that it also takes lat/long boundaries as input parameters. This greatly speeded things up, particularly when it is coupled with newly-created indices on latitudeAmt and longitudeAmt on the E._WellDetail table. Also, both E.WellDetail() and E.WellDetailBounded() filter out any well for which it was not possible to calculate a lat/long.
The user-defined, scalar functions base.getMaximumBucketAmt() and base.getMinimumBucketAmt() were created. Both take @amt and @incrementAmt as input parameters, and return the upper or lower boundary of the ‘bucket’ into which the @amt fits. For example, @amt is 15.273, and the @incrementAmt is 0.25, base.getMaximumBucketAmt() will return 15.5, and base.getMinimumBucketAmt() will return 15.25. In other words, a slightly more sophisticated ROUND function. These functions are employed by E.getWellGroupKml to group wells according to geographic boundaries.
There were also a lot more well symbol combinations. Some ad hoc queries to determine which symbols have been defined, and which remain to be defined can be found in SQLQuery1.sql, at least for now. More than 50 new symbols were defined, and they can now be found in the Well Symbol Library. The stored procedure E.putWellSymbol was created to automate the well symbol procedure somewhat; it takes @statusCd, @substanceCd, @typeCd and @urlTxt as input, and creates the necessary instances in E.WellSymbol, base.Document and E.elucidates to associate a well symbol with a unique combination of well status, substance and type.
Code Shavings I finally got around to renaming one of the generically-named objects; the dbo.temp1() user-defined, table-valued function was renamed to E.ZoomLevelDetail(). The same cannot be said, unfortunately, for Untitled2.sql and Untitled3.sql, which remain as mysteriously named as ever. Also, to ensure E._WellDetail is up to date, it was added to the ERCB.dtsx package, after the iterative loop which reads the ST1s.
Posted on 3rd July 2008
Under: Developers' Journal | No Comments »

