GetSize of heightmap returns 512x512 although it is larger

Hello guys,

I am pretty stuck here. I want to access the heightmap of a Landscape that was set into the world.
If the landscape is big (heightmap is 1017x1017 pixel) and I want to read data from the heightmap,
only a patch of 512x512 seems to be available.

Please have a look at the code:

   //build an array of all landscapes in the world
        TArray<AActor*> lands;
	UGameplayStatics::GetAllActorsOfClass(UeWorld, ALandscape::StaticClass(), lands);

	//get a pointer on the first entry of that array
	ALandscape* landscape = Cast<ALandscape>(lands[0]);

	//now inspect the components of the landscape and find the heightmap
	TInlineComponentArray<ULandscapeComponent*> components;
	landscape->GetComponents<ULandscapeComponent>(components);

When I read the size:

FTextureSource& hmap_texture = components[0]->GetHeightmap()->Source;
check(hmap_texture.IsValid());

int32 hmap_size_x = hmap_texture.GetSizeX();
int32 hmap_size_y = hmap_texture.GetSizeY();

it returns 512x512 instead of 1017x1017

Any ideas are highly welcome :slight_smile:

318952-screenshot-2020-10-16-200232.jpg