[Ottawa_users] Lat Long Calculations

Adair, Mike adair at NRCan.gc.ca
Thu Jun 28 15:46:28 EDT 2007


Dave,

I have some Great Circle calculation code in Perl that you could have,
just don't ask me to explain it ;-) 

Mike 

> -----Original Message-----
> From: ottawa_users-bounces at lists.osgeo.org 
> [mailto:ottawa_users-bounces at lists.osgeo.org] On Behalf Of 
> Frank Warmerdam
> Sent: Wednesday, June 27, 2007 14:30
> To: Ottawa (Canada) Local Chapter List
> Subject: Re: [Ottawa_users] Lat Long Calculations
> 
> Sampson, David wrote:
> > Thanks Frank,
> > 
> > I was looking into maybe doing a projection to UTM, but I fear 
> > problems when a distance is calculated across two different UTM 
> > zones... Does this matter?
> 
> Dave,
> 
> It is important that both points can be converted to a 
> projection that is well behaved (low error) in the area 
> containing the points.
> Cross UTM zone edges isn't a problem, but the further you go 
> "out of the zone" the greater the distortion.  It would 
> likely be better to use a custom projection centered between 
> your two points.  I'm not exactly sure what projection would 
> be best though since my projection "theory" is pretty weak.
> 
> > I looked at GEOS and found that there are measurements between 
> > geometry objects.
> > 
> http://geos.refractions.net/ro/doxygen_docs/html/namespacegeos_1_1oper
> > at
> > ion_1_1distance.html
> > But getting into the GEOS library from python is proving a 
> challenge.
> > Some posts even note that the measure function is not 
> exposed to the C 
> > API of Geos (FRANK?) 
> > http://lists.maptools.org/pipermail/fwtools/2006-March/000318.html.
> 
> GEOS is just doing a cartesian, not great circle, 
> calculation.  So you might as well do it yourself in python.
> 
> > So what about the measuremnt function from PCL?  Well I am 
> having to 
> > battle PCL install on windows using FWTools. If this works 
> I hope this 
> > is even what I want. Furthermore I hope I can compile and 
> package up 
> > an application without an FWTOOLS dependency.
> 
> I can't speak for what PCL has built in.  I think mixing PCL 
> binaries and FWTools is likely to be a nightmare though it 
> might be possible to graft pure python parts of PCL into 
> FWTools.  Generally though if PCL isn't doing anything 
> special for you, then it likely isn't worth while.
> 
> > I would have thought someone would have a compas.py program 
> that would 
> > do all this, but I guess it's so simple that everyone 
> reinvents their 
> > own wheel when they need it. My chissel is not that precise 
> to carve a 
> > new wheel. (SMILE)
> 
> I imagine such a thing exists somewhere.  Finding and 
> integrating may prove a challenge.  If you are willing to use 
> cartesian distances in a projection between points then there 
> is really no reason not to do the distance yourself, using 
> osr.py to reproject things.
> 
> Best regards,
> -- 
> ---------------------------------------+----------------------
> ----------
> ---------------------------------------+------
> I set the clouds in motion - turn up   | Frank Warmerdam, 
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | President OSGeo, 
> http://osgeo.org
> 
> _______________________________________________
> Ottawa_users mailing list
> Ottawa_users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/ottawa_users
> 


More information about the Ottawa_users mailing list