From ce959e8a144ad4483a9c260fc600c4655527f7e5 Mon Sep 17 00:00:00 2001 From: Rouven Bauer Date: Wed, 3 Nov 2021 13:49:08 +0100 Subject: [PATCH 1/2] Adding examples for Python's geospatial types --- pythonManual/asciidoc/cypher-workflow.adoc | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/pythonManual/asciidoc/cypher-workflow.adoc b/pythonManual/asciidoc/cypher-workflow.adoc index c8cc37de..a51c857c 100644 --- a/pythonManual/asciidoc/cypher-workflow.adoc +++ b/pythonManual/asciidoc/cypher-workflow.adoc @@ -232,6 +232,44 @@ include::{python-examples}/test_temporal_types_example.py[tags=temporal-types-du ---- +[[python-driver-geospatial-types]] +=== Geospatial Types + +This section lists some basic usage of the geospatial types provided by the Python Driver. + + +[[python-driver-geospatial-types-cartesian]] +==== `CartesianPoint` + +Represents 2 or 3 dimensional point in Cartesian space. + +[source, python] +---- +include::{python-examples}/test_temporal_types_example.py[tags=temporal-types-cartesian-import] +---- + +[source, python] +---- +include::{python-examples}/test_temporal_types_example.py[tags=temporal-types-cartesian] +---- + + +[[python-driver-geospatial-types-wgs84]] +==== `WGS84Point` + +Represents an instant capturing the wgs84, but not the time, nor the timezone. + +[source, python] +---- +include::{python-examples}/test_temporal_types_example.py[tags=temporal-types-wgs84-import] +---- + +[source, python] +---- +include::{python-examples}/test_temporal_types_example.py[tags=temporal-types-wgs84] +---- + + [[python-driver-exceptions-errors]] == Exceptions and error handling From 20a97594bab962e3e074a062c3fe158d43a1bc00 Mon Sep 17 00:00:00 2001 From: Rouven Bauer Date: Fri, 5 Nov 2021 10:24:46 +0100 Subject: [PATCH 2/2] Fix geospatial example reference tags --- pythonManual/asciidoc/cypher-workflow.adoc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pythonManual/asciidoc/cypher-workflow.adoc b/pythonManual/asciidoc/cypher-workflow.adoc index a51c857c..5683eafd 100644 --- a/pythonManual/asciidoc/cypher-workflow.adoc +++ b/pythonManual/asciidoc/cypher-workflow.adoc @@ -245,12 +245,12 @@ Represents 2 or 3 dimensional point in Cartesian space. [source, python] ---- -include::{python-examples}/test_temporal_types_example.py[tags=temporal-types-cartesian-import] +include::{python-examples}/test_geospatial_types_example.py[tags=geospatial-types-cartesian-import] ---- [source, python] ---- -include::{python-examples}/test_temporal_types_example.py[tags=temporal-types-cartesian] +include::{python-examples}/test_geospatial_types_example.py[tags=geospatial-types-cartesian] ---- @@ -261,15 +261,21 @@ Represents an instant capturing the wgs84, but not the time, nor the timezone. [source, python] ---- -include::{python-examples}/test_temporal_types_example.py[tags=temporal-types-wgs84-import] +include::{python-examples}/test_geospatial_types_example.py[tags=geospatial-types-wgs84-import] ---- [source, python] ---- -include::{python-examples}/test_temporal_types_example.py[tags=temporal-types-wgs84] +include::{python-examples}/test_geospatial_types_example.py[tags=geospatial-types-wgs84] ---- +[[python-driver-exceptions-errors]] +== Exceptions and error handling + +include::{common-content}/cypher-workflow.adoc[tag=exceptions-errors] + + [[python-driver-exceptions-errors]] == Exceptions and error handling