X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 05 Mar 2014 01:16 AM by  anon
Map clip not working?
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
05 Mar 2014 01:16 AM
    Hi, with IDL 8.3 on 32-bit windows7, MAP can not clip the lon/lat lines outside the image boundary. Why, thanks! ; Define the data by reading the image into IDL, ; creating the daymap variable to hold the data. READ_JPEG, FILEPATH('Day.jpg', $ SUBDIR=['examples','data']), daymap ; Define the latitude and longitude data for the contour. longitude = FINDGEN(360) - 180 latitude = FINDGEN(180) - 90 cntrdata = SIN(longitude/30) # COS(latitude/30) ; Display the global image. map2 = IMAGE(daymap, $ LIMIT=[-90,-180,90,180], GRID_UNITS=2, $ IMAGE_LOCATION=[-180,-90], IMAGE_DIMENSIONS=[360,180],$ MAP_PROJECTION='Mollweide') ; Draw the contour on top of the map image. cntr2 = CONTOUR(cntrdata, longitude, latitude, $ GRID_UNITS=2, N_LEVELS=10, RGB_TABLE=34, /OVERPLOT)

    Deleted User



    New Member


    Posts:
    New Member


    --
    05 Mar 2014 10:40 AM
    Dear Dai, If you run that example code no lat/lon lines are drawn outside the coord frame, unless you zoom in. Is that what you are doing? Cheers, Fernando

    Deleted User



    New Member


    Posts:
    New Member


    --
    05 Mar 2014 06:52 PM
    Yes, when I zoom in and lon/lat lines were not clipped.

    Deleted User



    New Member


    Posts:
    New Member


    --
    06 Mar 2014 02:51 PM
    Dear Dai, I see. Well, I have passed this information to engineering. They will take a look at it. As a workaround, I think the following can help: READ_JPEG, FILEPATH('Day.jpg', $ SUBDIR=['examples','data']), daymap ; Define the latitude and longitude data for the contour. longitude = FINDGEN(360) - 180 latitude = FINDGEN(180) - 90 cntrdata = SIN(longitude/30) # COS(latitude/30) ; Display the global image. map2 = IMAGE(daymap, $ LIMIT=[-90,-180,90,180], GRID_UNITS=2, $ IMAGE_LOCATION=[-180,-90], IMAGE_DIMENSIONS=[360,180],$ MAP_PROJECTION='Mollweide') ; Hide the original map grid: grid1 = map2.MAPGRID grid1.LINESTYLE = 6 grid1.LABEL_SHOW = 0 ; Create a NEW map grid. grid2 = MAPGRID(COLOR="red", $ TRANSPARENCY=0, $ LONGITUDE_MIN=-180, LONGITUDE_MAX=180, $ LATITUDE_MIN=-90, LATITUDE_MAX=90, $ GRID_LONGITUDE=10, GRID_LATITUDE=10, $ LABEL_SHOW=0) end I hope this helps for now. Cheers, Fernando
    You are not authorized to post a reply.