There's no reason not to use UTM. I guess that would be easier. I don't know what projection our data is in, and that might be the reason. If the coordinates determined in measure.js are correct, I can use them to make the distance calculations. I will look into the projection the maps come to us in and go from there.
Thanks for your help! Mike On 10/11/05, Armin Burger <[EMAIL PROTECTED]> wrote: > > Mike Hostetler wrote: > > Armin- > > > > I have done research on this topic all morning and I want to make sure > > I understand you correctly. > > > > 1. Because of projections, the "estimated coordinates" (measure.js, > > line 72/73) are not accurate. > > the coordinates are correct, but if they are in degrees instead of > meters, also the distance values are in degrees. And a distance of > "0.237 degree" will not give you the desired information, I guess. The > same thing of course for the area (square-degrees ?!) > > > > 2. The only accurate latitude/longitude coordinate is the upper right > > corner, determined by mapserver. > > No again, all coodinates are correct. But for measurements you need to > have the coordinates in the same system as you want the measurements to > have. > > > > > Please verify my assumptions. > > > > I found a very good forumula for distance calculation called the > > Haversine formula. If I can correctly determine the > > latitude/longitude coordinates, I can use this to determine accurate > > distance. > > > > My team and I are very interested in calculating area as well, so the > > problem of determining accurate latitude and longitude coordinates is > > critical. I will be doing more research and will let you know what I > > find. If I can determine a method to accomplish this, I will start on > > an implementation into pmapper. > > > > Mike > > > But a simple question: is there a reason why you do not want to use a > rectangular projection system like UTM and you want to stay in lat/lon? > Lat/lon is for me typically used for global views. > > Armin > > > > > On 10/11/05, Armin Burger <[EMAIL PROTECTED]> wrote: > > > >>Mike, > >>the problem is that the measurements are just done using Javascript based on > >>extent values of the current map. For calculating distances and area of data > >>in geographic projection system one had to convert them into an appropriate > >>rectangular system. This could be a Lambert Azimuthal Equal Area (the demo > >>map file uses the European ETRS LAEA projection). > >> > >>So I see the the following issues how to deal with: > >> > >>You have to find or specify a projection system that can be used, could be > >>LAEA (small scale) or a UTM for bigger scale. Then you need to convert from > >>the coordinates for the measure points from lat/lon to the projected > >>coordinates, and then you get the correct measurements. > >> > >>The conversion could be done using an existing conversion formula you could > >>implement in Javascript. This might often not be available. So one could try > >>to get that values via PHP Mapscript (using re-projection). The problem with > >>eg using the XMLHttp request is that it is asynchronous, in this case you > >>needed probably a synchronous connection (I think Sarissa has also support > >>for synchronous requests). Or somehow involve the PostGIS functions. > >> > >>I typically go a simple way and do not provide measure functions if the data > >>presentation is in lat/lon. If I want to have measurement function I use a > >>projected SRS. But if you are interested finding a solution you're welcome. > >> > >>Armin > >> > >> > >> > >> > >>>--- Urspr?ngliche Nachricht --- > >>>Von: Mike Hostetler <[EMAIL PROTECTED]> > >>>An: [EMAIL PROTECTED] > >>>Betreff: [Pmapper-users] Measure Tool > >>>Datum: Tue, 11 Oct 2005 07:30:18 -0600 > >>> > >>>Hello- > >>> > >>>I have been working on the measure tool and have fixed some of the > >>>problems with variables not working. As soon as I am done with this > >>>task, I will be submitting the code back to Armin. > >>> > >>>In working with the measure tool, I have come across several more > >>>issues. One is the units the measurement is in. After looking at the > >>>code, I believe the units are degrees of latitude or longitude. When > >>>I looked into converting this to meters, I found that you must take > >>>into account the curvature of the earth. There are formulas to do > >>>this, which I may stick into the program. When using the PostGIS > >>>backend, it supports a distance calculation as well. > >>> > >>>When it comes to area, I am still working on this. I will email this > >>>list and let them know of my progress. > >>> > >>>Thanks, > >>> > >>>-- > >>>Mike Hostetler > >>>[EMAIL PROTECTED] > >>>http://www.amountaintop.com > >> > >>-- > >>10 GB Mailbox, 100 FreeSMS/Monat http://www.gmx.net/de/go/topmail > >>+++ GMX - die erste Adresse f?r Mail, Message, More +++ > >> > > > > > > > > -- > > Mike Hostetler > > [EMAIL PROTECTED] > > http://www.amountaintop.com > -- Mike Hostetler [EMAIL PROTECTED] http://www.amountaintop.com From [EMAIL PROTECTED] Wed Oct 12 00:55:26 2005 From: [EMAIL PROTECTED] (luca orlandini) Date: Wed Oct 12 00:52:48 2005 Subject: [Pmapper-users] collaboration In-Reply-To: <[EMAIL PROTECTED]> References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> Message-ID: <[EMAIL PROTECTED]> Armin, actually I have just done the layout for version 2 using DIV. I tryed it using Firefox/Mozilla and it work. I want to try it with IE for Windows, I'll write you when I'll be able to do it. Luca Armin Burger ha scritto: > Paolo, > > I will check if the PHP plugin for Eclipse supports the use of CVS so > that this might facilitate the usage of CVS without having to check > out/in all the times the files on the commandline. > > For any interested users who want to contribute I see mainly 2 or 3 > areas: > 1) A bigger part would be the layout for version 2, ie. using mainly > DIV's (or better combination of tables and DIVs); facilitated resizing > and flexible positioning of elements (ideally with just some config > settings and CSS); adapting zoombox etc code for compatibility with > other browsers. Luca Orlandini wanted to have a look on that, I don't > know how far he's got. > > 2) A smaller part would be the adaptation of an XSLT template for the > WMS client functionality. If there is an expert for XSL this probably > takes less than an hour to achieve. I myself will have to study XSLT > first more extensively to get it done. I can send the 2 files for > testing to anybody interested. > > 3) something that could be contributed by quite a lot of users are > images for the toolbar buttons. Either as ready GIF's or even better > as Photoshop or Gimp files, or so. Would be nice to have the simple > available images accompanied by nicer ones. > > And of course, already existing bug fixes and corrected language files > (my Italian is not error-free) could be sent to me all the time. > > Armin > > Paolo Cavallini wrote: > >> Hi Armin. >> I believe bugfixes and improvements will accelerate as the user base >> will increase (as it seems to be the case now), so perhaps better >> planning in advance before things will get too heavy for you to manage. >> My suggestion is motivated by our need to incorporate the small >> changes we've made (presently this will be quite painful). >> I agree that setting up a cvs may also be time-consuming; if you need >> help, just ask. >> All best, and thanks for your work. >> pc >> >> At 16:13, marted? 11 ottobre 2005 you presumably wrote: >> >>> Walter, >>> >>> you're in principal right. I am not aware of how many people using >>> pmapper >>> and who is working on bug fixes. But until now I have not received very >>> much bugfixes. A CVS is for sure a good idea, I am just always a bit >>> reluctant because >>> * I'm working a bit chaotic, and CVS forces one to work in an >>> organized way >>> * CVS needs to go over some initial hurdles until you're used to it >>> >>> For the near future it might at least help to get quick feedback for >>> bugs, >>> if bugfixes are included, so much the better. And if more people >>> think it >>> might help to use CVS, ok, I might need to adapt my working style >>> then :-). >>> I am also thinking of providing a zip file of the application if >>> there are >>> some minor changes, like some daily to weekly version. >>> >>> Armin >> > > _______________________________________________ > Pmapper-users mailing list > [EMAIL PROTECTED] > http://faunalia.it/cgi-bin/mailman/listinfo/pmapper-users
