Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question
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 Feb 15 '12 at 18:16
add comment

2 Answers 2

up vote 1 down vote accepted

(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

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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