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

2904
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)
18 Replies
ChristopherJohnson1
Occasional Contributor II

No worries, Wendy.  I figured it was worth a try.  🙂

Yes, I have provided the Support team with the data that they need.  Yet, they are unable to replicate.  It is being escalated, so, hopefully, we will have a resolution soon.

I will send an update once we figure it out.

Thanks...Chris

0 Kudos
ChristopherJohnson1
Occasional Contributor II

Just an update here...after months and months of troubleshooting, we were able to determine that there was a bug -- BUG-000121886.  Hopefully, we will have a resolution soon.

Thanks...Chris

0 Kudos
ChristopherJohnson1
Occasional Contributor II

Well, we have a workaround, but a fix to the bug would be great.

Thanks...Chris

0 Kudos
WendyHarrison
Esri Contributor

Hi Shane - it is probably something to do with the ring ordering.  Still trying to get to the bottom of it. A few more questions...

What storage type (geometry or geography) are you using in SQL Server?

Where did the data come from? was it created in ArcGIS?

thanks

Wendy

0 Kudos
deleted-user-QWCWfF11Rtxw
New Contributor II

wendy,  appreciate the help.  

Data Format

  • Data is stored using the SQL Server geometry data type and SRID 2193 (NZ Transverse Mercator)

Process

  • The data is downloaded from an external vendor LINZ Data Service  as a SHP file
  • Uploaded into SQL Server using FME and converting the spatial object to an OGC Well Known Binary object
  • Once in the database, the spatial object is created using standard SQL Server OGC functions OGC Static Geometry Methods | Microsoft Docs 
  • All objects are then verified using the same set of spatial functions STIsValid (geometry Data Type) | Microsoft Docs 
  • Spatial Index is then created
  • Layer is opened up into ArcMap - labelling works
  • Layer is opened up into ArcGIS Pro 2.2 - labelling does not work

Notes

  • Layers created in a SQL Server database (using ArcMap) with geodatabase enabled seem to label correctly.  In ArcGIS Pro and the catalog view the layers that work (labelling that is) have a symbol that seems to indicate a polygon layer (green tick) whereas the ones that do not work just have a hollow polygon (red cross)

Hope this helps

0 Kudos
BruceHarold
Esri Regular Contributor

Shane does your edition of FME not include the SQL Server Spatial writer?

0 Kudos
deleted-user-QWCWfF11Rtxw
New Contributor II

We used to use the extension but reverted back to uploading a OGC well known binary.  I have also tried using the GDAL libraries to upload to a SQL geometry data type directly and still have the same labelling issue.

0 Kudos
ChetDobbins
Esri Contributor

Hi Shane,

I think i know this particular issue, and believe it may be something we have recently fixed in the software which was related to ring order. You mentioned that you are using ArcGIS Pro 2.2, and ArcMap as well... can you confirm the version of ArcMap? I suspect it is 10.6.1 because that is when the issue I am thinking about would have been introduced. 

The reason you wouldn't see the issue with data created by ArcGIS is because we will always follow our ring order requirements when inserting the data into a feature class. I suspect the method used to insert directly into the spatial table where you see this issue is not following our required ring order direction. SQL Server really does not care about this when the data is stored in the geometry spatial type so STIsValid would return the shape as valid no matter which way you inserted.

In 10.6.1 we made some changes to our validation method which improved performance, but also resulted in problems when reading shapes that have this reversed ring ordering. 

What is the  possibility that you could log a case with technical support so that we can get you hooked up with a defect?

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.