Check if point is inside unclosed linestring using POSTGIS ST Functions

المشرف العام

Administrator
طاقم الإدارة
I have a table with spatial data. This table contains a single record which is a unclosed linestring.

I calculated the Centroid of this geometry using query

SELECT ST_AsText(ST_Centroid("geom")) FROM "public"."ha_ground"I got the output "POINT(73.8180699704927 18.6281375643436)"

My aim is to check if this point is inside the unclosed linestring

I used the following query

SELECT ST_Contains("geom",ST_GeomFromText('POINT(73.8180699704927 18.6281375643436)', 4326)) FROM "public"."ha_ground"As We know Centroid of this geometry is inside the unclosed linestring.But, This query returns false instead of true.

What is the possible reason for this.

And what is the solution to check if point is inside unclosed linestring



أكثر...
 
أعلى