Mercator longitude and latitude calculations to x and y on a cropped map (of the UK)

I wrote a function which does exactly what you were looking for. I know it’s a bit late, but maybe there are some other people interested in. You need a map which is a mercator projection and you need to know the lat / lon positions of your map. You get great customized mercator maps … Read more

Calculating a LookAt matrix

Note the example given is a left-handed, row major matrix. So the operation is: Translate to the origin first (move by –eye), then rotate so that the vector from eye to At lines up with +z: Basically you get the same result if you pre-multiply the rotation matrix by a translation –eye: [ 1 0 … Read more

OCR and character similarity

for recognition or classification most OCR’s use neural networks These must be properly configured to desired task like number of layers internal interconnection architecture , and so on. Also problem with neural networks is that they must be properly trained which is pretty hard to do properly because you will need to know for that … Read more

How to select a single field for all documents in a MongoDB collection?

From the MongoDB docs: A projection can explicitly include several fields. In the following operation, find() method returns all documents that match the query. In the result set, only the item and qty fields and, by default, the _id field return in the matching documents. db.inventory.find( { type: ‘food’ }, { item: 1, qty: 1 … Read more

Retrieve only the queried element in an object array in MongoDB collection

MongoDB 2.2’s new $elemMatch projection operator provides another way to alter the returned document to contain only the first matched shapes element: db.test.find( {“shapes.color”: “red”}, {_id: 0, shapes: {$elemMatch: {color: “red”}}}); Returns: {“shapes” : [{“shape”: “circle”, “color”: “red”}]} In 2.2 you can also do this using the $ projection operator, where the $ in a … Read more

tech