Skip to main content
Question

Raster Python API resampleBySpacing

  • October 24, 2024
  • 2 replies
  • 33 views

pawel_k
Participant
Forum|alt.badge.img

Is there any example how to use fmeobjects.FMERasterTools.resampleBySpacing.

When I run this code:

        raster_g1 = feature.getGeometry()
        raster_g2 = fmeobjects.FMERasterTools.resampleBySpacing(5.0, 5.0, fmeobjects.FME_INTERPOLATION_BICUBIC, raster_g1, {})

 

I get error message:

Python Exception <TypeError>: descriptor 'resampleBySpacing' for 'fmeobjects.FMERasterTools' objects doesn't apply to a 'float' object

2 replies

hkingsbury
Celebrity
Forum|alt.badge.img+64
  • Celebrity
  • October 24, 2024

What’s your reasoning for doing this in python rather than using the RasterResampler?

 


danilo_fme
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • January 18, 2025

What’s your reasoning for doing this in python rather than using the RasterResampler?

 

Great suggestion