Map Matching GPS to Road Network I'm working on a project for which I have GPS points and I would like to extract the sequence of roads related to those points. I know that this is called "map-matching" and that there is a load of literature about it.  Here is my question: is there a software / library that allows to easily convert a sequence of GPS points into a road sequence, given that I have the road network, so that I don't have to (re)implement the wheel?
Map matching links and ideas? I'm using OpenStreetMap and its vectorial road network and I'd like to implement a map matcher algorithm.   Currently I'm able, for each GPS position, to retrieve the nearest road segment and calculate the projection of this position to that segment, like on this image (Red pin is the pure GPS position, in blue the mapped segment and in Green the mapped position):    However, due to the lack of accuracy of the GPS, sometimes the mapped position jumps from segment to another and can provide some inconsistent mapped position from time to time.  My current algorithm is very basic : from the pure GPS position, I get the nearest segment and decide that the mapped matched position is on this one. I know that this can be really improved.  I can imagine that taking the vehicle direction into account will improve the map matching but do you know any other approach that would enable me to improve my map matcher ?  I seek any link, and/or open source software?
I've heard that exposing database IDs (in URLs, for example) is a security risk, but I'm having trouble understanding why.  Any opinions or links on why it's a risk, or why it isn't?  EDIT: of course the access is scoped, e.g. if you can't see resource foo?id=123 you'll get an error page. Otherwise the URL itself should be secret.  EDIT: if the URL is secret, it will probably contain a generated token that has a limited lifetime, e.g. valid for 1 hour and can only be used once.  EDIT (months later): my current preferred practice for this is to use UUIDS for IDs and expose them. If I'm using sequential numbers (usually for performance on some DBs) as IDs I like generating a UUID token for each entry as an alternate key, and expose that. Having the derivative be an operator How to determine the class of a generic type? Prevent Windows 10 installer from using the preinstalled serial key without disabling UEFI Say my opponent plays a planeswalker during their first main phase.  I have a  or some other effect that will kill it after it is already in play, but before they use any of its abilities.  I could respond to them using a +1 ability, but I want to kill it before that effect goes on the stack.  In most casual situations, it would basically come down to whether I say "Hero's Downfall" first, or they say "+1" first.  But I can't imagine that's how it's supposed to work.  Is there a time between when the planeswalker hits the battlefield and when they activate its abilities that they must let me respond? It seems to me that situations like this arise frequently, and they are resolved simply by who speaks up first, which is horrible for such a rules-oriented game. Non-normality in residuals Why do I get blurry pictures when I take a lens attachment off? How to find the shortest path between opposite vertices of a cube, traveling on its surface? I am stuck with the following problem that says:      Let $A,B$ be the ends of the longest diagonal of the unit cube . The length of    the shortest path from $A$ to $B$ along the surface is :     $\sqrt{3}\,\,$  2.$\,\,1+\sqrt{2}\,\,$  3.$\,\,\sqrt{5}\,\,$ 4.$\,\,3$    My Try:   So, the length of the longest diagonal $AB=\sqrt{3}$. If I reach from $A$ to $B$ along the surface line $AC+CD+BD$, then it gives $3$ units. But the answer is given to be option 3.   Can someone explain? Thanks in advance for your time. Transformations from n-sphere coordinates to cartesian coordinates. I was wondering how one would proceed to convert between coordinate systems in $ \mathbb R^n $.  For $ \mathbb R^2 $ the conversion is easy and just basic trigonometry. Given $(r, \theta)$ we can convert these polar coordinates to cartesian coordinates to $(x=r\cos\theta, y=r\sin\theta)$  The same follows for $ \mathbb R^3 $. Given $(r,\theta_1,\theta_2)$ in spherical coordinates we can convert the spherical coordinates to cartesian coordinates with the following transformation $(x=r\cos\theta_2\cos\theta_1,y=r\cos\theta_2\sin\theta_1, z=r\sin\theta_2)$, just so my point of reference is clear:$\theta_1$is the angle lying in the x-y plane, and  $\theta_2$ is the angle the vector makes with the x-y plane.  So what about for four dimensions and up? For the sake of simplicity we can define the n-sphere vector as $(r,\theta_1,\theta_2,...,\theta_n)$ and the cartesian vectors $(x_1,x_2,...,x_n)$ and maintain the same reference of $\theta_1,\theta_2$ as before.  How do we define a transformation in $ \mathbb R^4 $?  A look into this wikipedia page under the  gave me something that I don't believe is quite right.  As according to the section  $(x_1=r\cos\theta_1,x_2=r\sin\theta_1 \cos\theta_2,x_3=\sin\theta_1 \sin\theta_2\cos\theta_3,...)$ which is already in contradiction to my statement about $ \mathbb R^3$ transformations.   What is the general transformation rule? Am I missing something that I should know from linear algebra that I might be forgetting because my linear algebra is rusty? If so, please let me know what I should review or point me in the right direction. Simultaneous collaborative editing of a LaTeX file Android: textview hyperlink What is an example of Gâteaux differentiable but not Fréchet differentiable at a point in a finite-dimensional space? Let $V,W$ be nonzero normed spaces over $\mathbb{K}$ such that $V$ is finite-dimensional.  Let $E$ open in $\mathbb{K}$ and $p\in E$.  Let $f:E\rightarrow W$ be Gâteaux-differentiable at $p$.  Is $f$ necessarily Fréchet-differentiable at $p$ in this case?  I think this is not true in general, but cannot find a counterexample. What would be a counterexample? What was with the two different colored prison uniforms in Daredevil season 2? In Daredevil S02, we see two kinds of prison uniforms, full orange and full white. We see in the flashback that Wilson Fisk gets a white prison uniform but his current one was orange.  The Punisher was also given a white prison uniform but most of the prisoners had orange uniforms. What was with the two different colored uniforms? Does it have some significance or is it just random? Does it happen similar in real life US prisons too? How do you add CSS rules (eg strong { color: red }) by use of Javascript? How do I answer "Where do you work?" What are the main purposes to ask someone 'Where do you work?' apart from to find out the type of place he or she works in?  I can answer:     I work in a shop.   I work in a hospital.   I work in an office.   But what other things can (or should) I use as a reply to this question?    Extra question:  sometimes I see     I work at a shop.    I work at a hospital.    I work at an office.   What's the difference between 'at' and 'in' in this case? How to delete a non-empty directory in Terminal? How do I delete the following directory?  I typed:  rmdir lampp   This error comes up:  rmdir: failed to remove `lampp': Directory not empty   Is there a command to delete all the files in the directory and delete the directory folder? What does $\lim\limits_{x \to \infty} f(x) = 1$ say about $\lim\limits_{x \to \infty} f'(x)$? Given that $f$ is differentiable, what does $\lim\limits_{x \to \infty} f(x) = 1$ say about $\lim\limits_{x \to \infty} f^\prime(x)$ ? Intuitively I feel that it's $0$.  I attempted to solve this by trying to evaluate $$\lim_{x \to \infty} \lim_{h \to 0} \frac{f(x + h) - f(x)}{h} $$ by trying to interchange the limits after showing that $\frac{f(x + h) - f(x)}{h}$ converges uniformly as $x \to \infty$. But I couldn't proceed further.  Trying to work backwards, as a specific example, $f(x) = \arctan(x)$ came to my mind. It's derivative certainly goes to $0$ as $x \to \infty$. Doesn't this show that $\frac{f(x + h) - f(x)}{h}$ converges uniformly to $0$ as $x \to \infty$ ?  I'm totally confused! I would really appreciate if anyone told me what I am doing wrong. Alternative set theories This is a (soft!) question for students of set theory and their teachers.   OK: ZFC is the canonical set theory we all know and love. But what other, alternative set theories, should a serious student encounter (at least to the extent of knowing that the theory exists, and about why it is thought interesting)?  Suggestions might be SP (Scott-Potter), NBG, NF, ZFA, IST, ETCS (for a few sentences of explanation, see   But what would be on your list of alternative set theories would be it good for advanced students to hear about, if only briefly? Wildcard certificates with short hostnames? I'm trying to generate a certificate with the following subjectAltName:  hostname *.hostname hostname.mydomain.local *.hostname.mydomain.local   I generate the CSR via OpenSSL and then get the certificate from Microsoft Active Directory Certificate Services. Certificate works OK for the following alternative names:  hostname hostname.mydomain.local *.hostname.mydomain.local   But, *.hostname just doesn't work. Testing with Curl, I get the following output:  % curl https://m.example/ curl: (51) SSL: certificate subject name '*.example' does not match target host name 'm.example'   If, on the other hand, I add 'm.example' as a subjectAltName, then it works. So, wildcard with shortened hostname just refuses to work. Affiliate Ads Are Coming To The Network Some time ago, we announced that . This has gone well and we're extremely thankful to everyone for their support and feedback. Because it has been successful so far, we're going to be extending the program to the majority of our graduated sites. Well, we've pretty much already done that, but there are quite a few sites that have ads enabled, yet still display nothing. The thing is, we don't really have an abundance of clients offering products that a  would find relevant, but Amazon has stand mixers, a selection of super fine chinois, deliciously sharp cutlery and enough cast iron to fill the Gulf Of Mexico with . Beginning as early as this week (week of 5 February 2018), our ad team is going to be hand selecting affiliate ads to be displayed on select sites. The use of inventory will of course depend on the availability of relevant ads to display which means:  Some sites might see very few, if any ads. Some topics simply don't come remotely close to orbiting anything worth advertising. Furthermore, while graduated, some sites simply don't have enough activity for ads to make sense.  Since these are hand-selected, it could take a while for ads to appear initially.  These would of course yield to inventory from clients if clients had products that were relevant to any given topic.   Nothing changes when it comes to the . If you're used to occasionally seeing a community promotion ad, you'll just notice that you'll also occasionally see an ad for something that is likely to be of interest to someone interested in the topic that your site covers. In fact, to be clear, this is simply a continuation of the announcement we made in November of 2016. We just wanted folks to know that we're going to be continuing the program where there's good potential to show relevant advertisements, even if we don't have clients lined up with a demand for it. Where can I give feedback about a certain ad on [site]? Open a meta post on your per-site meta and let us know. Please remember, the bulk of advertisements are an effort to get something small back from folks that hit the sites through search engines and are extremely unlikely to ever become contributors. Their soufflé stopped falling, and we'll probably never see them again. Maybe we can get a few bucks once they realized that copper ions help egg whites stiffen properly and buy a bowl or a proper bloom whisk. However, you're the experts on these topics and we're very likely going to listen to you. What sites, specifically? Are any sites exempt? If you're a former Stack Exchange 1.0 site and / or subsequently joined the network under a special charter, nothing changes - don't panic :) For the rest, we're just extending what we're currently doing with ads on graduated sites to also include those where there's an opportunity to make sensible use of affiliate ads. If a site has less than 15k (average) daily visits, or fewer than roughly 50k combined total posts - it might not yet be time to invest in selecting ads to be shown there. But, part of this exercise is also seeing what works best. I don't really have feedback, just some suggestions Ads aren't just an opportunity to sell stuff, they're an opportunity to really show people that we understand a given topic. That, of course, makes suggestions from people that do that stuff every day quite valuable. Post on your per-site meta and our community / ad critters will take a look. Questions? Comments? Kvetches? Let us know in an answer or comment below. If anything about the plan changes, we'll update this post to let folks know.