Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OT: Franchisee area calculation

0 views
Skip to first unread message

Jeff North

unread,
May 25, 2007, 11:24:56 AM5/25/07
to
I've searched the web for weeks (on and off) but can't find any
information about the topic.

A client wants to set up a franchisee structure and track this
information via a database.

I've never done this and uncertain of how I would do it.

Initially the client only wants state by state franchisees but I can
see that this could eventually be scaled to districts/areas.

To compound matters, my client is wanting this to work in any country.

Has anyone got any pointers as to information that I can start looking
at?
---------------------------------------------------------------
jnor...@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------

Usenet

unread,
May 25, 2007, 2:02:01 PM5/25/07
to
In article <pvvd535qr1jvmvmb5...@4ax.com>, Jeff North
wrote:

> I've searched the web for weeks (on and off) but can't find any
> information about the topic.

What you've outlined is more of a database development job than a web
technique (certainly until you give a few more details).

I'd be happy to help you with it for a reasonable fee 8-)

Regards
Mark
vowley at gotadsl dot co dot youkay (

Toby A Inkster

unread,
May 25, 2007, 2:27:51 PM5/25/07
to
Jeff North wrote:

> Initially the client only wants state by state franchisees but I can
> see that this could eventually be scaled to districts/areas.
>
> To compound matters, my client is wanting this to work in any country.

Firstly, not all countries have "states" -- certainly the UK doesn't. Some
countries have regional units similar to states -- e.g. France has
"departments". Other countries (small ones mainly) don't have any regional
subdivisions.

For encoding administrative areas in a database, I'd recommend using
ISO 8859, which provides two character codes for every country. Most
countries then define subcodes within ISO 8859 for regions within their
country.

For example, here are a few codes:

Australia: AU
United Kingdom: GB
Brighton & Hove: GB-BNH
New South Wales: AU-NSW

There is more information, and a full list of ISO codes at:
http://en.wikipedia.org/wiki/ISO_8859-1

However, the US local codes only go down to state level, so if you think
you're likely to need to subdivide further than ISO 8859 allows, I'd
advice encoding location in two or more fields -- one or more to contain
the ISO code, and one to contain a more specific locale *within* the area
of that ISO code.

Some places might have some sort of standards for how to encode these
districts, but you'll mostly find that they don't. Postal codes are an
option, but are probably too specific for your needs. (One franchisee per
postal code? This might be OK in Australia, where postal codes cover
fairly large populations, but less so for the UK, where they tend to cover
a dozen or so buildings.)

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 91 days, 1:56.]

Non-Intuitive Surnames
http://tobyinkster.co.uk/blog/2007/05/25/non-intuitive-surnames/

Jeff North

unread,
May 25, 2007, 7:06:11 PM5/25/07
to
On Fri, 25 May 2007 19:27:51 +0100, in comp.lang.php Toby A Inkster
<usenet...@tobyinkster.co.uk>
<7emji4-...@ophelia.g5n.co.uk> wrote:

>| Jeff North wrote:
>|
>| > Initially the client only wants state by state franchisees but I can
>| > see that this could eventually be scaled to districts/areas.
>| >
>| > To compound matters, my client is wanting this to work in any country.
>|
>| Firstly, not all countries have "states" -- certainly the UK doesn't. Some
>| countries have regional units similar to states -- e.g. France has
>| "departments". Other countries (small ones mainly) don't have any regional
>| subdivisions.

I'm well aware of this.



>| For encoding administrative areas in a database, I'd recommend using
>| ISO 8859, which provides two character codes for every country. Most
>| countries then define subcodes within ISO 8859 for regions within their
>| country.
>|
>| For example, here are a few codes:
>|
>| Australia: AU
>| United Kingdom: GB
>| Brighton & Hove: GB-BNH
>| New South Wales: AU-NSW
>|
>| There is more information, and a full list of ISO codes at:
>| http://en.wikipedia.org/wiki/ISO_8859-1
>|
>| However, the US local codes only go down to state level, so if you think
>| you're likely to need to subdivide further than ISO 8859 allows, I'd
>| advice encoding location in two or more fields -- one or more to contain
>| the ISO code, and one to contain a more specific locale *within* the area
>| of that ISO code.

hmmmm food for thought :-)



>| Some places might have some sort of standards for how to encode these
>| districts, but you'll mostly find that they don't. Postal codes are an
>| option, but are probably too specific for your needs. (One franchisee per
>| postal code?

Doubt it and very impractical from a business point of view.

>| This might be OK in Australia, where postal codes cover
>| fairly large populations,

Where did you get this silly idea from? Our major cities do have
sub-divisions called suburbs. Maybe you've heard of them.

>| but less so for the UK, where they tend to cover
>| a dozen or so buildings.)

la...@portcommodore.com

