Author Topic: How to install GDAL  (Read 6114 times)

shubhra_planex

  • Isis User Group
  • Osiris (Active Member)
  • **
  • Posts: 18
    • Email
How to install GDAL
« on: August 06, 2014, 06:31:41 AM »
Hi,

I want to install the GDAL software but i am unable to install it. The system configuration is Windows XP-32 bit.

Could you please guide me in this regard

thare

  • GIS Support Team
  • Isis (Extreme Power Member)
  • *****
  • Posts: 1217
    • http://webgis.wr.usgs.gov
    • Email
Re: How to install GDAL
« Reply #1 on: August 06, 2014, 07:31:43 AM »
The easiest option is probably to use the OSGeo4W (for Windows) installer. Once started I select advanced option and then I like to select "install" for all command-line options which will have basic GDAL tools. Under "libs", let the selected ones default, but I like to also add gdal-python, python-numpy, python-scipy, and for some jpeg2000 read support gdal-ecw and gdal-mrsid. Desktop options allow you to install GIS apps like QGIS, etc.
http://trac.osgeo.org/osgeo4w/

After you have installed OSGeo4W, start the "OSGeo4W shell". The installer should have placed a shortcut for this shell in your start menu.

For python scripting,  check out some of the sample Python / GDAL scripts at:
http://svn.osgeo.org/gdal/trunk/gdal/swig/python/samples/

More GDAL Python details here:
http://pypi.python.org/pypi/GDAL/

Other Options
Take a look at http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries

More help:
http://stevemosher.wordpress.com/installing-osgeo4w/

Sounds complicated but give it a shot,
Trent
« Last Edit: August 07, 2014, 01:33:06 PM by thare »

JohnVV

  • Isis (Extreme Power Member)
  • *****
  • Posts: 287
    • Email
Re: How to install GDAL
« Reply #2 on: August 07, 2014, 01:04:02 PM »
as above there are many options
i use fwtools
a win32 exe file can be found here
 FWTools 2.4.7
http://fwtools.maptools.org/
http://fwtools.maptools.org/windows-main.html
-- win exe
h t t p : / / home.gdal.org/fwtools/FWTools247.exe

but the windows version is the old 2 branch
and is showing it's age
« Last Edit: August 07, 2014, 01:06:18 PM by JohnVV »

shubhra_planex

  • Isis User Group
  • Osiris (Active Member)
  • **
  • Posts: 18
    • Email
Re: How to install GDAL
« Reply #3 on: August 28, 2014, 02:42:31 AM »
Hello,

Still unable to install the GDAL on my system....

shubhra_planex

  • Isis User Group
  • Osiris (Active Member)
  • **
  • Posts: 18
    • Email
Re: How to install GDAL
« Reply #4 on: August 28, 2014, 06:31:21 AM »
Thanks everyone I have install the GDAL in command prompt ...

Now could you tell me how to work with the change in projection with this...:)

thare

  • GIS Support Team
  • Isis (Extreme Power Member)
  • *****
  • Posts: 1217
    • http://webgis.wr.usgs.gov
    • Email
Re: How to install GDAL
« Reply #5 on: August 28, 2014, 11:11:20 PM »
gdalwarp allows you to reproject. Defining the output projection can be a little tricky - what projection are you going to? Good to know where you are coming from also. Run gdalinfo on the image to find this out.

http://www.gdal.org/gdalwarp.html

-Trent

shubhra_planex

  • Isis User Group
  • Osiris (Active Member)
  • **
  • Posts: 18
    • Email
Re: How to install GDAL
« Reply #6 on: August 29, 2014, 03:43:29 AM »
Dear Thare,

I have prepared the mosaics using Mini-RF datasets when i analysed it in ENVI 4.8 it does not show the lat/long. So i install the GDAL with Command line.

Could you please guide me how to use these tool to convert the mosaic into any required format
that ENVI can easily read the projection.


thare

  • GIS Support Team
  • Isis (Extreme Power Member)
  • *****
  • Posts: 1217
    • http://webgis.wr.usgs.gov
    • Email
Re: How to install GDAL
« Reply #7 on: August 30, 2014, 11:41:35 AM »
I might a little more information like what level of file you are trying to use. For example, in general, only map projected images will be well supported in GDAL and GIS applications for mapping. For Mini-RF they do release derived map projected (aka Level 2) products. Unfortunately it appears they released their "map" products using the Oblique Cylindrical projection. As far as I can tell this projection is only supported in ISIS (and by the team?). GDAL maps this to Swiss Oblique CYlindrical as a guess but GDAL doesn't support the unique rotation parameter (which helps align the swaths into a vertical position). I guess this is something our community should write for the Proj4 library GDAL uses. Thus to use correctly in a GIS like QGIS or ArcMap you must first reproject them to a more standardized projection using an application which supports that projection (like ISIS3). Cassini use the same projection. Here is a tutorial section for how to do that in ISIS:
http://isis.astrogeology.usgs.gov/IsisWorkshop/index.php/Working_with_Cassini_RADAR#Reproject_the_Oblique_Cylindrical

Now for the polar products (mosaics and probably some level2 images), since those use a Polar Stereographic projection, those products are supported in GDAL, QGIS, ArcMap, etc.

Summary: for GDAL, QGIS, ArcMap, etc. you are probably going to be limited to "correctly" using the Mini-RF mosaics only (available from the PDS) or perhaps any level 2 images which happen to be polar stereographic. 
http://pds-geosciences.wustl.edu/lro/lro-l-mrflro-4-cdr-v1/lromrf_0005/data/sar/mosaics/

good luck,
Trent

For GIS apps (and more global products), I would be careful mixing "LongitudeDomain = 360" and "CenterLongitude = 0.0". ArcMap in particular doesn't like this very much. I would use either:
"LongitudeDomain = 180" and "CenterLongitude = 0.0" (recommended) OR
"LongitudeDomain = 360" and "CenterLongitude = 180.0"
This puts X=0 in Cartesian meters at the center of the map instead on an edge which ArcMap prefers.

shubhra_planex

  • Isis User Group
  • Osiris (Active Member)
  • **
  • Posts: 18
    • Email
Re: How to install GDAL
« Reply #8 on: September 06, 2014, 05:06:42 AM »
Respected Sir,

For mosaicking I have used level 2 data of the Mini-RF and prepared the mosaic in the ISIS using different modules of ISIS. 

I have reproject these datastrips into polar sterographic.

Now how these mosaic can be convert  into any required format that ENVI can easily read the projection.

  :(  :( :(

thare

  • GIS Support Team
  • Isis (Extreme Power Member)
  • *****
  • Posts: 1217
    • http://webgis.wr.usgs.gov
    • Email
Re: How to install GDAL
« Reply #9 on: September 06, 2014, 08:13:30 PM »
To maintain the map projection, I would first try gdal_translate
> gdal_translate -of in.cub out.tif

This GeoTiff should be recognized by ENVI. I know ENVI 5.1 will see it - not sure about earlier versions.

You can also test loading the ISIS file directly with QGIS or TuiView.

-Trent

shubhra_planex

  • Isis User Group
  • Osiris (Active Member)
  • **
  • Posts: 18
    • Email
Re: How to install GDAL
« Reply #10 on: September 09, 2014, 01:30:49 AM »
Respected Sir,

I tried to open my .cub file in qgis software but it does not open there, what I should do.

I have to first convert it in geotiff or any other format that QGIS read.

Please help me  :(

JohnVV

  • Isis (Extreme Power Member)
  • *****
  • Posts: 287
    • Email
Re: How to install GDAL
« Reply #11 on: September 09, 2014, 05:53:42 PM »
The current GDAL has no big issues with any of the old isis2 cub files and reads the newer isis3 cub files just fine
-- at lease i have never had any issues with gdal reading my isis3 cub files

Every "GIS" program, like every Image processing program, has it's own "working" format .

and not every program can read EVERY format


converting a isis cub to a Gtiff is normal
or even to what i use most of the time
a RAW 32 bit floating point format with a detached header

then import that
but a Gtiff is used most often for gis software
« Last Edit: September 12, 2014, 06:28:07 PM by JohnVV »