• RE: Writing sqlite database for tables with coordinates

    Thanks for the reply, I'll look into mikepluspy. If others run into the same issue with using spatialite, I did the following: # Connect to SQLite and load SpatiaLite con = sqlite3.connect(file_sqlite) con.enable_load_extension(True) con.execute('SELECT load_extension("mod_spatialite")') # Read table content into a pandas DataFrame query = "SELECT *, AsText(geometry) AS wkt_geometry FROM msm_Node" df = pd.read_sql_query(query, con) df['geometry'] = df['wkt_geometry'].apply(wkt.loads)
  • Writing sqlite database for tables with coordinates

    When writing data to the sqlite database outside the MIKE+ software I have problems with writing to table with the geometry columns. There is no issue with writing to other tables like ms_Tab but I can find no documentation for the geometry. What is the format and how to write to e.g. msm_Nodes from for example python.