Tag Info

New answers tagged

0

Unfortunately, the only answer I found was to dive into C/C++ instead of the C# wrapper. There just wasn't enough exposed functionality for me to using the C# wrapper.


4

Reorganise your shapefile so that one shapefile contains one feature (A,B,C in your case) only Then use a loop like for i in A B C; do gdalwarp -cutline $i.shp ... $i.tif done to create each output raster. Example of script: #!/bin/sh # "shp" - folder for shapefiles # "outputraster" - folder for output rasters cd /home/user/cliprasters/ # ...


1

Since the png file has no georeferencing information, you have to georeference the file manually. This is rather simple if you have QGIS, and use Natural Earth shapefiles as reference, or the Openstreetmap background from the Openlayers plugin. Gdalwarp needs GCP ( Ground control points), and you get those with QGIS by just clicking on the image and on the ...


0

you can use batch hegtool, read this: http://newsroom.gsfc.nasa.gov/sdptoolkit/HEG/HEGFAQ_CLI.html and this: http://newsroom.gsfc.nasa.gov/sdptoolkit/HEG/HEG_Batch_job_Help.htm


2

Here is an example that does roughly what you ask for. The main parameters are the geotransform array that gdal uses to describe a raster location (position, pixel scale, and skew) and the epsg code of the projection. With that, the following code should properly georeference the raster and specify its projection. I did not test this much, but it seemed to ...


1

Assuming you have saved the output of your GCP points, can you compare the values in this file with the auto-generated script? I've noticed that the script rounds values; I wonder if this could be introducing a source of error.


0

1) Looks good, but you can crop, warp and convert data into XYZ with a single command by addind parameter -of XYZ to your gdalwarp command. However, some file formats are not good targets for gdalwarp which must append data to initialized target while the warping process is progressing. Make a trial and test if using tiff as on interim format is faster or ...


0

Apparently, I am not specifying the gdal parameters correctly. After getting bitten by this almost 2 years later in a different manner, kwbeam answered a question regarding horizontal artifacts in gdal which applies directly to this question as well. The short answer is that you have to make the error tolerance very small in the gdalwarp command. I ...


2

Try adding the -et (error threshold) option with lower thresholds than the default (0.125). When I use "-et 0.01", the horizontal artifacts disappear: gdalwarp -t_srs "+proj=stere +lat_0=90 +lon_0=-45 +lat_ts=70 +ellps=WGS84 +datum=WGS84 +units=m" \ -et 0.01 \ ./UiMbqSd.withmetadata.tif ./regridded_lon0_-45.tif


0

Try changing the resampling method for gdalwarp, e.g. gdalwarp -r mode etc. etc. which seems to remove your problem. What makes most sense will be different for different data.


0

Here is a solution as windows batch script, maybe it'll help: set in_path=path_to_stored_hdfs set out_path=path_to_proccessed_ones md %out_path% cd /d %in_path% FORFILES /m *L2_LAC*.hdf /C "cmd /c gdalwarp -geoloc -t_srs EPSG:4326 -te 113.205 1.120 157.105 2.005 HDF4_SDS:hdf:@file:01 %out_path%\@fname.tif" Where /m is a mask to match desired filenames ...


0

This turned out to be much simpler than I thought. I already knew my 'rectangular' UTM coordinates and the 'real' UTM location of the corners. I could then use that info along with the image size to calculate the pixel positions of the 'real' corners and use those to warp the image.



Top 50 recent answers are included