diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2017-08-06 16:27:37 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2017-08-06 16:27:37 +0400 |
commit | 11948d75862941e2780e550cbc5411895e1cc1c7 (patch) | |
tree | ccbadb2308209c3c2ac7081ac67f777df23cff7e /sql/spatial.h | |
parent | 6d51817d2cd79edbc15328bef532a5375f184219 (diff) | |
download | mariadb-git-11948d75862941e2780e550cbc5411895e1cc1c7.tar.gz |
MDEV-12180 ST_GeomFromGeoJSON option argument appears to have no effect.
Implement the 'option' argument for the ST_GeomFromGeoJSON.
Diffstat (limited to 'sql/spatial.h')
-rw-r--r-- | sql/spatial.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/sql/spatial.h b/sql/spatial.h index 3858c0d2e51..45f335596c8 100644 --- a/sql/spatial.h +++ b/sql/spatial.h @@ -255,6 +255,7 @@ public: GEOJ_INCORRECT_GEOJSON= 1, GEOJ_TOO_FEW_POINTS= 2, GEOJ_POLYGON_NOT_CLOSED= 3, + GEOJ_DIMENSION_NOT_SUPPORTED= 4, }; @@ -281,7 +282,8 @@ public: virtual uint init_from_opresult(String *bin, const char *opres, uint res_len) { return init_from_wkb(opres + 4, UINT_MAX32, wkb_ndr, bin) + 4; } - virtual bool init_from_json(json_engine_t *je, String *wkb) {return true;} + virtual bool init_from_json(json_engine_t *je, bool er_on_3D, String *wkb) + { return true; } virtual bool get_data_as_wkt(String *txt, const char **end) const=0; virtual bool get_data_as_json(String *txt, uint max_dec_digits, @@ -315,8 +317,8 @@ public: bool init_stream=1); static Geometry *create_from_wkb(Geometry_buffer *buffer, const char *wkb, uint32 len, String *res); - static Geometry *create_from_json(Geometry_buffer *buffer, - json_engine_t *je, String *res); + static Geometry *create_from_json(Geometry_buffer *buffer, json_engine_t *je, + bool er_on_3D, String *res); static Geometry *create_from_opresult(Geometry_buffer *g_buf, String *res, Gcalc_result_receiver &rr); int as_wkt(String *wkt, const char **end); @@ -395,7 +397,7 @@ public: uint32 get_data_size() const; bool init_from_wkt(Gis_read_stream *trs, String *wkb); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); - bool init_from_json(json_engine_t *je, String *wkb); + bool init_from_json(json_engine_t *je, bool er_on_3D, String *wkb); bool get_data_as_wkt(String *txt, const char **end) const; bool get_data_as_json(String *txt, uint max_dec_digits, const char **end) const; @@ -450,7 +452,7 @@ public: uint32 get_data_size() const; bool init_from_wkt(Gis_read_stream *trs, String *wkb); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); - bool init_from_json(json_engine_t *je, String *wkb); + bool init_from_json(json_engine_t *je, bool er_on_3D, String *wkb); bool get_data_as_wkt(String *txt, const char **end) const; bool get_data_as_json(String *txt, uint max_dec_digits, const char **end) const; @@ -484,7 +486,7 @@ public: bool init_from_wkt(Gis_read_stream *trs, String *wkb); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); uint init_from_opresult(String *bin, const char *opres, uint res_len); - bool init_from_json(json_engine_t *je, String *wkb); + bool init_from_json(json_engine_t *je, bool er_on_3D, String *wkb); bool get_data_as_wkt(String *txt, const char **end) const; bool get_data_as_json(String *txt, uint max_dec_digits, const char **end) const; @@ -521,7 +523,7 @@ public: bool init_from_wkt(Gis_read_stream *trs, String *wkb); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); uint init_from_opresult(String *bin, const char *opres, uint res_len); - bool init_from_json(json_engine_t *je, String *wkb); + bool init_from_json(json_engine_t *je, bool er_on_3D, String *wkb); bool get_data_as_wkt(String *txt, const char **end) const; bool get_data_as_json(String *txt, uint max_dec_digits, const char **end) const; @@ -550,7 +552,7 @@ public: bool init_from_wkt(Gis_read_stream *trs, String *wkb); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); uint init_from_opresult(String *bin, const char *opres, uint res_len); - bool init_from_json(json_engine_t *je, String *wkb); + bool init_from_json(json_engine_t *je, bool er_on_3D, String *wkb); bool get_data_as_wkt(String *txt, const char **end) const; bool get_data_as_json(String *txt, uint max_dec_digits, const char **end) const; @@ -580,7 +582,7 @@ public: uint32 get_data_size() const; bool init_from_wkt(Gis_read_stream *trs, String *wkb); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); - bool init_from_json(json_engine_t *je, String *wkb); + bool init_from_json(json_engine_t *je, bool er_on_3D, String *wkb); bool get_data_as_wkt(String *txt, const char **end) const; bool get_data_as_json(String *txt, uint max_dec_digits, const char **end) const; @@ -612,7 +614,7 @@ public: bool init_from_wkt(Gis_read_stream *trs, String *wkb); uint init_from_wkb(const char *wkb, uint len, wkbByteOrder bo, String *res); uint init_from_opresult(String *bin, const char *opres, uint res_len); - bool init_from_json(json_engine_t *je, String *wkb); + bool init_from_json(json_engine_t *je, bool er_on_3D, String *wkb); bool get_data_as_wkt(String *txt, const char **end) const; bool get_data_as_json(String *txt, uint max_dec_digits, const char **end) const; |