map

Distance between 2 geocodes

What is the formula for calculating the distance between 2 geocodes? I have seen some of the answers on this site but they basically say to rely on SQL Server 08 fucntions, I'm not on 08 yet. ANy help would be appreciated. Thanks. ...

How to get OSM xml or json data from an url?

I have been working on twitter api and found it easy to get json/xml feed from an url like http://twitter.com/friends/ids.json?screen_name=Planemad&jsoncallback=? similarly i wanted to know if there is a way to get OSM json/xml data from an url and use that and use it on an OSM map.... ...

Am I going to be OK for threading with STL given these conditions?

I have a collection of the form: map<key, list<object> > I only ever insert at the back of the list and sometimes I read from the entire map (but I never write to the map, except at initialization). As I understand it, none of the STL containers are thread safe, but I can only really have a maximum of one thread per key. Am I miss...

Small problem accessing a map inside a list in Clojure

Title says it all, here's the code : (def entry {:name tempName :num tempNum}) (def tempList '(entry)) (println (get (nth tempList 0) (:name))) Exception in thread "main" java.lang.IllegalArgumentException: Wrong number of args passed to keyword: :name In this bit of code, I define a map called entry containing a :name and a :num...

Question about traversing a list

Hi, I am a beginner in Clojure, and I have a simple question Lets say i have a List, composed of Maps. Each Map has a :name and :age My code is: (def Person {:nom rob :age 31 } ) (def Persontwo {:nom sam :age 80 } ) (def Persontthree {:nom jim :age 21 } ) (def mylist (list Person Persontwo Personthree)) Now how do i traverse the lis...

Filter for Lists in Clojure

Hi, I am having a bit of difficulty with Lists in Clojure I have a quick question concerning the filter function Let's say I have a List composed of Maps My code is: (def Person {:name Bob } ) (def Person2 {:name Eric } ) (def Person3 {:name Tim } ) (def mylist (list Person Person2 Person3)) How would i go about filtering my list so t...

hash_map and map which is faster? less than 10000 items

vs2005 support ::stdext::hash_map ::std::map. however it seems ::stdext::hash_map's insert and remove OP is slower then ::std::map in my test. ( less then 10000 items) Interesting.... Can anyone offored a comparision article about them? ...

Java NIO framework for filesystems instead of networks?

There are several high quality frameworks that hide the complexity of NIO based network programming (mina, netty, grizzly, etc.). Are there similar frameworks that simplify NIO based file-system programming? For example, as a learning exercise, I would like to implement a disk backed Map based on this (awesome!) article: http://www.jav...

which map api most powerful? googlemap? bing map..etc?

which javascript map api do you folks think most powerful? lately bing also introduce their map ...

Consuming apachesoap:Map complex datatype in webservice using .net

Hi there, I have a webservice programmed in coldfusion which I'm attempting to consume using c#.net. The particular webservices returns a coldfusion structure (a collection of items with a key and a value) which is exposed by the webservice as a complex object of type apachesoap:Map <wsdl:message name="getDetailResponse"> <wsdl:p...

Convert ESRI projection coordinates to lat-lng

I have a large dataset of x,y coordinates in "NAD 1983 StatePlane Michigan South FIPS 2113 Feet" (aka ESRI 102690). I'd like to convert them to lat-lng points. In theory, this is something proj is built to handle, but the documentation hasn't given me a clue -- it seems to describe much more complicated cases. I've tried using a python...

Mapping over multiple Seq in Scala

Suppose I have val foo : Seq[Double] = ... val bar : Seq[Double] = ... and I wish to produce a seq where the baz(i) = foo(i) + bar(i). One way I can think of to do this is val baz : Seq[Double] = (foo.toList zip bar.toList) map ((f: Double, b : Double) => f+b) However, this feels both ugly and inefficient -- I have to convert both...

Why does map return an empty array?

I have a problem in Perl I don't understand. I stripped it down to this very short code. Why does Perl's map function return an empty array? Shouldn't it return an array with 9 undefs? sub mySub{ return; } my @arr = (1 .. 9); my @arr2 = map( mySub($_), @arr ); print @arr . ' ' . @arr2, "\n"; It prints "9 0". It is probably som...

Why STL algorithm find() doesn't work on maps?

Is there any explanation why find() algorithm doesn't work for maps and one have to use map::find instead? ...

wsg 1984 - calc distance between 2 geo points

i need a peace of code in C# that can calc the distance between 2 points in a map that has a wsg1984 format ...

MS map point web service

can anybody plz guide me through following questions do MS Map point also covers India??? how we can use MS map point web service or API's or library etc to get the current location based on input Lat and Longitude. is there some facility of defining our custom maps and can we define our custom milestones on the custom map. ...

A bi-directional map in clojure?

What would be the best way to implement a bi-directional map in clojure? (By bi-directional map, I mean an associative map which can provide both A->B and B->A access. So in effect, the values themselves would be keys for going in the opposite direction.) I suppose I could set up two maps, one in each direction, but is there a more idi...

Using two (or more) objects as a HashMap key

I want to store certain objects in a HashMap. The problem is, usually you just use a single object as a key. (You can, for example, use a String.) What I want to do it to use multiple object. For example, a Class and a String. Is there a simple and clean way to implement that? ...

Mapping widget for Qt

Hello, I need a Qt widget that will allow me to display a map. It needs to be able to: * Run wo a network connection to a map or tile server. A simple bitmap would be fine. * Place widgets, lines and graphics on the map given lat/long * Calculate distances between points. * Compile on Linux and Windows. What would you suggest? Than...

Groovy map syntax error

If I have this code : import javax.swing.* import java.awt.image.* def xMap = [ BufferedImage.TYPE_3BYTE_BGR : "3 byte BGR", BufferedImage.TYPE_4BYTE_ABGR : "4 byte ABGR", ] the IDE will generate this error : illegal colon after argument expression; solution: a complex label expression before a colon must be paren...