Hi everyone, I found a URL parameter that can be added to ArcGIS FeatureServer service layers that makes the server return more complete and advanced rendering instructions for the layers.
The difference is mostly seen in layers which use multiple symbol layers such as polygons with a hatch fill. For layers like that, ArcGIS servers usually return a single symbol with the colors mixed. I recommend trying to load the example below, first as a mapserver service to see the definitions and then as a featureserver service to see how the drawing info is currently being passed. I found that if you query the layer metadata with the *returnAdvancedSymbols* URL parameter set to true, you get back the same response that ArcGIS Pro gets from the server and uses to create symbology for feature services. So instead of requesting the metadata for a layer like QGIS currently does: https://ags.iplan.gov.il/arcgisiplan/rest/services/PlanningPublic/Xplan/MapServer/4?f=json The initial metadata query would be: https://ags.iplan.gov.il/arcgisiplan/rest/services/PlanningPublic/Xplan/MapServer/4?f=json&returnAdvancedSymbols=true And get back a more complex result if there are advanced symbols on the layer. The drawingInfo returned is *mostly* compatible with the ESRI CIM spec, <https://github.com/Esri/cim-spec> but I already encountered some names that differed between server versions. While the parameter only appears in esri documentation from version 11.1, I tested that it is working for services running on ArcGIS Server version as far back as at least 10.6. I tried to start implementing this parsing in QGIS (image 3 shows rendering with my additions), but I want to make it optional until the parsing is complete and that is where I could use some help. I added a checkbox to *QgsNewArcGisRestConnectionDialog* where the user can toggle advanced symbols for a specific service, and managed to save the setting in the service settings in the profile's QGIS3.ini file. What I want to do next is pass this parameter on to *QgsAfsProvider* where I would use that as a switch between *QgsArcGisRestQueryUtils::getLayerInfo* and the function I added to get the metadata with advanced symbols called *QgsArcGisRestQueryUtils::getLayerAdvanvcedSymbolsInfo*. I could use some help in understanding how to read and pass on the parameter through the QgsAfsSharedData object or in any other way that might be more correct. On a side note, I am in the contributor meeting right now until lunch in case someone is here and can help with this face to face, it would be much appreciated. On a second side note, sample service with other types of complex symbols for points, lines and polygons will also be much appreciated for testing purposes. -- Regards, Dror Bogin, +972-50-3077338
_______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer