[postgis-users] Problem with ellipse function

Bruce Rindahl rindahl at lrcwe.com
Fri Jun 15 16:00:48 PDT 2007


You can modify the function in anyway you see fit for your uses.  That is
reason you can create functions.  The one I posted is very generic for any
use while yours is very specific to your needs and the projection of your
data.

I am glad the ellipse function was a help in your applications.

Bruce Rindahl

 

  _____  

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of franco
califano
Sent: Friday, June 15, 2007 11:45 AM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] Problem with ellipse function

 

Thank you.
This is the solution!!
But, i think, the function ellipse is wrong.
I modified it in this way:

Ellipse (x,y,rx,ry,rotation,#of segments in 1/4 of ellipse)

CREATE OR REPLACE FUNCTION Ellipse(double precision, double precision,
double precision, double precision, double precision, integer) 
RETURNS geometry AS 
'
SELECT
transform(translate(rotate(scale(buffer(transform(setsrid(makepoint(0,0),432
6),3395),1,$6),$3,$4),$5),x(transform(setsrid(makepoint($1,$2),4326),3395)),
y(transform(setsrid(makepoint($1,$2),4326),3395))),4326)
'
LANGUAGE 'sql';

where rx and ry are the (minor axis length)/2  and the (major axis length)/2
(in meters).
What do you think about this?
Thanks......

  

  _____  

  _____  

L'email della prossima generazione? Puoi averla con la nuova
<http://us.rd.yahoo.com/mail/it/taglines/hotmail/nowyoucan/nextgen/*http:/it
.docs.yahoo.com/nowyoucan.html>  Yahoo! Mail

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070615/d38ecf18/attachment.html>


More information about the postgis-users mailing list