Insert Shapefile or large Geojson file in elasticsearch

I have a shapefile with 50 geometries that i want to insert into elasticsearch index to view it on kibana.I tried to converted it into geojson and try to insert because geomeries are 50 and number of points in each geometry are large i can not insert it using dev tools.

Please suggest me how can i do that.

Have you tried to convert the geometry to WKT? It is somewhat less verbose than GeoJSON.

I will recommend write a small program using the Java High Level Rest Client

Yes i tried WKT as well but its not working for large and multiple geometries.

Is it possible for you to share the geometry you are trying to index? If so use Gist or something similar, preferably in WKT format.

I can not share through git due to some restriction,but you can find data on below site.

Have you seen data available on link?

I had a look into the data provided in your link. the first question I have is if you want to insert all wards in one document or one document per ward.

In any case I think you will need to write a small program to process the data before sending it to Elasticsearch. For example the GeoJSON uses FeatureCollection which is not supported so you need to extract those features.

I want to insert one document per ward.Please explain in detail procedure to process the data.

This depends so much in your tools and what you are more comfortable with. If I had to do it I will use the csv file linked in the page. It provides the WKT for a ward and the ward number. Then I will use the Java High Level Rest Client to send the data to ElasticSearch.

I am able to insert geojson as per given format but it is not visualizing in kibana.

I am afraid that visualising geo_shape fields is not yet possible in Kibana.

points and polygons are possible but multipolygon is not supported in Kibana.I confirmed with kibana team.

Thanks for the info!

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