Hi Marcus,

Quoting marcus.wolsc...@googlemail.com:

> Excuse me, wich polygon is buffered, when and for what purpose?
Sorry for being a bit unclear. Richard already explained it, so no  
need for me to touch that again.

> Why does it need a PostGIS for this job? Wouldn't calculating
> the normal in each vertex and offsetting the vertex along that normal
> be enough? (Plus a check if the new location is not inside the polygon,
> else offset only to the point where it touches the polygon.)
I started using PostGIS, because that is what I'm familiar with.  
Frederik Ramm suggested to directly use GEOS instead, so that is what  
I'm going to do next. Shapely might also be an option, but I'm not  
sure if it has implemented polygon buffering. Implementing a buffering  
algorithm myself is a waste of time when other alternatives are  
available.

One other note. I'm not sure if you noticed it, but the buffering  
takes place in WGS84. So the closer the geometry is to a pole, the  
bigger the distortion is of buffering in the horizontal direction, as  
compared to the vertical direction. For me that was an acceptable  
trade-off. I already mentioned in the script that accepting a SRS  
parameter might be a welcome future extension.

Regards,

Frank


_______________________________________________
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev

Reply via email to