Skip to main content

Hi,

 

I have a Condition Statement within AttributeManager that splits coordinate values. The value for seconds (_lat{2} and _long{2}) have different length e.g. 23° 05' 30.95420" N or 23° 06' 47.954" N

 

 

When I use the above it always returns the value but with E or N.

 

Any thoughts on how can I get only coordinates seconds?

 

 

Regards

Hi ms_1990,

 

The @FindString function returns the position of the 1st occurence of the Search String. For example: position 15, while the @Substring function expects the length of the substring. So you will have to calculate this length will a simple substraction of the total length of your LATITUDE attribute minus the position returned by @Findstring Function. Let me know if it works.


Try this:

 

@Substring(@Value(LATITUDE),4,(@FindString(@Value(LATITUDE),N)-4))

 

 

@FindString gives you the position of the "N". From that number you want to subtract your starting point, i.e. "4", to get the length of the seconds part of your string.

Try this:

 

@Substring(@Value(LATITUDE),4,(@FindString(@Value(LATITUDE),N)-4))

 

 

@FindString gives you the position of the "N". From that number you want to subtract your starting point, i.e. "4", to get the length of the seconds part of your string.

Thanks, it works!


Reply