mff-uk / odcs-dpus

Repository for DPUs (Data processing units) for ETL tool for RDF data
3 stars 2 forks source link

Geocoding #66

Closed mingan closed 7 years ago

mingan commented 10 years ago

I've modified Google Geocoder and Nominatim Geocoder DPUs. I added a checkbox style option to add schema:url with direct link to respective map services for debugging purposes and extended SPARQL query to extract country of the address from schema:addressCountry or schema:addressCountry/schema:name.

As for Google specific changes, handling of zero response case is handled correctly and is logged.

Changes for Nominatim are larger. I refactored the code, extracted class Address for generating different representations (structured/unstructured query, cache filename, human-readable version), slightly enhanced option for stripping numbers from schema:addressLocality to include Roman numerals as well. Based on tests I added automatic fallback option for cases when geocoding fails and the schema:streetAddress consist either only of digits (17, Stárkov, CZ) or contains value of schema:addressLocality (Stárkov 17, Stárkov, CZ). Second request is issued with schema:streetAddress replaced by schema:addressLocality (Stárkov, Stárkov, CZ). This happens often for small cities/villages where streets don't have names and Nominatim gets confused. Querying with the fallback format yields reasonable results in most cases.

tomas-knap commented 10 years ago

@jakubklimek, Could you please check that as the author of the previous versions of the DPUs?

jakubklimek commented 7 years ago

UnifiedViews is deprecated in favor of LinkedPipes ETL