Page 1 of 1

Geocoding: HSS LocationTypes versus PTV LocationTypes

Posted: Wed Dec 18, 2024 10:07 am
by Bernd Welter
Hi there,
I am not sure how to handle the HANA spatial services "address types" via the PTV geocoder.
In HANA we know country, state, county, postalCode, city, district, intersection, street, houseNumberInterpolated, houseNumberExact, houseNumberWithSupplement, other. Is there a matching table?
CodeDescriptionTypical Level of Accuracy
100 Country identified Very broad country level
200 Region / State identified Regional level
300 City identifiedCity or locality level
400 Postal code identifiedZIP/postal code centroid
500 Street identifiedStreet-level accuracy
600 House number identifiedMidpoint of house number range
700 Building identified Building-level accuracy
800 Address matched exactly Very precise / nearly rooftop
900 Manually validated or pinpointed coordinates Fully accurate / user-verified

Well, here's what I can respond to this:
HANA Spatial Services PTV Developer Geocoding / xLocate2Comment
country , state , countynot definedWon't occur in PTV
postalCodeLocationType.POSTAL_CODE

Code: Select all

{
      "locationType": "POSTAL_CODE",
      "referencePosition": {"latitude": 49.039592742919922,"longitude": 8.4168024063110352},
      "address": {
        "countryName": "Deutschland" , "state": "Baden-Württemberg" , "province": "Karlsruhe (Stadt)",        
        "postalCode": "76131", "city": "Karlsruhe", "district": "", 
        "subdistrict": "" , "street": "" , "houseNumber": "",
        "countryCodeIsoAlpha2": "DE" , "countryCodeIsoAlpha3": "DEU" , "countryCode": "DE"
      },
      "formattedAddress": "76131 Karlsruhe",
      "quality": {
        "totalScore": 100,
        "addressScores": {
          "postalCode": 100
        }
      }
    }
city / districtLocationType.LOCALITYWe do not distinguish between city and district

Code: Select all

{
      "locationType": "LOCALITY",
      "referencePosition": {"latitude": 49.010959625244141,"longitude": 8.4084796905517578},
      "address": {
        "countryName": "Deutschland", "state": "Baden-Württemberg", "province": "Karlsruhe (Stadt)",
        "postalCode": "", "city": "Karlsruhe", "district": "", 
        "subdistrict": "" , "street": "" , "houseNumber": "",
        "countryCodeIsoAlpha2": "DE" , "countryCodeIsoAlpha3": "DEU" , "countryCode": "DE"
      },
      "formattedAddress": "Karlsruhe",
      "quality": {
        "totalScore": 100,
        "addressScores": {
          "city": 100
        }
      }
    },
    {
      "locationType": "LOCALITY",
      "referencePosition": {"latitude": 49.014968872070312,"longitude": 8.4277801513671875},
      "address": {
        "countryName": "Deutschland" , "state": "Baden-Württemberg" , "province": "Karlsruhe (Stadt)",
        "postalCode": "" , "city": "Karlsruhe" , "district": "Oststadt",
        "subdistrict": "" , "street": "" , "houseNumber": "",
        "countryCodeIsoAlpha2": "DE", "countryCodeIsoAlpha3": "DEU", "countryCode": "DE"
      },
      "formattedAddress": "Karlsruhe Oststadt",
      "quality": {
        "totalScore": 100,
        "addressScores": {
          "city": 100,
          "district": 100
        }
      }
    }
intersectionLocationType.INTERSECTIONToday (18.12.2024) this type is defined but due to current implemented it won't appear so far. Might appear in the future.
streetLocationType.STREET

Code: Select all

{
      "locationType": "STREET",
      "referencePosition": {"latitude": 49.015659332275391,"longitude": 8.427546501159668},
      "address": {
        "countryName": "Deutschland","state": "Baden-Württemberg","province": "Karlsruhe (Stadt)",
        "postalCode": "76131","city": "Karlsruhe","district": "Oststadt", "subdistrict": "",
        "street": "Stumpfstraße", "houseNumber": "",
        "countryCodeIsoAlpha2": "DE", "countryCodeIsoAlpha3": "DEU", "countryCode": "DE"
      },
      "formattedAddress": "Stumpfstraße, 76131 Karlsruhe",
      "quality": {
        "totalScore": 100,
        "addressScores": {
          "city": 100,
          "district": 100,
          "street": 100
        }
      }
    }
houseNumberInterpolatedLocationType.INTERPOLATED_ADDRESS

Code: Select all

{
      "locationType": "INTERPOLATED_ADDRESS",
      "referencePosition": {"latitude": 49.0194091796875,"longitude": 8.442561149597168},
      "roadAccessPosition": {"latitude": 49.019344329833984,"longitude": 8.442657470703125},
      "address": {
        "countryName": "Deutschland","state": "Baden-Württemberg","province": "Karlsruhe (Stadt)",
        "postalCode": "76131","city": "Karlsruhe","district": "Rintheim",
        "subdistrict": "","street": "Haid-und-Neu-Straße","houseNumber": "83",
        "countryCodeIsoAlpha2": "DE","countryCodeIsoAlpha3": "DEU","countryCode": "DE"
      },
      "formattedAddress": "Haid-und-Neu-Straße 83, 76131 Karlsruhe",
      "quality": {
        "totalScore": 100,
        "addressScores": {
          "country": 100,
          "postalCode": 100,
          "city": 100,
          "street": 100,
          "houseNumber": 100
        }
      }
    }
houseNumberExact, houseNumberWithSupplementLocatin Type.EXACT_ADDRESSWe do not distinguish between them though we can return both "flavours"

Code: Select all

{
      "locationType": "EXACT_ADDRESS",
      "referencePosition": {"latitude": 49.013469696044922,"longitude": 8.4281797409057617},
      "roadAccessPosition": {"latitude": 49.013519287109375,"longitude": 8.4283199310302734},
      "address": {
        "countryName": "Deutschland","state": "Baden-Württemberg","province": "Karlsruhe (Stadt)",
        "postalCode": "76131","city": "Karlsruhe","district": "Oststadt","subdistrict": "",
        "street": "Stumpfstraße","houseNumber": "1",
        "countryCodeIsoAlpha2": "DE","countryCodeIsoAlpha3": "DEU","countryCode": "DE"
      },
      "formattedAddress": "Stumpfstraße 1, 76131 Karlsruhe",
      "quality": {
        "totalScore": 100,
        "addressScores": {
          "city": 100,
          "district": 100,
          "street": 100,
          "houseNumber": 100
        }
      }
    },{
      "locationType": "EXACT_ADDRESS",
      "referencePosition": {"latitude": 53.6037483215332,"longitude": 9.9308500289917},
      "roadAccessPosition": {"latitude": 53.603618621826172,"longitude": 9.930150032043457},
      "address": {
        "countryName": "Deutschland","state": "Hamburg","province": "Hamburg",
        "postalCode": "22527", "city": "Hamburg", "district": "Stellingen", "subdistrict": "",
        "street": "Vogt-Kölln-Straße", "houseNumber": "88F",
        "countryCodeIsoAlpha2": "DE","countryCodeIsoAlpha3": "DEU","countryCode": "DE"
      },
      "formattedAddress": "Vogt-Kölln-Straße 88F, 22527 Hamburg",
      "quality": {
        "totalScore": 76,
        "addressScores": {
          "city": 100,
          "street": 41,
          "houseNumber": 100
        }
      }
    }
othernot defined
???LocationType.POINT_OF_INTERESTToday (18.12.2024) this type is defined but due to current implemented it won't appear so far. Might appear in the future.