1

I have a little experience with GDAL using the command line. However I am not sure where to start with this issue as it deals with adding projection to an image and I have never done it from scratch.

I have a PNG image (radar/rain data) that I need to convert to geoTIF. I was told what the projection and bounding coordinates are, but I am not sure if I have enough information or even if I am doing it right.

Here is the information I was given :

Longitude: -102.328, -93.7296
Latitude: 26.0468, 33.3013
Projection: AzimuthalEquidistant.

For additional clues, I know the image was generated by in python with Py-Art (weather radar tools). I found information on projection output with this tool at this link, which states about image generation :

The GeoTIFF can be the standard Azimuthal Equidistant projection used in Py-ART, or a lat/lon projection on a WGS84 sphere.

So, I know the image was generated using the first option, but is this enough information to properly georeference my image? I see projection code in that link but it seems it is for their latter option (non standard Azimuthal Equidistant Projection). My end goal is to get the PNG projected to EPSG:3857 for Mapbox, but I am not sure how to get there. Here is what I have tried :

So, from what I read online, Azimuthal Equidistant Projection is also known as EPSG:4326. Perhaps what I am trying is too simple - but here was my command using what I believe are the coordinates and projection :

gdal_translate -of Gtiff -a_ullr -102.328 33.3013 -93.7296 26.0468 -a_srs EPSG:4326 image.png image2.tif

I then used this command to get to EPSG:3857 :

gdalwarp -t_srs EPSG:3857 image2.tif image2-projected.tif

I verified that the final image was wrong (image2-projected.tif).

What am I doing wrong? I see from other examples online that there are "proj4" strings and SRS data, but I don't exactly understand what needs to be added and how to add it (if anything.)

Last, here is the image itself for completeness, and this is a public google drive link to get the actual PNG :

enter image description here

3
  • Related gis.stackexchange.com/questions/173766/… > -wo SOURCE_EXTRA=1000 – Mapperz Mar 9 '20 at 3:56
  • Hi, I saw the link there. Are you saying that code "without" the SOURCE_EXTRA component would guide me? I am confused – David Mar 9 '20 at 3:59
  • Ah, I see their line of code.. "gdalwarp -overwrite -s_srs EPSG:3857 -t_srs EPSG:102016 -ts 8192 8192 -wo SOURCE_EXTRA=1000 -of GTiff F:/Karten/merc_corrected.tif F:/Karten/world_aeqd.tif " but I am not sure what -ts means or how this could apply to my issue. – David Mar 9 '20 at 4:03
1

Commands:

$ gdal_translate -of VRT -a_srs EPSG:4326 -a_nodata 255 3lXUn.png 3lXUn.vrt -a_ullr -102.328 33.3013 -93.7296 26.0468
$ gdalwarp -overwrite -s_srs EPSG:4326 -t_srs EPSG:3857 -co COMPRESS=LZW 3lXUn.vrt 3lXUn.tif

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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