comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » shapefile not in lat/lon
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Transparent Polygon Shapes Displayed on a Map [message #86750 is a reply to message #86716] Sun, 01 December 2013 11:18 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> I wanted to put this on a Google map so I could make sure it was located
> correctly, so then it was simply a matter of converting these Transverse
> Mercator coordinates, using the GRS 1980 datum, into the Google Mercator
> coordinates, with the WGS84 datum, of the Google map:
>
> roi = cgExtractShape(shapefile, 'LAYER', 'RICHELIEU')
> roi -> GetProperty, DATA=xy
> ll = Map_Proj_Inverse(xy[0,*], xy[1,*], MAP=utmmap->GetMapStruct())
> xy = Map_Proj_Forward(ll[0,*], ll[1,*], MAP=googlemap->GetMapStruct())
> roi -> SetProperty, DATA=xy
> cgDraw_ROI, roi, /Outline, Color='red', Thick=4
>
> Wahla! Perfect. :-)

I learned a lot (and had to update some software!) from this experience.
You can find an article about how I went about displaying a transparent
polygon shape from a shapefile on a map in this article:

http://www.idlcoyote.com/map_tips/transpoly.php

I spent about 15 hours of my time over the past four days figuring this
out and writing an article about it. No one pays me to do this. I do it
because I like to. In the last 10 years I have probably put in 20 hours
a week supporting IDL users here, through e-mail, and on my web page at
no charge to anyone. But, this kind of support for IDL users will be
coming to an end by the end of this year unless I can find some way to
keep doing it.

If this matters to you, if you use the Coyote Library, if you appreciate
the articles on this web page, if I have answered your questions though
e-mail, then I encourage you to take a moment and show your support by
making a donation to this work. I am coming to the reluctant conclusion
that what I do with IDL has no economic value. If this is true, then I
have to find something else to do, and quickly.

A donation in whatever amount you can afford and consider reasonable
will be gratefully appreciated. I love to do this work. It really is the
only thing I have ever wanted to do. I hope it is valuable to you, too.
You can make a donation here if you wish to do so:

http://www.idlcoyote.com/coyotestore/index.php?main_page=ind ex&cPath=67

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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Simpler Raster Output
Next Topic: Errorbar plot with max-min boundaries and bar plot with !P.Multi

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Nov 30 11:08:45 PST 2025

Total time taken to generate the page: 0.48288 seconds