Receive email notifications by changing your settings.
Click on your picture in the top right corner, go to Preferences and select your notification preferences.
Thank you for contributing to our forum!
Please keep in mind:
1. To only comment on the topic where the discussion is about. Do you have a new question or topic? Please start a new discussion.
2. Be kind to other users!

Import terrain with API

Using the API to import terrain, more specifically water does not accept the required inputs. The call is this: https://engine.tygron.com/api/session/event/editorterraintype/import/... token. I got this call working when I give value for 3 and 4 an actual double number. The problem occurs when I want the default.

As per instruction on the webpage the values 3 and 4 state the following: "Angle of repose, null if use default" and "Terrain Height, null if no adjustment required". In this case I want to use the default, hence use null.

The problem is that the API doesn't accept this. It gives me the following error: "Event editorterraintype/import parameter of Type: double[] at Index: 3 is required, value may not be empty or NULL.". The value of "0" makes it an actual value, not the default. So that doesn't work either.

This is in direct contrast to the required value for default. What do I fill in to get it to use the default values of the underlying underground types for angle of repose and depth of the water terrain type? Below the exact push of the file I used (this location is for testing only):


[

  {

   "type" : "GeometryCollection",

   "geometries" : [

     {

      "type" : "MultiPolygon",

      "coordinates" : [

        [

         [

           [ 135793.4563266, 453374.1550501 ],

           [ 135793.459348, 453374.1590363 ],

           [ 135791.6547868, 453373.9171193 ],

           [ 135784.9528599, 453373.0224283 ],

           [ 135785.5966552, 453368.4773683 ],

           [ 135787.94642, 453352.641749 ],

           [ 135788.3953605, 453350.0533979 ],

           [ 135788.9323277, 453347.4257285 ],

           [ 135789.5465155, 453344.8147527 ],

           [ 135795.4188312, 453322.5889677 ],

           [ 135795.8742415, 453320.6372531 ],

           [ 135796.2404075, 453318.6688913 ],

           [ 135804.4134572, 453266.287327 ],

           [ 135804.7819782, 453264.1480481 ],

           [ 135805.2287189, 453262.0244596 ],

           [ 135805.7546892, 453259.9185566 ],

           [ 135806.3568947, 453257.8333491 ],

           [ 135807.0363491, 453255.7718315 ],

           [ 135807.4835133, 453254.5377675 ],

           [ 135808.1704827, 453252.8660134 ],

           [ 135808.9297255, 453251.2269638 ],

           [ 135809.1912479, 453250.7042355 ],

           [ 135809.3940822, 453250.2936734 ],

           [ 135811.7980596, 453246.1536251 ],

           [ 135813.0893896, 453244.2546663 ],

           [ 135814.446037, 453242.403431 ],

           [ 135815.624647, 453240.8966976 ],

           [ 135817.5267895, 453238.8844494 ],

           [ 135819.487259, 453236.9259489 ],

           [ 135821.2843172, 453235.2069503 ],

           [ 135821.4577927, 453234.9784046 ],

           [ 135821.5629725, 453234.7091434 ],

           [ 135821.5909306, 453234.4231883 ],

           [ 135821.5387341, 453234.1395403 ],

           [ 135821.4124837, 453233.8811638 ],

           [ 135821.2182647, 453233.6670253 ],

           [ 135820.9741827, 453233.5150455 ],

           [ 135820.9761868, 453233.5150378 ],

           [ 135821.0042744, 453233.5229255 ],

           [ 135840.4315305, 453228.9986225 ],

           [ 135840.9055373, 453229.7903784 ],

           [ 135837.0853757, 453232.5595877 ],

           [ 135828.9425879, 453238.500733 ],

           [ 135827.5759688, 453239.5854114 ],

           [ 135826.3985757, 453240.6283844 ],

           [ 135825.2745138, 453241.7291217 ],

           [ 135824.2086469, 453242.8496249 ],

           [ 135822.4135931, 453244.8284763 ],

           [ 135820.6768623, 453246.8600758 ],

           [ 135817.3131198, 453251.5715089 ],

           [ 135816.7483938, 453252.4622075 ],

           [ 135815.8398854, 453254.1118249 ],

           [ 135815.102281, 453255.6458462 ],

           [ 135813.8673718, 453258.4041293 ],

           [ 135813.653931, 453258.9226745 ],

           [ 135812.9168547, 453260.8534826 ],

           [ 135812.2560327, 453262.8099836 ],

           [ 135811.6714575, 453264.7901785 ],

           [ 135811.1631211, 453266.7920684 ],

           [ 135810.7330199, 453268.8136467 ],

           [ 135810.3811268, 453270.8479172 ],

           [ 135807.7015827, 453287.9841005 ],

           [ 135802.6161718, 453320.7142406 ],

           [ 135802.2910245, 453322.406591 ],

           [ 135801.8886533, 453324.0812483 ],

           [ 135799.5722944, 453333.0024164 ],

           [ 135795.5806732, 453348.7084246 ],

           [ 135795.2662748, 453350.0689109 ],

           [ 135794.822884, 453352.2784419 ],

           [ 135794.458706, 453354.5016604 ],

           [ 135793.4055797, 453361.5159806 ],

           [ 135792.2671137, 453369.5250999 ],

           [ 135792.278818, 453369.7019605 ],

           [ 135792.9369813, 453373.2975083 ],

           [ 135793.484398, 453374.1589398 ],

           [ 135793.4563266, 453374.1550501 ]

         ]

        ]

      ]

     }

   ]

  },

  3, "true", null, null ]

I ignored the optional values on purpose

Sign In or Register to comment.