Re: Error with MapProjection::Forward [message #86670 is a reply to message #86669] |
Wed, 27 November 2013 08:38   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Madhavan Bomidi writes:
> The problems I noticed are ...
>
> (1) The google static map link provided top of my code shows a high resolution map while the lat-lon axis overlaying google map in the code is at a low resolution. I wanted to have the map at a high resolution because my overlaying points are very close by. Can you where I am going wrong?
I'm not sure what you mean by "low resolution". My guess is that you are
referring to Hershey fonts in the display window. Yes, they are not as
nice as the function graphics fonts. This is usually not much of a
problem, since the point of Coyote Graphics is to produce "high
resolution" raster and PostScript output. The "low resolution" you see
will be fixed as soon as you try to share your result with someone. :-)
If you mean by "low resolution" that you want to zoom into the area
more, you do that by setting the zoom factor. Setting the zoom to 18 or
20 spreads the points out.
> (2) I guess I am doing something wrong with cgDisplay and cgImage while providing the dimensions. How to provide these dimensions for any google static map while overlaying the axis?
I'm not sure I understand this question, but it is probably related to
too much hard-coding of numbers in the code I wrote. I could make it
more general by using the Keep_Aspect keyword on the cgImage command and
by using the "output" position of the image in the window as the
position for the map projection (with the OPOS keyword to cgImage). You
can use the Aspect keyword to cgDisplay to match the aspect ratio of the
image, if that is what you want.
I'll see if I can find the time today (I am suppose to be cleaning the
house for my wife while she cooks!) to make the change.
> (3) Can anyone provide me an example to include different colors for
my points with CgPlots and also text / label near the point?
I guess I would use the Color keyword to specify whatever color you wanted.
numColors = N_Elements(geo_lon)
cgLoadCT, 33, NColors=numColors
cgPlotS, geo_lon, geo_lat, COLOR=Bindgen(numColors), $
PSYM=16, SYMSIZE=1.2,MAP_OBJECT=mapCoord
You put text near a point by using the location of the point and
"offsetting" the location a bit. I find the ALIGNMENT keyword to cgText
to be useful when doing this. This always requires some trial and error
to get things looking the way you want them to. There is no general way
to do this. If I want the offset distance in device coordinates, I have
to make sure to translate device coordinates to data coordinates. This
is the purpose of the Convert_Coord function in IDL.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|