OpenBazaar / openbazaar-go

OpenBazaar 2.0 Server Daemon in Go
MIT License
993 stars 283 forks source link

Replace profile location with a structured address #200

Closed JustinDrake closed 6 years ago

JustinDrake commented 8 years ago

At the moment the profile location is a simple string (see here):

string location               = 3;

My suggestion is to make the location a structured Address:

message Address {
        string address      = 1;
        string city         = 2;
        string state        = 3;
        string postalCode   = 4;
        CountryCode country = 5;
        string addressNotes = 6;
    }

The idea of being able to search for physical storefronts near a specific zip code or city has been suggested many times, e.g. recently here. cc @drwasho @jjeffryes @morebrownies

jjeffryes commented 8 years ago

That's an interesting idea. Right now we don't do a lot with the location field.

Making it structured data would make it more useful.

cpacia commented 8 years ago

I don't think most people want to broadcast their street address to everyone.

JustinDrake commented 8 years ago

@cpacia This would be for physical storefronts (not buyers).

jjeffryes commented 8 years ago

It should be an optional field, and most of the fields in it should be optional. This is just for displaying on your store (if you're a seller), I think some sellers would like it.

Maybe a structure like this:

message Location{ string name = 1 string street = 2; string city = 3; string state = 4; string postalCode = 5; CountryCode country = 6; string addressNotes = 7; }

Name would be the name of the physical shop, if any ("Big Joe's Shoe Shop").

They could fill in as much or as little as they want, with the only restriction being if you set a location (you can choose not to), it needs a name and a country.

We could auto-populate the ships from in listings with the location.CountryCode if they set a location.

It seems worth considering, if we think users would get value out of being able to identify stores close to them (or close to some location, for instance if you're planning a trip and want to buy something near where you're travelling).

JustinDrake commented 7 years ago

I still think this is a good idea. Are we moving forward on this?

JustinDrake commented 7 years ago

cc @tyler-smith for comment

fire-pig commented 5 years ago

Apologies if this isn't the right place to bring this up, but structured addresses for vendors doesn't appear to have made it into the refactor--the address for vendors is still a free form field. Address information is important for service listings (someone living in Panama isn't likely to care about plumbers in Des Moines), and for many product listings (such as cars/houses/boats).

I would also propose adding these fields:

plusCode latitude longitude

The Plus Codes system is an open source system (developed by Google) for algorithmically assigning a unique address to every location on earth, down to a 3 x 3 meter square granularity. They're useful for people who don't have an address (as in many developing world countries) or don't have a fixed address (such as a street vendor).

https://www.geospatialworld.net/blogs/google-maps-plus-codes-addressing-system/

PlusCodes don't require online access, and since it's an open source system, even if Google decides to abandon the project, it can be carried on without them.