I'm trying to generalize World Bank Official Boundaries:World Boundaries GeoJSON - Low Resolution from https://datacatalog.worldbank.org/dataset/world-bank-official-boundaries using QGIS 3.18.3, using GRASS v.generalize, ultimately to display data using vega-lite, but some shapes aren't generalizing

Firstly, I removed the "fid" field, since that fixes issues about unique constraint violations. Then, I run the v.generalize with all the default options, which are

  '-l' : True,
  '-t' : False,
  'alpha' : 1,
  'angle_thresh' : 3,
  'beta' : 1,
  'betweeness_thresh' : 0,
  'cats' : '',
  'closeness_thresh' : 0,
  'degree_thresh' : 0,
  'error' : 'TEMPORARY_OUTPUT',
  'input' : '/home/dw/Desktop/WB_countries_Admin0_lowres.geojson',
  'iterations' : 1,
  'look_ahead' : 7,
  'method' : 0,
  'output' : 'TEMPORARY_OUTPUT',
  'reduction' : 50,
  'slide' : 0.5,
  'threshold' : 1,
  'type' : [0,1,2],
  'where' : ''

I get a good amount of warnings in the output, but it does make a new layer

WARNING: Number of incorrect boundaries: 2205

WARNING: The combination of types is not supported by all formats.

WARNING: No attribute table found -> using only category numbers as attributes

WARNING: 3668 features without category were skipped. Features without category are written only when -c flag is given.

WARNING: Output layer is empty, no features written

WARNING: 2237 boundaries were not modified because modification would damage topology

WARNING: 3638 lines/boundaries were not modified due to over-simplification

Spain looks generalised, but France and the UK, no. (Technically Spain is more generalized than I want, but expect that's a matter for tweaking the tolerance)

enter image description here

I can sort of understand this from the warnings... but what I don't know: what to do about it. How can I get all the countries to generalise? I would like the boundaries of countries to remain aligned without gaps appearing between them.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.