Skip to main content
Question

Processing IFMEPointCloud in Python Transformer

  • March 19, 2019
  • 1 reply
  • 46 views

Hi together,

I'm trying to create a transformer that processes point cloud data from a LAS file. To do so, I'm modifying the CenterOfMassCalculator_Python example.

How can I access the point cloud data? The feature.hasGeometry() attribute is true, but feature.getGeometry() returns None.

 

Code:

def input(self, feature):
   self.logger.logMessageString("--- input() ---")
   self.logger.logMessageString("  Feature type (fme):   " + feature
   self.logger.logMessageString("  hasGeometry (fme):    " + str(feature.hasGeometry()), fmeobjects.FME_INFORM)
   if feature.getGeometry() is None:
     self.logger.logMessageString("  Geometry is none")

Output:

--- input() ---
  Feature type (fme):   LAS
  hasGeometry (fme):    True
  Geometry is none
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3429 replies
  • March 19, 2019