@Squirrelkiller Did you guys set up a Proxy for Postman? My problem is, Postman aint capturing everything and I think that Firefox is actively masking some traffic (already fixed that partially).
@Raimonds A runner is basically just a server you give a batch or bash script to execute. You treat the script part as if you'd write a batch file for your PC.
@HéctorÁlvarez The guy ended up writing the code himself (which is to say, to expertly pick the proper SO question to reap the code from), to calculate clockwise order from the center point.
@Raimonds You can als otest. If you have test projects, let mstest run them in nother job on the stage after build. pipeline will have another stage and show yo which one failed.
@Squirrelkiller Yeha I've tested that with NUnit and .net core already
Our infrastructure is not ready for true unit testing still but I am moving it there
My plan for now is to setup gitlab to close what it gets to one of our small internal projects, do a showcase of what we can do, hope it gets adopted. Meaning hosted internally with own runners and other stuff
I'm fine with that. The goal here is to take an event that takes place in several buildings and draw a border around the relevant buildings. I don't care if I take in some extra space as well.
Then we discovered that UWP's MapControl doesn't directly support drawing circles. The recommended approach? Create a 360-point polygon at regular intervals from the center-point.
Why not draw a line between each pair of points. If you have any points on the "outside" of the line, don't use that one and keep trying untli you find one that doesn't
It's essentially brute-forcing a solution but it should work
@Raimonds Not necessarily. The point is that I have several buildings on a map, and an event that occurs in several of them, so I want to mark a boundary that covers all the affected buildings.
I am thinking of something like capturing all points under huge rectangle and then reduce its size and make some sort of magic conections whenever something is outside new area
visually it looks cool, not sure how easy it would be to write as a code.
I think math should have this issue sorted, just need to ask google properly
like finding mid point, calculating distance from each point to mid (vectors)
and then somehow based on those values and their locations join far most points
I regret not paying attention to my math teacher in uni, he tried to explain as a lot of cool stuff which I now understand since I tried to learn OpenGL
For the common cases, when the center point of the polygon falls inside the polygon, our approach works fine. You calculate the center point, then calculate a vector between that center to each point, and find the angle from the central axis and sort the points that way - then you get your points sorted clock-wise (or ccw, whatever), and you can create a polygon by drawing the edges in that order.
Start with a rectangle like mine, progressively reduce it's size. When you get to a point outside the rectangle, check to make sure it isn't between 2 points already outside the rectangle.
If it's not between 2 points, make it a point of the new shape
Hector was talking about the scenarios where the shape's center-point is outside - like the C shape above, which means that the naive clockwise-from-center polygon will include a lot of space that's "outside" the shape.
But in our case, it doesn't really matter, because the "shape" is simply an approximation of "the event is happening in this area", and we don't care about a bit of extra space.
I am so not going to do any of those things unless the design team explicitly decides to focus on that feature. It's a minor part of feature and far from our app's core interest.
I'm trying to convert sets of points to their respective polygon boundaries. I think this is something like a Voronoi diagram or Convex Hull, but not quite. I'm sure there's a technical term for it, but I'm a beginner to GIS.
It's probably best illustrated with the following image:
So, give...
I think one of my colleagues already solved this problem since we had the same product before where we are required to draw a polygon from a map based on a given lat,lngs with no particular order. It was highly tested and no issue have been filed so far. I would take a look in the source code but I'm already heading home so /shrug
Graham's scan is a method of finding the convex hull of a finite set of points in the plane with time complexity O(n log n). It is named after Ronald Graham, who published the original algorithm in 1972. The algorithm finds all vertices of the convex hull ordered along its boundary. It uses a stack to detect and remove concavities in the boundary efficiently.
== Algorithm ==
The first step in this algorithm is to find the point with the lowest y-coordinate. If the lowest y-coordinate exists in more than one point in the set, the point with the lowest x-coordinate out of the candidates should be...
So it finds lowest Y and looks for next X on the right until in can't find any after it moves into opposite direction and back again until it closes loop
in the process figuring out is it correct Y on that X
So I'm on a scaffolded page for Edit. Submit is pressed. The Post ActionMethod for Edit is called in the controller. If I want to display "Item successfully updated" or whatever, I can't use ViewBag to store the message if I redirect. Do I use session instead?
If you set the ViewBag data in the method that handles the post & then redirect to your success page and you display it there, it should only empty itself once you've hit the page and displayed it
@Raimonds I support an application where if inactive admin user tries to log in into the public site, it was redirected to the administration site and considered active