[gdal-dev] SRS of the Elastic Search geometries?

Even Rouault even.rouault at spatialys.com
Tue Sep 1 07:26:11 PDT 2015


Hi Jukka,

> Are the geometries which are stored into Elastic Search supposed to be in
> EPSG:4326?

That's my understanding of ES doc. For geo_point mapping, you can put 
arbitrary coordinates if I remember, but I believe the behaviour is undefined.
So basically the driver is reprojecting on-the-fly to EPSG:4326 on feature 
insertion.

> Now I can see that the driver is writing EPSG:4326 definitions
> into the metadata of the ES index

What do you mean by "into the metadata of the ES index". The SRS is always 
implied.
Of perhaps you meant on-the-fly reprojection ?

> but I can still save for example
> EPSG:3067 geometries without transforming them into EPSG:4326.

On-the-fly reprojection should occur normally (provided that your source layer 
has explicit SRS)

Little demo:

$ cat simple.csv
id,WKT
1,"LINESTRING(2 49,3 50)"

$ ogr2ogr simple_EPSG_32631.shp simple.csv -t_srs EPSG:32631 -s_srs EPSG:4326

$ ogr2ogr -update es: simple_EPSG_32631.shp

$ ogrinfo es: simple_epsg_32631
INFO: Open of `es:'
      using driver `ElasticSearch' successful.

Layer name: simple_epsg_32631
Geometry: Line String
Feature Count: 1
Extent: (2.000000, 49.000000) - (3.000000, 50.000000)
Layer SRS WKT:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.0174532925199433,
        AUTHORITY["EPSG","9122"]],
    AUTHORITY["EPSG","4326"]]
FID Column = ogc_fid
Geometry Column = geometry
_id: String (0.0)
WKT: String (0.0)
id: String (0.0)
OGRFeature(simple_epsg_32631):1
  _id (String) = AU-JSdC2eRJEoT8Pm33E
  WKT (String) = LINESTRING(2 49,3 50)
  id (String) = 1
  LINESTRING (2 49,3 50)


Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list