Question

how to provide points/lines with unique constant id for each time of running FME?

  • 14 June 2024
  • 3 replies
  • 46 views

Badge +13

Hello , 

I would like to generate constant unique id for lots of points or lines that has not get  the id yet and keep the same constant unique for each time running FME (no change)

i do not want any changing of id for each running Fme .

lines or points should get constant unique id 

and after one month when I run Fme workspace and there are new lines or points .

FME should provide the same constant unique id for old points or lines that provided them before and provide new constant unique id for new lines or points .

The problem I am generating points that they are not exist before at GIS data and I am not able to save the points with id in Gis database but I want to keep the id for each point without changing in Fme 

thanks in advance 

fme 2021 


3 replies

If you don't want to store the id and the information that the id is connected to anywhere, i guess the best option is to use a hash.

You could extract the geometry with the geometryExtracter as a WKTString and hash that value with the example here:

But if only 1 coördinate changes one digit it will break. You could store some attribute value or some geometry with the id that you generated in the first run, so you can re-merge the id in the second run.

 

Badge +13

@jkr_wrk thanks alot

Could you give me a short explanation about hash ?what advantages of Hash ?
what you mean of this sentence ( But if only 1 coördinate changes one digit it will break )
Which case does make coordinates change ?
 

What is it exactly that you are trying to achieve?

The advantages of a hash depends on why you are generating an ID without storing the ID.

If your line coördinates are 52.0000001 5.999999998 , 53 6 and the next time you analyze the data it's  52.0000002 5.999999998 , 53 6 or 53 6 , 52.0000001 5.999999998 the hash won't be the same so it get's a different ID. But a changedetector with the right settings will map.

Reply