arkorobotics / azgen-web

AZGen Website Front End
2 stars 0 forks source link

GEOMETRYCOLLECTION EMPTY #1

Closed worsthorse closed 3 years ago

worsthorse commented 3 years ago

Tried running W7W/LC-001 after running (successfully) another summit. Got the coordinates right but showed GEOMETRYCOLLECTION EMPTY in the box that displays the polygon coordinates. Trying a new summit designator after the error appears gets the same error. Reloading the web page fixes the error. So...

enter W7W/LC-001 lookup summit get coordinates click on calculate AZ get GEOMETRYCOLLECTION EMPTY enter W7W/LC-002 lookup summit get coordinates click on calculate AZ get GEOMETRYCOLLECTION EMPTY Reload the webpage, goes to original state enter W7W/LC-002 lookup summit get coordinates click on calculate AZ get POLYGON...

arkorobotics commented 3 years ago

Yeah, looks like a bug. I'll take a look at it. Thanks for the report!

arkorobotics commented 3 years ago

From what I've gathered, the API will return GEOMETRYCOLLECTION EMPTY if the summit is too sharp and only has few data points within the AZ (not enough to make a polygon). This can also happen with long and thing summits where the data points make a line instead of a polygon.

I think the right approach here is to generate a polygon that includes the entire 30m DEM grid square instead of plotting a polygon between the centers of the outer most grid squares within the AZ.

I'll experiment with this.

arkorobotics commented 3 years ago

Ok, I finally got to the bottom of this. Turns out the SOTA altitude isn't always close to the 30M DEM altitude. I found several instances where the DEM altitude for the lat/long of the summit is several meters below the altitude published on the SOTA database. In reality, the earth is always changing and compounding factors between measurement error of the DEM (for either the 30M or SOTA) vary with reality.

Since this is an estimation tool, I decided to use the DEM altitude if the requested altitude is too high. See azgen-api commit: https://github.com/arkorobotics/azgen-api/commit/61c32709aa6f5f929bcf0de4576f89611a27ddf2

That said, this inspired me to compare the azgen results with the Google Earth Flood Tool and Cal Topo maps. I'd like to better understand the accuracy of the tool. So keep tuned for that.

W7W/LC-001 returns a result now: Screen Shot 2021-09-23 at 10 37 21 PM