Unable to warp HDF5 files Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm...

A German immigrant ancestor has a "Registration Affidavit of Alien Enemy" on file. What does that mean exactly?

Suing a Police Officer Instead of the Police Department

Pointing to problems without suggesting solutions

Why does my GNOME settings mention "Moto C Plus"?

Marquee sign letters

Why isn't everyone flabbergasted about Bran's "gift"?

Im stuck and having trouble with ¬P ∨ Q Prove: P → Q

Why are two-digit numbers in Jonathan Swift's "Gulliver's Travels" (1726) written in "German style"?

Will the Antimagic Field spell cause elementals not summoned by magic to dissipate?

Etymology of 見舞い

If gravity precedes the formation of a solar system, where did the mass come from that caused the gravity?

Why these surprising proportionalities of integrals involving odd zeta values?

Can a Wizard take the Magic Initiate feat and select spells from the Wizard list?

Does using the Inspiration rules for character defects encourage My Guy Syndrome?

Does the Pact of the Blade warlock feature allow me to customize the properties of the pact weapon I create?

What helicopter has the most rotor blades?

What's the difference between using dependency injection with a container and using a service locator?

How to break 信じようとしていただけかも知れない into separate parts?

Why not use the yoke to control yaw, as well as pitch and roll?

Is there a verb for listening stealthily?

Like totally amazing interchangeable sister outfit accessory swapping or whatever

false 'Security alert' from Google - every login generates mails from 'no-reply@accounts.google.com'

Help Recreating a Table

Will I be more secure with my own router behind my ISP's router?



Unable to warp HDF5 files



Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Opening HDF data in QGIS on Ubuntu?How do I solve Gdalwarp error 'too many points failed to transform' for remapping Geostationary to Lambert conformal?Warping images with unknown projectionUnderstanding GDAL ERROR 1: Too many points… failed to transform?NetCDF with separate lat/lon bands to GeoTiff with Python/GDALgdal for reprojection of VSCMO VIIRS dataWarping Image having Lat Lon Geolocation arrayprojecting INSAT3D L1B data from HDF5 to GeotiffGeoTIFF (ESA Copernicus data) georeferencing coordinates are mirrored and projection slightly off when checking on Google MapsPlotting and/or exporting VIIRS SDR DNB data as GeoTIFF in R?GDAL Warp cuttline not workingHDF5 files in QGISPatch processing of multiple HDF5 files using Python and Gdal (gdalwarp)How to find correct projection for HDF5 data?GDAL Warp Not Producing Proper Mosaicprojecting INSAT3D L1B data from HDF5 to Geotiffextract value for a given coordinate from HDF5 fileGDAL Warp to in-memory rasterGdal warp cutline overhangWorkpath for Tiled GeoTIFF Warp and Worldfile





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







2















I have numerous HDF5 files(.nc) which I need to batch process warp using one of the gdal utilities gdalwarp. When I tried to warp the files an error occurred:



INPUT:



gdalwarp -geoloc -te 109.975 3.475 135.025 25.025 HDF5:"@file"://geophysical_data/chlor_a %out_path%@fname.tif"



RESULT:



ERROR 1: Unable to compute a GEOLOC_ARRAY based transformation between pixel/lin
e
and georeferenced coordinates for HDF5:A2015045060500.L2_LAC_OC.nc://geophysical
_data/chlor_a.



Update1:



Just to make it clear, do you mean in lat.vrt, lon.vrt and chlor.vrt I should remove the GCP Id's and MDI key and insert this section:



   <metadata domain="GEOLOCATION">  
<mdi key="X_DATASET">oc-long.vrt</mdi>
<mdi key="X_BAND">1</mdi>
<mdi key="Y_DATASET">oc-lat.vrt</mdi>
<mdi key="Y_BAND">1</mdi>
<mdi key="PIXEL_OFFSET">0</mdi>
<mdi key="LINE_OFFSET">0</mdi>
<mdi key="PIXEL_STEP">1</mdi>
<mdi key="LINE_STEP">1</mdi>
</metadata>


in between this section?



<VRTDataset rasterXSize="1116" rasterYSize="1610">

###### metadata section here #######

<VRTRasterBand dataType="Float32" band="1">
<SimpleSource>
<SourceFilename relativeToVRT="0">HDF5:A2015194044000.L2_LAC.SeAHABS.nc://geophysical_data/chlor_a</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="1116" RasterYSize="1610" DataType="Float32" BlockXSize="373" BlockYSize="17" />
<SrcRect xOff="0" yOff="0" xSize="1116" ySize="1610" />
<DstRect xOff="0" yOff="0" xSize="1116" ySize="1610" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>









share|improve this question

























  • Does it work if you separate -geoloc and -te in two commands?

    – AndreJ
    Jul 14 '15 at 9:24













  • Do you mean run gdalwarp with -geoloc first then run with -te again? Haven't tried it yet.

    – user
    Jul 14 '15 at 9:41






  • 1





    From my answer here gis.stackexchange.com/questions/128040/… I guess that gdalwarp -geoloc -of GTIFF -t_srs EPSG:4326 -te ... should run. But you have to use the right values for te, taken from the metadata as reported by gdalinfo.

    – AndreJ
    Jul 14 '15 at 10:23













  • I have tried this with HDF4 files and it worked but when the format became HDF5 it showed that error above.

    – user
    Jul 14 '15 at 11:35











  • The <metadata> should be removed too, or closed before the new section. The lon.vrt and lat.vrt get no GEOLOCATION, only the chlor.vrt.

    – AndreJ
    Jul 20 '15 at 5:19




















