Labelling a polygon query layer from SQL Server in ArcGIS Pro 2.2

720
18
Jump to solution
09-03-2018 07:46 PM
deleted-user-QWCWfF11Rtxw
New Contributor II

ArcGIS Professional 2.2 Labelling

I am having an issue labelling polygons in a query layer from SQL Server 2008 R2.

No labels seem to be drawing. 

I have checked the data and all columns are populated. 

  • Labelling works for point and polyline query layers.
  • Labelling works for point, polyline and polygon feature types in a FGDB
  • Labelling works for point, polyline and polygon feature types in a SHP file

Could someone please point me in the right direction.  I have tried the polygon labelling in SQL Server 2008 R2 and 2016 without luck.

Tags (1)
1 Solution

Accepted Solutions
deleted-user-QWCWfF11Rtxw
New Contributor II

Just wanted to thank the Esri team.  A patch ArcGIS Professional 2.2.3 came out the other week.  This has included a fix for this issue.  Thanks again.

View solution in original post

18 Replies
WendyHarrison
Esri Contributor

Hi Shane,

SQL Server 2008/2008R2 are not supported with Pro 2.2.  SQL Server 2016 is though.  Are you seeing the issue on both?

The best way to deal with this will be to log a support call so that we can take a look at the data and get a repro case.

thanks

Wendy

0 Kudos
deleted-user-QWCWfF11Rtxw
New Contributor II

Wendy,  I have recreated the database in SQL Server 2016 as well and have the same issue.  The only polygons that label in both database version are polygons with a hole in them.  The label appears in the hole.  Very unusual.  It does seem to work when I open the same layer in an SQL Server database that has had geodatabase enabled.  I have emailed support in NZ.

0 Kudos
WendyHarrison
Esri Contributor

ohhh - I saw something like this last week...

try exporting the data out to a file gdb and run the repair geometry gp tool on it with the OGC validation method. then put it back into sql server.

let me know how that goes.

thanks

Wendy

0 Kudos
deleted-user-QWCWfF11Rtxw
New Contributor II

Inside SQL Server I have run a check to ensure that all geometries are valid.  This particular layer is refreshed each night in SQL Server via a spatial query from four separate tables.  One spatial and 3 not spatial.  Once completed, a STIsValid() function is run on the resultant table.  Any objects not valid are reported to the data team.  Why would it be working in ArcMap?

0 Kudos
deleted-user-QWCWfF11Rtxw
New Contributor II

Wendy,  when I exported the records out to the a FGDB and labelled them, they only the polygons with the holes were labelled.  When I ran the repair as instructed, the labelling worked!!!

The geometies in the database are OGC compliant so what would the issue be?

0 Kudos
deleted-user-QWCWfF11Rtxw
New Contributor II

Forgot to add, I am doing this in SQL Server 2016.  I check the geometries with the following function STIsValid().  URL link below:

STIsValid (geometry Data Type) | Microsoft Docs 

0 Kudos
deleted-user-QWCWfF11Rtxw
New Contributor II

I am guessing that the reason why the polygons label when held in a Geodatabase in SQL Server is because they follow the Esri ring ordering?

0 Kudos
ChristopherJohnson1
Occasional Contributor II

Hi, Wendy. I have a similar issue to the one that you were discussing with Shane recently.  I do have a ticket open with Support, but I wanted to see if you had any ideas.

We have data (spatial and non-spatial) stored in the same database on a SQL Server 2012 instance.  The spatial data and non-spatial data are joined in ArcMap 10.6.1 (I tried with 10.5, as well) and labeling is turned on.  I see the labels in ArcMap, but when we publish to ArcGIS Server (10.61), the labels do not appear when viewing the map in ArcGIS JavaScript preview.  The same set-up/workflow is successful on ArcGIS Server 10.41.  The issue seems to be related to the join between the spatial data and non-spatial data.  If I publish the map document without the join, the labels appear.

I tried the suggestion you had about exporting the spatial data, running the repair tool and re-importing to SQL Server.  That did not work.

Any other ideas?

Thanks...Chris

P.S. Support is not able to duplicate the issue.  Are there any server settings at which I may look to try and resolve this issue?

0 Kudos
WendyHarrison
Esri Contributor

Hi Chris,

I'm sorry that I don't have any ideas off the top of my head as to what may be causing the issue.  You are in the best hands having the support call open.  Once they are able to reproduce it they will log it to my team and we will take it from there.

So let's get them all the information they need so that they can reproduce the issue in house. A lot of the times things are best reproduced with the data you are working with.  They don't need the whole dataset. The best thing you can send them is a map package with two datasets with a feature in each with the join between them and labels turned on (basically the smallest possible amount of data that will reproduce the issue).  As long as they can load it into SQL Server and repro.

Keep us posted

Thanks

Wendy

0 Kudos