Changes between Version 35 and Version 36 of UsersWikiplpgsqlfunctions
- Timestamp:
- 08/05/20 15:52:51 (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UsersWikiplpgsqlfunctions
v35 v36 3 3 4 4 This is an area to put utility functions or wrappers around PostGIS. 5 6 == Rotate Geometry around a Point ==7 {{{8 #!sql9 CREATE OR REPLACE FUNCTION RotateAtPoint(10 geom geometry, pt_x double precision, pt_y double precision, angle double precision)11 RETURNS geometry AS12 $$13 SELECT ST_Translate( ST_Rotate( ST_Translate( $1, -1*$2, -1*$3), $4), $2, $3)14 $$15 LANGUAGE 'sql';16 }}}17 5 18 6 == Construct Ellipse == … … 185 173 }}} 186 174 175 == Rotate Geometry around a Point == 176 177 Superseded by [https://postgis.net/docs/manual-3.0/ST_Rotate.html ST_Rotate]. 178 179 {{{ 180 #!sql 181 CREATE OR REPLACE FUNCTION RotateAtPoint( 182 geom geometry, pt_x double precision, pt_y double precision, angle double precision) 183 RETURNS geometry AS 184 $$ 185 SELECT ST_Translate( ST_Rotate( ST_Translate( $1, -1*$2, -1*$3), $4), $2, $3) 186 $$ 187 LANGUAGE 'sql'; 188 }}} 187 189 188 190 == Construct a multilinestring consisting of the interior and exterior rings of a polygon/multipolygon ==