I have a polyline with more than 15 mio attributes. all have more or less unik numbers in the field I would like to dissolve over.
I would like to dissolve this field so there are e.g. 5 categories left after dissolving, e.g. range 1-10 = 10, 10-100 = 100, ... , ... But my problem is, that the shape is so big, that working with is is very heavy.

Is there any way to handle this? And when would you make the categories?

  • 3
    Welcome to GIS:SE @SidselHansen! PostGIS may be the way to go if you're dealing with exceptionally large datasets.
    – Joseph
    Jan 13, 2017 at 14:37
  • I normally work in QGIS, but I will look into it. Jan 13, 2017 at 14:50

1 Answer 1


You can create a calculated field.

Go to your layer properties, fields pane, and click on the Field Calculator button (the abacus).

If you want your new field to stay in qgis (no change to your shape files) check "Create a virtual field".

Then, use this in expression (replace xxx with your source field):

WHEN (xxx<=100) THEN 100
WHEN (xxx>100 AND xxx<=500) THEN 500
WHEN (xxx>500 AND xxx<=1000) THEN 1000
WHEN (xxx>1000) THEN 9999

You can adapt it to suit your needs... (you can replace new integers with strings for example)

Then use categorization on your new field in the style pane.

  • Yea this would work for smaller datasets, but this shape have soo many attributes. I could not dissolve in QGIS, but dissolve it in ArcGIS worked and now the shapefile contains 6 attributes and is manageable again. Jan 19, 2017 at 21:52

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.