Re: [gdal-dev] convert geotiff to jpg

2010-04-01 Thread Frank Warmerdam

weixj2003ld wrote:

Hi,how to convert a geotiff file to a jpg file?


Wei,

Sorry, I neglected this part.

gdal_translate -of JPEG in.tif out.jpg

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

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] convert geotiff to jpg

2010-04-01 Thread Frank Warmerdam

weixj2003ld wrote:

Hi,how to convert a geotiff file to a jpg file?
BTW,I read two .tif files.and to get the count of raster through 
 getRastercount().one is 3 and the other is 6,what is means of 3 and 6?

Thk u in advance.


Wei,

The eat-your-own-tail answer is that 3 and 6 are the number of bands .

It is likely that the 3 band image has red, green and blue bands.

The six band image is presumably some sort of multispectral sensor
like Landsat, and the bands do not have obvious color gun assignments.

However, the final answer is that knowing the number of bands isn't enough
to tell us what they are.

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

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] software can display geotiff file in 3D viewer.

2010-04-01 Thread weixj2003ld
Hi
Could you tell me some open source softwares(base on windows) that can display 
geotiff files in 3D mode not in 2D mode? 
wei___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] convert geotiff to jpg

2010-04-01 Thread weixj2003ld
Hi,how to convert a geotiff file to a jpg file?
BTW,I read two .tif files.and to get the count of raster through  
getRastercount().one is 3 and the other is 6,what is means of 3 and 6?
Thk u in advance.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] Unable to set GDAL_merge NODATA or calculate statistics

2010-04-01 Thread Olsen, Keith
Hey,

I have two questions.


1.   I have 32bit float rasters that I'm trying to merge.  GDAL_merge does 
not seem to set the output nodata to the first input raster nodata value.  
There is a -n option, but the nodata value for a 32bit float is 
-3.4028235e+038.  Entering in this value with -n does not set the nodata value 
in the output tif.  Is there another way to express this value that gdal_merge 
understands?

2.   Is there a way for gdal_merge to automatically calculate the 
statistics on the output tif?  I have had issues with this before when writing 
out tif rasters with GDAL (c++).

Thanks,
--Keith Olsen


___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Setting ENVI .hdr band names

2010-04-01 Thread Frank Warmerdam

Benjamin Welton wrote:

Hey all,

   Im wondering if its possible to set the band names that appear in the 
ENVI header file instead of having the default band 1, band 2, 
(which looks kinda messy)



Ben,

Reviewing the current envidataset.cpp code, it seems that either band_names
and wavelength fields are used for the band descriptions if they are available.
Are you using GDAL 1.7+?  If so, perhaps you could file a ticket on the
issue and attach your envi header file.

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

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


RE: [gdal-dev] Memory corruption in PNG driver with Microsoft DebugDLLs?

2010-04-01 Thread Shaw, Jonathan-P29740
Thanks, Tamas. Your blog posting is helpful in explaining the potential
problems and the care that must be taken. I already paid careful
attention to the memory allocation/deallocation DLL boundary concerns,
but somehow I was clueless on the issues related to compiling against
mixtures of Microsoft's debug and non-debug runtime DLLs. The recent
ticket 3346 woke me up to this issue, and your post helps explain it
further.

 

Thanks,

Jonathan

 

 

 

From: Tamas Szekeres [mailto:szeker...@gmail.com] 
Sent: Thursday, April 01, 2010 2:28 AM
To: Shaw, Jonathan-P29740
Cc: gdal-dev@lists.osgeo.org
Subject: Re: [gdal-dev] Memory corruption in PNG driver with Microsoft
DebugDLLs?

 

 

 

2010/4/1 Shaw, Jonathan-P29740 

Upon further browsing of the open tickets, I'm wondering if I'm
experiencing the crashes, heap corruption, etc. described by
http://trac.osgeo.org/gdal/ticket/3346.


Jonathan,

You probably use GDAL along with one or more dependencies loaded
dynamically (like proj, libpng, libjpeg etc.) which may have been
compiled against different CRT dependencies. This may happen either by
using different CRT settings or different compiler versions when
compiling the various libraries. Having different CRT settings for the
various libraries is not necessarily a problems when the authors of the
libraries follow careful design considerations and coding practice (like
making memory allocations/deallocations within the dll boundaries etc.),
but it's rarely the case with the libraries we use. Using inhomogeneous
CRT dependecies in dependent libraries is unsupported by Microsoft
either, and I've also submitted a blogpost related to this topic here:
http://szekerest.blogspot.com/2010/02/redistribution-of-shared-c-runtime
.html

To avoid this situation you might want to recompile all the dependencies
with the same compiler and CRT setting which could be a nightmare in
many cases. You could alternatively use the pre-compiled binary packages
/ SDKs from this location http://vbkto.dyndns.org/sdk/ which are
guaranteed to compiled satisfying with the requirements above (by using
the /MD settings for all, and the same compiler used).


Best regards,

Tamas



 

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Memory corruption in PNG driver with Microsoft DebugDLLs?

2010-04-01 Thread Tamas Szekeres
2010/4/1 Shaw, Jonathan-P29740 

> Upon further browsing of the open tickets, I'm wondering if I'm
> experiencing the crashes, heap corruption, etc. described by
> http://trac.osgeo.org/gdal/ticket/3346.
>
>
Jonathan,

You probably use GDAL along with one or more dependencies loaded dynamically
(like proj, libpng, libjpeg etc.) which may have been compiled against
different CRT dependencies. This may happen either by using different CRT
settings or different compiler versions when compiling the various
libraries. Having different CRT settings for the various libraries is not
necessarily a problems when the authors of the libraries follow careful
design considerations and coding practice (like making memory
allocations/deallocations within the dll boundaries etc.), but it's rarely
the case with the libraries we use. Using inhomogeneous CRT dependecies in
dependent libraries is unsupported by Microsoft either, and I've also
submitted a blogpost related to this topic here:
http://szekerest.blogspot.com/2010/02/redistribution-of-shared-c-runtime.html

To avoid this situation you might want to recompile all the dependencies
with the same compiler and CRT setting which could be a nightmare in many
cases. You could alternatively use the pre-compiled binary packages / SDKs
from this location http://vbkto.dyndns.org/sdk/ which are guaranteed to
compiled satisfying with the requirements above (by using the /MD settings
for all, and the same compiler used).


Best regards,

Tamas
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] get the x and y coordinate of geotiff

2010-04-01 Thread weixj2003ld
1. How could I get the x and y of world coordinate ,or the longitude and the 
latitude of it by GDAL?

2. How could get the height of it with GDAL?

Thk u in advance.___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev