All

This is cheeky. WILL SUM!

I am really banging my head against an MB (or VB) implementation of Dijkstra
to try and extend the 'trace' functionality in MapInfo across several
objects. I've got a nice routine that builds a link/node network out of a
single spaghetti layer with 'missing' nodes inserted - in a small enough
area it flies. But the routing ... aargh, SO slow.

I'm under a deadline and I'd appreciate any tips you can give out of your
own efforts in this area - I've crawled the web and reimplemented several
versions of the algorithm now!

FYI its because I'm building a TCPIP 'map tools' server that accepts
messages from a MapXTJ client process (not the browser, the server-side) and
writes TAB files which have been crunched by MI Pro. MapXTJ doesn't do much
in the way of 'crunching'. 

This is because our customer wants to deploy though a browser without an
applet but retain some of the groovy map edit tools I've written for them
elsewhere. Eg 'bound' (click inside a shape made of unpolygonised linework
from many layers and get back the biggest resultant polygon) and 'lasso'
(draw a rough shape on linework ditto and get back the biggest possible
shape).

I've already done these and they go very well - but we need line tools as
well. If we're going to snap their clicks to linework we need something like
this tracing.

Any help you can give would be most welcome - and thanks/apologies.

(BTW 'Don't even think about it' is an acceptable answer!)

BR

Paul Crisp
Syntegra

Direct:  0191 461 4522 
Mobile: 0776 414 3762
Fax: (0191) 461 1959

Innovation Place Metro Riverside Park
Delta Bank Road Gateshead Tyne & Wear NE11 9DJ


-----Original Message-----
From: Bill Thoen [mailto:[EMAIL PROTECTED]]
Sent: 14 January 2002 22:35
To: Terrence O'Neill
Cc: 'Mapinfo'
Subject: Re: MI-L Trig / MapBasic Formula needed


Terrence O'Neill wrote:
> Thanks for sending me the code.  I appreciate it.  However, my situation
is
> a little more complicated than just 4 possibilities.  My problem arrises
> from having to create 90 arcs at a set distance away from a point, but at
> varying angles.  The problem I'm having is finding the MBR for that 90
> degree arc at any angle from 0 to 360 degrees.

You don't have enough information to solve that problem. All you
know is one point's coordinates, and that the other point is 90
degrees from that along the perimeter of some ellipse, and the
ellipse on which your arc is based is orthogonal to the XY axes,
and that's not enough. You need the center of the ellipse or at
least the angle that the known point makes to the center and the
a and b distances (1/2 the x and y axes of the ellipse.)

The formula for an ellipse (at the origin) is x^2/a^2 + y^2/b^2 =
1, where a and b are as described above. With only one point
known, and its relation to the center unknown, you can draw any
number of orthogonal ellipses through it and thus have any number
of candidate points 90 degrees away.

I'd say you need to also supply a center point at least. Since it
doesn't seem to be critical to your app, just pick one
arbitrarily such that the angle from it to your known point is
one of those "varying angles", and the problem will then have
only one solution instead of many.

-- 
- Bill Thoen
------------------------------------------------------------ 
GISnet, 1401 Walnut St., Suite C, Boulder, CO  80302
tel: 303-786-9961, fax: 303-443-4856
mailto:[EMAIL PROTECTED], http://www.gisnet.com/
------------------------------------------------------------



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.


********************************************************************

This email may contain information which is privileged or confidential. If you are not 
the intended recipient of this email, please notify the sender immediately and delete 
it without reading, copying, storing, forwarding or disclosing its contents to any 
other person
Thank you

Check us out at http://www.syntegra.com

********************************************************************

Reply via email to