0

I want put this query into code:

select * from st_geomfromtext('POINT(106.69588536141288 10.782847409207672)')

Here is what I did in code:

class st_geomfromtext(GenericFunction):
    name = 'st_geomfromtext'

query = Session.query(func.st_geomfromtext('POINT(106.69588536141288 10.782847409207672)')).all()

Here is what I receive:

LINE 1: SELECT st_geomfromtext('POINT(106.69588536141288 10.78284740...
               ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
0

1 Answer 1

2

Are you able to validate your query directly against PostgreSQL?

Function may actually not be there. st_geomfromtext is part of PostGIS, depending on the PostgreSQL version, you may need to install / enable it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.