Hexagon Geospatial
MENU

ERDAS IMAGINE

Discuss and share topics of interest using ERDAS IMAGINE the world’s leading geospatial data authoring system.
Showing results for 
Search instead for 
Do you mean 
Reply
Frequent Contributor
Posts: 106
Registered: ‎06-03-2016
Accepted Solution

Logging / Writing floats

Folks, 

 

I'm losing sig figs while logging.

 

Is there a way to write floats without scientific notation or change the number of significant figures?

 

Regards

 

Highlighted
Technical Evangelist
Posts: 761
Registered: ‎10-01-2015

Re: Logging / Writing floats

Hi Noel,

 

Could you please clarify what you mean by "logging". I'm assuming it's in the context of Spatial Modeler? If you could provide an exampe model of what you're trying to do we should be able to point you in the right direction.

 

Cheers

 

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Frequent Contributor
Posts: 106
Registered: ‎06-03-2016

Re: Logging / Writing floats

[ Edited ]

Hi Ian, 

 

Sure thing. Here's an example mode, here's some sample data, and this is what I'm getting:

 

 

...
07/09/16 18:39:16 SessionMgr(2508): 6.01338e+006
07/09/16 18:39:16 SessionMgr(2508): 6.01342e+006
07/09/16 18:39:16 SessionMgr(2508): 6.01346e+006
...

 

As such, my values are being rounded to the nearest ten-feet, which could make some points seem like dupes. 

 

What I expect are values like:

 

	6013389.654
	6013411.465
	6013450.687
	6013450.874

   

Regards

 

Technical Evangelist
Posts: 761
Registered: ‎10-01-2015

Re: Logging / Writing floats

[ Edited ]

Hi Noel,

 

Does this work for you?:

 

float.PNG

 

The Session Log isn't really intended as a mechanism to store actual results - just as a means to track progress. If you want the full precision information just write it to a Table (or use it directly within the larger model). I've also attached the model as shown here. And the full precision results in the Table look like this:

 

6013378.196672735
6013376.577684973
6013376.453672169
6013377.173133869
6013377.304926238
6013373.416496888
6013320.027244199

...

 

Cheers

 

 

 

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Frequent Contributor
Posts: 106
Registered: ‎06-03-2016

Re: Logging / Writing floats

Thank you Ian. I wrote to the session log in the example, but used the Report operator in production, which also renders floats in scientific notation.

Regards
Technical Evangelist
Posts: 761
Registered: ‎10-01-2015

Re: Logging / Writing floats

The Report probably should show the full precision. But it's still not something you can easily get the information back out of in a machine-usable form. We've been having several discussions here centered around the need to dump a bunch of numbers out of a model to something like a CSV file. I suspect you'll see that come along relatively soon.

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.