2















I have numerous HDF5 files(.nc) which I need to batch process warp using one of the gdal utilities gdalwarp. When I tried to warp the files an error occurred:



INPUT:



gdalwarp -geoloc -te 109.975 3.475 135.025 25.025 HDF5:"@file"://geophysical_data/chlor_a %out_path%@fname.tif"



RESULT:



ERROR 1: Unable to compute a GEOLOC_ARRAY based transformation between pixel/lin
e
and georeferenced coordinates for HDF5:A2015045060500.L2_LAC_OC.nc://geophysical
_data/chlor_a.



Update1:



Just to make it clear, do you mean in lat.vrt, lon.vrt and chlor.vrt I should remove the GCP Id's and MDI key and insert this section:



   <metadata domain="GEOLOCATION">  
<mdi key="X_DATASET">oc-long.vrt</mdi>
<mdi key="X_BAND">1</mdi>
<mdi key="Y_DATASET">oc-lat.vrt</mdi>
<mdi key="Y_BAND">1</mdi>
<mdi key="PIXEL_OFFSET">0</mdi>
<mdi key="LINE_OFFSET">0</mdi>
<mdi key="PIXEL_STEP">1</mdi>
<mdi key="LINE_STEP">1</mdi>
</metadata>


in between this section?



<VRTDataset rasterXSize="1116" rasterYSize="1610">

###### metadata section here #######

<VRTRasterBand dataType="Float32" band="1">
<SimpleSource>
<SourceFilename relativeToVRT="0">HDF5:A2015194044000.L2_LAC.SeAHABS.nc://geophysical_data/chlor_a</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="1116" RasterYSize="1610" DataType="Float32" BlockXSize="373" BlockYSize="17" />
<SrcRect xOff="0" yOff="0" xSize="1116" ySize="1610" />
<DstRect xOff="0" yOff="0" xSize="1116" ySize="1610" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>









share|improve this question

























  • Does it work if you separate -geoloc and -te in two commands?

    – AndreJ
    Jul 14 '15 at 9:24













  • Do you mean run gdalwarp with -geoloc first then run with -te again? Haven't tried it yet.

    – user
    Jul 14 '15 at 9:41






  • 1





    From my answer here gis.stackexchange.com/questions/128040/… I guess that gdalwarp -geoloc -of GTIFF -t_srs EPSG:4326 -te ... should run. But you have to use the right values for te, taken from the metadata as reported by gdalinfo.

    – AndreJ
    Jul 14 '15 at 10:23













  • I have tried this with HDF4 files and it worked but when the format became HDF5 it showed that error above.

    – user
    Jul 14 '15 at 11:35











  • The <metadata> should be removed too, or closed before the new section. The lon.vrt and lat.vrt get no GEOLOCATION, only the chlor.vrt.

    – AndreJ
    Jul 20 '15 at 5:19
















2












2








2








I have numerous HDF5 files(.nc) which I need to batch process warp using one of the gdal utilities gdalwarp. When I tried to warp the files an error occurred:



INPUT:



gdalwarp -geoloc -te 109.975 3.475 135.025 25.025 HDF5:"@file"://geophysical_data/chlor_a %out_path%@fname.tif"



RESULT:



ERROR 1: Unable to compute a GEOLOC_ARRAY based transformation between pixel/lin
e
and georeferenced coordinates for HDF5:A2015045060500.L2_LAC_OC.nc://geophysical
_data/chlor_a.



Update1:



Just to make it clear, do you mean in lat.vrt, lon.vrt and chlor.vrt I should remove the GCP Id's and MDI key and insert this section:



   <metadata domain="GEOLOCATION">  
<mdi key="X_DATASET">oc-long.vrt</mdi>
<mdi key="X_BAND">1</mdi>
<mdi key="Y_DATASET">oc-lat.vrt</mdi>
<mdi key="Y_BAND">1</mdi>
<mdi key="PIXEL_OFFSET">0</mdi>
<mdi key="LINE_OFFSET">0</mdi>
<mdi key="PIXEL_STEP">1</mdi>
<mdi key="LINE_STEP">1</mdi>
</metadata>


in between this section?



<VRTDataset rasterXSize="1116" rasterYSize="1610">

###### metadata section here #######

<VRTRasterBand dataType="Float32" band="1">
<SimpleSource>
<SourceFilename relativeToVRT="0">HDF5:A2015194044000.L2_LAC.SeAHABS.nc://geophysical_data/chlor_a</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="1116" RasterYSize="1610" DataType="Float32" BlockXSize="373" BlockYSize="17" />
<SrcRect xOff="0" yOff="0" xSize="1116" ySize="1610" />
<DstRect xOff="0" yOff="0" xSize="1116" ySize="1610" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>









