Question

Neighbour Finder: IFMELine was given an index beyond its current range


Badge

FME Version: FME(R) 2018.1.0.0 (20180717 - Build 18520 - WIN32)

 

My workspace is built to identify points that are from a certain distance from a line featureclass. I use a neighbor finder to identify the points. While using the base and candidate features as points and lines respectively, I achieve what I want except for an error i.e. IFMELine was given an index beyond its current range. Despite this error, the translation runs successfully.

 

On trying to find similar issues, I found this post that said it could be because the point is past the line. https://community.safe.com/s/question/0D54Q000080hgTy/neighborfinder-try-to-get-elevation-but-get-this-error-ifmeline-was-given-an-index-beyond-its-current-range

 

One way I could circumvent this is to also convert the line to points using a chopper or so but it is not desirable for the the vertex could be farther away from the line itself.

 

Would anyone know what would be the best way to resolve this?

Is there a method to identify these problematic areas and maybe flag them before I can use the neighbor finder?


18 replies

Userlevel 2
Badge +10

@sraapril​ this could still be caused by a defect in the NeighborFinder. If you're open to sharing your workspace and source data I would like to have a closer look at it and see if I can reproduce the issue in a newer version of FME. If you're not comfortable sharing your workspace & source data here you can always upload it to the Safe Software Support FTP.

Badge

@sraapril​ this could still be caused by a defect in the NeighborFinder. If you're open to sharing your workspace and source data I would like to have a closer look at it and see if I can reproduce the issue in a newer version of FME. If you're not comfortable sharing your workspace & source data here you can always upload it to the Safe Software Support FTP.

@danminneyatsaf​ : Thank you very much for reaching out. Please find attached the data here. It is a small dataset

Badge

NeighborFinderError@danminneyatsaf​ : These are my configurations. This forms part of the larger workspace but running this part gives me the index out of range error 9 times for the attached dataset

Userlevel 3
Badge +13

NeighborFinderError@danminneyatsaf​ : These are my configurations. This forms part of the larger workspace but running this part gives me the index out of range error 9 times for the attached dataset

Hello @sraapril​ , thanks for sharing your sample data! I tried this with your settings in a much newer version of FME (2022.0 beta), and I didn't run into any errors or warnings (althought I am unsure if the results are expected/correct). Would you consider upgrading and letting us know if the errors persist? You can find the newest version here. Just wondering if you're hitting an issue thats been resolved or if it needs revisiting. Best Kailin.

Badge

Hello @sraapril​ , thanks for sharing your sample data! I tried this with your settings in a much newer version of FME (2022.0 beta), and I didn't run into any errors or warnings (althought I am unsure if the results are expected/correct). Would you consider upgrading and letting us know if the errors persist? You can find the newest version here. Just wondering if you're hitting an issue thats been resolved or if it needs revisiting. Best Kailin.

Hello @kailinatsafe​ : Thank you for your time. It does work well in a higher version. However, it is not possible to upgrade FME from the 2018 version due to other dependencies. The only way to run it successfully without error is to convert the line to points however, that is not acceptable.

 

Would there be another solution to fix this. If unfixed, what would be the consequences of letting the workspace run with errors?

Userlevel 3
Badge +13

Hello @sraapril​ , thanks for sharing your sample data! I tried this with your settings in a much newer version of FME (2022.0 beta), and I didn't run into any errors or warnings (althought I am unsure if the results are expected/correct). Would you consider upgrading and letting us know if the errors persist? You can find the newest version here. Just wondering if you're hitting an issue thats been resolved or if it needs revisiting. Best Kailin.

Hello again @sraapril​ , if you're getting results that are expected, but you see "errors", you should be alright. Are they errors or just warnings?

I would just triple check everything along the way (to ensure there are no issues with your output(s)). Best, Kailin.

Badge

Hello @sraapril​ , thanks for sharing your sample data! I tried this with your settings in a much newer version of FME (2022.0 beta), and I didn't run into any errors or warnings (althought I am unsure if the results are expected/correct). Would you consider upgrading and letting us know if the errors persist? You can find the newest version here. Just wondering if you're hitting an issue thats been resolved or if it needs revisiting. Best Kailin.

@kailinatsafe​ : They are errors.

Badge +3

@sraapril​ 

Hi all.

 

I checked this one as i never have issues with the NB in 2018 version.

 

The flaw is in the data; the lines.

Tried several methods to corrrect it. (geomeetry validator does not find it)

 

This one works:

Use a TopologyBuilder on the lines. Output the nodes.

Use a linebuidler on the nodes with OBJECTID as connectionbreak attribute.

 

TopologyBuilder and linebuidler both with groupby = OBJECTID !!!!

 

Now u can do the neighbourfinder without error.

 

btw.: if you dont correct it, it runs to like 105 or so matches, so running it with the error seems not wise.

 

 

Greets.

 

Gio

Badge +3

@sraapril​ 

afbeelding

Badge

Hello @gio​ 

Thank you for your time!

 

I did try this solution and it does work without any errors however, I do not get the desired results. The rebuilt lines are devoid of any detail i.e. the curves are almost non-existent and therefore my original goal of trying to find the distance of the points from the lines is not fulfilled. NeighborFinderIn the first image, you can see the original dataset and the rebuilt lines on top of each other and they do not match.

Badge +3

Hello @gio​ 

Thank you for your time!

 

I did try this solution and it does work without any errors however, I do not get the desired results. The rebuilt lines are devoid of any detail i.e. the curves are almost non-existent and therefore my original goal of trying to find the distance of the points from the lines is not fulfilled. NeighborFinderIn the first image, you can see the original dataset and the rebuilt lines on top of each other and they do not match.

