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 empty.
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 (
> http://docs.osgearth.org/en/latest/developer/maps.html#pr
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 osgE
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 I
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 pro
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:
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 u
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) {
MapOption
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
wit
> 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
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 movin
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 us
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();
te
Solved:
https://github.com/eco-info/osgCookbook/blob/master/outros/terreno1/terreno1.cpp
On Wednesday, January 16, 2019 at 2:04:12 PM UTC-2, Rodrigo Dias wrote:
>
> Thank you, Glenn, but this part was already solved.
>
> About sending the camera's coordinates to screen text, I've found a
> solu
14 matches
Mail list logo