[Gdal-dev] JP2 geo info question

Frank Warmerdam fwarmerdam at gmail.com
Thu Dec 9 17:04:59 EST 2004


On Thu, 9 Dec 2004 15:58:58 -0600, Simpson <asimpson at i-55.com> wrote:
> 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.
'
Cool!   Though you shouldn't have run into all the problems you did. 

> 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?

The -a_srs switch on the gdal_translate commandline can be used to 
assign a coordinate system.  It takes a variety of formats to describe
the coordinate system including PROJ.4 and EPSG codes. 

eg. 

gdal_translate -a_srs EPSG:4326 in.tif out.tif

or

gdal_translate -a_srs '+proj=utm +zone=11 +datum=WGS84' in.tif out.tif

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