title: Spatial Database - Too many spatial objects to display
body: <p>I'm playing with SQL Server spatial database and managed to draw something using ellipses (and hyper and hypo-ellipses).</p>
  
  <p>But I'm getting this error:</p>
  
  <blockquote>
    <p>"Too many spatial objects to display - displaying the first 5000 objects. Please refine your query."</p>
  </blockquote>
  
  <p>Most of my graphic is being displayed. Removing a couple of ellipses "solves" the problem.</p>
  
  <p>Can I change that limit to allow me to draw more objects?</p>
  
  <p>Below is my example query:</p>
  
  <pre><code>DECLARE @plano AS TABLE (t FLOAT, x float, y FLOAT)
  DECLARE @t FLOAT = -3.14, @f FLOAT = .3,
          @mx FLOAT = 8, @my FLOAT = 10
  
  WHILE @t &lt; 3.14
  BEGIN
      SET @t = @t + 0.01
  
      INSERT INTO @plano
          SELECT @t, @mx*power(abs(SIN(@t)),@f), @my*power(abs(COS(@t)),@f)
          UNION
          SELECT @t, -@mx*power(abs(SIN(@t)),@f), @my*power(abs(COS(@t)),@f)
          UNION
          SELECT @t,  @mx*SIN(@t),(@my/10)*COS(@t)
          UNION
          SELECT @t, -@mx*power(SIN(@t),5),-@my*power(abs(COS(@t)),5)
          UNION
          SELECT @t, 3*COS(@t)*COS( 0.3) - 4*SIN(@t)*SIN( 0.3)+ 4, 3*COS(@t)*SIN( 0.3)+ 4*SIN(@t)*COS( 0.3) + 5
          UNION
          SELECT @t, 3*COS(@t)*COS(-0.3) - 4*SIN(@t)*SIN(-0.3)- 4, 3*COS(@t)*SIN(-0.3)+ 4*SIN(@t)*COS(-0.3) + 5
          UNION
          SELECT @t, 1.5*SIN(@t) + 3, 2*COS(@t) + 5
          UNION
          SELECT @t, 1.5*SIN(@t) - 3, 2*COS(@t) + 5
  END
  
  SELECT
      t,x, y,
      geometry::Point(x, y, 0).STBuffer(0.1)
  FROM
      @plano
  </code></pre>