[gradsusr] Generating image overlay for Open Street Map / Mercator Projection

Jonas Kaufmann me at j0nes.de
Wed Jun 6 05:53:55 EDT 2012


Hello Angelo,

thank you for your help! Would the resulting ctl file in my case (GFS
0.5 degrees) look like this then?

xdef 720 levels 0 0.5 1 1.5 (etc)
ydef 360 levels -90 -89.5 -89 (etc)

Thanks again for your help!

Best regards,

Jonas

On Tue, Jun 5, 2012 at 6:16 PM, Angelo Bertozzi
<angelo.bertozzi at meteocenter.it> wrote:
> hi
> I've a method for producing map overlay with Grads in mercator projection,
> but is not so straightforward
>
> i'm starting from rotated lat-lon or lambert conformal preprojected data in
> grib files
> 1) remove pdef directives in ctl files and sobstitute the "linear"
> progression in xdef and ydef with "levels" directive with the list of
> latitudes (ydef) and longitudes (xdef) of any single grid nodes
> This steps in my case is producing a huge .ctl files (the grib ctl files
> describing a 1600x2000 grid); a perl text-manipulation script is doing this
> work
> 2) plot a tiff image with "set gxout kml",
> 3) converting and rescaling with imagemagick the *tiff image in PNG
>
>
>
>
> 2012/6/5 Jonas Kaufmann <me at j0nes.de>
>>
>> Hello,
>>
>> do you have an idea how to use 'set gxout geotiff' to generate
>> displayable PNG images for use on a map software? Or do you have any
>> other hints how Mercator projection in GrADS works?
>>
>> Thank you for your help!
>>
>> Jonas
>>
>> On Fri, Jun 1, 2012 at 10:55 AM, Jonas Kaufmann <me at j0nes.de> wrote:
>> > Hello,
>> >
>> > thank you for your answer! Too bad there is no support for Mercator
>> > projection available (yet).
>> >
>> > I just had a look at the GeoTIFF output, but I did not succeed in
>> > creating a PNG (or whatever) file that I could overlay on OSM or
>> > Google Maps. The tif file gets created, but it is looking almost
>> > completely black when viewing with an image viewer (but I think this
>> > is expected behaviour?). I have tried to convert it to PNG using the
>> > GDAL tools with gdal_translate, but I only get grayscale noise images.
>> >
>> > Can someone explain the correct workflow to go from 'set gxout
>> > geotiff' to a displayable PNG image?
>> >
>> > Thank you for your help!
>> >
>> >
>> > Jonas
>> >
>> >
>> > On Thu, May 31, 2012 at 5:05 PM, Chris Slocum
>> > <cslocum at atmos.colostate.edu> wrote:
>> >> Hi Jonas,
>> >>
>> >> I too have been looking for a Mercator projection to
>> >> use with something like Open Street Map. To date,
>> >> I do not think there is a public extension for a Mercator
>> >> projection but the idea has been bounced around.
>> >>
>> >> I know that Weather Underground had someone
>> >> develop the projection for their WunderMap so it
>> >> is possible to do.
>> >>
>> >> In the interim, you could look at the GeoTIFF option.
>> >>
>> >> -Chris
>> >>
>> >>
>> >>
>> >> On Thu, May 31, 2012 at 6:46 AM, Jonas Kaufmann <me at j0nes.de> wrote:
>> >>>
>> >>> Hello,
>> >>>
>> >>> I am trying to generate an image with GrADS that should cover the
>> >>> whole world. The image should be based on an forecast from the GFS
>> >>> model. I want to use this image as a layer on top of Open Street Map.
>> >>>
>> >>> I can already create an image without borders, labels etc that I can
>> >>> put on my map. However it seems that the projection still is wrong,
>> >>> e.g. the continent borders drawn by GrADS do not match the borders on
>> >>> the map. I think this might be related to the map projection used, in
>> >>> OSM this should be Mercator projection which is not available in
>> >>> GrADS. The complete script can be found at the bottom of the mail.
>> >>>
>> >>> Is there a way to make the forecast map fit on OSM?
>> >>>
>> >>>
>> >>> Thank you for your help!
>> >>>
>> >>>
>> >>> Jonas
>> >>>
>> >>>
>> >>> -------
>> >>>
>> >>> 'open gfs'
>> >>>
>> >>> 'set gxout shaded'
>> >>> 'set parea 0 11 0 8.5'
>> >>> 'set mpdraw off'
>> >>> 'set frame off'
>> >>> 'set xlab off'
>> >>> 'set ylab off'
>> >>> 'set mproj latlon'
>> >>> 'set grads off'
>> >>>
>> >>> 'set mpdset hires'
>> >>> 'set map 1 1 1'
>> >>>
>> >>> 'set lon -180 180'
>> >>> 'set lat -90 90'
>> >>>
>> >>> 'd mag(ugrd10m, vgrd10m)'
>> >>>
>> >>> 'printim world.png x512 y512'
>> >>> 'quit'
>> >>> _______________________________________________
>> >>> gradsusr mailing list
>> >>> gradsusr at gradsusr.org
>> >>> http://gradsusr.org/mailman/listinfo/gradsusr
>> >>
>> >>
>> >>
>> >> _______________________________________________
>> >> gradsusr mailing list
>> >> gradsusr at gradsusr.org
>> >> http://gradsusr.org/mailman/listinfo/gradsusr
>> >>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
>
>
> --
> ------------------------------------------------------------------------
> Bertozzi Angelo
> Meteorologist - HPCC admin & research
> Atmospheric and Environmental numerical modeling division - head
> Mobile 345-71.335.07 - Office 0546-046207
> METEOCENTER (Sms Srl)
> Parco delle Arti e delle Scienze "TORRICELLI" - Via Albert Einstein, 8 -
> 48018 FAENZA (RA) - ITALY
>
> -------------------------------------------------------------------------
> Le informazioni contenute in questa e-mail e negli eventuali allegati sono
> riservate e destinate esclusivamente alla persona sopraindicata. Qualora non
> foste il destinatario, siete pregati di distruggere questo messaggio e
> notificarci il problema immediatamente. In ogni caso, non dovrete spedire a
> terzi, copiare, usare o diffondere il contenuto di questa e-mail e degli
> eventuali allegati. Si ricorda che la diffusione l'utilizzo e/o la
> conservazione dei dati ricevuti per errore costituiscono violazione alle
> disposizioni del D.lgs. n. 196/2003 (Codice in materia di protezione dei
> dati personali) oltre a costituire violazione di carattere penale ai sensi
> dell'art. 616 Codice penale (Violazione, sottrazione e soppressione di
> corrispondenza).
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>



More information about the gradsusr mailing list