share|improve this question
















I have numerous HDF5 files(.nc) which I need to batch process warp using one of the gdal utilities gdalwarp. When I tried to warp the files an error occurred:



INPUT:



gdalwarp -geoloc -te 109.975 3.475 135.025 25.025 HDF5:"@file"://geophysical_data/chlor_a %out_path%@fname.tif"



RESULT:



ERROR 1: Unable to compute a GEOLOC_ARRAY based transformation between pixel/lin
e
and georeferenced coordinates for HDF5:A2015045060500.L2_LAC_OC.nc://geophysical
_data/chlor_a.



Update1:



Just to make it clear, do you mean in lat.vrt, lon.vrt and chlor.vrt I should remove the GCP Id's and MDI key and insert this section:



   <metadata domain="GEOLOCATION">  
<mdi key="X_DATASET">oc-long.vrt</mdi>
<mdi key="X_BAND">1</mdi>
<mdi key="Y_DATASET">oc-lat.vrt</mdi>
<mdi key="Y_BAND">1</mdi>
<mdi key="PIXEL_OFFSET">0</mdi>
<mdi key="LINE_OFFSET">0</mdi>
<mdi key="PIXEL_STEP">1</mdi>
<mdi key="LINE_STEP">1</mdi>
</metadata>


in between this section?



<VRTDataset rasterXSize="1116" rasterYSize="1610">

###### metadata section here #######

<VRTRasterBand dataType="Float32" band="1">
<SimpleSource>
<SourceFilename relativeToVRT="0">HDF5:A2015194044000.L2_LAC.SeAHABS.nc://geophysical_data/chlor_a</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="1116" RasterYSize="1610" DataType="Float32" BlockXSize="373" BlockYSize="17" />
<SrcRect xOff="0" yOff="0" xSize="1116" ySize="1610" />
<DstRect xOff="0" yOff="0" xSize="1116" ySize="1610" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>






gdalwarp geolocation hdf






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 20 '15 at 5:47







user

















asked Jul 14 '15 at 7:39









useruser

177212




177212













  • Does it work if you separate -geoloc and -te in two commands?

    – AndreJ
    Jul 14 '15 at 9:24













  • Do you mean run gdalwarp with -geoloc first then run with -te again? Haven't tried it yet.

    – user
    Jul 14 '15 at 9:41






  • 1





    From my answer here gis.stackexchange.com/questions/128040/… I guess that gdalwarp -geoloc -of GTIFF -t_srs EPSG:4326 -te ... should run. But you have to use the right values for te, taken from the metadata as reported by gdalinfo.

    – AndreJ
    Jul 14 '15 at 10:23













  • I have tried this with HDF4 files and it worked but when the format became HDF5 it showed that error above.

    – user
    Jul 14 '15 at 11:35











  • The <metadata> should be removed too, or closed before the new section. The lon.vrt and lat.vrt get no GEOLOCATION, only the chlor.vrt.

    – AndreJ
    Jul 20 '15 at 5:19





















  • Does it work if you separate -geoloc and -te in two commands?

    – AndreJ
    Jul 14 '15 at 9:24













  • Do you mean run gdalwarp with -geoloc first then run with -te again? Haven't tried it yet.

    – user
    Jul 14 '15 at 9:41






  • 1





    From my answer here gis.stackexchange.com/questions/128040/… I guess that gdalwarp -geoloc -of GTIFF -t_srs EPSG:4326 -te ... should run. But you have to use the right values for te, taken from the metadata as reported by gdalinfo.

    – AndreJ
    Jul 14 '15 at 10:23













  • I have tried this with HDF4 files and it worked but when the format became HDF5 it showed that error above.

    – user
    Jul 14 '15 at 11:35











  • The <metadata> should be removed too, or closed before the new section. The lon.vrt and lat.vrt get no GEOLOCATION, only the chlor.vrt.

    – AndreJ
    Jul 20 '15 at 5:19



















Does it work if you separate -geoloc and -te in two commands?

– AndreJ
Jul 14 '15 at 9:24







Does it work if you separate -geoloc and -te in two commands?

– AndreJ
Jul 14 '15 at 9:24















Do you mean run gdalwarp with -geoloc first then run with -te again? Haven't tried it yet.

– user
Jul 14 '15 at 9:41





Do you mean run gdalwarp with -geoloc first then run with -te again? Haven't tried it yet.

– user
Jul 14 '15 at 9:41




1




1





From my answer here gis.stackexchange.com/questions/128040/… I guess that gdalwarp -geoloc -of GTIFF -t_srs EPSG:4326 -te ... should run. But you have to use the right values for te, taken from the metadata as reported by gdalinfo.

– AndreJ
Jul 14 '15 at 10:23







From my answer here gis.stackexchange.com/questions/128040/… I guess that gdalwarp -geoloc -of GTIFF -t_srs EPSG:4326 -te ... should run. But you have to use the right values for te, taken from the metadata as reported by gdalinfo.

– AndreJ
Jul 14 '15 at 10:23















I have tried this with HDF4 files and it worked but when the format became HDF5 it showed that error above.

– user
Jul 14 '15 at 11:35





I have tried this with HDF4 files and it worked but when the format became HDF5 it showed that error above.

– user
Jul 14 '15 at 11:35













The <metadata> should be removed too, or closed before the new section. The lon.vrt and lat.vrt get no GEOLOCATION, only the chlor.vrt.

– AndreJ
Jul 20 '15 at 5:19







The <metadata> should be removed too, or closed before the new section. The lon.vrt and lat.vrt get no GEOLOCATION, only the chlor.vrt.

– AndreJ
Jul 20 '15 at 5:19












1 Answer
1






active

oldest

votes


















2














After some testing, I think that the geoloc is not working properly. So I used the alternative method using manually created vrt files:




  1. Create a file named lon.vrt:



<VRTDataset rasterXSize="1354" rasterYSize="2030">
<SRS>GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]]</SRS>
<VRTRasterBand dataType="Float32" band="1">
<SimpleSource>
<SourceFilename relativeToVRT="1">HDF5:A2015045060000.L2_LAC_OC.nc://navigation_data/longitude</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="1354" RasterYSize="2030" DataType="Float32" BlockXSize="452" BlockYSize="21" />
<SrcRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
<DstRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>




  1. Same for the latitudes in lat.vrt:



<VRTDataset rasterXSize="1354" rasterYSize="2030">
<SRS>GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]]</SRS>
<VRTRasterBand dataType="Float32" band="1">
<SimpleSource>
<SourceFilename relativeToVRT="1">HDF5:A2015045060000.L2_LAC_OC.nc://navigation_data/latitude</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="1354" RasterYSize="2030" DataType="Float32" BlockXSize="452" BlockYSize="21" />
<SrcRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
<DstRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>




  1. and for the data chlor.vrt:



<VRTDataset rasterXSize="1354" rasterYSize="2030">
<metadata domain="GEOLOCATION">
<mdi key="X_DATASET">lon.vrt</mdi>
<mdi key="X_BAND">1</mdi>
<mdi key="Y_DATASET">lat.vrt</mdi>
<mdi key="Y_BAND">1</mdi>
<mdi key="PIXEL_OFFSET">0</mdi>
<mdi key="LINE_OFFSET">0</mdi>
<mdi key="PIXEL_STEP">1</mdi>
<mdi key="LINE_STEP">1</mdi>
</metadata>
<VRTRasterBand band="1" datatype="Float32">
<SimpleSource>
<SourceFilename relativeToVRT="1">HDF5:A2015045060000.L2_LAC_OC.nc://geophysical_data/chlor_a</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="1354" RasterYSize="2030" DataType="Float32" BlockXSize="452" BlockYSize="21" />
<SrcRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
<DstRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>




  1. Do the warping with:



gdalwarp -geoloc -t_srs EPSG:4326 chlor.vrt chlor-out.tif




and the result fits to the shorelines around Borneo:



enter image description here





Alternatively to creating the vrts manually, you can create them with GDAL:



gdal_translate -of VRT HDF5:A2015045060000.L2_LAC_OC.nc://navigation_data/longitude lon.vrt
gdal_translate -of VRT HDF5:A2015045060000.L2_LAC_OC.nc://navigation_data/latitude lat.vrt
gdal_translate -of VRT HDF5:A2015045060000.L2_LAC_OC.nc://geophysical_data/chlor_a chlor.vrt


With a good text editor, remove the GCP lists from all of them, and insert only into the chlor.vrt this section instead:



   <metadata domain="GEOLOCATION">  
<mdi key="X_DATASET">lon.vrt</mdi>
<mdi key="X_BAND">1</mdi>
<mdi key="Y_DATASET">lat.vrt</mdi>
<mdi key="Y_BAND">1</mdi>
<mdi key="PIXEL_OFFSET">0</mdi>
<mdi key="LINE_OFFSET">0</mdi>
<mdi key="PIXEL_STEP">1</mdi>
<mdi key="LINE_STEP">1</mdi>
</metadata>


Then run



gdalwarp -geoloc -t_srs EPSG:4326 -overwrite chlor.vrt chlor-vrt.tif 


to get the same picture as above.





Another solution, working with manually edited GCP points, can be found in my answer for Using GDALwarp for reprojecting netCDF file?






share|improve this answer


























  • I want the output pixel size to be 2488 2141 because later on I'm gonna be using the gdal_calc which requires the image to have the same dimension. How will I do it? Where should I insert the -ts in gdalwarp?

    – user
    Jul 14 '15 at 23:03











  • Will this be possible in batch process?

    – user
    Jul 14 '15 at 23:21











  • You can automate the process by building the vrt files with python code, but I can't help you out on that. Since the swath images are rotated, the size will be different for every flight and day.

    – AndreJ
    Jul 15 '15 at 4:17













  • Does that mean it isn't possible with batch process? Can I reduce the output pixel size by just adding -ts in gdalwarp?

    – user
    Jul 16 '15 at 0:49











  • I don't think you can write the GCP substitution into a batch file. For the -ts, just try it. You might need to add -srcnodata as well.

    – AndreJ
    Jul 16 '15 at 3:54












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "79"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f154339%2funable-to-warp-hdf5-files%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














