I am using FME's Tester to select objects that are bigger than 1 meter.
My data are in EPSG:4326.
How much is 1 meter in decimal degrees?
Answer
Although I like Alex's answer - it's better to reproject than to simply convert decimal degrees to metres with a fixed multiplier - I never really like having to reproject data back and forth if not necessary. I figure you're bound to lose some degree of accuracy/precision.
What I would try is the ReprojectLengthCalculator transformer. With that you could measure the length in decimal degrees and reproject that attribute value. You wouldn't need to reproject the feature to metres and back again.
The drawback here is that I think it will only really work with 2-point lines and - for some reason - you'll have to calculate the angle of that line as part of the input.
If you do reproject as Alex suggests, then I would encourage you to do that as a separate stream, and merge the resulting distance back onto the original data. That way you retain a good (un-reprojected) copy of the geometry.
I also suggest reprojecting to a dynamic coordinate system; _AZMED_
for measuring distances, and _AZMEA_
for measuring areas. Each feature effectively gets converted to its own equal-distance (equal-area) coordinate system, giving the best results.
I think it would look something like this:
You could put the Tester after the FeatureMerger, but I think this configuration is more efficient. The FeatureMerger will need a unique ID on the features to work.
No comments:
Post a Comment