Skip to content

Instantly share code, notes, and snippets.

@pigreco
Created November 15, 2017 10:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pigreco/2d3581c29aa2b7aa047eb806432c225e to your computer and use it in GitHub Desktop.
Save pigreco/2d3581c29aa2b7aa047eb806432c225e to your computer and use it in GitHub Desktop.
articolo su gfoss.it quarta query
SELECT t.pk_uid AS rowid, t.cod_reg AS cod_reg, t.cod_istat AS cod_istat,
       t.pro_com AS pro_com, t.sez2011 AS sez201, t.sez AS sez,
       t.loc2011 AS loc2011, t.cod_loc AS cod_loc, t.geometry AS geom
FROM test_celle AS t,
     (SELECT geom FROM input) AS b
WHERE ST_Distance (t.geometry, b.geom) <= 250 AND t.ROWID IN
     (SELECT rowid FROM SpatialIndex
      WHERE f_table_name = 'test_celle' AND search_frame =
            BuildCircleMbr(ST_X(b.geom), ST_Y(b.geom), 250));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment