[gdal-dev] Problems with gdalwarp re-projecting from lat-long to Lambert Conformal

Kyle Shannon ksshannon at gmail.com
Wed Mar 3 12:21:16 EST 2010


Yes, that is correct, that was a cut and paste mistake. You should not need
either -s_srs or -t_srs.

kss

-Kyle


On Wed, Mar 3, 2010 at 9:44 AM, Bill Hudspeth <wbhk at unm.edu> wrote:

> Thanks for the input Kyle. Just a quick question. In the second
> operation using gdal_translate, you indicate an -s_srs of EPSG:4326 for
> the *.vrt file. Wasn't the vrt file written in the Lambert projection in
> the first step? And if so, the second step could probably be done
> without having to specify either s_srs or t_srs?
>
> Is this true?
>
> Thanks again, Bill
>
> On Tue, 2010-03-02 at 11:36 -0700, Kyle Shannon wrote:
> > Bill,
> >
> > It may be necessary to create an intermediate file that supports
> > creation (I think the (rw+) flag on gdalinfo --formats shows which
> > formats support create, AAIGrid supports CreateCopy() but not
> > Create()).  Use gdalwarp to make a vrt file, then translate the file
> > to AAIGrid:
> >
> > /usr/local/gdal/bin/gdalwarp -of VRT -s_srs EPSG:4326 -t_srs
> > '+proj=lcc +lat_1=33n +lat_2=45n +lon_0=97w' mcd12_sep2109.asc
> > lambert_mcd12_sep2109.vrt
> >
> > then:
> >
> > /usr/local/gdal/bin/gdal_translate -of AAIGrid -s_srs EPSG:4326 -t_srs
> > '+proj=lcc +lat_1=33n +lat_2=45n +lon_0=97w' lambert_mcd12_sep2109.vrt
> > lambert_mcd12_sep2109.asc
> >
> > hope that helps,
> >
> > regards,
> >
> > -Kyle
> >
> >
> > On Tue, Mar 2, 2010 at 8:57 AM, Bill Hudspeth <wbhk at unm.edu> wrote:
> >         Hello,
> >
> >         Thanks for responding. When I use gdalinfo --formats, I see
> >         that AAIGrid
> >         is included in the list of acceptable formats. However, when I
> >         use
> >
> >         /usr/local/gdal/bin/gdalwarp -of AAIGrid -s_srs EPSG:4326
> >         -t_srs
> >         '+proj=lcc +lat_1=33n +lat_2=45n +lon_0=97w' mcd12_sep2109.asc
> >         lambert_mcd12_sep2109.asc
> >
> >         I get,
> >
> >         Output driver `AAIGrid' not recognised or does not support
> >         direct output file creation.  The following format drivers are
> >         configured
> >         and support direct output:
> >          VRT: Virtual Raster
> >          GTiff: GeoTIFF
> >          NITF: National Imagery Transmission Format
> >          HFA: Erdas Imagine Images (.img)
> >          ELAS: ELAS
> >          MEM: In Memory Raster
> >          BMP: MS Windows Device Independent Bitmap
> >          PCIDSK: PCIDSK Database File
> >          ILWIS: ILWIS Raster Map
> >          HDF4Image: HDF4 Dataset
> >          PNM: Portable Pixmap Format (netpbm)
> >          ENVI: ENVI .hdr Labelled
> >          EHdr: ESRI .hdr Labelled
> >          PAux: PCI .aux Labelled
> >          MFF: Atlantis MFF Raster
> >          MFF2: Atlantis MFF2 (HKV) Raster
> >          BT: VTP .bt (Binary Terrain) 1.3 Format
> >          IDA: Image Data and Analysis
> >          RMF: Raster Matrix Format
> >
> >
> >         ????
> >
> >
> >
> >
> >
> >
> >         On Tue, 2010-03-02 at 08:50 +0100, Markus Neteler wrote:
> >         > On Mon, Mar 1, 2010 at 7:12 PM, Bill Hudspeth <wbhk at unm.edu>
> >         wrote:
> >         > ...
> >         > > When I try to re-project the exported AAIGrid to another
> >         projection, I
> >         > > use:
> >         > >
> >         > > gdalwarp -s_srs EPSG:4326 -t_srs '+proj=lcc +lat__1=33n
> >         +lat_2=45n
> >         > > +lon_0=97w' MODIS_output_latlong.asc
> >         MODIS_output_lambert.asc
> >         >
> >         > Note that without -of format] you generate a GeoTIFF file...
> >         >
> >         > > While the resultant projection information looks correct,
> >         > >
> >         > > Driver: GTiff/GeoTIFF
> >         >    ^^^^^^^^^^^^^^^^^^^^^^^
> >         >
> >         > > The resultant text file has only the following on the top
> >         line:
> >         >
> >         > ... it is binary, not a text file. check
> >         >
> >         >  gdalwarp --formats
> >         >
> >         > for the available formats.
> >         >
> >         > Markus
> >
> >
> >         _______________________________________________
> >         gdal-dev mailing list
> >         gdal-dev at lists.osgeo.org
> >         http://lists.osgeo.org/mailman/listinfo/gdal-dev
> >
> >
> > _______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100303/f2274a21/attachment.html


More information about the gdal-dev mailing list