# Indexing problems with GDAL/ogr2ogr for GEO\_POINT of geojson files

**URL:** <https://discuss.elastic.co/t/indexing-problems-with-gdal-ogr2ogr-for-geo-point-of-geojson-files/298856>\
**Category:** Elasticsearch\
**Created:** [March 4, 2022, 2:42pm UTC](https://discuss.elastic.co/t/indexing-problems-with-gdal-ogr2ogr-for-geo-point-of-geojson-files/298856 "2022-03-04T14:42:51Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [March 7, 2022, 9:04am UTC](https://discuss.elastic.co/t/indexing-problems-with-gdal-ogr2ogr-for-geo-point-of-geojson-files/298856/2 "2022-03-07T09:04:00Z")

</div>

The difference is that your call to `ogr2ogr` is apparently generating a [`geo_shape`](https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-shape.html) field type while the GeoJSON upload tool in Kibana is using [`geo_point`](https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-point.html).

If you want `ogr2ogr` to map your geometries as `geo_point` you need to use the creation layer option `GEOM_MAPPING_TYPE`, as stated in the [driver documentation](https://gdal.org/drivers/vector/elasticsearch.html):

> - **GEOM\_MAPPING\_TYPE** =AUTO/GEO\_POINT/GEO\_SHAPE. Mapping type for geometry fields. Defaults to AUTO. GEO\_POINT uses the [geo\_point](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-geo-point-type.html) mapping type. If used, the “centroid” of the geometry is used. This is the behavior of GDAL \< 2.1. GEO\_SHAPE uses the [geo\_shape](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-geo-shape-type.html) mapping type, compatible of all geometry types. When using AUTO, for geometry fields of type Point, a geo\_point is used. In other cases, geo\_shape is used.

On [a 2020 advent calendar post](https://discuss.elastic.co/t/dec-6th-2020-en-uploading-data-from-osm-into-elasticsearch/255059) I used that parameter for `geo_shape` so maybe you can take a look as inspiration.

---

_[View the full topic](https://discuss.elastic.co/t/indexing-problems-with-gdal-ogr2ogr-for-geo-point-of-geojson-files/298856)._
