You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like the idea of this library to access certain things of the M+ database. And furthermore to insert data into it.
However, I was wondering how you insert spatial data into the M+ database for the data tables that contains geometric features, e.g. msm_Node, msm_Catchment, msm_Link etc.? How do you link the coordinates the each individual feature?
From the example that comes from the DataTableAccessor notebook, I would like to add another field that contains the geometric values (i.e. coordinates for upstream and downstream nodes). I mean, which format do I write this in? Should I convert it to shapely.geom objects, a WKT/WKB string, or what?
from mikeplus import DataTableAccess
data_access = DataTableAccess("../tests/testdata/Db/Sirius/Sirius.sqlite")
data_access.open_database()
values = {'Diameter': 2.0, 'Description': 'insertValues','geometry':LINESTRING(0 0, 1 1)} # <- added another field for 'geometry' with WKT geometry type
data_access.insert("msm_Link", "link_test", values)
Thanks in advance!
The text was updated successfully, but these errors were encountered:
Hi
I like the idea of this library to access certain things of the M+ database. And furthermore to insert data into it.
However, I was wondering how you insert spatial data into the M+ database for the data tables that contains geometric features, e.g.
msm_Node
,msm_Catchment
,msm_Link
etc.? How do you link the coordinates the each individual feature?From the example that comes from the
DataTableAccessor
notebook, I would like to add another field that contains the geometric values (i.e. coordinates for upstream and downstream nodes). I mean, which format do I write this in? Should I convert it toshapely.geom
objects, a WKT/WKB string, or what?Thanks in advance!
The text was updated successfully, but these errors were encountered: