Spatial Modeler Discussions

Gain, exchange, and share knowledge, or discuss topics with other Hexagon Geospatial Product pioneers and experts to get the most out of Hexagon Geospatial products.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Regular Contributor
Posts: 326
Registered: ‎11-16-2015
Accepted Solution

String to Integer / Float

Hi. I've a file which has it's BL coordinates in it's file name. I want to use this info to reference the file, but in order to do that I need to add 1 to the latitude. I've got the value as a string; how do I convert this to an integer / float so that I can add 1? Thanks, Johnnie

Highlighted
Regular Contributor
Posts: 326
Registered: ‎11-16-2015

Re: String to Integer / Float

And, of course, there's the From String operator, while I've been trying to bludgeon my way through with the Convert operator.

 

Just by the by, it would be handy in the help to have the list of suitable data types written out with those operators that have a free form field to add the data types. I always forget the format and have to go hunting for tables like this:

 

Parmaeter Suffix

Spatial Modeler Object Type

_File

IMAGINE.File

_Dir

IMAGINE.Directory

_Bool

IMAGINE.Bool

_Int

IMAGINE.Int

_Double

IMAGINE.Double

_Str

IMAGINE.String

_Scalar

IMAGINE.Scalar

Highlighted
Technical Evangelist
Posts: 1,048
Registered: ‎10-01-2015

Re: String to Integer / Float

From String operator to an IMAGINE.Double

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Highlighted
Technical Evangelist
Posts: 1,048
Registered: ‎10-01-2015

Re: String to Integer / Float

fromstring.PNG

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Highlighted
Regular Contributor
Posts: 326
Registered: ‎11-16-2015

Re: String to Integer / Float

Yup, I thought that should work as well...convert.png

Highlighted
Technical Evangelist
Posts: 1,048
Registered: ‎10-01-2015

Re: String to Integer / Float

Strings are weird and have to be dealt with differently.

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial