Look at this PostGIS query. There are 2 similar polygons, but one is filled with a correct grid of points, and the second one is filled with a grid with gaps. (Y steps are 400 or something.)
Why?
with osm_polygon as ( select 1 osm_id, 'srid=900913;POLYGON((9238229.46 7371410.99,9238408.65 7371534.03,9238552.3 7371099.6,9238789.02 7371168.99,9238908.05 7370804.37,9238934.4 7370715.42,9238923.77 7370700.73,9238928.66 7370683.3,9238857.18 7370660.51,9238877.43 7370609.41,9238763.11 7370549.31,9238708.84 7370530.29,9238562.59 7370482.71,9238562.59 7370472.49,9238485.21 7370451.16,9238419.16 7370706.6,9238229.46 7371410.99))'::geometry way union all select 2 osm_id, 'srid=900913;POLYGON((9237195.59 7372142.96,9237223.53 7372184.43,9237324.27 7372285.2,9237354.76 7372369.01,9237337.83 7372446.05,9237354.76 7372534.95,9237375.93 7372627.24,9237451.27 7372692.43,9237546.11 7372680.57,9237650.24 7372745.75,9237729.83 7372761.01,9237816.18 7372832.96,9237869.52 7372878.69,9237994.82 7372921.02,9238071.02 7372821.96,9238002.44 7372743.23,9237980.49 7372688.03,9238002.97 7372661.58,9238149.81 7372510.77,9238370.74 7372635.11,9238452.75 7372543.85,9238315.17 7372375.84,9238455.4 7372258.1,9238675 7372448.6,9238872.91 7372330.67,9238537.42 7372087.44, 9238226.52 7371943.24,9237887.88 7371717.04,9237735.75 7371830.8,9237569.07 7371701.17,9237469.85 7371784.51,9237406.41 7371894.04,9237195.59 7372142.96))'::geometry way)SELECT osm_id, generate_series(floor(st_xmin(way))::int, ceiling(st_xmax(way))::int, 150) as x, generate_series(floor(st_ymin(way))::int, ceiling(st_ymax(way))::int, 150) as y from osm_polygonorder by osm_id, x, y;The result is in the next picture. And it`s not any filtering function: in the query, no filtering is done, it's a pure combination of sets.
Why is one set different than the other?
أكثر...
Why?
with osm_polygon as ( select 1 osm_id, 'srid=900913;POLYGON((9238229.46 7371410.99,9238408.65 7371534.03,9238552.3 7371099.6,9238789.02 7371168.99,9238908.05 7370804.37,9238934.4 7370715.42,9238923.77 7370700.73,9238928.66 7370683.3,9238857.18 7370660.51,9238877.43 7370609.41,9238763.11 7370549.31,9238708.84 7370530.29,9238562.59 7370482.71,9238562.59 7370472.49,9238485.21 7370451.16,9238419.16 7370706.6,9238229.46 7371410.99))'::geometry way union all select 2 osm_id, 'srid=900913;POLYGON((9237195.59 7372142.96,9237223.53 7372184.43,9237324.27 7372285.2,9237354.76 7372369.01,9237337.83 7372446.05,9237354.76 7372534.95,9237375.93 7372627.24,9237451.27 7372692.43,9237546.11 7372680.57,9237650.24 7372745.75,9237729.83 7372761.01,9237816.18 7372832.96,9237869.52 7372878.69,9237994.82 7372921.02,9238071.02 7372821.96,9238002.44 7372743.23,9237980.49 7372688.03,9238002.97 7372661.58,9238149.81 7372510.77,9238370.74 7372635.11,9238452.75 7372543.85,9238315.17 7372375.84,9238455.4 7372258.1,9238675 7372448.6,9238872.91 7372330.67,9238537.42 7372087.44, 9238226.52 7371943.24,9237887.88 7371717.04,9237735.75 7371830.8,9237569.07 7371701.17,9237469.85 7371784.51,9237406.41 7371894.04,9237195.59 7372142.96))'::geometry way)SELECT osm_id, generate_series(floor(st_xmin(way))::int, ceiling(st_xmax(way))::int, 150) as x, generate_series(floor(st_ymin(way))::int, ceiling(st_ymax(way))::int, 150) as y from osm_polygonorder by osm_id, x, y;The result is in the next picture. And it`s not any filtering function: in the query, no filtering is done, it's a pure combination of sets.
Why is one set different than the other?

أكثر...