Guided Add Layer from File - Default Coordinate System
Is it possible to change the default coordinate system in the Guided Add Layer from File tool? It defaults to WGS 84 but we primarily use State Plane, so I'd prefer that to be the default for users.
-
I got the following reaction from support on the same question. I got a sample workflow, but cannot attach it here.
I was able to get this to work by taking advantage of the inSpatialReference argument for the results.configure-upload-data operation. This operation is included in the chain of commands that makes up the "Guided Add Layer from File" tool in the Layer Actions menu of the "Web GIS - Default" template for VertiGIS Studio Web. If you are using a different operation to upload the CSV, I believe the inSpatialReference argument can also be configured on similar operations like results.from-csv and results.from-files.
The following outlines what I did, though there are likely other ways to approach it as well:- Since it was difficult to work with the results.configure-upload-data operation in Web Designer, I converted the command chain to a workflow using the "Convert to Workflow" button:

- The results.upload-data-from-files operation that feeds the results.configure-upload-data operation seems to output an array, so I added a For Each activity to go through each item.
- In the For Each activity, I added a Set Property activity to configure the inSpatialReference argument using the spatial reference of the web map. Since a Get Map activity had already been included in the workflow, I simply used its output to find the spatial reference of the web map.
0 -
Moving this functionality from a workflow back to the Custom Command would make things way more usefull.
Also a Guided Export function where users can chose between GPS coordinates and Map coordinates would be a very welcome feature. My users don't understand EPSG codes. But they do understand that GPS uses lat long and the map uses Meters.
0 -
Hi Jasper
i had a similar issue where my users wouldn't understand ESPG codes and the data they upload is in a local coordinate system different to what i project the map in.
what i had to do was run a simple query with the specified output coordinate system to get the spatial reference and then set the property of out of results.upload-data-from-files to it.
in your case i would put a form (in modal) before the operation results.configure-upload-data and ask them what coordinates they are uploading and then run a query with that output coordinates system and use that to set the property for inspatialreference.
0 -
Hi Shaun Glorie, would it be possible to share the workflow? I'm looking into options to handle different coordinate systems when users import files. Our map is in MGA2020 but some users might use other systems, e.g Web Mercator. Thank you.
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
4 commentaires