3

I am trying to reproject an equirectangular projection image into stereographic around the north pole of mars using gdalwarp and I am not sure what is happening in my output image.

Output of gdalwarp

The input image is a normal looking rectangular image with no black regions. Zooming in to the missing wedge region I can see that not all of the pixels from the input image are present in the output image.

My gdalwarp command:

gdalwarp map_upper_crop.tif map_north_pole.tif -t_srs "+proj=stere +lon_0=0 +lat_0=90 +a=3396200 +b=3376200 units=m"

gdalinfo output on the input image:

Driver: GTiff/GeoTIFF
Files: projection_space_basemap_top.tif
Size is 11520, 1035
Coordinate System is:

PROJCS["unnamed",  
    GEOGCS["unnamed ellipse",  
        DATUM["unknown",  
            SPHEROID["unnamed",3396200,169.8100000000004]],  
        PRIMEM["Greenwich",0],  
        UNIT["degree",0.0174532925199433]],  
    PROJECTION["Equirectangular"],  
    PARAMETER["latitude_of_origin",0],  
    PARAMETER["central_meridian",0],  
    PARAMETER["standard_parallel_1",0],  
    PARAMETER["false_easting",0],  
    PARAMETER["false_northing",0],  
    UNIT["metre",1,  
        AUTHORITY["EPSG","9001"]]]  

PROJ.4 string is:
'+proj=eqc +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=3396200 +b=3376200 +units=m +no_defs '
Origin = (-10669477.099999999627471,5334738.599999999627471)
Pixel Size = (1852.339774305555466,-1852.339791666666542)
Metadata:
AREA_OR_POINT=Area
TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
TIFFTAG_XRESOLUTION=1024
TIFFTAG_YRESOLUTION=1024
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left (-10669477.100, 5334738.600) (179d59'59.99"E, 90d 0' 0.01"N)
Lower Left (-10669477.100, 3417566.916) (179d59'59.99"E, 57d39'22.50"N)
Upper Right (10669477.100, 5334738.600) (179d59'59.99"W, 90d 0' 0.01"N)
Lower Right (10669477.100, 3417566.916) (179d59'59.99"W, 57d39'22.50"N)
Center ( 0.000, 4376152.758) ( 0d 0' 0.01"E, 73d49'41.26"N)

Any idea what is going wrong here?

1
  • You could try with adding some warping options gdal.org/…. I would test with -wo sample_grid=yes, -wo sample_step=100, -wo source_extra=2
    – user30184
    Aug 20, 2015 at 4:50

1 Answer 1

2

I was able to get the correct output by adding the following options to my gdalwarp command:

-wo sample_grid=yes, -wo sample_steps=1000, -wo source_extra=2 -wo CUTLINE_ALL_TOUCHED=true -r cubic

Thank you user30184 for pointing these out!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.