Hi Guys
Anyone can help me on how to save my 'geometry' geojson edits in a database PostgreSQL using SQL Alchemy and geoalchemy2 plz.
Any guide to the python code that i should use , any reference video or book it would be very helpful.I tried to create a python function myself as its shown below but it doesen't work.
At list someone tell me where to put my python code(and where to start a session with database) in app.py in controllers.py in initstores.py or in model.py . ????
Should i convert my geojson object into a format for the database example wkt or smthing else(what is the function to do that) ???
Best Regards
# def save(first_time):
# SpatialBase.metadata.create_all(spatial_engine)
# if first_time:
# session = SpatialSessionMaker()
# gage1 = SpatialStreamGage(geometry)
# session.add(gage1)
# session.commit(gage1)
# session.close()
# return render(request)