<br>I am a new GDAL user and have been trying to use gdalwarp to reproject a 2D array of swath-based (satellite) floating-point data values (no projection) that reside in a flat binary file. I also have the corresponding floating-point geolocation binary files that are the same dimensions as the data array. Data extent ranges from 19.0 to 58.0 longitude and -61.0 and -40.0 latitude. All missing data values are set to -9999.0. From poring over various postings I came across, I created three .vrt files, the contents which are posted below. Question: assuming these .vrt files are correct, what is the gdalwarp command command to reproject this data to a basic geographic lon-lat grid, retaining the floating-point values in a flat binary file? I've had very limited success so far, and that has only occurred when I convert the data values to byte. Even then, something doesn't look exactly correct. This is an example of the gdalwarp command I've tried to use:<br>
<br><b>gdalwarp -geoloc -te 19.0 -61.0 58.0 -40.0 data_values.vrt out_proj.raw</b><br><br>Any help appreciated, thank you.<br><br>Charles<br><br><br><b>VRT file (data_values.vrt) for data array stored in file data_values.raw:</b><br>
<br><VRTDataset rasterXSize="1354" rasterYSize="2030"><br> <Metadata domain="GEOLOCATION"><br> <MDI key="LINE_OFFSET">5416</MDI><br> <MDI key="LINE_STEP">1</MDI><br>
<MDI key="PIXEL_OFFSET">4</MDI><br> <MDI key="PIXEL_STEP">1</MDI><br> <MDI key="X_BAND">1</MDI><br> <MDI key="X_DATASET">longitudes.vrt</MDI><br>
<MDI key="Y_BAND">1</MDI><br> <MDI key="Y_DATASET">latitudes.vrt</MDI><br> </Metadata><br> <VRTRasterBand dataType="Float32" band="1" subClass="VRTRawRasterBand"><br>
<NoDataValue>-9999.0</NoDataValue><br> <SourceFilename relativeToVRT="1">data_values.raw</SourceFilename><br> <ImageOffset>0</ImageOffset><br> <PixelOffset>4</PixelOffset><br>
<LineOffset>5416</LineOffset><br> <ByteOrder>LSB</ByteOrder><br> </VRTRasterBand><br></VRTDataset><br><br><b>VRT file (longitudes.vrt) for longitude array stored in file longitudes.raw:<br>
<br></b><VRTDataset rasterXSize="1354" rasterYSize="2030"><br> <VRTRasterBand dataType="Float32" band="1" subClass="VRTRawRasterBand"><br> <SourceFilename relativetoVRT="1">longitudes.raw</SourceFilename><br>
<ImageOffset>0</ImageOffset><br> <PixelOffset>4</PixelOffset><br> <LineOffset>5416</LineOffset><br> <ByteOrder>LSB</ByteOrder><br> <NoDataValue>-9999.0</NoDataValue><br>
</VRTRasterBand><br></VRTDataset><br><br>
<b>VRT file (latitudes.vrt) for latitude array stored in file latitudes.raw:<br>
<br>
</b><VRTDataset rasterXSize="1354" rasterYSize="2030"><br> <VRTRasterBand dataType="Float32" band="1" subClass="VRTRawRasterBand"><br> <SourceFilename relativetoVRT="1">latitudes.raw</SourceFilename><br>
<ImageOffset>0</ImageOffset><br> <PixelOffset>4</PixelOffset><br> <LineOffset>5416</LineOffset><br> <ByteOrder>LSB</ByteOrder><br> <NoDataValue>-9999.0</NoDataValue><br>
</VRTRasterBand><br></VRTDataset><br><br><br>