2

I am getting an error from ST_Tranform while using ST_Intersection: No function matches the given name and argument types. You might need to add explicit type casts.

select ST_Intersection(ST_Transform(ST_GeomFromText('POLYGON(( 200000 2900000,250000 3500000,300000 2960000,200000 2967400,200000 2900000))',96703),4326), ST_Transform((geom, 2249), 4326)) from polygon_folder; 
1
  • You forgot a function around (geom, 2249) Commented Jun 7, 2016 at 20:21

1 Answer 1

2

You probably want to do this:

 select ST_Intersection( ST_Transform( ST_SetSRID(ST_GeomFromText('POLYGON(( 200000 2900000,250000 3500000,300000 2960000,200000 2967400,200000 2900000))'),96703),4326), ST_Transform(geom, 4326)) from polygon_folder; 

But, I am quite sure (from Finding all polygons inside of a polygon) that ST_Intersection is not really what you need....

2
  • So what is a good way to find all the polygons that intersect with a given polygon? @WKT Commented Jun 7, 2016 at 20:29
  • About select * from polygon_folder pf where ST_Intersects(pf.geometry, ST_GeomFromText('....'); Commented Jun 7, 2016 at 20:35

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.