After some testing, I think that the geoloc is not working properly. So I used the alternative method using manually created vrt files:




  1. Create a file named lon.vrt:



<VRTDataset rasterXSize="1354" rasterYSize="2030">
<SRS>GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]]</SRS>
<VRTRasterBand dataType="Float32" band="1">
<SimpleSource>
<SourceFilename relativeToVRT="1">HDF5:A2015045060000.L2_LAC_OC.nc://navigation_data/longitude</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="1354" RasterYSize="2030" DataType="Float32" BlockXSize="452" BlockYSize="21" />
<SrcRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
<DstRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>




  1. Same for the latitudes in lat.vrt:



<VRTDataset rasterXSize="1354" rasterYSize="2030">
<SRS>GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]]</SRS>
<VRTRasterBand dataType="Float32" band="1">
<SimpleSource>
<SourceFilename relativeToVRT="1">HDF5:A2015045060000.L2_LAC_OC.nc://navigation_data/latitude</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="1354" RasterYSize="2030" DataType="Float32" BlockXSize="452" BlockYSize="21" />
<SrcRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
<DstRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>




  1. and for the data chlor.vrt:



<VRTDataset rasterXSize="1354" rasterYSize="2030">
<metadata domain="GEOLOCATION">
<mdi key="X_DATASET">lon.vrt</mdi>
<mdi key="X_BAND">1</mdi>
<mdi key="Y_DATASET">lat.vrt</mdi>
<mdi key="Y_BAND">1</mdi>
<mdi key="PIXEL_OFFSET">0</mdi>
<mdi key="LINE_OFFSET">0</mdi>
<mdi key="PIXEL_STEP">1</mdi>
<mdi key="LINE_STEP">1</mdi>
</metadata>
<VRTRasterBand band="1" datatype="Float32">
<SimpleSource>
<SourceFilename relativeToVRT="1">HDF5:A2015045060000.L2_LAC_OC.nc://geophysical_data/chlor_a</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="1354" RasterYSize="2030" DataType="Float32" BlockXSize="452" BlockYSize="21" />
<SrcRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
<DstRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>




  1. Do the warping with:



gdalwarp -geoloc -t_srs EPSG:4326 chlor.vrt chlor-out.tif




and the result fits to the shorelines around Borneo:



enter image description here





Alternatively to creating the vrts manually, you can create them with GDAL:



gdal_translate -of VRT HDF5:A2015045060000.L2_LAC_OC.nc://navigation_data/longitude lon.vrt
gdal_translate -of VRT HDF5:A2015045060000.L2_LAC_OC.nc://navigation_data/latitude lat.vrt
gdal_translate -of VRT HDF5:A2015045060000.L2_LAC_OC.nc://geophysical_data/chlor_a chlor.vrt


With a good text editor, remove the GCP lists from all of them, and insert only into the chlor.vrt this section instead:



   <metadata domain="GEOLOCATION">  
<mdi key="X_DATASET">lon.vrt</mdi>
<mdi key="X_BAND">1</mdi>
<mdi key="Y_DATASET">lat.vrt</mdi>
<mdi key="Y_BAND">1</mdi>
<mdi key="PIXEL_OFFSET">0</mdi>
<mdi key="LINE_OFFSET">0</mdi>
<mdi key="PIXEL_STEP">1</mdi>
<mdi key="LINE_STEP">1</mdi>
</metadata>


Then run



gdalwarp -geoloc -t_srs EPSG:4326 -overwrite chlor.vrt chlor-vrt.tif 


to get the same picture as above.





Another solution, working with manually edited GCP points, can be found in my answer for Using GDALwarp for reprojecting netCDF file?






share|improve this answer


























  • I want the output pixel size to be 2488 2141 because later on I'm gonna be using the gdal_calc which requires the image to have the same dimension. How will I do it? Where should I insert the -ts in gdalwarp?

    – user
    Jul 14 '15 at 23:03











  • Will this be possible in batch process?

    – user
    Jul 14 '15 at 23:21











  • You can automate the process by building the vrt files with python code, but I can't help you out on that. Since the swath images are rotated, the size will be different for every flight and day.

    – AndreJ
    Jul 15 '15 at 4:17













  • Does that mean it isn't possible with batch process? Can I reduce the output pixel size by just adding -ts in gdalwarp?

    – user
    Jul 16 '15 at 0:49











  • I don't think you can write the GCP substitution into a batch file. For the -ts, just try it. You might need to add -srcnodata as well.

    – AndreJ
    Jul 16 '15 at 3:54
















2














After some testing, I think that the geoloc is not working properly. So I used the alternative method using manually created vrt files:




  1. Create a file named lon.vrt:



<VRTDataset rasterXSize="1354" rasterYSize="2030">
<SRS>GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]]</SRS>
<VRTRasterBand dataType="Float32" band="1">
<SimpleSource>
<SourceFilename relativeToVRT="1">HDF5:A2015045060000.L2_LAC_OC.nc://navigation_data/longitude</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="1354" RasterYSize="2030" DataType="Float32" BlockXSize="452" BlockYSize="21" />
<SrcRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
<DstRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>




  1. Same for the latitudes in lat.vrt:



