Skip to main content

i need to extract the coordinate which are wrong and does not make sense like easting in utm should be 6 digits .because i have some coordinates in x column for example (easting = 7 digits 3628623.384 ) which is wrong it should be 6 digits. is there any way i can calculate the digits in coodinates column before the decimal point

Use a SubstringExtractor to pull out the digits before the decimal point:

 

Start index: 0

 

End index: @FindString(@Value(x-coord),.)-1

 

x-coord is your x attribute, . is what you're looking for and -1 to get the position one step to the left of the decimal point.

Then use a Tester to check that the resulting string isn't too long:

 

@Evaluate(@StringLength(@Value(_substring))) < 7

 

_substring is the string you just pulled out with the SubstringExtractor.

You can use the Tester to test if the value is less than 1000000 (i.e. the minimum value of 7 digits).


You can use the Tester to test if the value is less than 1000000 (i.e. the minimum value of 7 digits).

Doh. Sometimes the answer is just too obvious. 🙂 In my defense, I'm busy at work with the same maneuver but with character strings, so that's where my head is at the moment.


You can use the Tester to test if the value is less than 1000000 (i.e. the minimum value of 7 digits).

thanks takashi


Use a SubstringExtractor to pull out the digits before the decimal point:

 

Start index: 0

 

End index: @FindString(@Value(x-coord),.)-1

 

x-coord is your x attribute, . is what you're looking for and -1 to get the position one step to the left of the decimal point.

Then use a Tester to check that the resulting string isn't too long:

 

@Evaluate(@StringLength(@Value(_substring))) < 7

 

_substring is the string you just pulled out with the SubstringExtractor.

thanks danullen really appreciated


Reply