# Ignore geo points having lat & lon 0 from graph

**URL:** <https://discuss.elastic.co/t/ignore-geo-points-having-lat-lon-0-from-graph/79976>\
**Category:** Elasticsearch\
**Created:** [March 25, 2017, 5:37am UTC](https://discuss.elastic.co/t/ignore-geo-points-having-lat-lon-0-from-graph/79976 "2017-03-25T05:37:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![btom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/btom/32/13953_2.png) [@btom](https://discuss.elastic.co/u/btom)\
**Post date:** [March 25, 2017, 5:37am UTC](https://discuss.elastic.co/t/ignore-geo-points-having-lat-lon-0-from-graph/79976/1 "2017-03-25T05:37:05Z")

</div>

Hi,

I have few records in DB having latitude and longitude value 0. I am storing them as a geo points in elastic search.

"location": {  
"lat": 0,  
"lon": 0  
}

Could I filter to ignore records having lat = 0 and lon = 0 ? There is query to specify the range but can't find anything to exclude records having 0 lat & lon?

{  
"query": {  
"filtered": {  
"filter": {  
"geo\_distance\_range": {  
"location": {  
"lat": 40,  
"lon": -74  
}  
}  
}  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 25, 2017, 7:30am UTC](https://discuss.elastic.co/t/ignore-geo-points-having-lat-lon-0-from-graph/79976/2 "2017-03-25T07:30:33Z")

</div>

Please format your code using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

I moved your question to #elasticsearch as it's not related to #graph.

I'd recommend changing your index process and for example use a logstash mutate filter to simply remove the point from your document at index time.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 22, 2017, 7:30am UTC](https://discuss.elastic.co/t/ignore-geo-points-having-lat-lon-0-from-graph/79976/3 "2017-04-22T07:30:39Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
