Posts

Showing posts from February, 2018

How to create a regular survey grid with PostGIS

Image
A fishnet grid is also commonly called a: survey grid, raster sample, sample grid, grid, landscape grid, grid reference and of course fishnet. source:  https://trac.osgeo.org/postgis/wiki/UsersWikiCreateFishnet It all depends on your field of expertise as to what you call it, I know some times in biology they use the term "landscape grid". If you are the data analyst, gis analyst or even coop student who is assigned the job of creating such a sample grid as a set of polygons using Postgresql with PostGIS here is the function you could create in the database. As you see in the GIST here there is also sample sql select query that would generate the data for you using the default start location of x= 0.0 and y=0.0. The input parameters are as follows: number of rows of the grid number of columns of the grid start x coordinate (optional, default is 0.0) start y coordinate (optional, default is 0.0) row width in meters (if coordinates are a meter based syste