[Gdal-dev] help !

Anand Madhavan anandm at ittc.ku.edu
Thu Mar 6 22:58:09 EST 2003


Hi,

   I basically need to get ALL the information about a .img (hfa) file
header and copy it into another .img (hfa) file I create with my own new
data. Can anyone help me as to what API's I should use and where to look for
them ? Any help is highly appreciated. Thank you.

Regards,
Anand

-----Original Message-----
From: gdal-dev-admin at remotesensing.org
[mailto:gdal-dev-admin at remotesensing.org]On Behalf Of
gdal-dev-request at remotesensing.org
Sent: Thursday, February 27, 2003 11:00 AM
To: gdal-dev at remotesensing.org
Subject: Gdal-dev digest, Vol 1 #75 - 12 msgs


Send Gdal-dev mailing list submissions to
	gdal-dev at remotesensing.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://remotesensing.org/mailman/listinfo/gdal-dev
or, via email, send a message with subject or body 'help' to
	gdal-dev-request at remotesensing.org

You can reach the person managing the list at
	gdal-dev-admin at remotesensing.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Gdal-dev digest..."


Today's Topics:

   1. hdf4 metadata (Norman Vine)
   2. Re: hdf4 metadata (Andrey Kiselev)
   3. RE: hdf4 metadata (Norman Vine)
   4. Re: R: [Gdal-dev] Support for creating ENVI .hdr labeled files (Andrey
Kiselev)
   5. R: R: [Gdal-dev] Support for creating ENVI .hdr labeled files (Amici
Alessandro)
   6. Re: hdf4 metadata (Andrey Kiselev)
   7. RE: hdf4 metadata (Norman Vine)
   8. customizing GDAL to make only two drivers available (Ayman Kamal)
   9. RE: customizing GDAL to make only two drivers available (Norman Vine)
  10. Re: customizing GDAL to make only two drivers available (Frank
Warmerdam)
  11. Re: hdf4 metadata (Andrey Kiselev)
  12. RE: hdf4 metadata (Norman Vine)

--__--__--

Message: 1
From: "Norman Vine" <nhv at cape.com>
To: <gdal-dev at remotesensing.org>
Date: Wed, 26 Feb 2003 17:38:05 -0500
Subject: [Gdal-dev] hdf4 metadata
Reply-To: gdal-dev at remotesensing.org

Hi All

I am not sure if the following is a problem with GDAL
or my hdf4 library

With gdalinfo I constantly get

Driver: HDF4/Hierarchical Data Format Release 4
Size is 512, 512
Coordinate System is `'
Metadata:
....
  GPOLYGONCONTAINER=-103.892405, -81.954139, -86.270138, -107.052668
   ^^^^^^^^^^^^^^^
  GRINGPOINTLATITUDE=20.525827, 17.337449, -0.496254, 2.465055
  GRINGPOINTSEQUENCENO=1, 2, 3, 4

the data for GRPOLYGONCONTAINER is I would expect for
GRINGPOINTLONGITUDE

Is anyone else seeing this ?

This is using Cygwin

Cheers

Norman


--__--__--

Message: 2
From: Andrey Kiselev <dron at ak4719.spb.edu>
Date: Thu, 27 Feb 2003 10:00:30 +0300
To: gdal-dev at remotesensing.org
Subject: Re: [Gdal-dev] hdf4 metadata
Reply-To: gdal-dev at remotesensing.org

Norman,

On Wed, Feb 26, 2003 at 05:38:05PM -0500, Norman Vine wrote:
> I am not sure if the following is a problem with GDAL
> or my hdf4 library
>
> With gdalinfo I constantly get
>
> Driver: HDF4/Hierarchical Data Format Release 4
> Size is 512, 512
> Coordinate System is `'
> Metadata:
> ....
>   GPOLYGONCONTAINER=-103.892405, -81.954139, -86.270138, -107.052668
>    ^^^^^^^^^^^^^^^
>   GRINGPOINTLATITUDE=20.525827, 17.337449, -0.496254, 2.465055
>   GRINGPOINTSEQUENCENO=1, 2, 3, 4
>
> the data for GRPOLYGONCONTAINER is I would expect for
> GRINGPOINTLONGITUDE

What HDF products used by you? What size of this datasets? If them has a
reasonable size, I want get the sample.


--
Andrey V. Kiselev
Home phone:  +7 812 5274898  ICQ# 26871517

--__--__--

