Open for Voting

Automatic Geolocation on Worldwide Maps should allow for flexible SNMP-location formatting

I would like to see the ability to use Automatic Geolocation for nodes, while still retaining the ability to have my SNMP-location field be in my own format.   (I do realize this features hasn't been released yet, but it's due out soon)

Right now the format is pretty rigid, if MapQuest doesn't support the format you have the SNMP-location field set to, the automatic geolocation feature won't work.   So, if you want to have something placed on a map currently, the format would have to be something like: "5650 University Blvd SE, Albuquerque, NM 87105", which in the new Orion database table "WorldMapPoints" would probably get put in as Lattitude: 34.988889 and Longitude: -106.614444.   (easter egg alert, who can figure out this reference?)

Where it comes into play is if you want to use the location for something else too, like maybe to populate a node tree, if you are restrained by the MapQuest format, you would end up with something like this very random node-tree:

However, if you were allowed to format it the way you want, you could end up with something like this:

I'm not saying you have to put state first, maybe you want country, or zip code.   I'm just saying that if we want to use the automatic geolocation feature, we shouldn't be restrained by another companies idea of how our SNMP-location should be formatted.

I'm thinking the easiest way to do this would be some sort of user-defined transform, or pattern-matching, that would allow you to tell it where the different components of the SNMP-location field are.   Guessing based on regular expressions would be best.   So maybe you would end up with something like this to define your "source" format, ie: the format your address is in, based on VI substitutions


([A-Z]*) - ([A-Za-z ]*), ([A-Za-z0-9 ]*), ([0-9]*)


And the replacement format it would be transformed to before sending it to mapquest would be:


\3, \2, \1 \4

The other option is to allow us to transform fields before doing something like putting them in a node tree.  The problem I see with that is you might end up transforming them all over the place, while this should allow you a central point of transformation for this value.