<VRTDataset rasterXSize="1354" rasterYSize="2030">
<SRS>GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]]</SRS>
<VRTRasterBand dataType="Float32" band="1">
<SimpleSource>
<SourceFilename relativeToVRT="1">HDF5:A2015045060000.L2_LAC_OC.nc://navigation_data/latitude</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="1354" RasterYSize="2030" DataType="Float32" BlockXSize="452" BlockYSize="21" />
<SrcRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
<DstRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>




  1. and for the data chlor.vrt:



<VRTDataset rasterXSize="1354" rasterYSize="2030">
<metadata domain="GEOLOCATION">
<mdi key="X_DATASET">lon.vrt</mdi>
<mdi key="X_BAND">1</mdi>
<mdi key="Y_DATASET">lat.vrt</mdi>
<mdi key="Y_BAND">1</mdi>
<mdi key="PIXEL_OFFSET">0</mdi>
<mdi key="LINE_OFFSET">0</mdi>
<mdi key="PIXEL_STEP">1</mdi>
<mdi key="LINE_STEP">1</mdi>
</metadata>
<VRTRasterBand band="1" datatype="Float32">
<SimpleSource>
<SourceFilename relativeToVRT="1">HDF5:A2015045060000.L2_LAC_OC.nc://geophysical_data/chlor_a</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="1354" RasterYSize="2030" DataType="Float32" BlockXSize="452" BlockYSize="21" />
<SrcRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
<DstRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>




  1. Do the warping with:



gdalwarp -geoloc -t_srs EPSG:4326 chlor.vrt chlor-out.tif




and the result fits to the shorelines around Borneo:



enter image description here





Alternatively to creating the vrts manually, you can create them with GDAL:



gdal_translate -of VRT HDF5:A2015045060000.L2_LAC_OC.nc://navigation_data/longitude lon.vrt
gdal_translate -of VRT HDF5:A2015045060000.L2_LAC_OC.nc://navigation_data/latitude lat.vrt
gdal_translate -of VRT HDF5:A2015045060000.L2_LAC_OC.nc://geophysical_data/chlor_a chlor.vrt


With a good text editor, remove the GCP lists from all of them, and insert only into the chlor.vrt this section instead:



   <metadata domain="GEOLOCATION">  
<mdi key="X_DATASET">lon.vrt</mdi>
<mdi key="X_BAND">1</mdi>
<mdi key="Y_DATASET">lat.vrt</mdi>
<mdi key="Y_BAND">1</mdi>
<mdi key="PIXEL_OFFSET">0</mdi>
<mdi key="LINE_OFFSET">0</mdi>
<mdi key="PIXEL_STEP">1</mdi>
<mdi key="LINE_STEP">1</mdi>
</metadata>


Then run



gdalwarp -geoloc -t_srs EPSG:4326 -overwrite chlor.vrt chlor-vrt.tif 


to get the same picture as above.





Another solution, working with manually edited GCP points, can be found in my answer for Using GDALwarp for reprojecting netCDF file?






share|improve this answer


























  • I want the output pixel size to be 2488 2141 because later on I'm gonna be using the gdal_calc which requires the image to have the same dimension. How will I do it? Where should I insert the -ts in gdalwarp?

    – user
    Jul 14 '15 at 23:03











  • Will this be possible in batch process?

    – user
    Jul 14 '15 at 23:21











  • You can automate the process by building the vrt files with python code, but I can't help you out on that. Since the swath images are rotated, the size will be different for every flight and day.

    – AndreJ
    Jul 15 '15 at 4:17













  • Does that mean it isn't possible with batch process? Can I reduce the output pixel size by just adding -ts in gdalwarp?

    – user
    Jul 16 '15 at 0:49











  • I don't think you can write the GCP substitution into a batch file. For the -ts, just try it. You might need to add -srcnodata as well.

    – AndreJ
    Jul 16 '15 at 3:54














2












2








2







After some testing, I think that the geoloc is not working properly. So I used the alternative method using manually created vrt files:




  1. Create a file named lon.vrt:



<VRTDataset rasterXSize="1354" rasterYSize="2030">
<SRS>GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]]</SRS>
<VRTRasterBand dataType="Float32" band="1">
<SimpleSource>
<SourceFilename relativeToVRT="1">HDF5:A2015045060000.L2_LAC_OC.nc://navigation_data/longitude</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="1354" RasterYSize="2030" DataType="Float32" BlockXSize="452" BlockYSize="21" />
<SrcRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
<DstRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>




  1. Same for the latitudes in lat.vrt:



<VRTDataset rasterXSize="1354" rasterYSize="2030">
<SRS>GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]]</SRS>
<VRTRasterBand dataType="Float32" band="1">
<SimpleSource>
<SourceFilename relativeToVRT="1">HDF5:A2015045060000.L2_LAC_OC.nc://navigation_data/latitude</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="1354" RasterYSize="2030" DataType="Float32" BlockXSize="452" BlockYSize="21" />
<SrcRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
<DstRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>




  1. and for the data chlor.vrt:



