FeatureServer icon indicating copy to clipboard operation
FeatureServer copied to clipboard

Labels in ArcGIS Dashboard with transformed coordinates

Open kamil-novak opened this issue 5 years ago • 12 comments

Hello @rgwozdz, Can I ask you one more question about this issue. After using your workaround is all right. But now I have noticed that in ArcGIS Dashboards (web version) I can't display labels for Koop feature layer with this workaround. When I cancel this workaround, labels are displayed. This issue is only in Dashboard application. Other interfaces (Map Viewer 3.x or 4.x, application in JS API 4.x) are OK. Is there any solution for this? Thanks

Originally posted by @wellbloud-cz in https://github.com/koopjs/FeatureServer/issues/169#issuecomment-626639785

81560849-81c68200-9392-11ea-81fb-eb011a25d1f5

kamil-novak avatar May 13 '20 10:05 kamil-novak

This is an issue with using labels of portal items in db

On Wed, May 13, 2020, 5:23 AM wellbloud-cz [email protected] wrote:

Hello @rgwozdz https://github.com/rgwozdz, Can I ask you one more question about this issue. After using your workaround is all right. But now I have noticed that in ArcGIS Dashboards (web version) I can't display labels for Koop feature layer with this workaround. When I cancel this workaround, labels are displayed. This issue is only in Dashboard application. Other interfaces (Map Viewer 3.x or 4.x, application in JS API 4.x) are OK. Is there any solution for this? Thanks

Originally posted by @wellbloud-cz https://github.com/wellbloud-cz in #169 (comment) https://github.com/koopjs/FeatureServer/issues/169#issuecomment-626639785

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/koopjs/FeatureServer/issues/181, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6LCVCV7YRFP7NBSQCCXL3RRJYJXANCNFSM4M7TYIDA .

keithfraley avatar May 13 '20 11:05 keithfraley

Sorry, I don't understand it. Could you explain it me? It seems that it is really related to workaround for coordinates transformation (as I described). Thanks.

kamil-novak avatar May 19 '20 07:05 kamil-novak

@wellbloud-cz can you refresh me regarding which workaround you are doing, and why. I think it's because you're data needs to be served in a particular projection, but can you provide the details?

rgwozdz avatar May 19 '20 14:05 rgwozdz

A koop feature service that is saved with proper labeling as an item in the portal does not render those saved labels in dashboard. The work around is to slightly change something about the item (size or color of label maybe) and NOT save back as item, save the webmap, now the koop feature service rendering and labels are save at a map level, and they will work. There is an issue with opsdb rendering koop feature service labels that are stored as an item in the portal.

Regards Keith

On Tue, May 19, 2020 at 9:04 AM Rich Gwozdz [email protected] wrote:

@wellbloud-cz https://github.com/wellbloud-cz can you refresh me regarding which workaround you are doing, and why. I think it's because you're data needs to be served in a particular projection, but can you provide the details?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/koopjs/FeatureServer/issues/181#issuecomment-630840525, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6LCVDR7GXOJTX6QJC3AA3RSKGV5ANCNFSM4M7TYIDA .

keithfraley avatar May 19 '20 14:05 keithfraley

A koop feature service that is saved with proper labeling as an item in the portal does not render those saved labels in dashboard. The work around is to slightly change something about the item (size or color of label maybe) and NOT save back as item, save the webmap, now the koop feature service rendering and labels are save at a map level, and they will work. There is an issue with opsdb rendering koop feature service labels that are stored as an item in the portal. Regards Keith On Tue, May 19, 2020 at 9:04 AM Rich Gwozdz @.***> wrote: @wellbloud-cz https://github.com/wellbloud-cz can you refresh me regarding which workaround you are doing, and why. I think it's because you're data needs to be served in a particular projection, but can you provide the details? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#181 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6LCVDR7GXOJTX6QJC3AA3RSKGV5ANCNFSM4M7TYIDA .

Thanks for your explanation. I tried to do your workaround in the past, but it doesn't go to success. Regards Kamil

kamil-novak avatar May 20 '20 05:05 kamil-novak

@wellbloud-cz can you refresh me regarding which workaround you are doing, and why. I think it's because you're data needs to be served in a particular projection, but can you provide the details?

It was workaround for reprojecting data to WGS84 using proj4 using pseudocode below:

// fetch data from source

// reproject data to WGS84 using proj4

if (req.query.outSR === 5514 || req.query.outSR === 102067) {
  req.query.outSR = `PROJCS["S-JTSK / Krovak East North",GEOGCS["S-JTSK",DATUM["System_Jednotne_Trigonometricke_Site_Katastralni",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[589,76,480,0,0,0,0],AUTHORITY["EPSG","6156"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4156"]],PROJECTION["Krovak"],PARAMETER["latitude_of_center",49.5],PARAMETER["longitude_of_center",24.83333333333333],PARAMETER["azimuth",30.28813972222222],PARAMETER["pseudo_standard_parallel_1",78.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","5514"]]`
}

// Check for spatial query in your specific project
const { geometry = {}, inSR } = req.query
const { spatialReference: { latestWkid, wkid } = {} } = geometry
const geomFilterSRs = [latestWkid, wkid, inSR]
if (geomFilterSRs.includes(102067) || geomFilterSRs.includes(5514)) {
  delete req.query.geometry.spatialReference
  req.query.inSR = `PROJCS["S-JTSK / Krovak East North",GEOGCS["S-JTSK",DATUM["System_Jednotne_Trigonometricke_Site_Katastralni",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[589,76,480,0,0,0,0],AUTHORITY["EPSG","6156"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4156"]],PROJECTION["Krovak"],PARAMETER["latitude_of_center",49.5],PARAMETER["longitude_of_center",24.83333333333333],PARAMETER["azimuth",30.28813972222222],PARAMETER["pseudo_standard_parallel_1",78.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","5514"]]`
}

When I remove this pseudocode from Koop, I can display labels in Dashboard. Kamil

kamil-novak avatar May 20 '20 05:05 kamil-novak

@wellbloud-cz This sounds like a limitation of Dashboard. Perhaps Dashboard has issues with data served in non-standard projections? Have you tried adding data (in projection 5514/102067) to dashboard from a non-Koop source? Curious if labels work in that scenario.

rgwozdz avatar May 20 '20 13:05 rgwozdz

Other feature services from ArcGIS Server (in projection 5514/102067) are OK: Image 001

kamil-novak avatar May 20 '20 14:05 kamil-novak

Can you share the URL to the Dashboard?

rgwozdz avatar May 20 '20 15:05 rgwozdz

Nothing loads, is that what you are seeing? Looking at the network tab, Portal calls are returning: Item does not exist or is inaccessible.

rgwozdz avatar May 20 '20 17:05 rgwozdz

Sorry for my delay. It was issue with DNS. Now, it would be OK. Dashboard is avaiable here https://arcg.is/0Kizza

kamil-novak avatar Jun 09 '20 05:06 kamil-novak