SQL Server > SQL Server Forums > SQL Server Spatial > How to define an oval shape?

Answered How to define an oval shape?

  • Saturday, April 28, 2012 5:12 AM
     
     

    Hi all,

    I'm trying to define an oval shape that looks like this:

    How can I do it using

    geography::STGeomFromText('
    CURVEPOLYGON(CIRCULARSTRING( ??????? )

    ??

    Thanks for your help :)

Answers

  • Saturday, April 28, 2012 7:59 AM
    Answerer
     
     Answered

    You can't define "true" ellipses using SQL Server - the CircularString geometry (as it's name suggests) always uses circular interpolation to create segments between the set of supplied points - there is no way to define an ellipsoid curvature instead.

    So, just as in SQL Server 2008/R2 you had to approximate circular geometries using a many-sided linear geometry, you'll have to approximate an elliptic curve using a combination of circular/straight line segments in a COMPOUNDCURVE instead.


    twitter: @alastaira blog: http://alastaira.wordpress.com/

All Replies

  • Saturday, April 28, 2012 5:29 AM
     
     

    can you take a look on below samples

    http://msdn.microsoft.com/en-us/library/ff929187.aspx


    Regards,
    Ahmed Ibrahim
    SQL Server Setup Team
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you.
    This can be beneficial to other community members reading the thread.

  • Saturday, April 28, 2012 6:18 AM
     
     

    Hi Ahmed :)

    This is what I got, and it doesn't look like an oval at all! 

    how to remove the end sharp points and make it curved?

  • Saturday, April 28, 2012 7:29 AM
     
     

    May be this thread would help

    http://social.msdn.microsoft.com/Forums/lv/sqlspatial/thread/c63ed34b-5246-4ebd-9897-84ad2a442d1f


    Regards,
    Ahmed Ibrahim
    SQL Server Setup Team
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you.
    This can be beneficial to other community members reading the thread.

  • Saturday, April 28, 2012 7:59 AM
    Answerer
     
     Answered

    You can't define "true" ellipses using SQL Server - the CircularString geometry (as it's name suggests) always uses circular interpolation to create segments between the set of supplied points - there is no way to define an ellipsoid curvature instead.

    So, just as in SQL Server 2008/R2 you had to approximate circular geometries using a many-sided linear geometry, you'll have to approximate an elliptic curve using a combination of circular/straight line segments in a COMPOUNDCURVE instead.


    twitter: @alastaira blog: http://alastaira.wordpress.com/