unread,
May 26, 2007, 12:21:17 AM5/26/07
to
On May 25, 8:24 am, Jeff North <jnort...@yahoo.com.au> wrote:
> I've searched the web for weeks (on and off) but can't find any
> information about the topic.
>
> A client wants to set up a franchisee structure and track this
> information via a database.
>
> I've never done this and uncertain of how I would do it.
>
> Initially the client only wants state by state franchisees but I can
> see that this could eventually be scaled to districts/areas.
>
> To compound matters, my client is wanting this to work in any country.
>
> Has anyone got any pointers as to information that I can start looking
> at?
> ---------------------------------------------------------------
> jnort...@yourpantsyahoo.com.au : Remove your pants to reply
> ---------------------------------------------------------------

You could always put latitude and longitude in a DB table and then use
an area search. I read about it in some posting about MySQL but it is
still a ways off for me to look at presently.

It involves with the spatial extensions of MYSQL:
http://dev.mysql.com/doc/refman/5.0/en/spatial-extensions.html

With these you can 'map out a region" in your query.

Not much detail, but it's a start for something to google at least.

Jeff North

unread,
May 26, 2007, 3:57:20 AM5/26/07
to
On 25 May 2007 21:21:17 -0700, in comp.lang.php
la...@portcommodore.com
<1180153277.1...@m36g2000hse.googlegroups.com> wrote:

I thought of that but couldn't find much information. Also my client's
ISP is still using php/mysql 4.x :-(
---------------------------------------------------------------
jnor...@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------

Toby A Inkster

unread,
May 26, 2007, 3:43:03 AM5/26/07
to
Jeff North wrote:

> Toby A Inkster wrote:
>
>> This might be OK in Australia, where postal codes cover
>> fairly large populations,
>
> Where did you get this silly idea from? Our major cities do have
> sub-divisions called suburbs. Maybe you've heard of them.

And suburbs (at least in Sydney, where I lived for over half my life)
roughly match up with postcodes. For example, the 2034 code covers Coogee,
2035 Maroubra and so on. However, suburb boundaries are fuzzy, whereas
postcode boundaries are well-defined; whatsmore while different people
might give different names to the same place, the four-digit postcode is
unarguable.

So in Australia, postcodes might work well as a standardised sub-state
geographic division. In other countries, it's less useful.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]

[OS: Linux 2.6.12-12mdksmp, up 91 days, 15:19.]

Non-Intuitive Surnames
http://tobyinkster.co.uk/blog/2007/05/25/non-intuitive-surnames/

Jeff North

unread,
May 26, 2007, 10:48:37 AM5/26/07
to
On Sat, 26 May 2007 08:43:03 +0100, in comp.lang.php Toby A Inkster
<usenet...@tobyinkster.co.uk>
<715li4-...@ophelia.g5n.co.uk> wrote:

>| Jeff North wrote:
>| > Toby A Inkster wrote:
>| >
>| >> This might be OK in Australia, where postal codes cover
>| >> fairly large populations,
>| >
>| > Where did you get this silly idea from? Our major cities do have
>| > sub-divisions called suburbs. Maybe you've heard of them.
>|
>| And suburbs (at least in Sydney, where I lived for over half my life)
>| roughly match up with postcodes. For example, the 2034 code covers Coogee,
>| 2035 Maroubra and so on.

2034 COOGEE
2034 SOUTH COOGEE

2035 MAROUBRA
2035 MAROUBRA SOUTH
2035 PAGEWOOD

>| However, suburb boundaries are fuzzy, whereas
>| postcode boundaries are well-defined; whatsmore while different people
>| might give different names to the same place, the four-digit postcode is
>| unarguable.
>|
>| So in Australia, postcodes might work well as a standardised sub-state
>| geographic division. In other countries, it's less useful.

Veign

unread,
May 26, 2007, 1:13:05 PM5/26/07
to
I did something similar for this website (just for fun and to test things):
http://distancecheck.com/

It uses the Long and Lat to calculate the distance between two US zip codes.
It would be quite easy to create an area type search that covers, say, a 30
mile radius.

--
Chris
http://www.veign.com / http://www.veign.com/blog
--
"Jeff North" <jnor...@yahoo.com.au> wrote in message
news:e3qf53thhi490b2so...@4ax.com...

Edwina Rothschild

unread,
May 30, 2007, 6:09:14 PM5/30/07
to
"Jeff North" <jnor...@yahoo.com.au> wrote in message
news:pvvd535qr1jvmvmb5...@4ax.com...

That first unlucky obligation, I have paid. The best wish I could give you,
Mr. Brugen, and give all of you gentlemen, is, that you could be took up and
brought here.

I had done it again. I am sorry to make such a beginning with you, but I
must do it. With that Hiten took me down, and tied the placard, which was
neatly constructed for the purpose, on my shoulders like a knapsack; and
wherever I went, afterwards, I had the consolation of carrying it. I shall
not weary you with good advice.

'Now, Twenty Seven, said Mr. Creakle, entering on a clear stage with his
man, is there anything that anyone can do for you? If so, mention it. I
would umbly ask, sir, returned Uriah, with a jerk of his malevolent head,
for leave to write again to mother. It shall certainly be granted, said Mr.
Creakle. Howsoever it may seem to you to touch me, disregard that.

-S. Vadlamani

0 new messages