1

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;
  • You forgot a function around (geom, 2249) – thibautg Jun 7 '16 at 20:21
1

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....

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.