2

First file ( .shp ) had 1000KB, after 2buffers ( buffers on polygon, 1st buffer +100, 2nd buffer -100 ( small things near polygon should be removed )) in quantum gis file grown to 1500KB, and after the same 2 buffers in postgis file has 20000KB. Anyone can tell me why?

4
  • 4
    You probably have introduced a large number of new points. Try using the simplify algorithm in postgis. – johanvdw Feb 15 '12 at 14:13
  • 2
    Spot on johanvdw. When you buffer, it doesn't just 'inflate' the polygon's vertices, it adds new vertices to give you a more rounded shape. When you de-buffer, vertices are not removed unless they fall within the tolerance parameters of you GIS and/or they are absolutely identical (unlikely in most scenarios due to floating point errors). Therefore, the other effect you will get is that an inflate-then-deflate buffering process will not give you the same polygon outline as you had before. This might not matter for your use-case, but you should be aware of it, in case it is critical. – MappaGnosis Feb 15 '12 at 15:52
  • Your comments would form the complete answer. Please post one. – underdark Feb 15 '12 at 17:44
  • @johanvdw - can you please make your comment an answer. – Jakub Sisak GeoGraphics Feb 15 '12 at 18:16
1

(as per Underdark's request)

Spot on johanvdw. When you buffer, it doesn't just 'inflate' the polygon's vertices, it adds new vertices to give you a more rounded shape. When you de-buffer, vertices are not removed unless they fall within the tolerance parameters of you GIS and/or they are absolutely identical (unlikely in most scenarios due to floating point errors). Therefore, the other effect you will get is that an inflate-then-deflate buffering process will not give you the same polygon outline as you had before. This might not matter for your use-case, but you should be aware of it, in case it is critical

1

You probably have introduced a large number of new points. Try using the simplify algorithm in postgis.

As Sylvester points out in his comment on your question many vertices are added to create rounded shapes near the corners, and when you reverse that operation new points are created which did not exist before.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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