0

Need to reproject features (Poly & Point) to Local CRS, buffer the Poly, then clip the points based on the buffer, then reproject back to original to WGS84. Tested query without they reprojections (st_transform) functions and it worked, but unsure what is going wrong when the st_transform functions are added?

SELECT
    ST_TRANSFORM(ST_INTERSECTION(
        (SELECT ST_BUFFER(ST_COLLECT(ST_TRANSFORM(geom,SRID_Local)),5280) FROM Poly),
            ST_TRANSFORM(Point.geom,SRID_Local)),SRID_Original) AS geom,
FROM
    Poly,Point
WHERE
    ST_INTERSECTION(
        (SELECT ST_BUFFER(ST_COLLECT(ST_TRANSFORM(geom,SRID_Local)),5280) FROM Poly),
            ST_TRANSFORM(Point.geom,26913)) IS NOT NULL

1 Answer 1

1

Buffering a collection of polygons in different coordinate systems will create different new polygons. Then the set of points that intersect that buffer might be different. But the question of whether you need to do this re-projection or not depends on your particular situation and goals.

BTW, what's the purpose of the WHERE clause in your SQL expression above?

Your Answer

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

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