From a543ac0df8e94e605c8791acb33637785d06bc97 Mon Sep 17 00:00:00 2001 From: Antonio Barcelos Date: Wed, 24 Nov 2021 19:36:56 +0100 Subject: [PATCH 1/2] Adding examples for Javascript's geospatial types --- jsManual/asciidoc/cypher-workflow.adoc | 37 ++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/jsManual/asciidoc/cypher-workflow.adoc b/jsManual/asciidoc/cypher-workflow.adoc index d2b2027b..a6f6a9d3 100644 --- a/jsManual/asciidoc/cypher-workflow.adoc +++ b/jsManual/asciidoc/cypher-workflow.adoc @@ -199,6 +199,43 @@ Contains both date-based values (years, months, days) and time-based values (sec include::{javascript-examples}/examples.test.js[tags=temporal-types-duration] ---- +[[js-driver-geospatial-types]] +=== Geospatial Types + +This section lists some basic usage of the geospatial types provided by the Javascript Driver. + + +[[js-driver-geospatial-types-cartesian]] +==== `Point` + +Represents 2 or 3 dimensional point in Cartesian space or in the WGS84 space. The field `srid` indicates the type of the coordinate. + +The following table defines the list of possibles values for `srid` and its meaning. + +====== +[options="header", cols="<20m,<80a"] +|=== +| SRID | Description +| `7203` | 2D point in the cartesian space. +| `9157` | 3D point in the cartesian space. +| `4326` | 2D point in the WGS84 space. +| `4979` | 3D point in the WGS84 space. +|=== +====== + +Examples of Cartesian points instantiation and reading: + +[source, javascript] +---- +include::{javascript-examples}/examples.test.js[tags=geospatial-types-cartesian] +---- + +Examples of WSG84 points instantiation and reading: + +[source, javascript] +---- +include::{javascript-examples}/examples.test.js[tags=geospatial-types-wgs84] +---- [[js-driver-exceptions-errors]] == Exceptions and error handling From 61d90b048c7e8e263ce518944f3b324ba4e44486 Mon Sep 17 00:00:00 2001 From: David Oliver Date: Wed, 1 Dec 2021 10:44:24 +0000 Subject: [PATCH 2/2] Apply suggestions from code review --- jsManual/asciidoc/cypher-workflow.adoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jsManual/asciidoc/cypher-workflow.adoc b/jsManual/asciidoc/cypher-workflow.adoc index a6f6a9d3..1c98378a 100644 --- a/jsManual/asciidoc/cypher-workflow.adoc +++ b/jsManual/asciidoc/cypher-workflow.adoc @@ -208,9 +208,10 @@ This section lists some basic usage of the geospatial types provided by the Java [[js-driver-geospatial-types-cartesian]] ==== `Point` -Represents 2 or 3 dimensional point in Cartesian space or in the WGS84 space. The field `srid` indicates the type of the coordinate. +Represents 2 or 3 dimensional point in Cartesian space or in the WGS84 space. +The field `SRID` indicates the type of the coordinate. -The following table defines the list of possibles values for `srid` and its meaning. +The following table lists the possible values for `SRID`: ====== [options="header", cols="<20m,<80a"]