<VRTDataset rasterXSize="1354" rasterYSize="2030">
<metadata domain="GEOLOCATION">
<mdi key="X_DATASET">lon.vrt</mdi>
<mdi key="X_BAND">1</mdi>
<mdi key="Y_DATASET">lat.vrt</mdi>
<mdi key="Y_BAND">1</mdi>
<mdi key="PIXEL_OFFSET">0</mdi>
<mdi key="LINE_OFFSET">0</mdi>
<mdi key="PIXEL_STEP">1</mdi>
<mdi key="LINE_STEP">1</mdi>
</metadata>
<VRTRasterBand band="1" datatype="Float32">
<SimpleSource>
<SourceFilename relativeToVRT="1">HDF5:A2015045060000.L2_LAC_OC.nc://geophysical_data/chlor_a</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="1354" RasterYSize="2030" DataType="Float32" BlockXSize="452" BlockYSize="21" />
<SrcRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
<DstRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>




  1. Do the warping with:



gdalwarp -geoloc -t_srs EPSG:4326 chlor.vrt chlor-out.tif




and the result fits to the shorelines around Borneo:



enter image description here





Alternatively to creating the vrts manually, you can create them with GDAL:



gdal_translate -of VRT HDF5:A2015045060000.L2_LAC_OC.nc://navigation_data/longitude lon.vrt
gdal_translate -of VRT HDF5:A2015045060000.L2_LAC_OC.nc://navigation_data/latitude lat.vrt
gdal_translate -of VRT HDF5:A2015045060000.L2_LAC_OC.nc://geophysical_data/chlor_a chlor.vrt


With a good text editor, remove the GCP lists from all of them, and insert only into the chlor.vrt this section instead:



   <metadata domain="GEOLOCATION">  
<mdi key="X_DATASET">lon.vrt</mdi>
<mdi key="X_BAND">1</mdi>
<mdi key="Y_DATASET">lat.vrt</mdi>
<mdi key="Y_BAND">1</mdi>
<mdi key="PIXEL_OFFSET">0</mdi>
<mdi key="LINE_OFFSET">0</mdi>
<mdi key="PIXEL_STEP">1</mdi>
<mdi key="LINE_STEP">1</mdi>
</metadata>


Then run



gdalwarp -geoloc -t_srs EPSG:4326 -overwrite chlor.vrt chlor-vrt.tif 


to get the same picture as above.





Another solution, working with manually edited GCP points, can be found in my answer for Using GDALwarp for reprojecting netCDF file?






share|improve this answer















After some testing, I think that the geoloc is not working properly. So I used the alternative method using manually created vrt files:




  1. Create a file named lon.vrt:



<VRTDataset rasterXSize="1354" rasterYSize="2030">
<SRS>GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]]</SRS>
<VRTRasterBand dataType="Float32" band="1">
<SimpleSource>
<SourceFilename relativeToVRT="1">HDF5:A2015045060000.L2_LAC_OC.nc://navigation_data/longitude</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="1354" RasterYSize="2030" DataType="Float32" BlockXSize="452" BlockYSize="21" />
<SrcRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
<DstRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>




  1. Same for the latitudes in lat.vrt:



<VRTDataset rasterXSize="1354" rasterYSize="2030">
<SRS>GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]]</SRS>
<VRTRasterBand dataType="Float32" band="1">
<SimpleSource>
<SourceFilename relativeToVRT="1">HDF5:A2015045060000.L2_LAC_OC.nc://navigation_data/latitude</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="1354" RasterYSize="2030" DataType="Float32" BlockXSize="452" BlockYSize="21" />
<SrcRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
<DstRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>




  1. and for the data chlor.vrt:



<VRTDataset rasterXSize="1354" rasterYSize="2030">
<metadata domain="GEOLOCATION">
<mdi key="X_DATASET">lon.vrt</mdi>
<mdi key="X_BAND">1</mdi>
<mdi key="Y_DATASET">lat.vrt</mdi>
<mdi key="Y_BAND">1</mdi>
<mdi key="PIXEL_OFFSET">0</mdi>
<mdi key="LINE_OFFSET">0</mdi>
<mdi key="PIXEL_STEP">1</mdi>
<mdi key="LINE_STEP">1</mdi>
</metadata>
<VRTRasterBand band="1" datatype="Float32">
<SimpleSource>
<SourceFilename relativeToVRT="1">HDF5:A2015045060000.L2_LAC_OC.nc://geophysical_data/chlor_a</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="1354" RasterYSize="2030" DataType="Float32" BlockXSize="452" BlockYSize="21" />
<SrcRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
<DstRect xOff="0" yOff="0" xSize="1354" ySize="2030" />
</SimpleSource>
</VRTRasterBand>
</VRTDataset>




  1. Do the warping with:



gdalwarp -geoloc -t_srs EPSG:4326 chlor.vrt chlor-out.tif




and the result fits to the shorelines around Borneo:



enter image description here





Alternatively to creating the vrts manually, you can create them with GDAL:



