bsed / ala

Automatically exported from code.google.com/p/ala
0 stars 0 forks source link

SP: number of square kilometres incorrect by a factor of about a million - and then integer overflows #603

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Spatial Portal
When an area is created, the number of square kilometres within that area is 
reported. That number seems to be too great by a factor of about a million.
If the size of the area is greater than about 50 km X 50 km, the reported area 
overflows with a value of 2,147,483,647 sq km.

How to see the problem:
Spatial Portal
Add to Map | Areas
Add Area | Draw bounding box | NEXT
Draw Bounding box - choose a small area - say, 10 km x 10 km | NEXT
My Area : select metadata: 
User drawn bounding box
06/03/2014 23:39:15
145,209,908 sq km     <--------------------------FAR TOO BIG
POLYGON((147.21655273438 -43.445642009697,147.36212158203 
-43.445642009697,147.36212158203 -43.334868616219,147.21655273438 
-43.334868616219,147.21655273438 -43.445642009697))

To see this sq-km value max out:
Add to Map | Areas
Add Area | Draw bounding box | NEXT
Draw Bounding box - choose a larger area - say, 50 km x 50 km | NEXT
My Area : select metadata: 
User drawn bounding box
06/03/2014 23:46:40
2,147,483,647 sq km       <--------------------- MAX VALUE

Methinks you might be calculating as metres, and displaying as kilometres...

Thanks to Michael Batley for pointing this out.

Original issue reported on code.google.com by john.t...@austmus.gov.au on 6 Mar 2014 at 1:02

Attachments:

GoogleCodeExporter commented 9 years ago
Corrected this error in the development environment.  

Original comment by adam.col...@gmail.com on 21 Mar 2014 at 12:13

GoogleCodeExporter commented 9 years ago

Original comment by adam.col...@gmail.com on 19 May 2014 at 9:28

GoogleCodeExporter commented 9 years ago
Thanks Adam,
It works for me.
John

Original comment by john.t...@austmus.gov.au on 19 May 2014 at 10:30