Skip to main content
Hello,

 

While converting shapefile to any format I am getting an error "IFMELine was given an index beyond its current range.". So I guess this must be to do with shapefile but I can open shape file in Data inspector. Could somebody please point out what is causing this error?

 

 

Any resolution?

 

 

Cheers,

 

John

 

 

 

Cheers,

 

John

 

 
What happens if you run it through a GeometryValidator? I suspect the geometry is bad and causing the FME geometry manipulation engine to flake out (a few transformers require clean geometry).
All shapes pass GemetryValidator. But still fails.

 

Cheers
Hi John,

 

 

The message says that the processing tried to access a vertex of the line by an invalid index. i.e. less than 0, or greater than or equal to the number of vertices. So I don't think there is a problem in the source shape file.

 

 

This error could occur when a bad script manipulates the line geometry. For example, assuming that the input feature has line geometry, the error can be reproduced easily using a PythonCaller with this script.

 

-----

 

def badScript(feature):

 

    line = feature.getGeometry()

 

    point = line.getPointAt(-1) # Oops, invalid index was given!

 

-----

 

 

What kind of transformers do you have in the workspace?

 

 

Takashi
Did you get other several messages following "IFMELine was given an index beyond its current range"? If so, there could be a hint in the messages.
Maybe the script "ripped" apart donut/collection/aggregate objects objects?

 

(i see often scripts that do this inadvertantly..)

 

 

 

Recently a colleague did this.

 

Buildingpoly as base for a neighbourfinder to a linenetwork.

 

Some buildings were donuts.

 

Causing the shapewriter to throw an error " an fme_line was etc.etc." (and of course no erros when validating the geo..because the objects themselves where geometricaly ok, just not the relating attributes))

 

Solution: detect donuts prior to some processes.

 

 

 

Reply