gdal image with no spatial reference system

classic Classic list List threaded Threaded
3 messages Options
johan johan
Reply | Threaded
Open this post in threaded view
|

gdal image with no spatial reference system

Hello,

I have a big ecw image that I want to see with osgEarth. But due to some operations, it doesn't have spatial reference anymore, just georeferences (min and max x,y).
So oasgEarth could'nt compute a profile. I've tried with "<profile>local</profile>" but it seems that "local" is just declared, not used in code.

What should I do ? Thanks,
Johan.
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: gdal image with no spatial reference system

Hi Johan,

osgEarth only works on files that have complete georeferencing information (an srs and a geotransform).

The easiest way to see your file is to assign a coordinate system to it.  You can do this with the gdal_translate command:
gdal_translate -of VRT -a_srs epsg:4326 myimage.ecw myimage.vrt

You should be able to point osgearth to the newly created vrt file and it should work.

You need to replace epsg:4326 with whatever srs your image is actually in if it isn't in latlong projection.  I recommend using the VRT output format to avoid processing the actual imagery since you just want to assign an srs to the image.

Thanks!

Jason




On Thu, Sep 3, 2009 at 10:22 AM, johan (via Nabble) - No Reply <[hidden email]> wrote:
Hello,

I have a big ecw image that I want to see with osgEarth. But due to some operations, it doesn't have spatial reference anymore, just georeferences (min and max x,y).
So oasgEarth could'nt compute a profile. I've tried with "<profile>local</profile>" but it seems that "local" is just declared, not used in code.

What should I do ? Thanks,
Johan.



View message @ http://n2.nabble.com/gdal-image-with-no-spatial-reference-system-tp3573541p3573541.html
To start a new topic under osgEarth, email [hidden email]
To unsubscribe from osgEarth, click here.


johan johan
Reply | Threaded
Open this post in threaded view
|

Re: gdal image with no spatial reference system

Hello Jason.

Thanks for your quick answer.
I have added the missing georeferencing information and it works well !  :)

Regards,
Johan.