generated terrain center

Using GeoMipMap
I noticed that the x,y,z coordinates of the generated terrain are at

the corner rather than the center. This presents a challenge for me,

since I want the terrain dead center, and I want to scale it about

three times larger. I am using an image 129x129.

What’s an easy way to find the center of the terrain?

Also I followed the manual with this code:

        self.terrain = GeoMipTerrain("scene")
        

self.terrain.setHeightfield(Filename("Models/maps/gui/map_s.png"))
        ## self.terrain.setBruteforce(True) # Does not work on 1.5.2
        ## self.terrain.setAutoFlatten(GeoMipTerrain.AFMLight)
        # Set terrain properties
        self.terrain.setBlocksize(32)
        self.terrain.setFactor(10)
        self.terrain.setFocalPoint(self.my_camera3)
        # Store the root NodePath for convenience
        self.terrainRoot = self.terrain.getRoot()
        

self.terrainRoot.setTexture(loader.loadTexture("Models/maps/gui/deeptx.

bmp")) # Texture
        self.terrainRoot.setPos(0,0,0)
        ## self.terrainRoot.setScale(10)
        ## self.terrainRoot.setTransparency(1)
        ## self.terrainRoot.setColor(0.2,1,0.2,1)
        self.terrainRoot.reparentTo(render)
        self.terrainRoot.setSz(10)
        self.terrain.generate()

but I get this error:

AttributeError: ‘libpanda.GeoMipTerrain’ object has no attribute

‘setBlocksize’

What am I missing?

It’s setBlockSize, with a capital S.

Well, that part of the manual needs to be updated. Thanks.
What about finding the center of my terrain. Can you help me with that?

It’s just:

centerX = yourHeightfieldWidth * 0.5
centerY = yourHeightfieldHeight * 0.5

Thanks