I am interested in generating a polygon grid shape file for the landmass of the world. What I have presently is two tables in postgreSQL.
Table 1: Coastal area shapefile (http://openstreetmapdata.com/data/coastlines) : Consisits od Linestrings
column names : gid, fid, geom
Table 2: Polygon grid shape file created for the above Table 1 with the help of QGIS
Grid is (1 lat x 1 lon) in size.
column names : gid_grid, id_grid, coord_grid, geom_grid
Now I want to find the polygon grids in Table 2 which are in the land area (even if a small part of coastal line falls inside the grid, it has to be marked as land area).
My initial thought is to find the polygon grids which intercept with any of the coastal lines, and mark it as a land area (using postgis queries). The problem is, it will not find any polygon grids which totally falls inside the land area. Any suggestions please?