Thank you, Glenn, but this part was already solved.
About sending the camera's coordinates to screen text, I've found a solution
elsewhere:
Code:
Vec3f eye;
while ( !viewer.done() ) {
eye = viewer.getCamera()->getInverseViewMatrix().getTrans();
Rodrigo,
To load a png you need to replace TMSOptions with GDALOptions.
On Mon, Jan 7, 2019, 12:21 PM Rodrigo Dias Hi,
>
> Following this example (
> http://docs.osgearth.org/en/latest/developer/maps.html#programmatic-map-creation),
> I'm trying to use a PNG instead of a link (like the example
So, I learned how to put HUD text, and I'm trying to understand the movement of
the camera sending the camera's coordinates to this text. However, the three
coordinates (heading, pitch and roll) are always 0 or pi, which seems more a
rounding error than anything else. It seems the world is
> If you feed the TIFF LWZ coder the same 4-bit data as the PNG is made form, I
> would think it would code about as efficiently, even if the data is stored in
> an 8-bit representation.
I used QGIS to convert from PNG to TIFF. The image only has 16 colors, so maybe
it's QGIS fault. Later I
If you feed the TIFF LWZ coder the same 4-bit data as the PNG is made form,
I would think it would code about as efficiently, even if the data is
stored in an 8-bit representation. Forward-dictionary compression systems
work on how many unique symbols are found and if you make a 16m color image
Hi,
Sorry, I didn't post the updated code:
Code:
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
using namespace osg;
using namespace osgEarth;
using namespace osgEarth::Drivers;
int main (int argc, char** argv) {
How big is the TIFF and the PNG? They use similar compression methods (PNG
is ZIP/Deflate and compressed TIFF is usually LZW and can also use
ZIP/Deflate) so you ought to be able to get them fairly close in size. What
are the total pixel dimensions of the image? Your best result might not be
from
Well, I managed to create a georeferenced texture file in TIFF format. However,
since it's about twice the size of the PNG (even compacted with LZW), it would
be great if PNGs could be used instead.
I also managed to make the map projected (flat), by adding the following code
in the beginning:
Ok, Chris, I got it.
Is there any way to tell the program where to put the PNG image? Or must I use
a georeferenced TIFF?
Other thing, the XML documentation
(http://docs.osgearth.org/en/latest/references/earthfile.html#map) explains
that I can choose between a geocentric (ellipsoidal) or a
Ok, so if you're adding an image layer programmatically, you *don't *want
to add a .earth XML file.
It should probably look something like
// Add an imagery layer
{
GDALOptions gdal;
gdal.url() = "br.png";
osg::ref_ptr layer = new
Hi Chris,
following the example, I thought I could use directly a PNG instead of a .earth
XML. Now I tried a XML.
My source code, main.cpp:
Code:
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
using namespace osgEarth;
using namespace
Can you show your exact code and the .earth XML file?
It sounds to me like it failed to open/load the XML file. Is it a file
path/permisssions issue?
On Mon, Jan 7, 2019 at 6:13 PM Rodrigo Dias wrote:
> Hi,
>
> Following this example (
>
Hi,
Following this example
(http://docs.osgearth.org/en/latest/developer/maps.html#programmatic-map-creation),
I'm trying to use a PNG instead of a link (like the example uses a TIFF for
elevation). However, I got the following error:
> [osgEarth]* Error in XML document: Error document
13 matches
Mail list logo