Select * from StreetFile where CircleSelector intersects obj into Work
Fails on some polylines

Working on my 911 MapALI program to "reverse geocode" a cell phone location
yep, in Corpus Christi TX of 1000 911 calls per day 70% are cell and 60%
have valid and *accurate* lat/lon coords

Note accurate, as the location can be less than 10 feet from the street
center line

I have MI 4.5,  6, and 6.5 and all fail the same way.

You can copy and paste the code at the end to test it -- correct is that no
objects are selected

CircleSelector is 8 feet and 14 feet from the line

If you draw a line from the nodes above and below the *close* node you find
that it cuts thru the selector

This is *reverse logic* at this point and nothing should be selected so that
the SQL loop continues 8,16,32...8192 feet and drops out when answer table
has found an object
So it should have looped to 16ft and correctly found the line intersecting
the selector -- not the imaginary line

Problem then occurs later when testing the distance from the location back
to the line segment extracted from the polyline
If the *triangle height* calculated from start/end/location points is
greater than the selector radius distance
indicating that this segment was not the one intersecting with selector
[NOT]
the app continues looking at the rest of the segments and fails.

Move the point around a bit and then it will pick up correctly and try
changing the 8 in CreateCircle to 16, 32

FWI this is a real street and a real cell call location
911 is happy with what app does BUT..............when, not if, something
goes wrong the legal buzzards will be hovering above


Besure to change file location in create table and get all line wrapping
back on one line................
------------------------ copy start ---------------------
Set Distance Units "ft"
Create Table "fail" (Street Char(50),FromLeft Integer,ToLeft
Integer,FromRight Integer,ToRight Integer) file "C:\fail.TAB" TYPE NATIVE
Charset "WindowsLatin1"
Create Map For fail CoordSys Earth Projection 1, 0
Map From fail

dim aSel as object
Create Pline into variable aSel 8 (-97.412431,27.802423)
(-97.412656,27.802733) (-97.41275,27.803293) (-97.412748,27.803833)
(-97.412661,27.804223) (-97.412467,27.804637) (-97.412428,27.804869)
(-97.412441,27.805053) PEN MakePen(1,2,0)

insert into fail (obj,street,fromleft,toleft,fromright,toright) values
(aSel,"Oak Ln",6477,6515,6478,6516)
commit table fail
Set Map window windowid(0) Zoom Entire Layer 1

aSel=createcircle(-97.412705,27.803829,8)
select * from fail where obj intersects aSel into work browse * from work
insert into cosmetic1 (obj) values (aSel)
undim aSel

------------------ copy end ---------------------------------





Trey Pattillo
[EMAIL PROTECTED]
www.wap3.com
N27.799013 W-97.665322


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 9138

Reply via email to