[uf-discuss] hCard: indistinguishable address parts problem
Drew McLellan
lists at allinthehead.com
Wed Jun 7 08:34:50 PDT 2006
On 5 Jun 2006, at 19:53, Ryan King wrote:
> On Jun 5, 2006, at 8:06 AM, Drew McLellan wrote:
>
>> I have a data set of companies with neat fields for name, phone,
>> postcode and geo. The address for each is one big string including
>> number, street, town, and sometimes route-road names and
>> directions. It's a real mess.
>>
>> At present, I've chosen to mark up the entire address string as
>> street-address, even though I know it to include locality, region
>> and other misc information in many cases. Without access to a
>> better geocoding system, I don't think there's a practical way for
>> me to distinguish between parts of the string.
>>
>> I figure that nothing is going to break on trying to parse the
>> street-address, and ultimately it's better to have the data in
>> some form than none. The alternative as I see it is to not include
>> any of this information in the hCard.
>>
>> I have a nagging thought that I'm being evil.
>>
>> Thoughts?
>
> Not evil, you've got a tough situation.
>
> My first question would be "what do current consumers of iCalendar
> do with that?". If it doesn't totally break them, then its not *too
> bad* of an abuse.
That was my thinking. I've not found an implementation where street-
address is parsed in any way more than a direct import of the string.
As addressing systems can vary so wildly even from town to town, it's
hard to see any harm coming from my pollution of the street-address
field that couldn't conceivably also be caused by valid data from an
unconventional addressing system, for example.
The worst that is likely to happen is that there could be duplication
of data across a couple of different fields (if, for example, a user
were to merge my data with existing data they already hold for the
same entity). So I think this route is acceptable to me.
My implementation is here, btw: http://www.getlpg.org.uk/
It's fun because I make use of the geo format inside hCard from with
some JavaScript to dig out latitude and longitude and plot points on
a google map. Without a nice way to address the data from within the
document, I probably would have maintained a parallel data structure
within JavaScript to do this - I like how geo saved me the effort of
that.
drew.
More information about the microformats-discuss
mailing list