Business Intelligence Tools

Spotfire Troubleshooting — Labels won’t appear on a map chart feature layer

  • Are you having issues getting labels to appear on a feature layer in a map chart?

I ran into an interesting problem this week.  A user was working with a very detailed map chart.  It had at least 10 layers split up between marker layers and feature layers.  The user wanted to put labels on one of the feature layers that represented well paths (aka well sticks), but they wouldn’t show up.  I ran several tests trying to figure out the problem.  I put labels on other feature layers.  I created new, simpler maps with just this one layer.  I compared the settings with other feature layers that had labels.

As is quite often the case, the answer was in the data.  The table (an information link) behind the feature layer didn’t have X and Y coordinate columns, and labels need the coordinates to know where to place the labels.  The sticks were placed correctly on the map without the x and y  coordinates, but the labels require them.  I needed to add  XCenter, XMax, XMin, YCenter, YMax and YMin columns to make the labels work. The moral of the story — Always check your data!

Update on 8/30/2017 — I ran into this problem again and came back to my post for help in solving it.  In re-reading the post, I realized more detail and information were needed to show how I solved the problem.

The post says — I needed to add  XCenter, XMax, XMin, YCenter, YMax and YMin columns to make the labels work. Well, how did I do that?

Answer — I used all six of the WKBEnvelope spatial functions

More specifically, I applied those functions to the SHAPE column in my information link.  Those functions generate the XCenter, XMax, XMin, YCenter, YMax and YMin columns required for the labels. The exact expression was — WKBEnvelopeXCenter([SHAPE]).



8 thoughts on “Spotfire Troubleshooting — Labels won’t appear on a map chart feature layer

  1. Pingback: Creating Information Links with Spatial Data - Data Shop Talk

  2. Jeremy Reply

    In Spotfire I don’t see a Spatial Functions category at all when trying to create these new calculated columns. Do you know where they’ve gone by chance?

    • Julie Sebby Post authorReply

      I was using version 7.9 at the time. If they exist in version 7.6, they will be under the spatial category of functions. I can’t add a screenshot to comments, but if you go to Insert > Calculated column…look on the right-hand side of the dialog and there will be a drop down for the category. In that drop down there should be an option for spatial, and they will be in there. If you don’t have spatial, they probably weren’t added until 7.9.

  3. V Anderson Reply

    Thanks for these helpful articles – I’ve been reading a lot of these and it’s great to have a resource for dealing with these tricky Spotfire issues.

    I was able to successfully use this fix, but I’ve noticed something odd. If I calculate the XMin, XMax, YMin, YMax, XCenter, YCenter columns externally and bring them in with my feature layer data table, the labels don’t render. It only seems to work if I calculate these values using the WKBEnvelope… functions in Spotfire, or load a local shapefile with the same data rather than the spatial SQL version.

    Have you or anyone else dealt with this issue? I’m trying to make this as easy as possible for end-users to pull in these layers, and it is not ideal to have to ask them to calculate 6 columns to be able to label their features. Have you had success pre-calculating these columns in SQL and bringing them in?

    • Julie Sebby Post authorReply

      I haven’t tried that myself. It might be because of the data type. Do the data types match? Are they the same as when you calculate XMin/XMax, etc?

Leave a Reply

Your email address will not be published. Required fields are marked *