2 workflow questions (Region delimiter and Querytask spatial reference)
Hi,
I have 2 questions on workflows:
1 - The Querytask activity has an OUTPUT parameter SpatialReference but shouldn't be this INPUT? And does it actually project the geometry to the spatial reference from the map?
2 - I've had several problems with delimiters (region locked) depending on where I'm deploying the workflows as they are interpreted differently depending on the server configuration ("." or ","). Is there an easy way in an workflow to configure this and not have to worry about it anymore during development?
Thanks in advance
0
-
Hi Ricardo
if you take a look at the ESRI help for the ArcGIS API for JavaScript 3.19 QueryTask
https://developers.arcgis.com/javascript/3/jsapi/querytask-amd.html
and then follow though to look at Query
https://developers.arcgis.com/javascript/3/jsapi/query-amd.html
Look at the properties of a Query and you will see that a the query definition requires one of the following properties: queryGeometry, text, or where.
The queryGeometry is required to have a spatial reference in its definition.
The outSpatialReference is the the spatial reference for the returned geometry, so yes it does project to the specified spatial reference.
So the question is do you need to change to spatial reference of the returned geometry?
What is the circumstance that the delimiters are being used in your workflow?
Regards
Ralph Price0 -
Thanks for the reply and sorry I couldn't reply earlier.
In regards to the first one I was only trying to figure out what was done behind the scene as it doesn't make much sense to me the fact the spatialReference is an output. It would make more sense to be an input.
Question 2:
Let's say I have my decimal values being returned as 1.23 . Depending on the regional settings it might or might not be interpreted correctly (it might be expecting 1,23 ). I want to make sure I develop the workflow in a way that this situation is handled for every regional setting but wouldn't want to do it on a case-by-case basis.0 -
Can anyone help please? 0 -
It is possible to use a CultureInfo-object to control the way decimal separators are handled.
Make sure that the System.Globalization namespace is imported. Create a variable of type System.Globalization.CultureInfo, and assign it to a new CultureInfo-object, e.g. USCulture = new CultureInfo("en-US").
You can then use this to control that the decimal separator used is according to the locale you specified, e.g:
mileage = mileage + Convert.ToDouble(feature.Attributes("Mileage"),USCulture)
feature.Attributes("Mileage") = mileage.ToString("N2", USCulture)
Jostein Svegården
Geodata AS0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
4 kommentarer