@sraapril​ 

Yes you are correct. I should have checked that.

 

I read that it is a knonw error in neighbourfinder. But i never encountered it.

So seems bit input dependand?

 

 

But here is some fun.

 

I used a custom i made, based on the neighbourfinder.

It runs with no errors.

The result is same as a standard neighbourfinder: 105 objects at 39.5 searchdistance.

 

afbeelding 

Badge +3

@sraapril​ 

 

Here is the above workbench

Including the custom.

 

 

Im curious as how fme is going to explain this :) for it contains a neighbourfinder of course.

 

I ran it on FME(R) 2018.0.0.2 (20180414 - Build 18301 - WIN64)

Badge

@sraapril​ 

 

Here is the above workbench

Including the custom.

 

 

Im curious as how fme is going to explain this :) for it contains a neighbourfinder of course.

 

I ran it on FME(R) 2018.0.0.2 (20180414 - Build 18301 - WIN64)

@gio​ : Thank you again!

I looked into your template file and I could not understand everything. I will elaborate how it worked on my end

  1. The FME workspace opens with a warning that it is not able to find a transformer. That should be okay but I include it here in case you meant to send another version
  2. The custom transformer is not attached to output ports.
  3. I suppose the meat of the custom transformer is the neighbor finder which is missing.

 

imageI added the neighbor finder to try to see if I could make it work however, I am not sure how that neighbor finder is configured using the user parameters set by you. I tried various methods but I was not successful.

 

Also, I am unable to rationalize the use of all the parameters declared by you. Would you elaborate?

Userlevel 3
Badge +13

@gio​ : Thank you again!

I looked into your template file and I could not understand everything. I will elaborate how it worked on my end

  1. The FME workspace opens with a warning that it is not able to find a transformer. That should be okay but I include it here in case you meant to send another version
  2. The custom transformer is not attached to output ports.
  3. I suppose the meat of the custom transformer is the neighbor finder which is missing.

 

imageI added the neighbor finder to try to see if I could make it work however, I am not sure how that neighbor finder is configured using the user parameters set by you. I tried various methods but I was not successful.

 

Also, I am unable to rationalize the use of all the parameters declared by you. Would you elaborate?

Hello @sraapril​ , sorry it took me so long to reply! This is a bug labelled as FMEENGINE-16150, which has been fixed it newer versions. The error messages appear to be somewhat irrelevant, and are caused when at least 2 base features are within tolerance of the Candidate (lines) and one is beyond the end of the line. Ultimately meaning - the error can be ignored! Hope this helps, Kailin.

Badge +4

Hello @gio​ 

Thank you for your time!

 

I did try this solution and it does work without any errors however, I do not get the desired results. The rebuilt lines are devoid of any detail i.e. the curves are almost non-existent and therefore my original goal of trying to find the distance of the points from the lines is not fulfilled. NeighborFinderIn the first image, you can see the original dataset and the rebuilt lines on top of each other and they do not match.

Use pathsplitter, and arcstroker with maximal deviation. Before topologybuilder. It should approx fix your arc problem.

Badge +3

@gio​ : Thank you again!

I looked into your template file and I could not understand everything. I will elaborate how it worked on my end

  1. The FME workspace opens with a warning that it is not able to find a transformer. That should be okay but I include it here in case you meant to send another version
  2. The custom transformer is not attached to output ports.
  3. I suppose the meat of the custom transformer is the neighbor finder which is missing.

 

imageI added the neighbor finder to try to see if I could make it work however, I am not sure how that neighbor finder is configured using the user parameters set by you. I tried various methods but I was not successful.

 

Also, I am unable to rationalize the use of all the parameters declared by you. Would you elaborate?

Hi It should be in the template. Has to be installed (or copied to ..fme/transformers I’ll check it later. It is called “Dear Neighbours 2.something” (it is a blocking with Neighbourfinder in it) Greets. Gio
Badge +3

@gio​ : Thank you again!

I looked into your template file and I could not understand everything. I will elaborate how it worked on my end

  1. The FME workspace opens with a warning that it is not able to find a transformer. That should be okay but I include it here in case you meant to send another version
  2. The custom transformer is not attached to output ports.
  3. I suppose the meat of the custom transformer is the neighbor finder which is missing.

 

imageI added the neighbor finder to try to see if I could make it work however, I am not sure how that neighbor finder is configured using the user parameters set by you. I tried various methods but I was not successful.

 

Also, I am unable to rationalize the use of all the parameters declared by you. Would you elaborate?

@sraapril​ 

 

Hi This is the missing custom.

It is a blocking custom with a neighborfinder.

I find it very elegant myself :)

 

(i thought it would be included in the template, i actively picked it to be so.)

 

Greets.

Badge +3

@gio​ : Thank you again!

I looked into your template file and I could not understand everything. I will elaborate how it worked on my end

  1. The FME workspace opens with a warning that it is not able to find a transformer. That should be okay but I include it here in case you meant to send another version
  2. The custom transformer is not attached to output ports.
  3. I suppose the meat of the custom transformer is the neighbor finder which is missing.

 

imageI added the neighbor finder to try to see if I could make it work however, I am not sure how that neighbor finder is configured using the user parameters set by you. I tried various methods but I was not successful.

 

Also, I am unable to rationalize the use of all the parameters declared by you. Would you elaborate?

@kailinatsafe​ 

 

It is irrelevant in so far as that the proces never reaches the Feature Read Summary in the translation log..

 

Somehow putting it trough a iterative custom does not trow the error. Probably cause it goes one by one i assume.

 

Greets.

Gio

 

Reply