Geoman (Leaflet) > PostGIS > Python > PostGIS > Geoman (Leaflet) #1195
Unanswered
wietmazairac
asked this question in
Questions & Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Use case:
User draws a polygon.
This polygon is saved in a database.
Python retrieves data from the database and performs some calculations.
Python saves results in database.
Leaflet retreives results from database and presents them to the user.
The framework is Django.
Questions:
Is this the right approach, or should I use other software/tools?
I cannot find an example in which a Geoman polyline is saved to a PostGIS database.
EDIT:
Ok, I looked a bit more into it.
Apparently the method I suggested before is probably not the way forward.
I found a new way, and it goes like this...
It is still not entirely clear, but it is probably possible to call a Python script from JS.
I have no experience implementing this. So, please let me know if this approach is right.
EDIT 2:
Ok, I think I am almost there.
The user draws a polygon. JS (AJAX?) calls a python function.
Then the question that remains is, where is that python function located.
Is that Python function actually a view in Django, that could also be called by entering the right URL in the browser?
Beta Was this translation helpful? Give feedback.
All reactions