How to set different images in WMS by zoom level in Geoserver? - zooming

How to set different images (same TIF with different size) for some zoom levels?

Two ways.
First, layer group and scale dependencies:
create N separate layers, associate each one with a different set of activation scales in their style (take the raster style, copy, add min and max scale denominators). See also the documentation
make each layer "non advertised"
lump them all toghether in a layer group (or if you are on 2.11, skip the non advertised bit above and just create a "opaque container" layer group)
Second approach, use image pyramid:
Download and install the pyramid extension
Put each file in a different folder, naming them 0, 1, 2, 3, ....
Point the image pyramid to the parent folder, it will automatically figure out the image resolutions and setup scale switches based on that
If that does not satisfy you, go and tweak the pyramid property file in the parent folder

Related

How to make sure the building is loaded in the right orientation?

I use the grid on the scene. The Building A (first image) setup is to be expected. But when I uploaded Building B, the orientation didn't match. Do I have to set it up in Revit ? or can I do it programatically.
Every model you load into the viewer is coming with its own metadata such as:
what is the "up" direction of the model
what is the offset of the model from the origin
what units is the model defined in
By default the viewer honors all these settings which means that, for example, if you load a Revit model that is defined in feet (and uses the Z-axis as the "up" direction), and then an Inventor model that is defined in meters (and uses the Y-axis as the "up" direction), the two models will have different scale and orientation.
To work around this issue, when loading (aggregating) multiple models in Forge Viewer, you can override any unit scaling, offset, or general 4x4 transformation that is applied to each model. For more details, look at https://forge.autodesk.com/blog/multi-model-refresher.

Libgdx texturepacker doesn't pack all images

When i run the texturepacker in libgdx i have the problem that it doesn't pack all the images in one big sprite sheet. If i for example have 4 images and it only packs 3 of them. Note that 2 images are the exact copies of eachother so maybe that has something to do with it.
LibGDX by default doesn't pack images which are exact copies. This can be overridden by setting alias to false in your configuration.
alias: If true, two images that are pixel for pixel the same will only be packed once. (default: true)
However, usually it is beneficial to pack the same images only once because it creates a smaller texture. You can still use both names when getting TextureRegion objects or creating Sprite.
Set alias to false in the texture packer settings.
Documentation here

Why LibGdx texturepacker doesn't pack images in order?

I got these images and when I pack them they come in the wrong order, like the last 7 images or so go to the front and this messes it all up for me and I don't even know why.I have packed images before with no problems.
TexturePacker does not store regions in a certain order unless you specify that order using indices appended to the file names. The intended way to pack and retrieve an animation is as follows:
1) Name the source images with their frame numbers appended, for example:
run1.png, run2.png, run3.png, etc.
2) Pack them with TexturePacker.
3) After loading the TextureAtlas, retrieve a set of regions by name. For example:
animation = new Animation(1/15f, textureAtlas.findRegions("run"));
The retrieved regions will be in the order of the frame numbers that were in the source file names.

Force certain sprites into only one image of the TextureAtlas in LIBGDX

I'm using TexturePacker to make a texture atlas. The result are 2 PNGs. I need certain images(sprites) to be deposited into only one of the pngs so I only have to bind only one texture to use in some shaders that I'm using. How can I force certain sprites to pack themselves at the same place and not dispersed randomly into the 2 PNGs?
Perhaps I've misunderstood your question, but you could just use texture packer twice, once with each set of sprites. Then you know which sprites will be in which png
You can create subdirectories within the directory of your source images and sort them into pages by placing them in different subdirectories. Each subdirectory will get its own unique Texture(s). The advantage of this method is that you have only one TextureAtlas to manage. The correct Texture will be automatically grabbed when you create sprites or get TextureRegions.
If you set flattenPaths to true, then you won't have to worry about what you name the subdirectories. If you leave it as the default false, then you must include the subdirectory name as part of the sprite name with a /.

How to stack Sprites rendered inside Iterator?

I am rendering an image to a Sprite inside of an Iterator. I'd like each render (iteration) to remain on the canvas indefinitely, so that each successive render layers on top of the previous ones. How can I do this?
There are no Clears or any other layers in my composition.
In Quartz Composer, you'll almost always want to use a Clear patch — don't assume that you can rely on the prior contents of the framebuffer. So, to accomplish this, you'll need to load all of your images into a structure (probably by using JavaScript to feed an Image Loader patch and build a Queue from that), and then display all of the images each frame using an Iterator.
Check out Apple's "Image TV" sample composition, available in the OS X Developer Library in the Quartz Composer Conceptual Compositions bundle. This example demonstrates how to load a series of images into a structure and then display them.