36 votes

Creating polygon grid using GeoPandas

Previous answer gives correct result, but I allowed myself to improve the code, to avoid many unnecessary lines, as well as iterating on indexes instead of values on the list. import geopandas as gpd ...
  • 599
28 votes
Accepted

Creating fishnet grid Shapefile in QGIS?

Look at the Processing Toolbox and you may choose many algorithms without the need of a plugin
  • 51.8k
25 votes

Creating fishnet grid Shapefile in QGIS?

You don't need a plugin, just use a geoalgorithm from the toolbox: Vector > Research Tools > Create Grid... In QGIS 2.10 this is called 'Create Graticule'
  • 3,471
25 votes
Accepted

Creating polygon grid using GeoPandas

There are many solutions. One of them import geopandas as gpd from shapely.geometry import Polygon import numpy as np points = gpd.read_file('points.shp') xmin,ymin,xmax,ymax = points....
  • 51.8k
20 votes

Creating regular polygon grid in PostGIS

You can create a regular grid simply by vectorising an empty raster: SELECT (ST_PixelAsPolygons(ST_AddBand(ST_MakeEmptyRaster(100, 100, 1.1, 1.1, 1.0), '8BSI'::text, 1, 0), 1, false)).geom
17 votes

Create spatial polygon grid from spatial points in R

here is a solution using sf and sf::st_make_grid: library(raster) library(sf) e <- as(raster::extent(-125, -65, 25, 49), "SpatialPolygons") %>% st_as_sf() grd_lrg <- st_make_grid(e, ...
  • 1,643
15 votes
Accepted

Creating fishnet from template feature class using ArcPy?

here is an example. You need to extract the bounding box from a describe object. desc = arcpy.Describe(fc) arcpy.CreateFishnet_management(fc[:-4]+"_c200.shp",str(desc.extent.lowerLeft),str(desc....
  • 48.8k
15 votes

Creating nested grid in QGIS

This answer was given to the original question prior the edit: Here is a graphical model you can use: So basically, you first need to create your parent grid as rectangles and order them with an SQL ...
  • 27.3k
13 votes

Overlaying spatial polygon with grid and checking in which grid element specific coordinates are located using R

The New York dataset provided in the question is no longer available for download. I use the nc dataset from sf package to demonstrate a solution using sf package: library(sf) library(ggplot2) # ...
  • 1,643
12 votes

Creating fishnet grid Shapefile in QGIS?

Vector grid creation has been incorporated in QGIS for a long time: Vector -> Research Tools -> Vector Grid Note that the default grid spacing of 0.0001000000 units of the layer CRS is too ...
  • 75.4k
11 votes
Accepted

Turning vector grid into individual shapefiles using QGIS?

You need to use Split Vector Layer from processing toolbox. You can find the tool from Processing toolbox -> QGIS geoalgorithms -> Vector general tools -> Split Vector Layer Select the input ...
  • 36.7k
11 votes
Accepted

Vector grid in QGIS3 - Can I change the order of row number?

You can create a new layer with the re-ordered ID Run the grid tool as you currently do. Go the the menu layer / add layer / add-edit virtual layer and enter the following query. select *, ...
  • 36.1k
10 votes

Creating regular polygon grid in PostGIS

I've created a variant of @Alexander's function that doesn't require that we transform to another SRID. This avoids the issue of having to find a projection that uses meters as units for a particular ...
  • 392
10 votes
Accepted

Create spatial polygon grid from spatial points in R

You can make a long/lat raster and transform library(raster) r <- raster(ext = extent(-125, -65, 25, 49), res=c(5,2)) values(r) <- 1:ncell(r) rA <- projectRaster(r, crs="+proj=aea +lat_1=29....
10 votes
Accepted

Creating grid with PyQGIS

You use wrong TYPE code. You have to use 2 for rectangular grid. 3 means diamond. params = {'TYPE':2, ...} # 2: rectangle For more details about the algorithm try import processing processing....
10 votes

Creating grid in QGIS 'anchored' to specific point

You can use GRASS v.mkgrid tool in Processing Toolbox > GRASS > Vector.
9 votes

Creating regular polygon grid in PostGIS

Here is an optimized and efficient algorithm to create fishnet, regular grid, polygon grid, rectangular grid inside any envelope, polygon, or multipolygons. almost handle any SRID; GitHub Repo: https:/...
9 votes
Accepted

Sum line lengths for each grid cell in QGIS

Create a polygon grid using the Vector Grid tool instead of lines. Make sure to check the polygon output. Once you have a polygon grid (also known as fishnet), you can use the Sum line length tool ...
  • 8,398
9 votes

Building a grid of equal square polygons in ArcGIS 10?

You can do this with both the Create Fishnet tool or the Grid Index Features tool. Create Fishnet is a bit more configurable, and can output either polygon or polyline. Both will allow you to set a ...
  • 29.3k
9 votes
Accepted

Create Fishnet option

Instead of looking for the Create Fishnet (or any other) tool in ArcToolbox, I recommend using the Search window to search for and open it. If you are curious to know which toolset it is located in ...
  • 64.2k
9 votes

Sorting grid cells in fishnet grid by location and number using QGIS?

You can use pyqgis. Script will: List all centroids x, y coordiantes with each features id Sort list by x and y The ids are now in correct order - create a dictionary of id and sequential number ...
  • 55.3k
9 votes

Creating 100m^2 grid automatically using QGIS?

You have two options here. First one will create a new vector layer with a grid and the second one will just display a grid as overlay. What you are looking for is the first option. However, in case ...
  • 27.3k
8 votes

Creating fishnet grid with specified rotation angle in ArcGIS Desktop?

As Vince said, the Create Fishnet tool is what you want to use. At the top of that help page in the summary section is a link to the How Create Fishnet Works page. Note that the main help page for ...
  • 15.6k
8 votes
Accepted

Create grid where points is centroid? QGIS

This way it should work: Reproject your points to a projected CRS with metres as units (if not already done) Draw buffers with a radius of 50m (half of the grid size) around them with Vector -> ...
  • 75.4k
8 votes
Accepted

How to select specific rows of polygons from a grid in QGIS?

You can use the floor function in your expression, like this: floor($id /24) IN (1,3,5,7,9,11,13,15,17,19,21) On a sample grid I've obtained this result with my own numbers (my grid has 13 columns ...
8 votes
Accepted

Creating grid following points in QGIS?

This is a bit of a workaround in QGIS 3.8 and requires that the points are separated by a uniform distance (bit it looks like it from your screenshots). Create a grid with the same spacing and ...
  • 1,049
8 votes

Placing point over pixel with maximum value falling in grid overlay using QGIS

First, sample your raster values via "Raster pixels to points" from Processing Toolbox. It will create a point on each pixel of your raster, containing the rastervalue. Now join your points ...
  • 27.3k
7 votes
Accepted

How to count points within adjoining hex grid cells?

The first part of your question is easy. Go to Vector->Analysis Tools->Points in Polygon. This tool will iterate over all your polygons and add a column (called 'PNTCNT' by default) with the ...
  • 33.2k
7 votes
Accepted

Generate rectangular fishnet or vector (grid cells) shapefile in R?

Your raster-sp workflow worked fine for me, not sure how you got 19 columns either. If it wasn't a typo, it might have been an rgdal bug on write; that's the only related package that I can see a ...
  • 3,507
7 votes
Accepted

Expanding a grid/fishnet in QGIS

You can expand the grid, but you would have to do it manually, and that would be time consuming and prone to error. This is how I would approach what you need. This is going to be long winded with a ...
  • 1,317

Only top scored, non community-wiki answers of a minimum length are eligible