Skip to content

Adding examples for Javascript's geospatial types #241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions jsManual/asciidoc/cypher-workflow.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,44 @@ 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 lists the possible values for `SRID`:

======
[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
Expand Down