ST_Buffer diving under the covers part 1

المشرف العام

Administrator
طاقم الإدارة
This will be a quick post. I just looked at how ST_Buffer is written in the PostGIS codebase, and I thought this was interesting. When you use ST_Buffer and specify geometry, buffer distance, and an integer value, this gets converted in the overloaded function into a quad_segs version.

CREATE OR REPLACE FUNCTION ST_Buffer(geometry,float8,integer)RETURNS geometryAS $$ SELECT _ST_Buffer($1, $2,CAST('quad_segs='||CAST($3 AS text) as cstring))$$LANGUAGE 'sql' IMMUTABLE STRICT;P.S. I would have written more, but Sherlock just started.




أكثر...
 
أعلى