Ticket #101

classic Classic list List threaded Threaded
5 messages Options
Jay Jay
Reply | Threaded
Open this post in threaded view
|

Ticket #101

Hi Guys,

I am trying to display a geotiff image (WGS 84 / UTM Zone 17N projection) on a geodetic globe.  I simply create a geocentric map programatically and then add a single image layer using the GDAL driver and pass to the driver via the url param a single geotiff image in the WGS 84 / UTM Zone 17N projection.

After creating the layer, I get the following error and the layer does not render:

ERROR 1: latitude or longitude exceeded limits
[osgEarth::SRS] Failed to xform a point from WGS 84 to WGS 84 / UTM Zone 17N

I then tried to do the same thing using a .earth file and osgViewer and get the same error.  The contents of my .earth file are below for reference, as well as the output from running gdalinfo on the tif file.

Is this issue related to Ticket #101, or am I missing something?

earth file:

<map name="geotiff example" type="geocentric">

   <image name="geotiff" driver="gdal">
      <url>L71017030_03020050912_B10_copy.tif</url>
      <tile_size>128</tile_size>
      <extensions>tif</extensions>
   </image>

</map>

output from gdalinfo:

Driver: GTiff/GeoTIFF
Files: L71017030_03020050912_B10_copy.tif
Size is 8141, 7241
Coordinate System is:
PROJCS["WGS 84 / UTM zone 17N",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.2572235629972,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-81],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","32617"]]
Origin = (577200.000000000000000,4892400.000000000000000)
Pixel Size = (30.000000000000000,-30.000000000000000)
Metadata:
  AREA_OR_POINT=Point
  TIFFTAG_XRESOLUTION=0
  TIFFTAG_YRESOLUTION=0
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  577200.000, 4892400.000) ( 80d 2'2.98"W, 44d10'50.63"N)
Lower Left  (  577200.000, 4675170.000) ( 80d 3'52.32"W, 42d13'29.62"N)
Upper Right (  821430.000, 4892400.000) ( 76d58'59.69"W, 44d 6'50.91"N)
Lower Right (  821430.000, 4675170.000) ( 77d 6'33.10"W, 42d 9'45.64"N)
Center      (  699315.000, 4783785.000) ( 78d32'51.08"W, 43d10'49.99"N)
Band 1 Block=8141x1 Type=Byte, ColorInterp=Gray

Thanks,
Jay
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: Ticket #101

Hi Jay,

It does sound like it could be related, keep monitoring that ticket
until we commit a fix and see if you have better luck.

Thanks,

Jason

On Wed, Feb 10, 2010 at 11:11 AM, Jay [via osgEarth]
<[hidden email]> wrote:

> Hi Guys,
>
> I am trying to display a geotiff image (WGS 84 / UTM Zone 17N projection) on
> a geodetic globe.  I simply create a geocentric map programatically and then
> add a single image layer using the GDAL driver and pass to the driver via
> the url param a single geotiff image in the WGS 84 / UTM Zone 17N
> projection.
>
> After creating the layer, I get the following error and the layer does not
> render:
>
> ERROR 1: latitude or longitude exceeded limits
> [osgEarth::SRS] Failed to xform a point from WGS 84 to WGS 84 / UTM Zone 17N
>
> I then tried to do the same thing using a .earth file and osgViewer and get
> the same error.  The contents of my .earth file are below for reference, as
> well as the output from running gdalinfo on the tif file.
>
> Is this issue related to Ticket #101, or am I missing something?
>
> earth file:
>
> <map name="geotiff example" type="geocentric">
>
>    <image name="geotiff" driver="gdal">
>       <url>L71017030_03020050912_B10_copy.tif</url>
>       <tile_size>128</tile_size>
>       <extensions>tif</extensions>
>    </image>
>
> </map>
>
> output from gdalinfo:
>
> Driver: GTiff/GeoTIFF
> Files: L71017030_03020050912_B10_copy.tif
> Size is 8141, 7241
> Coordinate System is:
> PROJCS["WGS 84 / UTM zone 17N",
>     GEOGCS["WGS 84",
>         DATUM["WGS_1984",
>             SPHEROID["WGS 84",6378137,298.2572235629972,
>                 AUTHORITY["EPSG","7030"]],
>             AUTHORITY["EPSG","6326"]],
>         PRIMEM["Greenwich",0],
>         UNIT["degree",0.0174532925199433],
>         AUTHORITY["EPSG","4326"]],
>     PROJECTION["Transverse_Mercator"],
>     PARAMETER["latitude_of_origin",0],
>     PARAMETER["central_meridian",-81],
>     PARAMETER["scale_factor",0.9996],
>     PARAMETER["false_easting",500000],
>     PARAMETER["false_northing",0],
>     UNIT["metre",1,
>         AUTHORITY["EPSG","9001"]],
>     AUTHORITY["EPSG","32617"]]
> Origin = (577200.000000000000000,4892400.000000000000000)
> Pixel Size = (30.000000000000000,-30.000000000000000)
> Metadata:
>   AREA_OR_POINT=Point
>   TIFFTAG_XRESOLUTION=0
>   TIFFTAG_YRESOLUTION=0
>   TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
> Image Structure Metadata:
>   INTERLEAVE=BAND
> Corner Coordinates:
> Upper Left  (  577200.000, 4892400.000) ( 80d 2'2.98"W, 44d10'50.63"N)
> Lower Left  (  577200.000, 4675170.000) ( 80d 3'52.32"W, 42d13'29.62"N)
> Upper Right (  821430.000, 4892400.000) ( 76d58'59.69"W, 44d 6'50.91"N)
> Lower Right (  821430.000, 4675170.000) ( 77d 6'33.10"W, 42d 9'45.64"N)
> Center      (  699315.000, 4783785.000) ( 78d32'51.08"W, 43d10'49.99"N)
> Band 1 Block=8141x1 Type=Byte, ColorInterp=Gray
>
> Thanks,
> Jay
>
> ________________________________
> View message @ http://n2.nabble.com/Ticket-101-tp4548877p4548877.html
> To start a new topic under osgEarth, email
> [hidden email]
> To unsubscribe from osgEarth, click here.
>
Jay Jay
Reply | Threaded
Open this post in threaded view
|

Re: Ticket #101

Thanks. Will do.

In the meantime, is there a workaround for this, such as first using gdalwarp to reproject the data to the map's profile?  Was I missing anything in my .earth file, or should it be that simple once the fix is in?

Thanks,
Jay
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: Ticket #101

Hey Jay,

You can use gdal_warp to reproject your file to global geodetic using:
gdalwarp -t_srs epsg:4326 myfile.tif mylatlonfile.tif

If you're going to be using that file and not caching the tiles, you
are going to be better off reprojecting the file once anyway vs
letting osgEarth reproject on each request to increase performance.

Thanks,

Jason

On Wed, Feb 10, 2010 at 11:38 AM, Jay [via osgEarth]
<[hidden email]> wrote:

> Thanks. Will do.
>
> In the meantime, is there a workaround for this, such as first using
> gdalwarp to reproject the data to the map's profile?  Was I missing anything
> in my .earth file, or should it be that simple once the fix is in?
>
> Thanks,
> Jay
>
> ________________________________
> View message @ http://n2.nabble.com/Ticket-101-tp4548877p4549052.html
> To start a new topic under osgEarth, email
> [hidden email]
> To unsubscribe from osgEarth, click here.
>
Jay Jay
Reply | Threaded
Open this post in threaded view
|

Re: Ticket #101

Hi Jason,

Thanks.  I tried that, and the layer was rendered with no errors, but the image was not colored or rotated correctly.  I'll have to look into gdalwarp a bit.

Thanks,
Jay