is it possible to set terrain (AttributeLayer) resolution using python? (from default 1024x1024 to 4096x4096)

744
3
06-29-2017 03:20 AM
MarekDekys
New Contributor III

Hello, 

I am able to create new terrain (CE calls it attribute layer) using:

addAttributeLayer(self, name, texture=None, heightmap=None, useGeoRef=False)

and I can also change the terrain dimensions and positions using:

setAttributeLayerExtents(self, layer, extents)

But I haven't found any information in documentation about how to set terrain resolution from default (1024x1024) to 4096x4096 using python script.

Am I missing something or this feature isn't implemented yet? (so I have to do it manually)

The reason why I need this is to automatically generate lots of CE projects (each will use it's own terrain tile + vector data) and automatically preprocess terrain (in full resolution) and doing this manually will take forever..

One incoplete workaround would be to: copy existing scene file containing only terrain layer with correctly set resolution and then change the other things (terrain coordinates and dimensions using: setAttributeLayerExtents )

but I also need to change elevation map and texture location and I'm not sure if this is possible either (haven't found information about it in documentation)

thanks,

Mark

0 Kudos
3 Replies
ThomasFuchs
Esri Regular Contributor

This is a limitation with Python the terrain sampling is reduced to 1024x1024

If a higher sampling is needed, please use a tiling approach by adding multiple terrain layers with reduced extend.

0 Kudos
MarekDekys
New Contributor III

Hi Thomas,

 

thanks for reply. I don't think it is a Python limitation (but maybe I am wrong) because when I repeat this process by hand It also creates terrain with default resolution of 1024x1024. And I can manually increase the terrain to 4096x4096. And I was wondering if same could be done using some method in python.

 

Well I understand using higher resolutions will slow down everything but we are already using tiled approach and can't lower tile size any more thus we need high resolution of 4096x4096 and looks like my machine can take this without slowing down everthing

 

so is there any option/method in python that can do it? I thought everthing that can be done manually can also be done automatically using python. Maybe the functionality is there (because for example setAttributeLayerExtents is implemented and does similiar job) but somebody just forgot to document this particular feature

0 Kudos
ThomasFuchs
Esri Regular Contributor

Unfortunately there is no way to increase the resolution with python - this is a missing feature.

I'm aware it is possible in the user interface.

0 Kudos