Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Labels in ArcGIS Dashboard with transformed coordinates #181

Open
kamil-novak opened this issue May 13, 2020 · 12 comments
Open

Labels in ArcGIS Dashboard with transformed coordinates #181

kamil-novak opened this issue May 13, 2020 · 12 comments

Comments

@kamil-novak
Copy link

kamil-novak commented May 13, 2020

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 #169 (comment)

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

@keithfraley
Copy link

keithfraley commented May 13, 2020 via email

@kamil-novak
Copy link
Author

kamil-novak commented May 19, 2020

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.

@rgwozdz
Copy link
Member

rgwozdz commented May 19, 2020

@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?

@keithfraley
Copy link

keithfraley commented May 19, 2020 via email

@kamil-novak
Copy link
Author

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
Copy link
Author

@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

@rgwozdz
Copy link
Member

rgwozdz commented May 20, 2020

@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.

@kamil-novak
Copy link
Author

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

@rgwozdz
Copy link
Member

rgwozdz commented May 20, 2020 via email

@kamil-novak
Copy link
Author

@rgwozdz
Copy link
Member

rgwozdz commented May 20, 2020 via email

@kamil-novak
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants