From 09dd35bd391bd37aa5a46b02fb65ba6959316702 Mon Sep 17 00:00:00 2001 From: Kunlin Yu Date: Tue, 26 Dec 2023 16:14:07 +0800 Subject: [PATCH] Add an example to README Signed-off-by: Kunlin Yu --- README.md | 202 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 202 insertions(+) diff --git a/README.md b/README.md index 30bafdb..8217c2a 100644 --- a/README.md +++ b/README.md @@ -122,3 +122,205 @@ conan install . --output-folder=out/build --build=missing ``` 5. Finally trigger configuration and building using VS GUI. +# example +```json +{ + "connections": [ + { + "comment": "this is a inter layer connection connect layer1 and layer2", + "layers": [ + "layer1", + "layer2" + ], + "nodes": [ + "n1", + "node_2nd" + ], + "spaces": [ + "space1", + "space_2nd" + ] + } + ], + "layers": [ + { + "id": "layer1", + "theme": "Topographic", + "dual_space": { + "edges": [ + { + "boundary": "b2", + "geom": "LINESTRING (0.5 0.5, 1.5 0.5)", + "id": "e", + "nodes": [ + "n1", + "n2" + ], + "weight": 0.0 + } + ], + "nodes": [ + { + "edges": [ + "e" + ], + "geom": "POINT (0.5 0.5)", + "id": "n1", + "space": "space1" + }, + { + "edges": [ + "e" + ], + "geom": "POINT (1.5 0.5)", + "id": "n2", + "space": "space2" + } + ] + }, + "primal_space": { + "boundaries": [ + { + "edge": null, + "geom": "LINESTRING (0 0, 1 0)", + "id": "b1", + "spaces": [ + "space1" + ] + }, + { + "edge": "e", + "geom": "LINESTRING (1 0, 1 1)", + "id": "b2", + "spaces": [ + "space1", + "space2" + ] + }, + { + "edge": null, + "geom": "LINESTRING (1 1, 0 1)", + "id": "b3", + "spaces": [ + "space1" + ] + }, + { + "edge": null, + "geom": "LINESTRING (0 1, 0 0)", + "id": "b4", + "spaces": [ + "space1" + ] + }, + { + "edge": null, + "geom": "LINESTRING (1 0, 2 0)", + "id": "b5", + "spaces": [ + "space2" + ] + }, + { + "edge": null, + "geom": "LINESTRING (2 0, 2 1)", + "id": "b6", + "spaces": [ + "space2" + ] + }, + { + "edge": null, + "geom": "LINESTRING (2 1, 1 1)", + "id": "b7", + "spaces": [ + "space2" + ] + } + ], + "spaces": [ + { + "boundaries": [ + "b1", + "b2", + "b3", + "b4" + ], + "geom": "POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))", + "id": "space1", + "node": "n1" + }, + { + "boundaries": [ + "b2", + "b5", + "b6", + "b7" + ], + "geom": "POLYGON ((1 0, 2 0, 2 1, 1 1, 1 0))", + "id": "space2", + "node": "n2" + }, + { + "boundaries": [], + "geom": "POLYGON ((-1 0, 0 0, 0 1, -1 1, -1 0))", + "id": "space_2nd", + "node": null + } + ] + } + }, + { + "id": "layer2", + "theme": "Topographic", + "dual_space": { + "edges": [], + "nodes": [ + { + "edges": [], + "geom": "POINT (-0.5 0.5)", + "id": "node_2nd", + "space": null + } + ] + }, + "primal_space": { + "boundaries": [ + { + "edge": null, + "geom": "LINESTRING (-1 0, 0 0)", + "id": "b_2nd1", + "spaces": [] + }, + { + "edge": null, + "geom": "LINESTRING (0 0, 0 1)", + "id": "b_2nd2", + "spaces": [] + }, + { + "edge": null, + "geom": "LINESTRING (0 1, -1 1)", + "id": "b_2nd3", + "spaces": [] + }, + { + "edge": null, + "geom": "LINESTRING (-1 1, -1 0)", + "id": "b_2nd4", + "spaces": [] + } + ], + "spaces": [ + { + "boundaries": [], + "geom": "POLYGON ((-1 0, 0 0, 0 1, -1 1, -1 0))", + "id": "space_2nd", + "node": null + } + ] + } + } + ] +} +``` \ No newline at end of file