[Gdal-dev] JP2 geo info question

Simpson asimpson at i-55.com
Thu Dec 9 16:58:58 EST 2004


Frank,

j2w works!  I tried jpw and tfw, but not the j2w.
I now have maps rendering from mapserver with these re-encoded jp2s, and no
'assertion failed' crashes.
I re-encoded lossless and only 4 overviews, whereas the originals were lossy
with 11 overviews.  I'll try with more overviews to see if it'll crash.

How would one set the coordinate system? Via API and GeoTiff?

Thanks very much for the help,
Drew.

-----Original Message-----
From: Frank Warmerdam [mailto:fwarmerdam at gmail.com]
Sent: Thursday, December 09, 2004 2:47 PM
To: Simpson
Cc: gdal-dev at xserve.flids.com
Subject: Re: [Gdal-dev] JP2 geo info question


On Thu, 9 Dec 2004 11:28:38 -0600, Simpson <asimpson at i-55.com> wrote:
> Greetings,
>
> I am trying to re-encode a JP2 with gdal->jasper to see if encoding is
> related to a MapServer problem I'm having.
>
> I convert to GeoTiff first and gdalinfo shows all geo information still
ok.
>
> Then I convert the GeoTiff to a JP2.
>
> gdalinfo->mrsid sdk on the JP2 reports no geo info.
> mrsidinfo on the JP2 reports no geo info.
> gdalinfo->jasper on the JP2 reports geo info.
>
> Does Jasper encode the geo info differently in the JP2?

Drew,

The GDAL JasPer driver should encode the georeferencing information
as a GeoTIFF embedded in the JP2 file.  I thought that the MrSID SDK
would support this,though I haven't tried it personally.

It seems you don't have a coordinate system defined.  You might want
to try re-encoding the JP2 including a coordinate system.  It is possible
that the MrSID SDK ignores an embedded geotiff if there is no
coordinate system information.

I'm not sure if the MrSID sdk will support world files for jp2 files.
I'm pretty sure it does support sdw world files for .sid files though.
You might want to try .sdw, or .j2w world files and see.

Best regards,
--
---------------------------------------+------------------------------------
--
I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent






More information about the Gdal-dev mailing list