I am trying find where a line (chosen by a user) intersects any of the multiple polygons within the shapefile. The shapefile is in EPSG:4326 and the coordinates are in (longitude, latitude).
I have loaded a shapefile containing all the buildings (i.e. polygons) from the centre of Rome and have built a schema inside a database with a PostGIS extension (note, PostGIS version: 2.3).
Link to SQL dump and shapefiles used for polygons of my current database set up: https://www.dropbox.com/sh/khszbfwg4lw8l64/AABtnTfgld6EyLwTHwR84ICLa?dl=0
output from my current query '':
SELECT ST_AsText(ST_Intersection('LINESTRING (12.497626 41.897156, 12.4922 41.8902)'::geometry, geom::geometry));
I realise I am most certainly at fault here, as I'm no PostGIS expert. However, I'm stuck as 'geom' is a column in the schema, hence, I'm uncertain as to how to proceed.