Importing a Polar Plot to GM
acgardiner
Global Mapper UserTrusted User
Is it possible to import into GM a set of signal coverage contours? I have an Excel file which includes in one column degrees (every 5 degrees from 0 to 360) and distance in kilometres in the other. The only GIS information I have for the contours are the latitude and longitude of the transmitter site. I need to display each contour as a continuous black line which typically appears as a cardioid pattern.
Comments
-
There really is not any support for something like that (i.e. a file listing angles and distances instead of coordinates) right now. What you could maybe do in Excel is create a formula to create new columns with the actual X and Y coordinates associated with each distance angle pair. Then you could save a CSV file from Excel with the X and Y coordinate columns and load that into Global Mapper.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
So I guess what I need to do is find a formula (using plane geometry as opposed to spherical since I'm dealing with distances of less than 100 km) that converts the points, expressed in polar coordinates, to latitude & longitude. Whew!! Where to start - guess I'll try browsing if I can come up with the right key words...............
-
That should work. For planar geometry, try the following:
new_lon = orig_lon + ( dist / 108000 ) * cos( angle ) / cos( start_lat )
new_lat = orig_lat + ( dist / 108000 ) * sin( angle )
Note that the division by 108,000 is to approximate converting the distance from meters to degrees.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Mike,
Just to confirm, is that formula based on degrees (as opposed to radians) and kilometres (as opposed to miles or whatever)?? -
The formula assumes distances in meters. The formula doesn't specify degrees or radians, just convert as appropriate for whatever the sin and cos functions in Excel expect.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
I am assuming that zero degrees is true north so assume (I believe you assumed zero degrees would be on the positive x-axis) so I believe your formulas would read:
new_lat = orig_lat + (dist/108000) * cos(angle)
new_lon = orig_lon + (dist/108000) * sin(angle) / sin(start_lat)
But I'm confused over the last expression in calculating longitude, i.e. sin(start/lat). Do you mean the starting latitude in decimal degrees? -
The divide factor should remain cos( start_lat ) as the angle of the starting latitude is not dependent on whether you are using cartesian or cartographic angles. This factor is for adjusting for the curvature of the earth and the fact that lines of longitude get closer together as you get away from the equator. Thus it takes more degrees of longitude to get a set distance than it does degrees of latitude as you get further from the equator. The equation obviously fails at the poles, which is why a rigorous implementation would obviously use a much more complex algorithm that would be a pain to implement in Excel.
I also think that rather than flipping sin and cos for the other angles that you should convert your cartographic angle to cartesian with the following formula (angles in degrees):
cartesian_angle = 90 - cartographic_angle
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
But changing to cartesian won't improve the accuracy will it?global_mapper wrote: »
I also think that rather than flipping sin and cos for the other angles that you should convert your cartographic angle to cartesian with the following formula (angles in degrees):
cartesian_angle = 90 - cartographic_angle
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
No, won't affect the accuracy, I just haven't thought through whether flipping the sin and cos will work in all cases, so I suggested the alternative that I know should work. If you know flipping the sin and cos will work in all quadrants then go with that.
-
global_mapper wrote: »No, won't affect the accuracy, I just haven't thought through whether flipping the sin and cos will work in all cases, so I suggested the alternative that I know should work. If you know flipping the sin and cos will work in all quadrants then go with that.
Works like a hot darn! Many, many thanks again, Mike, for the fabulous srvice!
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website