/// <summary>
            /// Static constructor for BigFloatArray.
            /// </summary>
            /// <param name="maxDoc"></param>
            /// <returns></returns>
            public static BigFloatArray NewInstance(int maxDoc)
            {
                BigFloatArray array = new BigFloatArray(maxDoc);

                array.EnsureCapacity(maxDoc);
                return(array);
            }
            public virtual void Load(string latFieldName, string lonFieldName, BoboIndexReader reader)
            {
                if (reader == null)
                {
                    throw new ArgumentNullException("reader object is null");
                }

                FacetDataCache latCache = (FacetDataCache)reader.GetFacetData(latFieldName);
                FacetDataCache lonCache = (FacetDataCache)reader.GetFacetData(lonFieldName);

                int maxDoc = reader.MaxDoc;

                BigFloatArray xVals = this._xValArray;
                BigFloatArray yVals = this._yValArray;
                BigFloatArray zVals = this._zValArray;

                if (xVals == null)
                {
                    xVals = NewInstance(maxDoc);
                }
                else
                {
                    xVals.EnsureCapacity(maxDoc);
                }
                if (yVals == null)
                {
                    yVals = NewInstance(maxDoc);
                }
                else
                {
                    yVals.EnsureCapacity(maxDoc);
                }
                if (zVals == null)
                {
                    zVals = NewInstance(maxDoc);
                }
                else
                {
                    zVals.EnsureCapacity(maxDoc);
                }

                this._xValArray = xVals;
                this._yValArray = yVals;
                this._zValArray = zVals;

                BigSegmentedArray latOrderArray = latCache.OrderArray;
                ITermValueList    latValList    = latCache.ValArray;

                BigSegmentedArray lonOrderArray = lonCache.OrderArray;
                ITermValueList    lonValList    = lonCache.ValArray;

                for (int i = 0; i < maxDoc; ++i)
                {
                    string docLatString = latValList.Get(latOrderArray.Get(i)).Trim();
                    string docLonString = lonValList.Get(lonOrderArray.Get(i)).Trim();

                    float docLat = 0;
                    if (docLatString.Length > 0)
                    {
                        docLat = float.Parse(docLatString);
                    }

                    float docLon = 0;
                    if (docLonString.Length > 0)
                    {
                        docLon = float.Parse(docLonString);
                    }

                    float[] coords = GeoMatchUtil.GeoMatchCoordsFromDegrees(docLat, docLon);
                    _xValArray.Add(i, coords[0]);
                    _yValArray.Add(i, coords[1]);
                    _zValArray.Add(i, coords[2]);
                }
            }