AnsweredAssumed Answered

esri/units v.s. esri/tasks/GeometryService units

Question asked by greenkarmic on May 7, 2015
Latest reply on May 7, 2015 by greenkarmic

Hi,

 

I was wondering if there is an easy way to use a unit taken from the esri/units module, and use it to specify the unit in a GeometryService operation? The unit sets don't match. I can make the conversion myself, but maybe there's a simple/official way I missed. Thanks.

 

esri/units module

 

  1. ACRES: "esriAcres"
  2. ARES: "esriAres"
  3. CENTIMETERS: "esriCentimeters"
  4. DECIMAL_DEGREES: "esriDecimalDegrees"
  5. DECIMETERS: "esriDecimeters"
  6. DEGREE_MINUTE_SECONDS: "esriDegreeMinuteSeconds"
  7. FEET: "esriFeet"
  8. FEET_PER_SECOND: "esriFeetPerSecond"
  9. HECTARES: "esriHectares"
  10. INCHES: "esriInches"
  11. KILOMETERS: "esriKilometers"
  12. KILOMETERS_PER_HOUR: "esriKilometersPerHour"
  13. KNOTS: "esriKnots"
  14. METERS: "esriMeters"
  15. METERS_PER_SECOND: "esriMetersPerSecond"
  16. MILES: "esriMiles"
  17. MILES_PER_HOUR: "esriMilesPerHour"
  18. MILLIMETERS: "esriMillimeters"
  19. NAUTICAL_MILES: "esriNauticalMiles"
  20. POINTS: "esriPoints"
  21. SQUARE_CENTIMETERS: "esriSquareCentimeters"
  22. SQUARE_DECIMETERS: "esriSquareDecimeters"
  23. SQUARE_FEET: "esriSquareFeet"
  24. SQUARE_INCHES: "esriSquareInches"
  25. SQUARE_KILOMETERS: "esriSquareKilometers"
  26. SQUARE_METERS: "esriSquareMeters"
  27. SQUARE_MILES: "esriSquareMiles"
  28. SQUARE_MILLIMETERS: "esriSquareMillimeters"
  29. SQUARE_NAUTICAL_MILES: "esriSquareNauticalMiles"
  30. SQUARE_YARDS: "esriSquareYards"
  31. UNKNOWN: "esriUnknownUnits"
  32. YARDS: "esriYards"

 

esri/tasks/GeometryService module

 

  1. UNIT_50KILOMETER_LENGTH: 109030
  2. UNIT_150KILOMETER_LENGTH: 109031
  3. UNIT_ACRES: "esriAcres"
  4. UNIT_ARCMINUTE: 9103
  5. UNIT_ARCMINUTE_CENTESIMAL: 9112
  6. UNIT_ARCSECOND: 9104
  7. UNIT_ARCSECOND_CENTESIMAL: 9113
  8. UNIT_ARES: "esriAres"
  9. UNIT_BENOIT_1895A_CHAIN: 9052
  10. UNIT_BENOIT_1895A_FOOT: 9051
  11. UNIT_BENOIT_1895A_LINK: 9053
  12. UNIT_BENOIT_1895A_YARD: 9050
  13. UNIT_BENOIT_1895B_CHAIN: 9062
  14. UNIT_BENOIT_1895B_FOOT: 9061
  15. UNIT_BENOIT_1895B_LINK: 9063
  16. UNIT_BENOIT_1895B_YARD: 9060
  17. UNIT_BRITISH_1936_FOOT: 9095
  18. UNIT_CENTIMETER: 109006
  19. UNIT_CLARKE_CHAIN: 9038
  20. UNIT_CLARKE_FOOT: 9005
  21. UNIT_CLARKE_LINK: 9039
  22. UNIT_CLARKE_YARD: 9037
  23. UNIT_DECIMETER: 109005
  24. UNIT_DEGREE: 9102
  25. UNIT_FATHOM: 9014
  26. UNIT_FOOT: 9002
  27. UNIT_FOOT_1865: 9070
  28. UNIT_GERMAN_METER: 9031
  29. UNIT_GOLDCOAST_FOOT: 9094
  30. UNIT_GON: 9106
  31. UNIT_GRAD: 9105
  32. UNIT_HECTARES: "esriHectares"
  33. UNIT_INDIAN_1937_FOOT: 9081
  34. UNIT_INDIAN_1937_YARD: 9085
  35. UNIT_INDIAN_1962_FOOT: 9082
  36. UNIT_INDIAN_1962_YARD: 9086
  37. UNIT_INDIAN_1975_FOOT: 9083
  38. UNIT_INDIAN_1975_YARD: 9087
  39. UNIT_INDIAN_FOOT: 9080
  40. UNIT_INDIAN_YARD: 9084
  41. UNIT_INTERNATIONAL_CHAIN: 109003
  42. UNIT_INTERNATIONAL_INCH: 109008
  43. UNIT_INTERNATIONAL_LINK: 109004
  44. UNIT_INTERNATIONAL_ROD: 109010
  45. UNIT_INTERNATIONAL_YARD: 109001
  46. UNIT_KILOMETER: 9036
  47. UNIT_METER: 9001
  48. UNIT_MICRORADIAN: 9109
  49. UNIT_MIL6400: 9114
  50. UNIT_MILLIMETER: 109007
  51. UNIT_NAUTICAL_MILE: 9030
  52. UNIT_RADIAN: 9101
  53. UNIT_SEARS_CHAIN: 9042
  54. UNIT_SEARS_FOOT: 9041
  55. UNIT_SEARS_LINK: 9043
  56. UNIT_SEARS_YARD: 9040
  57. UNIT_SQUARE_CENTIMETERS: "esriSquareCentimeters"
  58. UNIT_SQUARE_DECIMETERS: "esriSquareDecimeters"
  59. UNIT_SQUARE_FEET: "esriSquareFeet"
  60. UNIT_SQUARE_INCHES: "esriSquareInches"
  61. UNIT_SQUARE_KILOMETERS: "esriSquareKilometers"
  62. UNIT_SQUARE_METERS: "esriSquareMeters"
  63. UNIT_SQUARE_MILES: "esriSquareMiles"
  64. UNIT_SQUARE_MILLIMETERS: "esriSquareMillimeters"
  65. UNIT_SQUARE_YARDS: "esriSquareYards"
  66. UNIT_STATUTE_MILE: 9093
  67. UNIT_SURVEY_CHAIN: 9033
  68. UNIT_SURVEY_FOOT: 9003
  69. UNIT_SURVEY_LINK: 9034
  70. UNIT_SURVEY_MILE: 9035
  71. UNIT_SURVEY_YARD: 109002
  72. UNIT_UK_NAUTICAL_MILE: 109013
  73. UNIT_US_NAUTICAL_MILE: 109012
  74. UNIT_US_SURVEY_INCH: 109009
  75. UNIT_US_SURVEY_ROD: 109011

Outcomes