Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-807

Error: Can't extract geo keys from object, malformed geometry?

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 1.8.2
    • None
    • None
    • Windows

    Description

      If I have geo-spherical index on "geo" field I can insert the attached document to mongo DB 2.5.1 but when I try to insert collection as

      collection.Insert(BsonDocument.Parse(File.ReadAllText("data1.txt")))

      I get error MongoDB.Driver.WriteConcernException : WriteConcern detected an error 'Can't extract geo keys from object, malformed geometry?:
      at MongoDB.Driver.Operations.InsertOperation.Execute(MongoConnection connection)
      at MongoDB.Driver.MongoCollection.InsertBatch(Type nominalType, IEnumerable documents, MongoInsertOptions options)
      at MongoDB.Driver.MongoCollection.Insert(Type nominalType, Object document, MongoInsertOptions options)
      at Vlad.MongoGeoTests.Test.MiscTests.Test1() in MiscTests.cs: line 74

      Why I get error when using the driver when I can insert it directly to mongo 2.5.1

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            vbodurov Vladimir Bodurov
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: