# Input geo locations with Elasticsearch.net

**URL:** https://discuss.elastic.co/t/input-geo-locations-with-elasticsearch-net/126291
**Category:** Elasticsearch
**Created:** [March 30, 2018, 10:11pm UTC](https://discuss.elastic.co/t/input-geo-locations-with-elasticsearch-net/126291 "2018-03-30T22:11:24Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![aaron.pedigo](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@aaron.pedigo](https://discuss.elastic.co/u/aaron.pedigo)
#### Post date: [March 30, 2018, 10:11pm UTC](https://discuss.elastic.co/t/input-geo-locations-with-elasticsearch-net/126291/1 "2018-03-30T22:11:24Z")

</div>

I am using the [Elasticesearch.net](http://Elasticesearch.net) library instead of the NEST library and am able to input my data except my latitude and longitude are not able to be mapped to a geo\_point in Kibana. All of the examples I can find seem to be talking about NEST though.

Here is a bit of my code...

var settings = new ConnectionConfiguration(new Uri("http://" + ipAddress));  
var lowlevelClient = new ElasticLowLevelClient(settings);

// Fill out the pieces here...

foreach (Piece piece in pieces)  
{  
var asyncIndexResponse = await lowlevelClient.IndexAsync(  
"pieces", "piece", piece.PieceID, PostData.Serializable(piece));  
}

My piece class looks like this:  
public class Piece  
{  
public string PieceID { get; set; }  
public DateTime TimeStamp { get; set; }  
public int MachineSerial { get; set; }  
public string Location { get; set; }  
public string RoutingCategory { get; set; }  
public string RoutingString { get; set; }  
public int DestinationBin { get; set; }  
}

I have tried many of the options this page appears to suggest, but I think I'm missing something:  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-point.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-point.html)

Can someone tell me what to do to allow me to input location data using [Elasticsearch.net](http://Elasticsearch.net)?

---

<div class="post-metadata">

### Author: ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)
#### Post date: [March 31, 2018, 5:43am UTC](https://discuss.elastic.co/t/input-geo-locations-with-elasticsearch-net/126291/2 "2018-03-31T05:43:23Z")

</div>

What do the lat and lon look like on a `Piece` instance? Could you provide a succinct example?

With what you have tried so far, what does [`DebugInformation`](https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/debug-information.html) show on the response? You can get to this through `response.ApiCall.DebugInformation`, and if you set `.DisableDirectStreaming()` on the request (or globally on `ConnectionConfiguration`), you'll also get the request and response bytes in the debug information.

---

<div class="post-metadata">

### Author: ![aaron.pedigo](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@aaron.pedigo](https://discuss.elastic.co/u/aaron.pedigo)
#### Post date: [April 3, 2018, 6:50pm UTC](https://discuss.elastic.co/t/input-geo-locations-with-elasticsearch-net/126291/3 "2018-04-03T18:50:04Z")

</div>

Russ,

I have tried a few different formats for the piece.  
This is what I tried last:  
{  
"PieceID": "110180403-143925247",  
"TimeStamp": "2018-04-03T18: 39: 25.2475097Z",  
"MachineSerial": 110,  
"City": "Lafayette",  
"Location": "40.451587,-86.878911",  
"RoutingCategory": "Resolved",  
"RoutingString": "01666850339",  
"DestinationBin": 11  
}

I have tried the location with and without a space.

I have also tried this:  
{  
"PieceID": "110180403-143925247",  
"TimeStamp": "2018-04-03T18: 39: 25.2475097Z",  
"MachineSerial": 110,  
"City": "Lafayette",  
"Location": {  
"lat": 40.451587,  
"lon": -86.878911  
},  
"RoutingCategory": "Resolved",  
"RoutingString": "01666850339",  
"DestinationBin": 11  
}

No matter what I have tried, I get this error message in Kibana when trying to make a Coordinate Map:  
No Compatible Fields: The "pieces\*" index pattern does not contain any of the following field types: geo\_point

---

<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: [May 1, 2018, 6:50pm UTC](https://discuss.elastic.co/t/input-geo-locations-with-elasticsearch-net/126291/4 "2018-05-01T18:50:27Z")

</div>

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