Quang T. answered 08/07/19
SELECT ST_WITHIN(m_polygon.bounds , m_polygon.bounds ) FROM m_polygon;
Have you tried it without m_polygon for the Select? SELECT ST_WITHIN (bounds, bounds) FROM m_polygon;
Me L.
asked 08/06/19Environment: PostgreSQL 11.4 with PostGIS 2.5.2
I am getting the error message for SELECT statement above:
I was thinking what the reason for the error is: the ST_WITHIN arguments types should be GEOMETRY, but I am passing the POLYGONs.
However the following works:
Quang T. answered 08/07/19
SELECT ST_WITHIN(m_polygon.bounds , m_polygon.bounds ) FROM m_polygon;
Have you tried it without m_polygon for the Select? SELECT ST_WITHIN (bounds, bounds) FROM m_polygon;
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.
Me L.
I tried, it does not help. The core issue is what ST_WITHIN arguments type should be GEOMETRY. I need to convert POLYGON type into GEOMETRY. The closest function which I found is ST_GeomFromText() http://www.postgis.net/docs/ST_GeomFromText.html but I cannot figure out how to apply it to the POLYGON type which I have in my table.08/08/19