Indexing problems with GDAL/ogr2ogr for GEO_POINT of geojson files

The difference is that your call to ogr2ogr is apparently generating a geo_shape field type while the GeoJSON upload tool in Kibana is using geo_point.

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:

  • GEOM_MAPPING_TYPE =AUTO/GEO_POINT/GEO_SHAPE. Mapping type for geometry fields. Defaults to AUTO. GEO_POINT uses the geo_point 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 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 I used that parameter for geo_shape so maybe you can take a look as inspiration.

1 Like