flask,flask-sqlalchemy,sqlalchemy-migrate,flask-migrate,geoalchemy2
If you are following Miguel Grinberg's tutorial you are using SQLite database. GeoAlchemy2 – if I'm not wrong – supports only PostgreSQL/PostGIS, as @dirn pointed out in the comment. The solution would be to get a PostgreSQL server running. SQLAlchemy deals fine with PostreSQL. Once you got it, just edit your...
That would be in the Well-Known Binary format; you can use the geoalchemy2.functions.ST_AsText to convert them to the WKT text format. This would work in the database itself, thus you'd apply this to your query to ask for the results in WKT instead of WKB; that is in your SQLAlchemy...
sqlalchemy,flask-sqlalchemy,geoalchemy2
Alright, I figured it out, but wow that wasn't obvious, especially if you're not intimately familiar with Geoalchemy2. In my case above, you have to tack: .order_by(func.ST_Distance(cls.geoLoc, geo)) to the end of the code that's in my question. Basically, ST_Distance is a function that takes in a two points and...