3

I have a collection of images from a rain radar which show intensity. I have loaded the images and create a matrix of pixel colours.

What I need to do next is generate a set of coordinates for each pixel of the image. I have been given the following information about the projection:


02 Melbourne (512 km)
projection = Gnomonic
center_longitude =     144.75200
center_latitude  =     -37.85200
lon0 =     138.56821
lat0 =     -42.27182
lon1 =     139.29153
lat1 =     -33.11378
lon2 =     150.25096
lat2 =     -33.11209
lon3 =     150.97934
lat3 =     -42.26946

My problem really comes down to my lack of understanding of the Gnomonic project, from what I understand it's not as simple as pick the correct coordinate system from QGIS, and the projection is conditional to the center coordinates.

I would really like some tips to send me in the right direction, I am open to using a python package or using QGIS or a combination of the two.

1
  • You can create your own custom coordinate system in QGIS and it should work just fine... but why? You're not going to project the raster; is it to be converted to points and then projected to another coordinate system? It seems to me though a datum and spheroid needs to be included, perhaps your projection information is incomplete, where did it come from? – Michael Stimson Aug 25 '16 at 4:33
5

According to http://www.remotesensing.org/geotiff/proj_list/gnomonic.html, you need the center coordinates (which you have), and false Easing and Northing (which can be set to zero).

As a first guess (and GDAL default), the ellipsoid can be assumed as WGS84.

What you still need is the extent of the image in projected coordinates. You have four coordinates, but in degrees. So you need cs2cs to convert the degrees to projected coordinates:

cs2cs +init=epsg:4326 +to +proj=gnom +lat_0=-37.852 +lon_0=144.752 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs -f "%%.3f"<in.txt >>out.txt

Then use

gdal_transform -a_srs "+proj=gnom +lat_0=-37.852 +lon_0=144.752" -a_ullr <upper left & lower right X & Y coordinates> infile outfile

to apply the georeference to your file.

2
  • The in.txt file, I assume is the coordinate, what is the data structure of the coordinates? I haven’t used cs2cs before – Lauren Oct 16 '18 at 7:50
  • @Lauren in.txt just contains longitudes and latitudes separated by blanks, Southern and Western coordinates negative, one line for every point. – AndreJ Oct 16 '18 at 8:08

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.