windows phone 7 - How to create a buffer and determine what is inside the buffer of a mapPolyLine? c# -
i'm trying create buffer around mappolyline determine if there's inside mappolyline. below code mappolyline:
private void routeservice_calculateroutecompleted(object sender, calculateroutecompletedeventargs e) { // if route calculate success , contains route, draw route on map. if ((e.result.responsesummary.statuscode == bingmaprouteservice.responsestatuscode.success) & (e.result.result.legs.count != 0)) { // set properties of route line want draw. system.windows.media.color routecolor = colors.blue; solidcolorbrush routebrush = new solidcolorbrush(routecolor); //mappolyline routeline = new mappolyline(); app.routeline.locations = new locationcollection(); app.routeline.stroke = routebrush; app.routeline.opacity = 0.65; app.routeline.strokethickness = 5.0; // retrieve route points define shape of route. foreach (location p in e.result.result.routepath.points) { app.routeline.locations.add(new geocoordinate(p.latitude, p.longitude)); }
how coordinates of buffer of mappolyline (using bing map api without arcgis extension)?
well, think of way: buffer in gis polygon. way it's going useful see if points inside or not able create shape (whether display or not) , run whatever point-in-a-polygon analysis available you. (i don't know if bing maps offers functionality). ideally, i'd go drawing arcs @ endpoints (using them arcs' centers), join them line segments following contours of polyline). need determine slope , intersection each polyline point this. or better put, intersections lines offset distance (whether in screen coordinates or mercator) polyline points. once that's done, may have suitable polygon, although point-in-polygon code i've worked not work arcs. you'd need approximate straightline segments.
i feel pain on 1 not want encumber app arcgis dlls, despite functionality. , realize barebones outline of needs done. set out do.
Comments
Post a Comment