When attempting to import terrain information in Terrain Extractor (Trex), one of the following errors occurs:
"Not enough storage is available to process this command"
"Exception of type 'System.OutOfMemoryException was thrown"
"Memory allocation error"
"Array dimensions exceeded supported range."
This can happen with a large shapefile and/or a computer that does not have enough available physical memory. The following are potential solutions:
1) Ensure you're using a 64-bit Operating Systems with more than 2 GB of RAM and the 64-bit version of the program. A 32-bit operating system will only allocate up to 2GB of ram per process. A 64-bit computer will allocate a great amount of ram to each process. To check if you're using the 64-bit version, go to Help > About <software name> and check next to the version number. If using the 64-bit version, "64-bit" will be shown. In the CONNECT Edition version of the software go to File > Help > About <software name>. To open the 64 bit version of the software go to "C:\Program Files (x86)\Bentley\WaterGEMS\x64" and locate the <program name>.exe file (i.e. WaterGEMS.exe).
2) Clip the shapefile from within TRex itself. Click on the 'Clip Dataset to Model' checkbox, then set the buffering percentage to some small number (try 10% to start with). By doing this TRex will only analyze an area equal to the dimensions of your model +10%. This should improve the performance and use less memory.
3) If possible, try breaking the terrain model into multiple, smaller chunks and allocate one at a time. If you are not sure how to do this, seek assistance from a GIS specialist.
4) If possible, try converting the terrain model into a different format or reduce the detail. When integrating with ArcMap or ArcGIS Pro, two additional ESRI-based data source types are available in Trex, which utilize the ESRI native geoprocessing capabilities and may work better with large datasets.