Drupal Taxonomy Architecture Design for World Geography - drupal

I am building a Drupal 7 site to use the Google Maps API coupled with the GeoField module. I need to architect the site so that a node (perhaps a custom content type with the geofield used) represents a location on the map.
Would a geo field in the node's content type be sufficient or should I also create a hierarchy taxonomy representing the hierarchy of the world?
Continents > Countries > Regions > Cities > Districts
North America > United States of America > California > San Francisco > Golden Gate
Each blip on the map represents a location which might be a business listing or an event. I am thinking it would be duplicating things to create the taxonomy.

Related

Best strategy for a Firestore database for municipalities

Here in Italy the land is politically divided into regions, provinces and municipalities. For example I live in the city of Varazze, whose province is Savona, in the region of Liguria.
I created a Firestore database that accepts businesses whose addresses are composed like the example up here. Nothing difficult as I use an external service which give me consistent and correct geo data. The rest of the information for the business is entered by the user.
Now I need to search into this db of businesses by region and/or province and/or municipality. To set up the UI with the filter, I absolutely need to show only regions, provinces and municipalities that have a business into the db and not all those available (FYI: Italy has 21 regions, 107 provinces and ~8000 municipalities).
Looking down the internet and here on SO, I understand that the best strategy is to create a new collection to store distinct data about the location, separated from the businesses collection, in order to enable a quicker lookup. So every time I add or edit a business I check if it's region, province and municipality exists in the "search collection" (let's name this way) and if not, add it.
But how to structure this collection?
If I use the municipality as key, I'll have a quick lookup for the municipality itself (at top will be 8000 records), but if I need to search by a region or province the result is poor because firestore does not have any way to "distinct" the results (something like SELECT DISTINCT province FROM geocollection WHERE Region='Liguria' if you want to visualize it in SQL) and I have to do it on a server or at worst on the client (not an option this last one).
I don't know if staring with the region and keeping the structure region -> province -> municipality is the way to go. Or going for the province, being halfway between.
Another way could be to have separate collection for regions, provinces and municipalities.
What I'm asking here is what is the best solution, in terms of performance and data complexity.
A good way to go on this would be to have a collection Regions, then each Region has a Collection Provinces, and each province has a collection Municipalities.
And the documents have the name of the geografic region as ID, This will allow you to lookup by the ID on the corrisponding collections.

Is it possible to set up a tag based query system in DynamoDB?

Given the following DynamoDB tables:
Galleries:
gallery id
title
owner
Tags:
gallery id
tag
Is it possible to do queries such as:
Give me all the galleries tagged with Europe AND Church
Give me all the galleries tagged with Europe AND Church AND NOT France
Give me COUNT of how many galleries are tagged with Europe
In an efficient way.
I know how to make a system like this work in a traditional relational database, but am curious as to its feasibility in DynamoDB.

Collecting postal adresses from webpages?

I'm looking for a special program that able to collect postal adresses from web pages, not only from one pages, all pages from specific area.
I mean I want to find&collect all the enterprises in london. For example i would like to find the all hairdressers postal adresses in London. I just type hairdresser London and the program will collect me the data in tables like this style: url, postal adress
www.hairdresserlondon1.com, 83 Berwick Street, London, United Kingdom
www.hairdresserlondon2.com, 12 Getwick Street, London, United Kingdom
and so on...
Is there any idea which program is good for this task? What's the name of this kind of method?

Geo-coordinates provider for European cities and districts

I'm looking for database with geo-data about city districts for all cities of the Europe.
I have plans to use it in my google-maps based appication.
For example, if you try to search with query "Paris, Paris 11" at Google Maps, you will see the highlighted area of Paris-11 district.
I've already found great database with country regions polygone: https://www.google.com/fusiontables/DataSource?dsrcid=420419
Can anybody help me with same database for city regions?
Or maybe google maps api has some method to receive polygonal coordinates of selected city district?
PS all national earth data-tables are stored here: https://www.google.com/fusiontables/DataSource?dsrcid=394713

Drupal, Ubercart: is there a way to select all Europeans / Not-Europeans countries in the shipping settings?

I usually create conditional rules with shipping to assign different costs for:
national shipping (a specific country is selected)
and international shipping (the same country is selected but a NOT is added to the condition)
I have now to assign different shipping costs according to Europe / Not Europe. A solution would be to select all countries in Europe, but I was wondering if there is a faster way
thanks
For the sanity of your users just do it the way everybody else does!
Have a country pull down with a list of all supported countries in it. Defaulting to you "home" nation.
If you are sending stuff there are a lot more considerations than just shipping costs, you may need to fill in specific tax forms for some countries and depending on what your site is selling you may need special processing for some countries (try sending coffee to Thailand -- you need to obtain permission from thier ministry of agriculture!).
Create the different shipping methods at admin/store/settings/quotes (one for Europe, one for non-Europe).
Add a Rule by editing the new shipping method and adding a condition
or go to the Rules config at admin/workflow/rules
Use a text comparison condition with a order:delivery-address:country data selector
In the value field place the regular expression to match any of the desired country names, for example the list of EU member states below.
Maybe it could be done with postal codes too, but I do not know how they are structured. Everyone keeps their sanity.
(\W|^)(Austria|Belgium|Bulgaria|Croatia|Cyprus|Czech|Republic|Denmark|Estonia|Finland|France|Germany|Greece|Hungary|Ireland|Italy|Latvia|Lithuania|Luxembourg|Malta|Netherlands|Poland|Portugal|Romania|Slovakia|Slovenia|Spain|Sweden|United\sKingdom)(\W|$)

Resources