lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [14/26] lucenenet git commit: Added missing Spatial classes, ported Spatial tests, and fixed several bugs
Date Fri, 25 Nov 2016 11:07:19 GMT
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d8c73530/src/Lucene.Net.Tests.Spatial/SpatialTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Spatial/SpatialTestCase.cs b/src/Lucene.Net.Tests.Spatial/SpatialTestCase.cs
new file mode 100644
index 0000000..ebc5374
--- /dev/null
+++ b/src/Lucene.Net.Tests.Spatial/SpatialTestCase.cs
@@ -0,0 +1,248 @@
+using Lucene.Net.Analysis;
+using Lucene.Net.Codecs.Lucene45;
+using Lucene.Net.Documents;
+using Lucene.Net.Index;
+using Lucene.Net.Search;
+using Lucene.Net.Util;
+using Spatial4n.Core.Context;
+using Spatial4n.Core.Shapes;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Text;
+
+namespace Lucene.Net.Spatial
+{
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    /// <summary>
+    /// A base test class for spatial lucene. It's mostly Lucene generic.
+    /// </summary>
+    public abstract class SpatialTestCase : LuceneTestCase
+    {
+        private DirectoryReader indexReader;
+        protected RandomIndexWriter indexWriter;
+        private Store.Directory directory;
+        protected IndexSearcher indexSearcher;
+
+        protected SpatialContext ctx;//subclass must initialize
+
+        public override void SetUp()
+        {
+            base.SetUp();
+
+            directory = NewDirectory();
+            Random random = Random();
+            indexWriter = new RandomIndexWriter(random, directory, newIndexWriterConfig(random));
+            indexReader = indexWriter.Reader;
+            indexSearcher = NewSearcher(indexReader);
+        }
+
+        protected virtual IndexWriterConfig newIndexWriterConfig(Random random)
+        {
+            IndexWriterConfig indexWriterConfig = NewIndexWriterConfig(random, TEST_VERSION_CURRENT, new MockAnalyzer(random));
+            //TODO can we randomly choose a doc-values supported format?
+            if (NeedsDocValues())
+                indexWriterConfig.SetCodec(TestUtil.AlwaysDocValuesFormat(new Lucene45DocValuesFormat())); ;
+            return indexWriterConfig;
+        }
+
+        protected virtual bool NeedsDocValues()
+        {
+            return false;
+        }
+
+        public override void TearDown()
+        {
+            IOUtils.Close(indexWriter, indexReader, directory);
+            base.TearDown();
+        }
+
+        // ================================================= Helper Methods ================================================
+
+        protected virtual void AddDocument(Document doc)
+        {
+            indexWriter.AddDocument(doc);
+        }
+
+        protected virtual void addDocumentsAndCommit(List<Document> documents)
+        {
+            foreach (Document document in documents)
+            {
+                indexWriter.AddDocument(document);
+            }
+            Commit();
+        }
+
+        protected virtual void DeleteAll()
+        {
+            indexWriter.DeleteAll();
+        }
+
+        protected virtual void Commit()
+        {
+            indexWriter.Commit();
+            IOUtils.Close(indexReader);
+            indexReader = indexWriter.Reader;
+            indexSearcher = NewSearcher(indexReader);
+        }
+
+        protected virtual void VerifyDocumentsIndexed(int numDocs)
+        {
+            assertEquals(numDocs, indexReader.NumDocs);
+        }
+
+        protected virtual SearchResults executeQuery(Query query, int numDocs)
+        {
+            try
+            {
+                TopDocs topDocs = indexSearcher.Search(query, numDocs);
+
+                List<SearchResult> results = new List<SearchResult>();
+                foreach (ScoreDoc scoreDoc in topDocs.ScoreDocs)
+                {
+                    results.Add(new SearchResult(scoreDoc.Score, indexSearcher.Doc(scoreDoc.Doc)));
+                }
+                return new SearchResults(topDocs.TotalHits, results);
+            }
+            catch (IOException ioe)
+            {
+                throw new ApplicationException("IOException thrown while executing query", ioe);
+            }
+        }
+
+        protected virtual Spatial4n.Core.Shapes.IPoint randomPoint()
+        {
+            IRectangle WB = ctx.WorldBounds;
+            return ctx.MakePoint(
+                randomIntBetween((int)WB.MinX, (int)WB.MaxX),
+                randomIntBetween((int)WB.MinY, (int)WB.MaxY));
+        }
+
+        protected virtual IRectangle randomRectangle()
+        {
+            IRectangle WB = ctx.WorldBounds;
+            int rW = (int)randomGaussianMeanMax(10, WB.Width);
+            double xMin = randomIntBetween((int)WB.MinX, (int)WB.MaxX - rW);
+            double xMax = xMin + rW;
+
+            int yH = (int)randomGaussianMeanMax(Math.Min(rW, WB.Height), WB.Height);
+            double yMin = randomIntBetween((int)WB.MinY, (int)WB.MaxY - yH);
+            double yMax = yMin + yH;
+
+            return ctx.MakeRectangle(xMin, xMax, yMin, yMax);
+        }
+
+        private double randomGaussianMinMeanMax(double min, double mean, double max)
+        {
+            Debug.Assert(mean > min);
+            return randomGaussianMeanMax(mean - min, max - min) + min;
+        }
+
+        /**
+         * Within one standard deviation (68% of the time) the result is "close" to
+         * mean. By "close": when greater than mean, it's the lesser of 2*mean or half
+         * way to max, when lesser than mean, it's the greater of max-2*mean or half
+         * way to 0. The other 32% of the time it's in the rest of the range, touching
+         * either 0 or max but never exceeding.
+         */
+        private double randomGaussianMeanMax(double mean, double max)
+        {
+            // DWS: I verified the results empirically
+            Debug.Assert(mean <= max && mean >= 0);
+            double g = randomGaussian();
+            double mean2 = mean;
+            double flip = 1;
+            if (g < 0)
+            {
+                mean2 = max - mean;
+                flip = -1;
+                g *= -1;
+            }
+            // pivot is the distance from mean2 towards max where the boundary of
+            // 1 standard deviation alters the calculation
+            double pivotMax = max - mean2;
+            double pivot = Math.Min(mean2, pivotMax / 2);//from 0 to max-mean2
+            Debug.Assert(pivot >= 0 && pivotMax >= pivot && g >= 0);
+            double pivotResult;
+            if (g <= 1)
+                pivotResult = pivot * g;
+            else
+                pivotResult = Math.Min(pivotMax, (g - 1) * (pivotMax - pivot) + pivot);
+
+            return mean + flip * pivotResult;
+        }
+
+        // ================================================= Inner Classes =================================================
+
+        protected class SearchResults
+        {
+
+            public int numFound;
+            public List<SearchResult> results;
+
+            public SearchResults(int numFound, List<SearchResult> results)
+            {
+                this.numFound = numFound;
+                this.results = results;
+            }
+
+            public StringBuilder toDebugString()
+            {
+                StringBuilder str = new StringBuilder();
+                str.append("found: ").append(numFound).append('[');
+                foreach (SearchResult r in results)
+                {
+                    string id = r.GetId();
+                    str.append(id).append(", ");
+                }
+                str.append(']');
+                return str;
+            }
+
+            public override string ToString()
+            {
+                return "[found:" + numFound + " " + results + "]";
+            }
+        }
+
+        protected class SearchResult
+        {
+
+            public float score;
+            public Document document;
+
+            public SearchResult(float score, Document document)
+            {
+                this.score = score;
+                this.document = document;
+            }
+
+            public string GetId()
+            {
+                return document.Get("id");
+            }
+
+            public override string ToString()
+            {
+                return "[" + score + "=" + document + "]";
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d8c73530/src/Lucene.Net.Tests.Spatial/SpatialTestData.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Spatial/SpatialTestData.cs b/src/Lucene.Net.Tests.Spatial/SpatialTestData.cs
new file mode 100644
index 0000000..231c1cd
--- /dev/null
+++ b/src/Lucene.Net.Tests.Spatial/SpatialTestData.cs
@@ -0,0 +1,78 @@
+using Spatial4n.Core.Context;
+using Spatial4n.Core.Exceptions;
+using Spatial4n.Core.Shapes;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+
+namespace Lucene.Net.Spatial
+{
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    /// <summary>
+    /// This class is modelled after SpatialTestQuery.
+    /// Before Lucene 4.7, this was a bit different in Spatial4n as SampleData & SampleDataReader.
+    /// </summary>
+    public class SpatialTestData
+    {
+        public String id;
+        public String name;
+        public IShape shape;
+
+        /** Reads the stream, consuming a format that is a tab-separated values of 3 columns:
+         * an "id", a "name" and the "shape".  Empty lines and lines starting with a '#' are skipped.
+         * The stream is closed.
+         */
+        public static IEnumerator<SpatialTestData> GetTestData(Stream @in, SpatialContext ctx)
+        {
+            List<SpatialTestData> results = new List<SpatialTestData>();
+            TextReader bufInput = new StreamReader(@in, Encoding.UTF8);
+            try
+            {
+                String line;
+                while ((line = bufInput.ReadLine()) != null)
+                {
+                    if (line.Length == 0 || line[0] == '#')
+                        continue;
+
+                    SpatialTestData data = new SpatialTestData();
+                    String[] vals = line.Split(new char[] { '\t' }, StringSplitOptions.RemoveEmptyEntries);
+                    if (vals.Length != 3)
+                        throw new ArgumentException("bad format; expecting 3 tab-separated values for line: " + line);
+                    data.id = vals[0];
+                    data.name = vals[1];
+                    try
+                    {
+                        data.shape = ctx.ReadShapeFromWkt(vals[2]);
+                    }
+                    catch (ParseException e)
+                    {
+                        throw new ApplicationException(e.Message, e);
+                    }
+                    results.Add(data);
+                }
+            }
+            finally
+            {
+                bufInput.Dispose();
+            }
+            return results.GetEnumerator();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d8c73530/src/Lucene.Net.Tests.Spatial/SpatialTestQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Spatial/SpatialTestQuery.cs b/src/Lucene.Net.Tests.Spatial/SpatialTestQuery.cs
new file mode 100644
index 0000000..1de5a92
--- /dev/null
+++ b/src/Lucene.Net.Tests.Spatial/SpatialTestQuery.cs
@@ -0,0 +1,102 @@
+using Lucene.Net.Spatial.Queries;
+using Lucene.Net.Support;
+using Spatial4n.Core.Context;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+
+namespace Lucene.Net.Spatial
+{
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    /// <summary>
+    /// Helper class to execute queries
+    /// </summary>
+    public class SpatialTestQuery
+    {
+        public string testname;
+        public string line;
+        public int lineNumber = -1;
+        public SpatialArgs args;
+        public List<string> ids = new List<string>();
+
+        /**
+         * Get Test Queries.  The InputStream is closed.
+         */
+        public static IEnumerator<SpatialTestQuery> GetTestQueries(
+            SpatialArgsParser parser,
+            SpatialContext ctx,
+            string name,
+            Stream @in)
+        {
+
+            List<SpatialTestQuery> results = new List<SpatialTestQuery>();
+
+            TextReader bufInput = new StreamReader(@in, Encoding.UTF8);
+            try
+            {
+                String line;
+                for (int lineNumber = 1; (line = bufInput.ReadLine()) != null; lineNumber++)
+                {
+                    SpatialTestQuery test = new SpatialTestQuery();
+                    test.line = line;
+                    test.lineNumber = lineNumber;
+
+                    try
+                    {
+                        // skip a comment
+                        if (line.StartsWith("[", StringComparison.Ordinal))
+                        {
+                            int idx2 = line.IndexOf(']');
+                            if (idx2 > 0)
+                            {
+                                line = line.Substring(idx2 + 1);
+                            }
+                        }
+
+                        int idx = line.IndexOf('@');
+                        StringTokenizer st = new StringTokenizer(line.Substring(0, idx - 0));
+                        while (st.HasMoreTokens())
+                        {
+                            test.ids.Add(st.NextToken().Trim());
+                        }
+                        test.args = parser.Parse(line.Substring(idx + 1).Trim(), ctx);
+                        results.Add(test);
+                    }
+                    catch (Exception ex)
+                    {
+                        throw new ApplicationException("invalid query line: " + test.line, ex);
+                    }
+                }
+            }
+            finally
+            {
+                bufInput.Dispose();
+            }
+            return results.GetEnumerator();
+        }
+
+        public override String ToString()
+        {
+            if (line != null)
+                return line;
+            return args.toString() + " " + ids;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d8c73530/src/Lucene.Net.Tests.Spatial/StrategyTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Spatial/StrategyTestCase.cs b/src/Lucene.Net.Tests.Spatial/StrategyTestCase.cs
new file mode 100644
index 0000000..01c8e67
--- /dev/null
+++ b/src/Lucene.Net.Tests.Spatial/StrategyTestCase.cs
@@ -0,0 +1,274 @@
+using Lucene.Net.Documents;
+using Lucene.Net.Index;
+using Lucene.Net.Queries.Function;
+using Lucene.Net.Search;
+using Lucene.Net.Spatial.Queries;
+using Lucene.Net.Util;
+using Spatial4n.Core.Context;
+using Spatial4n.Core.Shapes;
+using System;
+using System.Collections.Generic;
+using System.IO;
+
+namespace Lucene.Net.Spatial
+{
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    public abstract class StrategyTestCase : SpatialTestCase
+    {
+        public const string RESOURCE_PATH = "Lucene.Net.Tests.Spatial.Test_Files.";
+        public const string DATA_RESOURCE_PATH = RESOURCE_PATH + "Data.";
+
+        public static readonly String DATA_SIMPLE_BBOX = "simple-bbox.txt";
+        public static readonly String DATA_STATES_POLY = "states-poly.txt";
+        public static readonly String DATA_STATES_BBOX = "states-bbox.txt";
+        public static readonly String DATA_COUNTRIES_POLY = "countries-poly.txt";
+        public static readonly String DATA_COUNTRIES_BBOX = "countries-bbox.txt";
+        public static readonly String DATA_WORLD_CITIES_POINTS = "world-cities-points.txt";
+
+        public static readonly String QTEST_States_IsWithin_BBox = "states-IsWithin-BBox.txt";
+        public static readonly String QTEST_States_Intersects_BBox = "states-Intersects-BBox.txt";
+        public static readonly String QTEST_Cities_Intersects_BBox = "cities-Intersects-BBox.txt";
+        public static readonly String QTEST_Simple_Queries_BBox = "simple-Queries-BBox.txt";
+
+        //private Logger log = Logger.getLogger(getClass().getName());
+
+        protected readonly SpatialArgsParser argsParser = new SpatialArgsParser();
+
+        protected SpatialStrategy strategy;
+        protected bool storeShape = true;
+
+        protected virtual void executeQueries(SpatialMatchConcern concern, params string[] testQueryFile)
+        {
+            //log.info("testing queried for strategy "+strategy);
+            foreach (String path in testQueryFile)
+            {
+                IEnumerator<SpatialTestQuery> testQueryIterator = getTestQueries(path, ctx);
+                runTestQueries(testQueryIterator, concern);
+            }
+        }
+
+        protected virtual void getAddAndVerifyIndexedDocuments(String testDataFile)
+        {
+            List<Document> testDocuments = getDocuments(testDataFile);
+            addDocumentsAndCommit(testDocuments);
+            VerifyDocumentsIndexed(testDocuments.size());
+        }
+
+        protected virtual List<Document> getDocuments(String testDataFile)
+        {
+            return getDocuments(getSampleData(testDataFile));
+        }
+
+        protected virtual List<Document> getDocuments(IEnumerator<SpatialTestData> sampleData)
+        {
+            List<Document> documents = new List<Document>();
+            while (sampleData.MoveNext())
+            {
+                SpatialTestData data = sampleData.Current;
+                Document document = new Document();
+                document.Add(new StringField("id", data.id, Field.Store.YES));
+                document.Add(new StringField("name", data.name, Field.Store.YES));
+                IShape shape = data.shape;
+                shape = convertShapeFromGetDocuments(shape);
+                if (shape != null)
+                {
+                    foreach (Field f in strategy.CreateIndexableFields(shape))
+                    {
+                        document.Add(f);
+                    }
+                    if (storeShape)//just for diagnostics
+                        document.Add(new StoredField(strategy.FieldName, shape.toString()));
+                }
+
+                documents.Add(document);
+            }
+            return documents;
+        }
+
+        /** Subclasses may override to transform or remove a shape for indexing */
+        protected virtual IShape convertShapeFromGetDocuments(IShape shape)
+        {
+            return shape;
+        }
+
+        protected virtual IEnumerator<SpatialTestData> getSampleData(String testDataFile)
+        {
+            String path = DATA_RESOURCE_PATH + testDataFile;
+            Stream stream = GetType().Assembly.GetManifestResourceStream(path);
+            if (stream == null)
+                throw new FileNotFoundException("classpath resource not found: " + path);
+            return SpatialTestData.GetTestData(stream, ctx);//closes the InputStream
+        }
+
+        protected virtual IEnumerator<SpatialTestQuery> getTestQueries(String testQueryFile, SpatialContext ctx)
+        {
+            Stream @in = GetType().Assembly.GetManifestResourceStream(RESOURCE_PATH + testQueryFile);
+            return SpatialTestQuery.GetTestQueries(
+                argsParser, ctx, testQueryFile, @in);//closes the InputStream
+        }
+
+        public virtual void runTestQueries(
+            IEnumerator<SpatialTestQuery> queries,
+            SpatialMatchConcern concern)
+        {
+            while (queries.MoveNext())
+            {
+                SpatialTestQuery q = queries.Current;
+                runTestQuery(concern, q);
+            }
+        }
+
+        public virtual void runTestQuery(SpatialMatchConcern concern, SpatialTestQuery q)
+        {
+            String msg = q.toString(); //"Query: " + q.args.toString(ctx);
+            SearchResults got = executeQuery(makeQuery(q), Math.Max(100, q.ids.size() + 1));
+            if (storeShape && got.numFound > 0)
+            {
+                //check stored value is there
+                assertNotNull(got.results[0].document.Get(strategy.FieldName));
+            }
+            if (concern.orderIsImportant)
+            {
+                IEnumerator<String> ids = q.ids.GetEnumerator();
+                foreach (SearchResult r in got.results)
+                {
+                    String id = r.document.Get("id");
+                    if (!ids.MoveNext())
+                    {
+                        fail(msg + " :: Did not get enough results.  Expect" + q.ids + ", got: " + got.toDebugString());
+                    }
+                    assertEquals("out of order: " + msg, ids.Current, id);
+                }
+
+                if (ids.MoveNext())
+                {
+                    fail(msg + " :: expect more results then we got: " + ids.Current);
+                }
+            }
+            else
+            {
+                // We are looking at how the results overlap
+                if (concern.resultsAreSuperset)
+                {
+                    ISet<string> found = new HashSet<string>();
+                    foreach (SearchResult r in got.results)
+                    {
+                        found.add(r.document.Get("id"));
+                    }
+                    foreach (String s in q.ids)
+                    {
+                        if (!found.contains(s))
+                        {
+                            fail("Results are mising id: " + s + " :: " + found);
+                        }
+                    }
+                }
+                else
+                {
+                    List<string> found = new List<string>();
+                    foreach (SearchResult r in got.results)
+                    {
+                        found.Add(r.document.Get("id"));
+                    }
+
+                    // sort both so that the order is not important
+                    CollectionUtil.TimSort(q.ids);
+                    CollectionUtil.TimSort(found);
+                    assertEquals(msg, q.ids.toString(), found.toString());
+                }
+            }
+        }
+
+        protected virtual Query makeQuery(SpatialTestQuery q)
+        {
+            return strategy.MakeQuery(q.args);
+        }
+
+        protected virtual void adoc(String id, String shapeStr)
+        {
+            IShape shape = shapeStr == null ? null : ctx.ReadShapeFromWkt(shapeStr);
+            AddDocument(newDoc(id, shape));
+        }
+        protected virtual void adoc(String id, IShape shape)
+        {
+            AddDocument(newDoc(id, shape));
+        }
+
+        protected virtual Document newDoc(String id, IShape shape)
+        {
+            Document doc = new Document();
+            doc.Add(new StringField("id", id, Field.Store.YES));
+            if (shape != null)
+            {
+                foreach (Field f in strategy.CreateIndexableFields(shape))
+                {
+                    doc.Add(f);
+                }
+                if (storeShape)
+                    doc.Add(new StoredField(strategy.FieldName, shape.toString()));//not to be parsed; just for debug
+            }
+            return doc;
+        }
+
+        protected virtual void DeleteDoc(String id)
+        {
+            indexWriter.DeleteDocuments(new TermQuery(new Term("id", id)));
+        }
+
+        /** scores[] are in docId order */
+        protected virtual void CheckValueSource(ValueSource vs, float[] scores, float delta)
+        {
+            FunctionQuery q = new FunctionQuery(vs);
+
+            //    //TODO is there any point to this check?
+            //    int expectedDocs[] = new int[scores.length];//fill with ascending 0....length-1
+            //    for (int i = 0; i < expectedDocs.length; i++) {
+            //      expectedDocs[i] = i;
+            //    }
+            //    CheckHits.checkHits(random(), q, "", indexSearcher, expectedDocs);
+
+            TopDocs docs = indexSearcher.Search(q, 1000);//calculates the score
+            for (int i = 0; i < docs.ScoreDocs.Length; i++)
+            {
+                ScoreDoc gotSD = docs.ScoreDocs[i];
+                float expectedScore = scores[gotSD.Doc];
+                assertEquals("Not equal for doc " + gotSD.Doc, expectedScore, gotSD.Score, delta);
+            }
+
+            CheckHits.CheckExplanations(q, "", indexSearcher);
+        }
+
+        protected virtual void AssertOperation(IDictionary<String, IShape> indexedDocs,
+                                       SpatialOperation operation, IShape queryShape)
+        {
+            //Generate truth via brute force
+            ISet<string> expectedIds = new HashSet<string>();
+            foreach (var stringShapeEntry in indexedDocs)
+            {
+                if (operation.Evaluate(stringShapeEntry.Value, queryShape))
+                    expectedIds.add(stringShapeEntry.Key);
+            }
+
+            SpatialTestQuery testQuery = new SpatialTestQuery();
+            testQuery.args = new SpatialArgs(operation, queryShape);
+            testQuery.ids = new List<string>(expectedIds);
+            runTestQuery(SpatialMatchConcern.FILTER, testQuery);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d8c73530/src/Lucene.Net.Tests.Spatial/Test-Files/Data/LUCENE-4464.txt
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Spatial/Test-Files/Data/LUCENE-4464.txt b/src/Lucene.Net.Tests.Spatial/Test-Files/Data/LUCENE-4464.txt
new file mode 100644
index 0000000..dfb5a40
--- /dev/null
+++ b/src/Lucene.Net.Tests.Spatial/Test-Files/Data/LUCENE-4464.txt
@@ -0,0 +1,3 @@
+#id	name	shape
+poly1	poly1	POLYGON ((-93.17288720912401 45.280265431486754, -93.17232270645628 45.2802724629027, -93.17229737711205 45.279497574052314, -93.1722224854913 45.277577770983854, -93.17218124644266 45.276747010395624, -93.16722650828461 45.276819421108826, -93.16581262076448 45.27684404529939, -93.16363038333625 45.276882054199596, -93.16249244695301 45.276929493877525, -93.16247370542268 45.27641118002343, -93.16246893668628 45.276279382682894, -93.1624671302382 45.274701063846244, -93.16246679905096 45.273381422360785, -93.16247689122851 45.273189685068424, -93.16249146710186 45.27291249464421, -93.16249868565903 45.272467966062614, -93.16247955957382 45.27177209534391, -93.1624787718002 45.27127651548793, -93.16247840794293 45.27104491547271, -93.16247917486976 45.27087000356473, -93.1624817727418 45.270279315147775, -93.16252487154968 45.26996729342093, -93.16254025661699 45.26976826077157, -93.16247902564132 45.269527941604, -93.16242684845764 45.2692774997531, -93.16242126018722 4
 5.26894470083864, -93.16241263011544 45.26769394309626, -93.16246809168283 45.26571736107859, -93.16247263940593 45.26195548919013, -93.16253090997651 45.258615729449964, -93.16256878834184 45.25650987969364, -93.1626048203569 45.2546538608912, -93.16265873943591 45.251876274357876, -93.16275002007988 45.2510418534315, -93.16282237443883 45.25042383853711, -93.16286421513767 45.249181538840595, -93.16288289220509 45.24862697953288, -93.1629601120395 45.248250613185206, -93.16301002807151 45.24802483983211, -93.16301621932013 45.247670020958665, -93.16301519349018 45.247478630666144, -93.16303001333274 45.24727504082362, -93.16303463142393 45.24713931946277, -93.16302280990728 45.2470107542477, -93.16298327344437 45.24685970499298, -93.16294217154733 45.246633449219054, -93.16294315088282 45.246419514713516, -93.16295754265565 45.24621538933992, -93.16296755618336 45.24580786412655, -93.16296268372803 45.245362220836384, -93.16296319568123 45.245046689033444, -93.16297766811293 45.24
 481357093532, -93.16296370759883 45.2445699039253, -93.16294931051515 45.24231310924752, -93.16294559876471 45.24173111255096, -93.16295568091667 45.240776604513705, -93.1629609359182 45.24053954238007, -93.1629658719288 45.24019639978025, -93.1625355179785 45.24018482062359, -93.15847246037083 45.24007549519542, -93.15641780558727 45.24006372373029, -93.15470331938288 45.24002991133718, -93.1515176880772 45.240038275846665, -93.14892151971884 45.24004508944476, -93.14597353408716 45.240012024375574, -93.14198169289922 45.239944427606616, -93.14246140322608 45.21441838866706, -93.14239730934507 45.20842345035032, -93.14240307538512 45.203669567890245, -93.13209436867183 45.20385828388066, -93.13238731320574 45.19696183064252, -93.13244550539693 45.19559178376392, -93.13255875219626 45.19292582294682, -93.12747185962866 45.19303831675316, -93.12741613255534 45.196689407842044, -93.12341724811418 45.196748516850086, -93.12336451543653 45.19630050937325, -93.12233270487748 45.196311891
 79194, -93.12244695905335 45.18943470505876, -93.12752867296823 45.18931969757398, -93.1275981937757 45.18579899512077, -93.12249095182051 45.18589579364393, -93.12250905286206 45.18230218633591, -93.11745336177542 45.182234528897865, -93.11742994994425 45.17494109686777, -93.11234677240823 45.174914625057596, -93.11232755368056 45.178541858988, -93.09142510557425 45.17830768889981, -93.0878908215621 45.18208021181682, -93.04087986544745 45.182020129318005, -93.02011304608662 45.18206919600553, -92.99725469269949 45.18154883703301, -92.9866455346556 45.18162938363265, -92.98002761377205 45.181741313792635, -92.97460481311676 45.1817232745721, -92.95815138711436 45.18159971137449, -92.95832448011389 45.16710586357575, -92.95821211351648 45.15266682925307, -92.94804883291458 45.152678829402525, -92.94820512323935 45.14582287000843, -92.94821449767262 45.14541149629351, -92.93808126859899 45.145435393255234, -92.938064080176 45.1464755574292, -92.93790172782569 45.15630033200825, -92.9
 3776855788026 45.156299483202375, -92.93416458772786 45.15627656196406, -92.92776593175911 45.156235863288074, -92.92779198321185 45.15260820059608, -92.9228643837518 45.15257871636257, -92.91761510291013 45.15254730117589, -92.91755895303478 45.15978011255037, -92.90742527225278 45.15975884768774, -92.90734951861361 45.16700513027527, -92.90243435593408 45.16697925148226, -92.90226994175299 45.16697838648701, -92.90228225598396 45.16960751885433, -92.90228682505473 45.170583562524534, -92.89838293958822 45.17058359192683, -92.89776337384279 45.17058359923907, -92.89720228241329 45.170636798053465, -92.89720546113311 45.171648743169875, -92.89721045187194 45.17323675651512, -92.89721215942521 45.17377958217219, -92.8972133713998 45.17416655315385, -92.89752994284902 45.17416793500262, -92.90230392627396 45.174188700362095, -92.90230695467396 45.17483317173849, -92.90230939234701 45.175352265892315, -92.90231342163983 45.17620891826606, -92.9023378718661 45.18141217320357, -92.898291
 95794003 45.18137903577816, -92.89197067471983 45.181327269964534, -92.86573042754982 45.18111238484799, -92.86537258386163 45.18110945889712, -92.86579788828743 45.16683341076013, -92.85850341291456 45.166840495697045, -92.85576616527777 45.1668651317465, -92.8455814929548 45.16695680639518, -92.8403672382906 45.167003741522834, -92.84037534438275 45.166359277271084, -92.83914257524022 45.166407761467035, -92.83786182101709 45.16655768366541, -92.83762301824869 45.16658563659705, -92.83700510809494 45.16665797101126, -92.83700330475195 45.1670405349812, -92.83520392476423 45.16704646605868, -92.83519998302931 45.1672093811339, -92.83518241658018 45.17114095264113, -92.8351705215998 45.17380185475555, -92.83516823773242 45.17431412368648, -92.82501384033566 45.174380025018145, -92.82373302900695 45.174963166130034, -92.82127603798283 45.17799740439804, -92.81495695139105 45.17798284134312, -92.81498212776123 45.18394380043827, -92.81496335262872 45.20297631525698, -92.81496300732859
  45.2033351264244, -92.8149190887153 45.20460132029917, -92.81473397710002 45.21, -92.8198460035041 45.21, -92.81985864578533 45.21352006541341, -92.81476009958381 45.21350519453624, -92.81473397710002 45.211, -92.79434616877515 45.20979982288059, -92.79434485197183 45.210003888814526, -92.7942994128934 45.217028016258524, -92.79414754531777 45.217027433538036, -92.75950558164095 45.216895251116746, -92.75791266717471 45.216889175072694, -92.75634408090858 45.21737192056616, -92.75539334998972 45.21781096867505, -92.75544275719047 45.219840930849315, -92.75232263931744 45.219847708152834, -92.75345360864661 45.22241622713623, -92.75393100188802 45.22290500013628, -92.75454911801587 45.22425238152991, -92.75465656863904 45.22441872007679, -92.75478824580995 45.22461252606749, -92.75573200183275 45.22594899943625, -92.7559326169467 45.2263989667922, -92.756173357985 45.22677479396459, -92.75628338889855 45.227185737281864, -92.75651400327136 45.22770300256764, -92.75667800355963 45.22
 8069998932774, -92.75745600158125 45.23052599674398, -92.75737071502948 45.23131853178694, -92.75760683805547 45.23212889115611, -92.7575248338702 45.23249816977935, -92.75760900807862 45.233043995948975, -92.75740715667484 45.23498808590038, -92.75739258433605 45.23515457917446, -92.75736004212973 45.235441823970014, -92.75728900664646 45.2361259970008, -92.75750924881613 45.23833187652166, -92.75783421241928 45.239151014730965, -92.75799784052033 45.2401986059374, -92.75814399470411 45.24075700093086, -92.75910499448543 45.24444199845027, -92.75927217262658 45.246363482652335, -92.759708376526 45.24795052230262, -92.76024900009054 45.24960000150479, -92.76026400206055 45.25171699829065, -92.75984499770836 45.25286799832034, -92.75883599655404 45.25442699925451, -92.75592228367496 45.256779108256175, -92.75559993467031 45.25707105760005, -92.75540261715516 45.25725539605134, -92.75458100472993 45.258140999051975, -92.75362100152239 45.25941899619891, -92.75258800661327 45.261786002
 1943, -92.7523530053651 45.26244399793552, -92.7521330910868 45.26318539548715, -92.75199986320791 45.26381589028983, -92.7519440909167 45.26415703570502, -92.75192391851121 45.26559725594415, -92.75247612752318 45.26746623235666, -92.75254008932185 45.26768063816608, -92.75267394173396 45.268130176728555, -92.75287910082022 45.2688320393691, -92.7530104867237 45.26921012533672, -92.75329204456183 45.26980089141646, -92.75414711285153 45.2712720735891, -92.7552129966957 45.27237299947564, -92.75574299378961 45.27288399662051, -92.75678399520334 45.273891998902435, -92.75750199664172 45.27442999825494, -92.75801999923948 45.274822998224586, -92.75866321741752 45.27578539520815, -92.7589271849383 45.27616491445647, -92.75924599787822 45.27671899844492, -92.75941999802778 45.27718649803985, -92.75960999785612 45.27731999914, -92.75978699565532 45.27743849638546, -92.76004300142414 45.277978995119405, -92.76061199738588 45.27882799808139, -92.76117799722955 45.280582999200305, -92.76136
 19999475 45.28220800042353, -92.76167096088638 45.2836803717185, -92.76198517744629 45.2850267976271, -92.76206945308458 45.2853507773657, -92.76202745146396 45.286658659028, -92.76204199858486 45.28698499388888, -92.76201199644161 45.28793199672008, -92.76200399722086 45.28821299803955, -92.76121399640145 45.28913599914764, -92.7603870028136 45.28991599406784, -92.75871000510011 45.29096499709372, -92.75799200634881 45.291140996050984, -92.75687800551285 45.29148399845183, -92.75507700319366 45.2919269952758, -92.75480030147037 45.291986779669465, -92.74569331443023 45.29606484000191, -92.74555580404507 45.29614422445335, -92.74523588498667 45.29631411941847, -92.76071968429389 45.29617634034589, -92.79448651640953 45.29587194744184, -92.82553071142016 45.29634288822895, -92.82523623967 45.28697641600944, -92.8246113114385 45.27459391718561, -92.82414631698042 45.26733414102221, -92.83443181636859 45.267466042102846, -92.83450366471794 45.265666722695805, -92.8395297613521 45.26570
 782145342, -92.83954651660255 45.2675117790906, -92.85488466565545 45.267633226883305, -92.85446380439222 45.260381978642265, -92.8530801070886 45.256940031152055, -92.8746167542768 45.2569553750289, -92.87517983690772 45.26774272327855, -92.88032459143679 45.26775272915376, -92.88028907325248 45.27498539130476, -92.885429695981 45.27499516876503, -92.88541044770409 45.27862274921294, -92.8854460740016 45.28269595676258, -92.8858306795285 45.28583335680999, -92.89095994168375 45.285838365551086, -92.89147668909354 45.290056047991875, -92.89183494474656 45.292995365557246, -92.89287941280966 45.29621886928581, -92.93574219102997 45.296382695230655, -92.9366855829562 45.29639453639271, -92.93730010601949 45.29640233268984, -92.93773633826109 45.296407862218295, -92.95031707870098 45.29656663627082, -92.95732733387652 45.29663267857854, -92.95723233585932 45.305785498930874, -92.95755812361517 45.31807293816823, -92.9575313307762 45.325662873647204, -92.96200814151011 45.32569410734573
 , -92.96201051236334 45.33056403262943, -92.95763365021791 45.330562956294486, -92.95750484414667 45.34006528297348, -92.95740249422305 45.3523406680097, -92.96272753035339 45.352295608902175, -92.96260253143201 45.363259386181184, -92.95732537061275 45.363286992831206, -92.95715614538045 45.36869421119079, -92.97302216756823 45.36904156334545, -92.9731090974606 45.37554810693529, -92.98760985309234 45.37555619312347, -92.98429494637762 45.38215591061988, -92.9924184629002 45.38233326055907, -93.01850137881846 45.38277378724873, -93.01956464133914 45.41174708503911, -93.03973263863047 45.412106304897264, -93.06569776540464 45.412656360563524, -93.08346874844985 45.41297273973574, -93.09263091377308 45.41335460313747, -93.1012213163472 45.413720365424695, -93.10759754754753 45.41373499082408, -93.14214551761233 45.41373101611429, -93.1421802894172 45.40666589187203, -93.14209155741717 45.38498980813781, -93.14398965535287 45.369981475770224, -93.13861914028635 45.36992203894643, -93.
 13946982733188 45.35540022959687, -93.14362673736643 45.35542059147377, -93.14338145836778 45.34816201728363, -93.14259222919002 45.34815677471413, -93.14123737100095 45.34271091215897, -93.14120170425102 45.34166175650565, -93.14159640367895 45.340845226624126, -93.16430988689314 45.34107128935172, -93.1641229508536 45.33731028186903, -93.163783504365 45.32713863170596, -93.16354815472778 45.31568179036097, -93.1634974864936 45.3115083559682, -93.16335415000293 45.30838048844207, -93.16326942872365 45.30653168298998, -93.16286993093225 45.29781375116957, -93.16292479029 45.297483756012355, -93.16251838572086 45.29748043583636, -93.16242411934059 45.29340169752503, -93.16237192435095 45.291513658346155, -93.16125915756838 45.29101148729498, -93.16224903398384 45.290456018307964, -93.16243543883762 45.29031474509565, -93.16248365754952 45.29016960982244, -93.1625270557542 45.28932067928762, -93.16350507037129 45.28940282906675, -93.16413761242012 45.28944739938537, -93.16430369461645
  45.289411531953206, -93.164472138656 45.28937514511818, -93.16431016328954 45.288334379584406, -93.16422830296436 45.28780835028316, -93.16373011428878 45.287807744950875, -93.16348868413621 45.28778563548775, -93.16304669211718 45.28779811404454, -93.16252493722239 45.28781182501286, -93.1625182014603 45.28601279964026, -93.1625127377889 45.28416325442296, -93.1717122152211 45.28391079701647, -93.17291828928865 45.28387769615237, -93.17292468588315 45.28327561174209, -93.1729215958459 45.28269914269899, -93.17290904354249 45.28216703245599, -93.17290447076888 45.281410092382885, -93.17289432485279 45.28068732375472, -93.17288720912401 45.280265431486754))
+poly2	poly2	POLYGON((-93.26592485308495 45.18931973506328, -93.26373519655886 45.18933815615675, -93.2637828223868 45.18660121752107, -93.26280973893772 45.18656958194617, -93.2603275028686 45.186488876325654, -93.25976682936536 45.18646929139094, -93.25877703935303 45.18686109057519, -93.25788401039608 45.18633824889261, -93.25713811973642 45.186864792015704, -93.25660115549654 45.18628640445176, -93.24081325108644 45.18609354693712, -93.2356823133177 45.1860308697061, -93.23474944979115 45.186019474019865, -93.23478565684188 45.18266103967549, -93.23072066106351 45.18267669158043, -93.22480340476464 45.18267437402639, -93.21952101307244 45.18267371221728, -93.21950131879755 45.184689058075534, -93.21950381582634 45.18590104693386, -93.21950547892035 45.186708829298695, -93.21948324866376 45.18808573281868, -93.21947477056304 45.188619717930756, -93.2194751507154 45.1899146284615, -93.22390334137022 45.18991091026497, -93.2245904557543 45.18993775453468, -93.2245784309098 45.190287
 02856576, -93.2245932424241 45.19081834295508, -93.22460314163764 45.19137779927979, -93.22459067695124 45.19162607300785, -93.22458367100289 45.19176562022696, -93.22354968949122 45.191760188521705, -93.22131530006368 45.19175468785821, -93.22018302807493 45.19175762419069, -93.21965635944291 45.19175898704962, -93.21824735047468 45.191762639857636, -93.21840068968908 45.191840907619024, -93.21858279007587 45.191950538176606, -93.21874378970492 45.19205449060312, -93.21893581214327 45.192204972059955, -93.21911499957261 45.19238205879934, -93.21934767139433 45.192628269473076, -93.21954522989743 45.1928508489684, -93.21972003978802 45.19304459976245, -93.21997538064213 45.19332124206717, -93.22011354045264 45.193470928079385, -93.22046875034326 45.19384479955501, -93.2206469058326 45.19404172922978, -93.22079845082156 45.194244494502364, -93.2209416400795 45.19447508772328, -93.22107397875365 45.19474417974581, -93.2211368505518 45.19490985928749, -93.22118231976518 45.195047277731
 625, -93.22124659963487 45.19525315038074, -93.22128314962913 45.195396480693944, -93.22130715028514 45.195564823375, -93.22131862069979 45.195757013030224, -93.22130704484326 45.19599065847414, -93.22127083850016 45.19622942989826, -93.22124456959293 45.19636257994296, -93.22120917947201 45.19651471803614, -93.22115328972328 45.196774039833144, -93.22110053150747 45.19700410181286, -93.22105123806169 45.19721904984113, -93.21939747849284 45.19720754776318, -93.21658707902952 45.19719901749774, -93.21405492494755 45.19718389708806, -93.21060961905127 45.19716332241369, -93.20846870851273 45.19715738191871, -93.20635420918421 45.19714993030806, -93.20384995444252 45.19713947337882, -93.20382099935851 45.195915480832355, -93.20379040854755 45.195493880093856, -93.20373937951182 45.19525460196455, -93.20366799901262 45.194730001052676, -93.20359944927 45.194273469702246, -93.20351980946141 45.19386975065817, -93.20336890147132 45.1933312322322, -93.20348773988103 45.19317805926476, -93
 .20364964522179 45.19294381603321, -93.20373782170354 45.192758795441485, -93.20378634041538 45.1925589245846, -93.20378780054193 45.1924118820702, -93.20373224993294 45.192246366644895, -93.20366678053941 45.192063182244134, -93.20349712021084 45.19164111034226, -93.20336402335359 45.191262445660406, -93.20333661484061 45.19107258136713, -93.20334012614478 45.19082850506992, -93.20338500114326 45.190584969374704, -93.20346313590359 45.19035226093307, -93.20353125074365 45.19015096025676, -93.20337886118753 45.19012069933683, -93.20280004152556 45.18999823901699, -93.20236430223584 45.1898748712581, -93.20223796285948 45.18983446401002, -93.20171338128353 45.189666689690526, -93.20105175026708 45.18940210042135, -93.20059509118217 45.18937347081525, -93.20014399997638 45.18935951962055, -93.1999096512546 45.18934032171285, -93.19969162075753 45.18934030912719, -93.19953079227915 45.18938062079311, -93.19930724128803 45.189471810355066, -93.19836742091539 45.18954495845859, -93.19790
 904174889 45.189755310346555, -93.19770094626355 45.18978905045578, -93.19728573057267 45.1898563687543, -93.19706717806918 45.18978234280038, -93.1961191012612 45.18980511056629, -93.19583707702907 45.18977039110604, -93.19495714548943 45.18966207098092, -93.19409949054268 45.18955648989894, -93.19361391124465 45.18954758129998, -93.19142135137997 45.189507349701145, -93.18867729058191 45.18943758222878, -93.18766468614145 45.18941183701645, -93.1869063815807 45.18939255950494, -93.18676117212036 45.18939312363656, -93.18583601993124 45.18939673056086, -93.18362870083628 45.18940533739182, -93.18015920861117 45.189432919714875, -93.17748344774633 45.18940274982507, -93.17100678798263 45.18934067185518, -93.1680509570817 45.18931686702863, -93.16712265967519 45.189309389152754, -93.1632729184803 45.189289560128074, -93.1524420382428 45.189137301470666, -93.1488330300988 45.189087681208825, -93.14258337454692 45.18900953614207, -93.1425728385595 45.18964797148711, -93.14257129908563 
 45.19044710129245, -93.14256839076815 45.191380659844974, -93.14257549009486 45.192639988690985, -93.14256591028126 45.193624481846925, -93.1425562203409 45.19475816134898, -93.14254671019609 45.19564806883362, -93.14253591314012 45.19592629600891, -93.1425191002932 45.19635953895129, -93.14240307328147 45.20366956427245, -93.14239731024965 45.20842345007226, -93.14246141142196 45.2144183909345, -93.14198170032972 45.23994442974387, -93.14597353942523 45.240012030562795, -93.14892151981124 45.24004509174428, -93.15151768504401 45.24003827478177, -93.15470331907811 45.2400299112851, -93.15641781022819 45.240063720104146, -93.15847245794774 45.24007548756677, -93.16253551804624 45.24018481776239, -93.16296586932476 45.24019639699945, -93.16296093749654 45.240539543608094, -93.16295567833508 45.24077659970959, -93.16294559992268 45.24173110984731, -93.16294931429802 45.242313107885224, -93.16296371061823 45.24456989801016, -93.16297766989932 45.24481356907269, -93.16296319587042 45.245
 04668430867, -93.16296267909655 45.24536222031531, -93.16296756070733 45.24580785775435, -93.16295754084666 45.24621538734816, -93.16294315030365 45.24641950970948, -93.1629421699368 45.246633444731216, -93.16298326866249 45.24685970478054, -93.16302280494743 45.24701074802872, -93.1630346343297 45.247139320093076, -93.16303000914128 45.24727503858908, -93.16301519072017 45.24747862874394, -93.16301622062082 45.247670019373224, -93.16301002844395 45.24802483903903, -93.16296010836595 45.248250609285236, -93.16288288941641 45.248626979189, -93.16286421036493 45.24918153632857, -93.16282236866641 45.25042383853131, -93.16275001793326 45.25104184745623, -93.16265874011768 45.251876269431015, -93.1626048141941 45.25465385517585, -93.162568780952 45.25650987775294, -93.16253090903855 45.25861572819838, -93.16247264162719 45.261955487720506, -93.16246809047925 45.26571735738526, -93.16241263022145 45.267693939529536, -93.16242125944353 45.26894469986081, -93.16242684956876 45.269277499432
 015, -93.16247902269161 45.26952793567272, -93.16254025984375 45.269768259020054, -93.1625248689828 45.26996728874923, -93.16248176954191 45.27027930739088, -93.16247917649272 45.270869996810376, -93.16247840915516 45.27104490906511, -93.16247877426206 45.27127651283899, -93.162479560911 45.27177208702322, -93.16249869026827 45.272467959171365, -93.16249147172434 45.27291248854739, -93.16247688682598 45.27318968296259, -93.16246680083795 45.27338141702519, -93.1624671298516 45.27470105775956, -93.16246893968787 45.276279379505084, -93.1624737063593 45.2764111771935, -93.16249244905424 45.276929488819604, -93.16363037995181 45.27688204948932, -93.16581262202895 45.276844043452684, -93.16722651010657 45.27681941864911, -93.17218124072862 45.27674700948904, -93.1722224784459 45.27757776899891, -93.17229737034532 45.279497570305445, -93.17232269933695 45.28027246109518, -93.17288721010608 45.28026543129147, -93.1728943187817 45.2806873180744, -93.17290447218495 45.28141008817547, -93.17
 290904002667 45.28216703008146, -93.17292159084371 45.28269913830247, -93.17292468118433 45.283275608616165, -93.17291828224536 45.28387769767021, -93.1717122127579 45.283910797244246, -93.16251273143365 45.28416325629099, -93.16251820094257 45.28601279797615, -93.16252493935717 45.287811833132764, -93.16304669905364 45.28779811692505, -93.16348868871324 45.28778563925035, -93.16373011962693 45.28780774767522, -93.16422830587629 45.28780835110865, -93.1643101699488 45.28833437868018, -93.16447213914093 45.289375147768524, -93.16430369361024 45.28941153310711, -93.16413761723706 45.28944740219967, -93.16350507286433 45.289402832527344, -93.16252705964098 45.289320683284735, -93.16248365939401 45.29016961156254, -93.16243543831087 45.29031475002342, -93.16224903970826 45.2904560215217, -93.16125915934788 45.29101149209126, -93.16237192796683 45.291513661220456, -93.16242412151107 45.29340170072084, -93.16251838980172 45.29748044313293, -93.16292479370829 45.29748376064082, -93.1863909
 4534673 45.29767533425263, -93.18833342032521 45.29769119188229, -93.1925428426471 45.29770437859642, -93.19474753040078 45.29771128804242, -93.19765740975974 45.29769541872667, -93.20297591868295 45.29776263827187, -93.20683144906876 45.29774197003572, -93.20883497923562 45.297766559466794, -93.21546742887979 45.297768422222155, -93.22617724980643 45.29791971794424, -93.23408017640227 45.298023690859175, -93.2343080073169 45.288444186545625, -93.23432525195352 45.287995322205425, -93.23469515647318 45.269279712377234, -93.23475627635968 45.266203358381446, -93.23560542207227 45.26619551047824, -93.23899176558338 45.26613779367068, -93.24250527367546 45.26608234822973, -93.243445378056 45.26606503829342, -93.24512861083372 45.2660344570852, -93.24588057830995 45.26602026067889, -93.24713274287363 45.26599455787498, -93.25036838013868 45.26592734514467, -93.25172461510564 45.265900698298395, -93.25236738024864 45.265888260809106, -93.25481754173921 45.26583307838667, -93.255713579529
 06 45.265819559899164, -93.2594981489083 45.26575415212897, -93.26098138766197 45.265754375486374, -93.26155216698102 45.26565612540643, -93.26170097145753 45.26562288963898, -93.26208574477789 45.26553876835043, -93.26245875524685 45.265434673708015, -93.26277275191426 45.265316250819595, -93.26311663127117 45.26517251314189, -93.26346212923646 45.26500240317637, -93.26393572774133 45.26477558787491, -93.2651820516718 45.26406759657772, -93.26518110226205 45.26337226279194, -93.26515218908767 45.26311636791454, -93.26518703008779 45.262871689663605, -93.2652064900752 45.26265582104258, -93.2652110298225 45.26215614194132, -93.26522443086994 45.26112430402238, -93.26522989950563 45.260703199933474, -93.26524872191168 45.25930812973533, -93.26525187087448 45.258897852775995, -93.26525857049303 45.258025812056765, -93.26527734826267 45.256675072153314, -93.26528081766433 45.25612813038996, -93.265287399575 45.25512698071874, -93.26530031054412 45.253711671615115, -93.26531490547187 45
 .25273002640574, -93.26532214123614 45.252243491267, -93.26533817105908 45.25062180123498, -93.26535413994274 45.24906421173263, -93.26536141910549 45.24841165046578, -93.26536638602661 45.24796649509243, -93.26537318826473 45.24735637067748, -93.26539798003012 45.24589779189643, -93.265404909549 45.24454674190931, -93.2654060939449 45.24296904311022, -93.26540624905046 45.24276127146885, -93.26540843815205 45.2420263885843, -93.26541275006169 45.240577352345994, -93.2654375717671 45.238843301612725, -93.26544518264211 45.237906888690105, -93.26544940933664 45.23738688110566, -93.26546966016808 45.236093591927926, -93.2654781584622 45.235359229961944, -93.26548338867605 45.23490715107922, -93.26553582901259 45.23354268990693, -93.26554071996831 45.23330119833777, -93.26555987026248 45.2323552839169, -93.26557251955711 45.23173040973764, -93.26556626032777 45.22975235185782, -93.26556606661761 45.229367333607186, -93.26556579189545 45.228823722705066, -93.26562882232702 45.2268722061
 76665, -93.26571073971922 45.224335971082276, -93.26574560622672 45.22192222321787, -93.26574836877063 45.22173093256304, -93.26577033227747 45.22021043432355, -93.26578588443306 45.21913391123174, -93.26580662128347 45.21769799745153, -93.26580983179628 45.217475736026664, -93.26581322607608 45.217240685631346, -93.26590715360736 45.210737684073244, -93.26591966090616 45.209871711997586, -93.2659016992406 45.20722015227932, -93.26587484243684 45.203254836571126, -93.26585637174348 45.20052765082941, -93.26585684827346 45.19841676076085, -93.26587786763154 45.19732741144391, -93.2658624676632 45.1970879109074, -93.2659274100303 45.194004979577755, -93.26595017983325 45.191531890895845, -93.26595423366354 45.19092534610275, -93.26593099287571 45.190637988686554, -93.2659274057232 45.18986823069059, -93.26592485308495 45.18931973506328))
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d8c73530/src/Lucene.Net.Tests.Spatial/Test-Files/Data/countries-bbox.txt
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Spatial/Test-Files/Data/countries-bbox.txt b/src/Lucene.Net.Tests.Spatial/Test-Files/Data/countries-bbox.txt
new file mode 100644
index 0000000..78e14e0
--- /dev/null
+++ b/src/Lucene.Net.Tests.Spatial/Test-Files/Data/countries-bbox.txt
@@ -0,0 +1,249 @@
+#id	name	shape	
+FLK	Falkland Is.	ENVELOPE(-61.148055, -57.733200, -51.249455, -52.343055)
+GUF	French Guiana	ENVELOPE(-54.603782, -51.648055, 5.755418, 2.113473)
+GUY	Guyana	ENVELOPE(-61.389727, -56.470636, 8.535273, 1.186873)
+PCN	Pitcairn Is.	ENVELOPE(-130.105055, -128.286118, -24.325836, -25.082227)
+SGS	South Georgia & the South Sandwich Is.	ENVELOPE(-38.023755, -26.241391, -53.989727, -58.498609)
+SHN	St. Helena	ENVELOPE(-5.792782, -5.645282, -15.903755, -16.021946)
+SUR	Suriname	ENVELOPE(-58.071400, -53.986118, 6.001809, 1.836245)
+TTO	Trinidad & Tobago	ENVELOPE(-61.921600, -60.520836, 11.345554, 10.040345)
+VEN	Venezuela	ENVELOPE(-73.378064, -59.803055, 12.197500, 0.649164)
+ASM	American Samoa	ENVELOPE(-170.823227, -170.561873, -14.254309, -14.375555)
+COK	Cook Is.	ENVELOPE(-165.848345, -157.703764, -10.881318, -21.940836)
+PYF	French Polynesia	ENVELOPE(-151.497773, -138.809755, -8.778191, -17.870836)
+UMI	Jarvis I.	ENVELOPE(-160.045164, -160.009464, -0.374309, -0.398055)
+NIU	Niue	ENVELOPE(-169.952236, -169.781555, -18.963336, -19.145555)
+WSM	Samoa	ENVELOPE(-172.780027, -171.429200, -13.460555, -14.057500)
+TKL	Tokelau	ENVELOPE(-171.862718, -171.843764, -9.170627, -9.218891)
+TON	Tonga	ENVELOPE(-175.360000, -173.906827, -18.568055, -21.268064)
+WLF	Wallis & Futuna	ENVELOPE(-178.190273, -176.121936, -13.214864, -14.323891)
+ARG	Argentina	ENVELOPE(-73.582300, -53.650009, -21.780518, -55.051673)
+BOL	Bolivia	ENVELOPE(-69.656191, -57.521118, -9.679191, -22.901109)
+BRA	Brazil	ENVELOPE(-74.004591, -34.792918, 5.272709, -33.741118)
+CHL	Chile	ENVELOPE(-109.446109, -66.420627, -17.505282, -55.902227)
+ECU	Ecuador	ENVELOPE(-91.663891, -75.216846, 1.437782, -5.000309)
+PRY	Paraguay	ENVELOPE(-62.643773, -54.243900, -19.296809, -27.584727)
+PER	Peru	ENVELOPE(-81.355146, -68.673909, -0.036873, -18.348546)
+URY	Uruguay	ENVELOPE(-58.438609, -53.098300, -30.096673, -34.943818)
+UMI	Baker I.	ENVELOPE(-176.467655, -176.455855, 0.222573, 0.215282)
+CAN	Canada	ENVELOPE(-141.002991, -52.617364, 83.113873, 41.675554)
+GTM	Guatemala	ENVELOPE(-92.246782, -88.214736, 17.821109, 13.745836)
+UMI	Howland I.	ENVELOPE(-176.643082, -176.631091, 0.808609, 0.790282)
+UMI	Johnston Atoll	ENVELOPE(-169.538936, -169.523927, 16.730273, 16.724164)
+MEX	Mexico	ENVELOPE(-118.404164, -86.738618, 32.718454, 14.550545)
+UMI	Midway Is.	ENVELOPE(-177.395845, -177.360545, 28.221518, 28.184154)
+BRB	Barbados	ENVELOPE(-59.659446, -59.427082, 13.337082, 13.050554)
+DMA	Dominica	ENVELOPE(-61.491391, -61.250700, 15.631945, 15.198054)
+GRD	Grenada	ENVELOPE(-61.785182, -61.596391, 12.237154, 11.996945)
+GLP	Guadeloupe	ENVELOPE(-61.796109, -61.187082, 16.512918, 15.870000)
+MTQ	Martinique	ENVELOPE(-61.231536, -60.816946, 14.880136, 14.402773)
+LCA	St. Lucia	ENVELOPE(-61.079582, -60.878064, 14.109309, 13.709445)
+SPM	St. Pierre & Miquelon	ENVELOPE(-56.397782, -56.145500, 47.135827, 46.747191)
+VCT	St. Vincent & the Grenadines	ENVELOPE(-61.280146, -61.120282, 13.383191, 13.130282)
+ABW	Aruba	ENVELOPE(-70.059664, -69.874864, 12.627773, 12.411109)
+BMU	Bermuda	ENVELOPE(-64.823064, -64.676809, 32.379509, 32.260554)
+DOM	Dominican Republic	ENVELOPE(-72.003064, -68.322927, 19.930827, 17.604164)
+HTI	Haiti	ENVELOPE(-74.467791, -71.629182, 20.091454, 18.022782)
+JAM	Jamaica	ENVELOPE(-78.373900, -76.221118, 18.522500, 17.697218)
+ANT	Netherlands Antilles	ENVELOPE(-69.163618, -68.192927, 12.383891, 12.020554)
+BHS	The Bahamas	ENVELOPE(-78.978900, -72.738891, 26.929164, 20.915273)
+TCA	Turks & Caicos Is.	ENVELOPE(-72.031464, -71.127573, 21.957773, 21.429918)
+BLZ	Belize	ENVELOPE(-89.216400, -87.779591, 18.489900, 15.889854)
+CYM	Cayman Is.	ENVELOPE(-81.400836, -81.093064, 19.354164, 19.265000)
+COL	Colombia	ENVELOPE(-81.720146, -66.870455, 12.590273, -4.236873)
+CRI	Costa Rica	ENVELOPE(-85.911391, -82.561400, 11.212845, 8.025673)
+CUB	Cuba	ENVELOPE(-84.952927, -74.131255, 23.194027, 19.821945)
+SLV	El Salvador	ENVELOPE(-90.108064, -87.694673, 14.431982, 13.156391)
+HND	Honduras	ENVELOPE(-89.350491, -83.131855, 16.435827, 12.985173)
+NIC	Nicaragua	ENVELOPE(-87.689827, -83.131855, 15.022218, 10.709691)
+PAN	Panama	ENVELOPE(-83.030291, -77.198336, 9.620136, 7.206109)
+AIA	Anguilla	ENVELOPE(-63.167782, -62.972709, 18.272982, 18.164445)
+ATG	Antigua & Barbuda	ENVELOPE(-61.891109, -61.666946, 17.724300, 16.989718)
+VGB	British Virgin Is.	ENVELOPE(-64.698482, -64.324527, 18.504854, 18.383891)
+MSR	Montserrat	ENVELOPE(-62.236946, -62.138891, 16.812354, 16.671391)
+PRI	Puerto Rico	ENVELOPE(-67.266400, -65.301118, 18.519445, 17.922218)
+KNA	St. Kitts & Nevis	ENVELOPE(-62.862782, -62.622509, 17.410136, 17.208882)
+VIR	Virgin Is.	ENVELOPE(-65.023509, -64.562573, 18.387673, 17.676664)
+FRO	Faroe Is.	ENVELOPE(-7.433473, -6.389718, 62.357500, 61.388327)
+GRL	Greenland	ENVELOPE(-73.053609, -12.157637, 83.623600, 59.790273)
+XGK	Guernsey	ENVELOPE(-2.668609, -2.500973, 49.508191, 49.422491)
+ISL	Iceland	ENVELOPE(-24.538400, -13.499446, 66.536100, 63.390000)
+IRL	Ireland	ENVELOPE(-10.474727, -6.013055, 55.379991, 51.445545)
+XIM	Isle of Man	ENVELOPE(-4.787155, -4.308682, 54.416382, 54.055545)
+SJM	Jan Mayen	ENVELOPE(-9.119909, -7.928509, 71.180818, 70.803863)
+XJE	Jersey	ENVELOPE(-2.247364, -2.015000, 49.261109, 49.167773)
+GBR	United Kingdom	ENVELOPE(-8.171664, 1.749445, 60.843327, 49.955273)
+CPV	Cape Verde	ENVELOPE(-25.360555, -22.666109, 17.192364, 14.811109)
+CIV	Cote d'Ivoire	ENVELOPE(-8.606382, -2.487782, 10.735254, 4.344718)
+GHA	Ghana	ENVELOPE(-3.248891, 1.202782, 11.155691, 4.727082)
+GIB	Gibraltar	ENVELOPE(-5.356173, -5.334509, 36.163309, 36.112073)
+LBR	Liberia	ENVELOPE(-11.492327, -7.368400, 8.512782, 4.343609)
+MAR	Morocco	ENVELOPE(-13.174964, -1.011809, 35.919164, 27.664236)
+PRT	Portugal	ENVELOPE(-31.289027, -6.190455, 42.150673, 32.637500)
+ESP	Spain	ENVELOPE(-18.169864, 4.316945, 43.764300, 27.637500)
+ESH	Western Sahara	ENVELOPE(-17.101527, -8.666391, 27.666954, 20.764100)
+BFA	Burkina Faso	ENVELOPE(-5.520837, 2.397927, 15.082773, 9.395691)
+GIN	Guinea	ENVELOPE(-15.080837, -7.653373, 12.677500, 7.193927)
+GNB	Guinea-Bissau	ENVELOPE(-16.717773, -13.643891, 12.684718, 10.925100)
+MLI	Mali	ENVELOPE(-12.244837, 4.251391, 25.000273, 10.142154)
+MRT	Mauritania	ENVELOPE(-17.075555, -4.806109, 27.290454, 14.725636)
+SEN	Senegal	ENVELOPE(-17.532782, -11.369927, 16.690618, 12.301745)
+SLE	Sierra Leone	ENVELOPE(-13.295609, -10.264309, 9.997500, 6.923609)
+GMB	The Gambia	ENVELOPE(-16.821664, -13.798609, 13.826391, 13.059973)
+DJI	Djibouti	ENVELOPE(41.759854, 43.420409, 12.708327, 10.942218)
+ERI	Eritrea	ENVELOPE(36.443282, 43.121382, 17.994882, 12.363891)
+ETH	Ethiopia	ENVELOPE(32.991800, 47.988245, 14.883609, 3.406664)
+MNG	Mongolia	ENVELOPE(87.761100, 119.931509, 52.142773, 41.586654)
+SDN	Sudan	ENVELOPE(21.829100, 38.607500, 22.232218, 3.493391)
+UGA	Uganda	ENVELOPE(29.574300, 35.009718, 4.222782, -1.476109)
+ISR	Gaza Strip	ENVELOPE(34.216663, 34.558891, 31.596100, 31.216545)
+IRQ	Iraq	ENVELOPE(38.794700, 48.560691, 37.383673, 29.061664)
+ISR	Israel	ENVELOPE(34.267582, 35.681109, 33.270273, 29.486709)
+JOR	Jordan	ENVELOPE(34.960418, 39.301109, 33.377591, 29.188891)
+KAZ	Kazakhstan	ENVELOPE(46.499163, 87.348209, 55.442627, 40.594436)
+NOR	Norway	ENVELOPE(4.789582, 31.073536, 71.154709, 57.987918)
+RUS	Russia	ENVELOPE(-180.000000, 180.000000, 81.851927, 41.196582)
+SWE	Sweden	ENVELOPE(11.113336, 24.167009, 69.060300, 55.339164)
+ISR	West Bank	ENVELOPE(34.888191, 35.570609, 32.546391, 31.350691)
+DZA	Algeria	ENVELOPE(-8.667218, 11.986473, 37.089854, 18.976391)
+AND	Andorra	ENVELOPE(1.421391, 1.781718, 42.655964, 42.436382)
+CMR	Cameroon	ENVELOPE(8.502363, 16.207000, 13.085000, 1.654164)
+CAF	Central African Republic	ENVELOPE(14.418891, 27.459718, 11.000836, 2.221264)
+LBY	Libya	ENVELOPE(9.311391, 25.151663, 33.171136, 19.499064)
+MCO	Monaco	ENVELOPE(7.390900, 7.439291, 43.768300, 43.727545)
+TUN	Tunisia	ENVELOPE(7.492218, 11.581663, 37.340409, 30.234391)
+BEN	Benin	ENVELOPE(0.776663, 3.855000, 12.396654, 6.218718)
+TCD	Chad	ENVELOPE(13.461945, 24.002745, 23.450554, 7.458536)
+GNQ	Equatorial Guinea	ENVELOPE(8.424163, 11.353891, 3.763336, 0.930154)
+KIR	Kiribati	ENVELOPE(-157.581700, 172.947509, 2.033054, 1.335991)
+NER	Niger	ENVELOPE(0.166663, 15.996663, 23.522309, 11.693273)
+NGA	Nigeria	ENVELOPE(2.692500, 14.649654, 13.891500, 4.272845)
+STP	Sao Tome & Principe	ENVELOPE(6.465136, 7.463473, 1.701245, 0.018336)
+TGO	Togo	ENVELOPE(-0.149764, 1.797800, 11.138536, 6.100545)
+ALB	Albania	ENVELOPE(19.288536, 21.053327, 42.660345, 39.645000)
+BIH	Bosnia & Herzegovina	ENVELOPE(15.740591, 19.619782, 45.265945, 42.565827)
+HRV	Croatia	ENVELOPE(13.504791, 19.425000, 46.535827, 42.399991)
+ITA	Italy	ENVELOPE(6.623963, 18.514445, 47.094582, 36.649164)
+MKD	Macedonia	ENVELOPE(20.458818, 23.030973, 42.358954, 40.855891)
+MLT	Malta	ENVELOPE(14.329100, 14.570000, 35.991936, 35.800000)
+SMR	San Marino	ENVELOPE(12.406945, 12.511109, 43.986873, 43.898682)
+SMN	Serbia & Montenegro	ENVELOPE(18.453327, 23.005000, 46.181109, 41.849000)
+VTC	Vatican City	ENVELOPE(12.444473, 12.457718, 41.908391, 41.900891)
+BGR	Bulgaria	ENVELOPE(22.365273, 28.605136, 44.224718, 41.243045)
+CYP	Cyprus	ENVELOPE(32.269863, 34.586036, 35.688609, 34.640273)
+EGY	Egypt	ENVELOPE(24.706800, 36.895827, 31.646945, 21.994164)
+GEO	Georgia	ENVELOPE(40.002963, 46.710818, 43.584718, 41.048045)
+GRC	Greece	ENVELOPE(19.640000, 28.238045, 41.747773, 34.930545)
+LBN	Lebanon	ENVELOPE(35.100827, 36.623745, 34.647500, 33.062082)
+SYR	Syria	ENVELOPE(35.614463, 42.378327, 37.290545, 32.313609)
+TUR	Turkey	ENVELOPE(25.665827, 44.820545, 42.109991, 35.818445)
+AUT	Austria	ENVELOPE(9.533573, 17.166382, 49.018745, 46.407491)
+CZE	Czech Republic	ENVELOPE(12.093700, 18.852218, 51.052491, 48.581382)
+DNK	Denmark	ENVELOPE(8.092918, 15.149163, 57.745973, 54.561936)
+HUN	Hungary	ENVELOPE(16.111800, 22.894800, 48.576173, 45.748327)
+POL	Poland	ENVELOPE(14.147636, 24.143473, 54.836036, 49.002918)
+SVK	Slovakia	ENVELOPE(16.844718, 22.558054, 49.600827, 47.737500)
+SVN	Slovenia	ENVELOPE(13.383473, 16.607873, 46.876245, 45.425818)
+SJM	Svalbard	ENVELOPE(10.487918, 33.637500, 80.764163, 74.343045)
+BEL	Belgium	ENVELOPE(2.541663, 6.398200, 51.501245, 49.508882)
+FRA	France	ENVELOPE(-4.790282, 9.562218, 51.091109, 41.364927)
+DEU	Germany	ENVELOPE(5.865000, 15.033818, 55.056527, 47.274718)
+LIE	Liechtenstein	ENVELOPE(9.474636, 9.633891, 47.274545, 47.057454)
+LUX	Luxembourg	ENVELOPE(5.734445, 6.524027, 50.181809, 49.448464)
+NLD	Netherlands	ENVELOPE(3.370863, 7.210973, 53.465827, 50.753882)
+CHE	Switzerland	ENVELOPE(5.967009, 10.488209, 47.806664, 45.829436)
+USA	United States	ENVELOPE(-178.216555, 179.775936, 71.351436, 18.925482)
+BLR	Belarus	ENVELOPE(23.165400, 32.740054, 56.167491, 51.251845)
+EST	Estonia	ENVELOPE(21.837354, 28.194091, 59.664718, 57.522636)
+FIN	Finland	ENVELOPE(19.511391, 31.581963, 70.088609, 59.806800)
+LVA	Latvia	ENVELOPE(20.968609, 28.235963, 58.083254, 55.674836)
+LTU	Lithuania	ENVELOPE(20.942836, 26.813054, 56.449854, 53.890336)
+MDA	Moldova	ENVELOPE(26.634991, 30.128709, 48.468318, 45.448645)
+ROM	Romania	ENVELOPE(20.261027, 29.672218, 48.263882, 43.623309)
+UKR	Ukraine	ENVELOPE(22.151445, 40.178745, 52.378600, 44.379154)
+IND	India	ENVELOPE(68.144227, 97.380536, 35.505618, 6.745827)
+MDV	Maldives	ENVELOPE(72.863391, 73.637272, 7.027773, -0.641664)
+OMN	Oman	ENVELOPE(51.999291, 59.847082, 26.368709, 16.642782)
+SOM	Somalia	ENVELOPE(40.988609, 51.411318, 11.979164, -1.674873)
+LKA	Sri Lanka	ENVELOPE(79.696091, 81.891663, 9.828191, 5.918054)
+TKM	Turkmenistan	ENVELOPE(51.250182, 66.670882, 42.796173, 35.145991)
+UZB	Uzbekistan	ENVELOPE(55.997491, 73.167545, 45.570591, 37.184991)
+YEM	Yemen	ENVELOPE(42.555973, 54.473473, 18.999345, 12.144718)
+ARM	Armenia	ENVELOPE(43.454163, 46.620536, 41.297054, 38.841145)
+AZE	Azerbaijan	ENVELOPE(44.778863, 51.677009, 42.710754, 38.262809)
+BHR	Bahrain	ENVELOPE(50.453327, 50.796391, 26.288891, 25.571945)
+IRN	Iran	ENVELOPE(44.034954, 63.330273, 39.779154, 25.075973)
+KWT	Kuwait	ENVELOPE(46.546945, 48.416591, 30.084164, 28.538882)
+QAT	Qatar	ENVELOPE(50.751936, 51.615827, 26.152500, 24.556045)
+SAU	Saudi Arabia	ENVELOPE(34.572145, 55.666109, 32.154945, 16.377500)
+ARE	United Arab Emirates	ENVELOPE(51.583327, 56.381663, 26.083882, 22.633327)
+AFG	Afghanistan	ENVELOPE(60.504163, 74.915736, 38.471982, 29.406109)
+KGZ	Kyrgyzstan	ENVELOPE(69.249500, 80.281582, 43.216900, 39.195473)
+NPL	Nepal	ENVELOPE(80.052200, 88.194554, 30.424718, 26.368364)
+PAK	Pakistan	ENVELOPE(60.866300, 77.823927, 37.060791, 23.688045)
+TJK	Tajikistan	ENVELOPE(67.364700, 75.187482, 41.049254, 36.671845)
+BGD	Bangladesh	ENVELOPE(88.043872, 92.669345, 26.626136, 20.744818)
+BTN	Bhutan	ENVELOPE(88.751936, 92.114218, 28.325000, 26.703609)
+BRN	Brunei	ENVELOPE(114.095082, 115.360263, 5.053054, 4.018191)
+CHN	China	ENVELOPE(73.620045, 134.768463, 53.553745, 18.168882)
+JPN	Japan	ENVELOPE(123.678863, 145.812409, 45.486382, 24.251391)
+PRK	North Korea	ENVELOPE(124.323954, 130.697418, 43.006100, 37.671382)
+PLW	Palau	ENVELOPE(134.452482, 134.658872, 7.729445, 7.305254)
+PHL	Philippines	ENVELOPE(116.950000, 126.598036, 19.391109, 5.049164)
+KOR	South Korea	ENVELOPE(126.099018, 129.586872, 38.625245, 33.192209)
+KHM	Cambodia	ENVELOPE(102.346509, 107.636382, 14.708618, 10.422736)
+LAO	Laos	ENVELOPE(100.091372, 107.695254, 22.499927, 13.926664)
+MYS	Malaysia	ENVELOPE(99.641936, 119.275818, 7.352918, 0.852782)
+MMR	Myanmar	ENVELOPE(92.204991, 101.169427, 28.546527, 9.839582)
+SGP	Singapore	ENVELOPE(103.640945, 103.997945, 1.445282, 1.259027)
+THA	Thailand	ENVELOPE(97.347272, 105.639291, 20.454582, 5.633473)
+VNM	Vietnam	ENVELOPE(102.140745, 109.464845, 23.324164, 8.559236)
+GUM	Guam	ENVELOPE(144.634154, 144.953309, 13.652291, 13.235000)
+MHL	Marshall Is.	ENVELOPE(162.324963, 171.378063, 14.594027, 5.600273)
+FSM	Micronesia	ENVELOPE(158.120100, 163.042891, 6.977636, 5.261664)
+MNP	Northern Mariana Is.	ENVELOPE(145.572682, 145.818082, 15.268191, 14.908054)
+UMI	Wake I.	ENVELOPE(166.608981, 166.662200, 19.324582, 19.279445)
+BWA	Botswana	ENVELOPE(19.996109, 29.373618, -17.782082, -26.875555)
+BDI	Burundi	ENVELOPE(28.985000, 30.853191, -2.301564, -4.448055)
+ATF	French Southern & Antarctic Lands	ENVELOPE(51.650836, 70.567491, -46.327645, -49.725009)
+HMD	Heard I. & McDonald Is.	ENVELOPE(73.234709, 73.773882, -52.965145, -53.199445)
+KEN	Kenya	ENVELOPE(33.907218, 41.905163, 4.622500, -4.669618)
+RWA	Rwanda	ENVELOPE(28.854445, 30.893263, -1.054446, -2.825491)
+TZA	Tanzania	ENVELOPE(29.340827, 40.436809, -0.997218, -11.740418)
+ZMB	Zambia	ENVELOPE(21.996391, 33.702282, -8.191664, -18.074918)
+ZWE	Zimbabwe	ENVELOPE(25.237918, 33.071591, -15.616527, -22.414764)
+ATA	Antarctica	ENVELOPE(-180.000000, 180.000000, -60.503336, -90.000000)
+NOR	Bouvet I.	ENVELOPE(3.342363, 3.484163, -54.383609, -54.462782)
+COM	Comoros	ENVELOPE(43.214027, 44.530418, -11.366946, -12.383055)
+REU	Juan De Nova I.	ENVELOPE(42.723818, 42.760900, -17.052018, -17.076118)
+LSO	Lesotho	ENVELOPE(27.013973, 29.455554, -28.570691, -30.650527)
+MWI	Malawi	ENVELOPE(32.681873, 35.920963, -9.376673, -17.135282)
+MOZ	Mozambique	ENVELOPE(30.213018, 40.846109, -10.471109, -26.860282)
+ZAF	South Africa	ENVELOPE(16.483327, 37.892218, -22.136391, -46.969727)
+SWZ	Swaziland	ENVELOPE(30.798336, 32.133400, -25.728336, -27.316391)
+AGO	Angola	ENVELOPE(11.731245, 24.084445, -4.388991, -18.016391)
+COG	Congo	ENVELOPE(11.140663, 18.643609, 3.711109, -5.015000)
+ZAR	Congo, DRC	ENVELOPE(12.214554, 31.302773, 5.380691, -13.458055)
+FJI	Fiji	ENVELOPE(-180.000000, 180.000000, -16.153473, -19.162782)
+GAB	Gabon	ENVELOPE(8.700836, 14.519582, 2.317900, -3.925282)
+NAM	Namibia	ENVELOPE(11.716391, 25.264427, -16.954173, -28.961873)
+NZL	New Zealand	ENVELOPE(-176.848755, 178.841063, -34.414718, -52.578055)
+IOT	British Indian Ocean Territory	ENVELOPE(72.357900, 72.494282, -7.233473, -7.436246)
+REU	Glorioso Is.	ENVELOPE(47.279091, 47.303054, -11.554100, -11.577782)
+MDG	Madagascar	ENVELOPE(43.236827, 50.501391, -11.945555, -25.588336)
+MUS	Mauritius	ENVELOPE(57.306309, 63.495754, -19.673336, -20.520555)
+MYT	Mayotte	ENVELOPE(45.039163, 45.293345, -12.662500, -12.992500)
+REU	Reunion	ENVELOPE(55.220554, 55.853054, -20.856527, -21.373891)
+SYC	Seychelles	ENVELOPE(46.205691, 55.540554, -4.551664, -9.463055)
+CXR	Christmas I.	ENVELOPE(105.629000, 105.751900, -10.384082, -10.510973)
+CCK	Cocos Is.	ENVELOPE(96.817491, 96.864845, -12.130418, -12.199446)
+IDN	Indonesia	ENVELOPE(95.210945, 141.007018, 5.913473, -10.929655)
+TLS	Timor Leste	ENVELOPE(124.046100, 127.308591, -8.140000, -9.463627)
+AUS	Australia	ENVELOPE(112.907209, 158.960372, -10.135691, -54.753891)
+NRU	Nauru	ENVELOPE(166.904418, 166.957045, -0.493336, -0.552218)
+NCL	New Caledonia	ENVELOPE(163.982745, 168.130509, -20.087918, -22.673891)
+NFK	Norfolk I.	ENVELOPE(167.910945, 167.998872, -29.000555, -29.081109)
+PNG	Papua New Guinea	ENVELOPE(140.858854, 155.966845, -1.355282, -11.642500)
+SLB	Solomon Is.	ENVELOPE(155.671300, 166.931836, -6.605518, -11.845836)
+TUV	Tuvalu	ENVELOPE(176.295254, 179.232281, -6.089446, -8.561291)
+VUT	Vanuatu	ENVELOPE(166.521636, 169.893863, -13.707218, -20.254173)


Mime
View raw message