Skip to main content

2 workflow questions (Region delimiter and Querytask spatial reference)

Comments

4 comments

  • Permanently deleted user
    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 Price
    0
  • Permanently deleted user
    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
  • Permanently deleted user
    Can anyone help please?
    0
  • Jostein Svegården
    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 AS
    0

Please sign in to leave a comment.