Can you define a dynamic spatial resolution for a export_elevation command?
I'm exporting elevation data in Vulcan 3D triangulation format (00t), which is VERY dependent on the spatial resolution used for it's size (it grows exponentially with higher spatial resolutions) and the generated files can't weight more than 15 Mb. Funny thing is, with some exported files and an exponential regresion you can get a formula that will predict the size of a Vulcan file pretty well (+- 10% of error maybe a bit more, but that is ok in this case)
https://www.wolframalpha.com/input/?i=solve+t%3Da*761625*exp(-0.863*x)
Where t is the size of the exported 00t file (in bytes), a is the area of the polygon (in sq km) and x is the spatial resolution (in meters)
As part of my automated workflow I'm using a script using the EXPORT_ELEVATION command along with the POLYGON_CROP_USE_EACH=YES option. The polygons used for cropping are User Defined Features of different sizes (they vary from 0.01 sq km to 2 sq km) and are generated for every proyect. So I wanted to use the ENCLOSED_AREA attribute of each User Defined Feature to define de SPATIAL_RES_METERS option, in something that looks like this:
https://www.wolframalpha.com/input/?i=solve+t%3Da*761625*exp(-0.863*x)
Where t is the size of the exported 00t file (in bytes), a is the area of the polygon (in sq km) and x is the spatial resolution (in meters)
As part of my automated workflow I'm using a script using the EXPORT_ELEVATION command along with the POLYGON_CROP_USE_EACH=YES option. The polygons used for cropping are User Defined Features of different sizes (they vary from 0.01 sq km to 2 sq km) and are generated for every proyect. So I wanted to use the ENCLOSED_AREA attribute of each User Defined Feature to define de SPATIAL_RES_METERS option, in something that looks like this:
EXPORT_ELEVATION FILENAME="path\to\file\filename.00t" \
EXPORT_LAYER="triangulation_layer" TYPE="VULCAN_3D" SPATIAL_RES_METERS="FORMULA='-(1000/863)*LOG(15000/(761625*<ENCLOSED_AREA>)'" \
POLYGON_CROP_FILE="User Created Features" POLYGON_CROP_USE_ALL=YES
Is this possible? Or is there other way of achieving this?
Thanks
Is this possible? Or is there other way of achieving this?
Thanks
Answers
-
Here is an update to my findings:
The formula described here does not work with small areas...
The sizes ger HUGE because the spatial resolution is too small if calculated automatically.
Regarding the automatic solution: I could get it to work using the GENERATE_REPORT command, exporting a .csv and then loading it with the DEFINE_VAR_TABLE command. It works ok, but as I said, the formula has to be tuned before it generates acceptable results.
Categories
- 12.6K All Categories
- 5.5K Features Discussion
- 337 Downloading Imagery
- 1.3K Elevation Data
- 379 Georeferencing Imagery Discussion
- 620 GM Script Language
- 52 User Scripts
- 113 GPS Features
- 405 Projection Questions
- 815 Raster Data
- 1.3K Vector Data
- 6.5K Support
- 172 Announcement and News
- 900 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 559 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 231 How I use Global Mapper
- 106 Global Mapper Forum Website