Message: 3
From: "Norman Vine" <nhv at cape.com>
To: <gdal-dev at remotesensing.org>
Subject: RE: [Gdal-dev] hdf4 metadata
Date: Thu, 27 Feb 2003 04:52:33 -0500
Reply-To: gdal-dev at remotesensing.org

Andrey Kiselev writes:
>
> On Wed, Feb 26, 2003 at 05:38:05PM -0500, Norman Vine wrote:
> > I am not sure if the following is a problem with GDAL
> > or my hdf4 library
> >
> > With gdalinfo I constantly get
> >
> > Driver: HDF4/Hierarchical Data Format Release 4
> > Size is 512, 512
> > Coordinate System is `'
> > Metadata:
> > ....
> >   GPOLYGONCONTAINER=-103.892405, -81.954139, -86.270138, -107.052668
> >    ^^^^^^^^^^^^^^^
> >   GRINGPOINTLATITUDE=20.525827, 17.337449, -0.496254, 2.465055
> >   GRINGPOINTSEQUENCENO=1, 2, 3, 4
> >
> > the data for GRPOLYGONCONTAINER is I would expect for
> > GRINGPOINTLONGITUDE
>
> What HDF products used by you? What size of this datasets? If them has a
> reasonable size, I want get the sample.

Hi Andrey

I am working with MODIS data

There are l2 and l3 data sets in the 'images' directory of
the MODIS Ocean Color tutorial
http://jeager.gsfc.nasa.gov/modis_workshop_unh/

I suggest that we use these as our 'standard' MODIS test files

Note I hope to eventually be able to duplicate the functionality of the
matlab and IDL code in this tutorial with GDAL and Python

Cheers

Norman


--__--__--

Message: 4
From: Andrey Kiselev <dron at ak4719.spb.edu>
Date: Thu, 27 Feb 2003 12:58:32 +0300
To: gdal-dev at remotesensing.org
Subject: Re: R: [Gdal-dev] Support for creating ENVI .hdr labeled files
Reply-To: gdal-dev at remotesensing.org

Amici,

On Wed, Feb 26, 2003 at 12:47:34PM +0100, Amici Alessandro wrote:
> in addition to the WIP-items you mentioned i'd like to point out to you
> one more useful item to implement:
> an option to _append_ the '.hdr' extension to the full name i.e.
> 	image.bin -> image.bin.hdr

I have implemented such an option. Try "SUFFIX=ADD" with gdal_translate.
By default suffix will be replaced as previously.

--
Andrey V. Kiselev
Home phone:  +7 812 5274898  ICQ# 26871517

--__--__--

Message: 5
From: Amici Alessandro <alessandro_amici at telespazio.it>
To: gdal-dev at remotesensing.org
Subject: R: R: [Gdal-dev] Support for creating ENVI .hdr labeled files
Date: Thu, 27 Feb 2003 11:36:18 +0100
Reply-To: gdal-dev at remotesensing.org


hi,

> Amici,

Andrey, my first name is Alessandro :) and unfortunately i have no power to
change the broken mailer with this stupid 'second name first' default :(

> On Wed, Feb 26, 2003 at 12:47:34PM +0100, Amici Alessandro wrote:
> > in addition to the WIP-items you mentioned i'd like to point out to you
> > one more useful item to implement:
> > an option to _append_ the '.hdr' extension to the full name i.e.
> > 	image.bin -> image.bin.hdr
>
> I have implemented such an option. Try "SUFFIX=ADD" with gdal_translate.
> By default suffix will be replaced as previously.

i tryed both SUFFIX and INTERLEAVE, and found no problem :).

thanks a lot, this seriously cuts down the number of quirks i need to
implement in my apps!

i will stress test the ENVI driver from now on. if you need testing on
specific
areas (i.e. map_info), don't esitate to cc me directly.

cheers,
alessandro

--__--__--

Message: 6
From: Andrey Kiselev <dron at ak4719.spb.edu>
Date: Thu, 27 Feb 2003 13:41:01 +0300
To: gdal-dev at remotesensing.org
Subject: Re: [Gdal-dev] hdf4 metadata
Reply-To: gdal-dev at remotesensing.org

Norman,

What GDAL version do you use?


--
Andrey V. Kiselev
Home phone:  +7 812 5274898  ICQ# 26871517

--__--__--

Message: 7
From: "Norman Vine" <nhv at cape.com>
To: <gdal-dev at remotesensing.org>
Subject: RE: [Gdal-dev] hdf4 metadata
Date: Thu, 27 Feb 2003 06:02:51 -0500
Reply-To: gdal-dev at remotesensing.org

Andrey Kiselev writes:
>
> Norman,
>
> What GDAL version do you use?

Yesterday's CVS

Cheers

Norman

--__--__--

Message: 8
Date: Thu, 27 Feb 2003 04:00:55 -0800 (PST)
From: Ayman Kamal <kamal_jo at yahoo.com>
To: gdal-dev at remotesensing.org
Subject: [Gdal-dev] customizing GDAL to make only two drivers available
Reply-To: gdal-dev at remotesensing.org

Is there any means to minimize the numbers of drivers
available in GDAL so that I can use it just to convert
from format "A" to format "B", I guess this way it
will be lighter weight. Can I do this? How?

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

--__--__--

Message: 9
From: "Norman Vine" <nhv at cape.com>
To: <gdal-dev at remotesensing.org>
Subject: RE: [Gdal-dev] customizing GDAL to make only two drivers available
Date: Thu, 27 Feb 2003 07:16:57 -0500
Reply-To: gdal-dev at remotesensing.org

Ayman Kamal writes:
>
> Is there any means to minimize the numbers of drivers
> available in GDAL so that I can use it just to convert
> from format "A" to format "B", I guess this way it
> will be lighter weight. Can I do this? How?

If I remember correctly you are using MSVC
in which case I believe that you can modify the
$GDAL_SRC/frmts/makefile.vc EXTRAFLAGS variable
to just include the formats you want

ie this should yield a GDAL that only did tiff and bmp
EXTRAFLAGS =	 -DFRMT_gtiff -DFRMT_bmp

on Unix like systems you need to modify the
$GDAL_SRC/GDALmake.opt file variable $GDAL_FORMATS

HTH

Norman



--__--__--

Message: 10
Date: Thu, 27 Feb 2003 09:11:53 -0500
From: Frank Warmerdam <warmerdam at pobox.com>
To: gdal-dev at remotesensing.org
Subject: Re: [Gdal-dev] customizing GDAL to make only two drivers available
Reply-To: gdal-dev at remotesensing.org

Norman Vine wrote:
> Ayman Kamal writes:
>
>>Is there any means to minimize the numbers of drivers
>>available in GDAL so that I can use it just to convert
>>from format "A" to format "B", I guess this way it
>>will be lighter weight. Can I do this? How?
>
>
> If I remember correctly you are using MSVC
> in which case I believe that you can modify the
> $GDAL_SRC/frmts/makefile.vc EXTRAFLAGS variable
> to just include the formats you want
>
> ie this should yield a GDAL that only did tiff and bmp
> EXTRAFLAGS =	 -DFRMT_gtiff -DFRMT_bmp
>
> on Unix like systems you need to modify the
> $GDAL_SRC/GDALmake.opt file variable $GDAL_FORMATS

Ayman,

Norman is right on this, though you can only control what gets
included by subdirectory of gdal/frmts, so for instance, to get any
driver in the frmts/raw directory you normally get them all.  However, they
are "light".  There are also a few dependencies between drivers that may
come
up.

I would add that you can save alot by not including the OGR drivers in a
GDAL
build where you only need raster support.

On windows set comment out the "INCLUDE_OGR_FRMTS" flag setting to disable
inclusino of OGR.

On Unix configure with the "--without-ogr" switch.

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



--__--__--

Message: 11
From: Andrey Kiselev <dron at ak4719.spb.edu>
Date: Thu, 27 Feb 2003 17:40:13 +0300
To: gdal-dev at remotesensing.org
Subject: Re: [Gdal-dev] hdf4 metadata
Reply-To: gdal-dev at remotesensing.org

Norman,

I have fixed problem with HDF-EOS metadata parsing. You could check out
latest changes.

--
Andrey V. Kiselev
Home phone:  +7 812 5274898  ICQ# 26871517

--__--__--

Message: 12
From: "Norman Vine" <nhv at cape.com>
To: <gdal-dev at remotesensing.org>
Subject: RE: [Gdal-dev] hdf4 metadata
Date: Thu, 27 Feb 2003 10:04:39 -0500
Reply-To: gdal-dev at remotesensing.org

Andrey Kiselev writes:
>
> I have fixed problem with HDF-EOS metadata parsing. You could check out
> latest changes.

Yes *much* better :-)

Thanks !

Norman


--__--__--

_______________________________________________
Gdal-dev mailing list
Gdal-dev at remotesensing.org
http://remotesensing.org/mailman/listinfo/gdal-dev


End of Gdal-dev Digest




More information about the Gdal-dev mailing list