gdal_translate -of VRT HDF5:A2015045060000.L2_LAC_OC.nc://navigation_data/longitude lon.vrt
gdal_translate -of VRT HDF5:A2015045060000.L2_LAC_OC.nc://navigation_data/latitude lat.vrt
gdal_translate -of VRT HDF5:A2015045060000.L2_LAC_OC.nc://geophysical_data/chlor_a chlor.vrt


With a good text editor, remove the GCP lists from all of them, and insert only into the chlor.vrt this section instead:



   <metadata domain="GEOLOCATION">  
<mdi key="X_DATASET">lon.vrt</mdi>
<mdi key="X_BAND">1</mdi>
<mdi key="Y_DATASET">lat.vrt</mdi>
<mdi key="Y_BAND">1</mdi>
<mdi key="PIXEL_OFFSET">0</mdi>
<mdi key="LINE_OFFSET">0</mdi>
<mdi key="PIXEL_STEP">1</mdi>
<mdi key="LINE_STEP">1</mdi>
</metadata>


Then run



gdalwarp -geoloc -t_srs EPSG:4326 -overwrite chlor.vrt chlor-vrt.tif 


to get the same picture as above.





Another solution, working with manually edited GCP points, can be found in my answer for Using GDALwarp for reprojecting netCDF file?







share|improve this answer














share|improve this answer



share|improve this answer








edited 18 mins ago

























answered Jul 14 '15 at 11:56









AndreJAndreJ

69.1k563127




69.1k563127













  • I want the output pixel size to be 2488 2141 because later on I'm gonna be using the gdal_calc which requires the image to have the same dimension. How will I do it? Where should I insert the -ts in gdalwarp?

    – user
    Jul 14 '15 at 23:03











  • Will this be possible in batch process?

    – user
    Jul 14 '15 at 23:21











  • You can automate the process by building the vrt files with python code, but I can't help you out on that. Since the swath images are rotated, the size will be different for every flight and day.

    – AndreJ
    Jul 15 '15 at 4:17













  • Does that mean it isn't possible with batch process? Can I reduce the output pixel size by just adding -ts in gdalwarp?

    – user
    Jul 16 '15 at 0:49











  • I don't think you can write the GCP substitution into a batch file. For the -ts, just try it. You might need to add -srcnodata as well.

    – AndreJ
    Jul 16 '15 at 3:54



















  • I want the output pixel size to be 2488 2141 because later on I'm gonna be using the gdal_calc which requires the image to have the same dimension. How will I do it? Where should I insert the -ts in gdalwarp?

    – user
    Jul 14 '15 at 23:03











  • Will this be possible in batch process?

    – user
    Jul 14 '15 at 23:21











  • You can automate the process by building the vrt files with python code, but I can't help you out on that. Since the swath images are rotated, the size will be different for every flight and day.

    – AndreJ
    Jul 15 '15 at 4:17













  • Does that mean it isn't possible with batch process? Can I reduce the output pixel size by just adding -ts in gdalwarp?

    – user
    Jul 16 '15 at 0:49











  • I don't think you can write the GCP substitution into a batch file. For the -ts, just try it. You might need to add -srcnodata as well.

    – AndreJ
    Jul 16 '15 at 3:54

















I want the output pixel size to be 2488 2141 because later on I'm gonna be using the gdal_calc which requires the image to have the same dimension. How will I do it? Where should I insert the -ts in gdalwarp?

– user
Jul 14 '15 at 23:03





I want the output pixel size to be 2488 2141 because later on I'm gonna be using the gdal_calc which requires the image to have the same dimension. How will I do it? Where should I insert the -ts in gdalwarp?

– user
Jul 14 '15 at 23:03













Will this be possible in batch process?

– user
Jul 14 '15 at 23:21





Will this be possible in batch process?

– user
Jul 14 '15 at 23:21













You can automate the process by building the vrt files with python code, but I can't help you out on that. Since the swath images are rotated, the size will be different for every flight and day.

– AndreJ
Jul 15 '15 at 4:17







You can automate the process by building the vrt files with python code, but I can't help you out on that. Since the swath images are rotated, the size will be different for every flight and day.

– AndreJ
Jul 15 '15 at 4:17















Does that mean it isn't possible with batch process? Can I reduce the output pixel size by just adding -ts in gdalwarp?

– user
Jul 16 '15 at 0:49





Does that mean it isn't possible with batch process? Can I reduce the output pixel size by just adding -ts in gdalwarp?

– user
Jul 16 '15 at 0:49













I don't think you can write the GCP substitution into a batch file. For the -ts, just try it. You might need to add -srcnodata as well.

– AndreJ
Jul 16 '15 at 3:54





I don't think you can write the GCP substitution into a batch file. For the -ts, just try it. You might need to add -srcnodata as well.

– AndreJ
Jul 16 '15 at 3:54


















draft saved

draft discarded




















































Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f154339%2funable-to-warp-hdf5-files%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Щит и меч (фильм) Содержание Названия серий | Сюжет |...

is 'sed' thread safeWhat should someone know about using Python scripts in the shell?Nexenta bash script uses...

Meter-Bus Содержание Параметры шины | Стандартизация |...