Negative-Carbon-Reforestation-Project / openlayers-springboot-react-demo

0 stars 0 forks source link

Map query inaccuracy #37

Open liamstar97 opened 2 years ago

liamstar97 commented 2 years ago

Query on the map returns 100% reforestation opportunity while query on the OpenSearch dash returns 00.7...% reforestation opportunity. image

Query:

GET _search
{
  "query": {
    "bool": {
      "must": {
        "match_all": {}
      },
      "filter": {
        "geo_distance": {
          "distance": "100m",
          "location": {
            "lat": 47.72193034713749,
            "lon": -122.18298973286029
          }
        }
      }
    }
  }
}

returns:

  "hits" : {
    "total" : {
      "value" : 1,
      "relation" : "eq"
    },
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : "wa_total_reforestation_opportunity",
        "_type" : "_doc",
        "_id" : "fa858cffced7b4d61c2777ec7ce40656",
        "_score" : 1.0,
        "_source" : {
          "wa_total_reforestation_opportunity" : 0.0074083654,
          "location" : [
            -122.1828,
            47.7221
          ]
        }
      }
    ]
  }
asathkumara commented 2 years ago

Confirmed that this is not a problem with the JavaScript percentage code, so it's related to the Spring Boot code