|
ZL3AI > APRDIG 01.05.07 01:01l 235 Lines 8986 Bytes #999 (0) @ WW
BID : 10081-ZL3AI
Read: GUEST
Subj: [APRSSIG] Vol 34 #18, 1/2
Path: DB0FHN<DB0FOR<DB0SIF<DB0MRW<DK0WUE<F4BWT<SR1BSZ<IW2OAZ<ZL2BAU
Sent: 070430/2249Z @:ZL2BAU.#79.NZL.OC #:45473 [Waimate] $:10081-ZL3AI
From: ZL3AI@ZL2BAU.#79.NZL.OC
To : APRDIG@WW
Today's Topics:
1. Map Symbol Placement (M J)
2. Re: Map Symbol Placement (Curt, WE7U)
3. RE: Map Symbol Placement ('Scott Miller')
4. Re: Map Symbol Placement (Curt, WE7U)
5. RE: Map Symbol Placement ('Scott Miller')
6. RE: Map Symbol Placement (Curt, WE7U)
7. RE: Map Symbol Placement (Curt, WE7U)
8. Re: Map Symbol Placement (Tom Russo)
----------------------------------------------------------------------
Message: 1
Date: Thu, 19 Apr 2007 08:06:46 -0700 (PDT)
From: M J <mjandthegang_at_yahoo.com>
Subject: [aprssig] Map Symbol Placement
I notice that within some APRS programs, it is necessary to identify two
lat/lon points on a map, and link them to the corresponding map's pixels.
Has anyone more publicly documented the equations used to plot a symbol on
a map if you know the lat/lon that the symbol is supposed to appear on
(once you know the previous info)? I'm interested in learning more about
that. Thanks! MJ
------------------------------
Message: 2
Date: Thu, 19 Apr 2007 08:32:08 -0700 (PDT)
From: "Curt, WE7U" <archer_at_eskimo.com>
Subject: Re: [aprssig] Map Symbol Placement
On Thu, 19 Apr 2007, M J wrote:
>I notice that within some APRS programs, it is necessary to
>identify two lat/lon points on a map, and link them to the
>corresponding map's pixels. Has anyone more publicly documented
>the equations used to plot a symbol on a map if you know the
>lat/lon that the symbol is supposed to appear on (once you know
>the previous info)? I'm interested in learning more about that.
>Thanks! MJ
I've worked on the code for this before. First the program translates the
pixels & locations you gave it to the pixels at diagonal map corners. Once
you have the new numbers you have the beginning/ending latitude and
longitude for the area the map covers, assuming a rectangular map.
After that it's simple math to subtract min-lat from max-lat and min-long
from max-long, then each up by the number of pixels along that dimension of
the map.
Of course the fact that both lat and long can use negative numbers
complicates things slightly. For the Xastir project we translate
everything to our own coordinate system that uses only positive numbers
which makes this part easier.
--
Curt, WE7U. APRS Client Comparisons: http://www.eskimo.com/~archer
"Lotto: A tax on people who are bad at math." -- unknown
"Windows: Microsoft's tax on computer illiterates." -- WE7U
"The world DOES revolve around me: I picked the coordinate system!"
------------------------------
Message: 3
Date: Thu, 19 Apr 2007 08:38:14 -0700
From: "'Scott Miller'" <scott_at_opentrac.org>
Subject: RE: [aprssig] Map Symbol Placement
I think programs like UI-View just assume it's linear - i.e., if the
longitude of the point to be plotted is exactly between the left and right
reference points (x = x1 + (x1-x2)/2) and the screen is 1000 pixels wide,
then it's plotted at 1000/2 = 500.
Of course, maps aren't going to be linear if they're flat, and the Earth
isn't perfectly spherical. To do it right you need to know what projection
the map uses. Xastir is the only APRS program that I'm pretty sure knows
about map projections, and I think it uses an external library to handle
them.
I suppose it all depends on the scale you're dealing with. If you're
showing a small area, the error will probably be smaller than the size of
the symbol and it won't really matter.
Maybe someone with more geodesy knowledge than me can point you in the
direction of some appropriate resources.
Scott
N1VG
------------------------------
Message: 4
Date: Thu, 19 Apr 2007 08:38:24 -0700 (PDT)
From: "Curt, WE7U" <archer_at_eskimo.com>
Subject: Re: [aprssig] Map Symbol Placement
On Thu, 19 Apr 2007, Curt, WE7U wrote:
>On Thu, 19 Apr 2007, M J wrote:
>
>>I notice that within some APRS programs, it is necessary to
>>identify two lat/lon points on a map, and link them to the
>>corresponding map's pixels. Has anyone more publicly documented
>>the equations used to plot a symbol on a map if you know the
>>lat/lon that the symbol is supposed to appear on (once you know
>>the previous info)? I'm interested in learning more about that.
>>Thanks! MJ
>
>I've worked on the code for this before. First the program
>translates the pixels & locations you gave it to the pixels at
>diagonal map corners. Once you have the new numbers you have the
>beginning/ending latitude and longitude for the area the map covers,
>assuming a rectangular map.
>
>After that it's simple math to subtract min-lat from max-lat and
>min-long from max-long, then each up by the number of pixels along
>that dimension of the map.
Should have been: "then divide each up by the number of pixels..."
>Of course the fact that both lat and long can use negative numbers
>complicates things slightly. For the Xastir project we translate
>everything to our own coordinate system that uses only positive
>numbers which makes this part easier.
--
Curt, WE7U. APRS Client Comparisons: http://www.eskimo.com/~archer
"Lotto: A tax on people who are bad at math." -- unknown
"Windows: Microsoft's tax on computer illiterates." -- WE7U
"The world DOES revolve around me: I picked the coordinate system!"
------------------------------
Message: 5
Date: Thu, 19 Apr 2007 08:41:08 -0700
From: "'Scott Miller'" <scott_at_opentrac.org>
Subject: RE: [aprssig] Map Symbol Placement
>Of course the fact that both lat and long can use negative numbers
>complicates things slightly. For the Xastir project we translate
>everything to our own coordinate system that uses only positive
>numbers which makes this part easier.
How does Xastir handle different map projections? I seem to remember that
it had a projection library linked in. And it seems to work properly when I
load in California maps in Albers equal-area conic projection. Does it
reproject the map to match the screen coordinates?
Scott
N1VG
------------------------------
Message: 6
Date: Thu, 19 Apr 2007 08:47:29 -0700 (PDT)
From: "Curt, WE7U" <archer_at_eskimo.com>
Subject: RE: [aprssig] Map Symbol Placement
On Thu, 19 Apr 2007, 'Scott Miller' wrote:
>Of course, maps aren't going to be linear if they're flat, and the Earth
>isn't perfectly spherical. To do it right you need to know what projection
>the map uses. Xastir is the only APRS program that I'm pretty sure knows
>about map projections, and I think it uses an external library to handle
>them.
Xastir does know about map projections, via libproj, but we don't use it
for very much currently. We assume a flat, rectangular map for most image
files we handle, the only exception to this is USGS DRG's, maybe DOQQ's as
well.
When we need to use maps in various projections with Xastir we warp them
using other tools ahead-of-time. Xastir itself doesn't have to know about
it.
Some map programs are capable of using many tie-points to warp the image to
a flat-map representation. We usually use "gdalwarp" to process maps for
use with Xastir. It's free. From the manpage:
"SYNOPSIS
gdalwarp
[-s_srs srs_def] [-t_srs srs_def] [-order n] [-et err_threshold]
[-te xmin ymin xmax ymax] [-tr xres yres] [-ts width height]
[-wo "NAME=VALUE"] [-ot Byte/Int16/...] [-wt Byte/Int16]
[-srcnodata value [value...]] [-dstnodata value [value...]]
[-rn] [-rb] [-rc] [-rcs] [-wm memory_in_mb] [-multi] [-q]
[-of format] [-co "NAME=VALUE"]* srcfile dstfile
DESCRIPTION
The gdalwarp utility is a simple image reprojection and warping utility.
The program can reproject to any support projection, and can also apply
GCPs stored with the image if the image is 'raw' with control information."
--
Curt, WE7U. APRS Client Comparisons: http://www.eskimo.com/~archer
"Lotto: A tax on people who are bad at math." -- unknown
"Windows: Microsoft's tax on computer illiterates." -- WE7U
"The world DOES revolve around me: I picked the coordinate system!"
------------------------------
Message: 7
Date: Thu, 19 Apr 2007 08:49:39 -0700 (PDT)
From: "Curt, WE7U" <archer_at_eskimo.com>
Subject: RE: [aprssig] Map Symbol Placement
On Thu, 19 Apr 2007, 'Scott Miller' wrote:
>How does Xastir handle different map projections? I seem to remember that
>it had a projection library linked in. And it seems to work properly when I
>load in California maps in Albers equal-area conic projection. Does it
>reproject the map to match the screen coordinates?
It may have been close enough for your purposes, so you didn't notice the
distortion.
I believe the only support we currently have is for DRG's (and perhaps
DOQQ's?) for switching between NAD27 and WGS84/NAD83 datums.
We don't use the libproj library for much else.
--
Curt, WE7U. APRS Client Comparisons: http://www.eskimo.com/~archer
"Lotto: A tax on people who are bad at math." -- unknown
"Windows: Microsoft's tax on computer illiterates." -- WE7U
"The world DOES revolve around me: I picked the coordinate system!"
------------------------------
Read previous mail | Read next mail
| |