# Issue with deserializing MultilineStringGeoShape

**URL:** https://discuss.elastic.co/t/issue-with-deserializing-multilinestringgeoshape/263670
**Category:** Elasticsearch
**Created:** [February 9, 2021, 2:20am UTC](https://discuss.elastic.co/t/issue-with-deserializing-multilinestringgeoshape/263670 "2021-02-09T02:20:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rckreddy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rckreddy/32/83607_2.png) [@rckreddy](https://discuss.elastic.co/u/rckreddy)
#### Post date: [February 9, 2021, 2:20am UTC](https://discuss.elastic.co/t/issue-with-deserializing-multilinestringgeoshape/263670/1 "2021-02-09T02:20:13Z")

</div>

Please see the code below.  
Results when calling ElasticSearch.  
"\_source": {  
"TEST1": 450304485,  
"TEST2": 1612465007053,  
"GEOMETRY": {  
"TYPE": "MultiLineString",  
"COORDINATES": [  
[  
[  
-83.01273,  
39.94391  
],  
[  
-83.01273,  
39.94374  
],  
[  
-83.01272,  
39.94357  
],  
[  
-83.01261,  
39.94339  
],  
[  
-83.01238,  
39.94302  
],  
[  
-83.01209,  
39.94253  
]  
]  
]  
},  
"VERSION": "20.2"  
}  
// .Net class  
public class TestData  
{  
public long Test1 { get; set; }  
public long Test2 { get; set; }  
[GeoShape(Name = "COORDINATES")]  
public MultiLineStringGeoShape Geometry { get; set; }  
}

var url = configuration["elasticsearch:url"];  
var defaultIndex = configuration["elasticsearch:index"];  
var pool = new SingleNodeConnectionPool(new Uri(url));  
var settings = new ConnectionSettings(pool , sourceSerializer: JsonNetSerializer.Default).DefaultIndex(defaultIndex);

settings.DefaultMappingFor(m =\> m  
.PropertyName(td =\> td.Type, "TYPE")  
.PropertyName(td =\> td.Coordinates, "COORDINATES"));

```
        settings.DefaultMappingFor<TestData>(m => m
                                                       .PropertyName(td => td.Test1, "TEST1")
                                                       .PropertyName(td => td.Test2, "TEST2")
                                                       .PropertyName(td => td.Geometry, "GEOMETRY"));
        var client = new ElasticClient(settings);

```

Results back in .Net after the call

[  
{  
"test1": 450304485,  
"test2": 1612465007053,  
"geometry": null  
}  
]

I can't the get geometry data deserialized when the results come back successfully. Since this a NEST type should the default deserializer get the geometry data? Any suggestions would be greatly appreciated..

---

<div class="post-metadata">

### Author: ![rckreddy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rckreddy/32/83607_2.png) [@rckreddy](https://discuss.elastic.co/u/rckreddy)
#### Post date: [February 9, 2021, 9:10pm UTC](https://discuss.elastic.co/t/issue-with-deserializing-multilinestringgeoshape/263670/2 "2021-02-09T21:10:34Z")

</div>

Figured out the solution from this gist..

> <https://gist.github.com/russcam/5c40e5c6fb95b9afd9242df675fce428>

---

<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: [March 9, 2021, 9:11pm UTC](https://discuss.elastic.co/t/issue-with-deserializing-multilinestringgeoshape/263670/3 "2021-03-09T21:11:11Z")

</div>

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