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