locked
Why can't ssms display label columns for point geometries? RRS feed

  • Question

  • Hi,

    I would be interested to know why ssms can't display label columns for point geometries?

    I would think these geometries are ideal candidates for this purpuse.

    T.i.a.

    Monday, August 10, 2009 12:07 PM

Answers

  • Not only is it hard to display labels for point geometries, but it's hard to display the geometries themselves because, by definition, they represent a singular point in space, occupying no area. This makes them pretty hard to display!

    The easiest solution is simply to add a small buffer around each point so that they are represented as small (approximately circular) polygons:

    SELECT
      geometry::Point(3,4,0).STBuffer(0.1) AS Shape,
      'Some Label Text' AS Label
    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
    Monday, August 10, 2009 9:59 PM
    Answerer
  • This is something we are considering for SQL 11. The main reason is that you can have a large number of points and we do not have any good label collision detection algorithms in the map control. In the meantime You can form a buffer as tanoshimi suggested or you can hover the mouse over a particular point to see the rest of the fields in a tooltip.

    Monday, August 10, 2009 10:25 PM

All replies

  • Not only is it hard to display labels for point geometries, but it's hard to display the geometries themselves because, by definition, they represent a singular point in space, occupying no area. This makes them pretty hard to display!

    The easiest solution is simply to add a small buffer around each point so that they are represented as small (approximately circular) polygons:

    SELECT
      geometry::Point(3,4,0).STBuffer(0.1) AS Shape,
      'Some Label Text' AS Label
    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
    Monday, August 10, 2009 9:59 PM
    Answerer
  • This is something we are considering for SQL 11. The main reason is that you can have a large number of points and we do not have any good label collision detection algorithms in the map control. In the meantime You can form a buffer as tanoshimi suggested or you can hover the mouse over a particular point to see the rest of the fields in a tooltip.

    Monday, August 10, 2009 10:25 PM