@Service public class GeocodingService extends Object implements com.gisgraphy.geocoding.IGeocodingService
| Modifier and Type | Field and Description |
|---|---|
static int |
ACCEPT_DISTANCE_BETWEEN_CITY_AND_STREET |
static SolrResponseDtoDistanceComparator |
comparator |
static com.gisgraphy.domain.valueobject.Pagination |
FIVE_RESULT_PAGINATION |
static Pattern |
HOUSENUMBERPATTERN |
protected static org.slf4j.Logger |
logger
The logger
|
static com.gisgraphy.domain.valueobject.Output |
LONG_OUTPUT |
static com.gisgraphy.domain.valueobject.Output |
MEDIUM_OUTPUT |
static com.gisgraphy.domain.valueobject.Pagination |
ONE_RESULT_PAGINATION |
| Constructor and Description |
|---|
GeocodingService() |
| Modifier and Type | Method and Description |
|---|---|
protected com.gisgraphy.addressparser.AddressResultsDto |
buildAddressResultDtoFromSolrResponseDto(List<com.gisgraphy.fulltext.SolrResponseDto> solResponseDtos,
String houseNumberToFind) |
protected com.gisgraphy.addressparser.AddressResultsDto |
buildAddressResultDtoFromStreetsAndCities(List<com.gisgraphy.fulltext.SolrResponseDto> streets,
List<com.gisgraphy.fulltext.SolrResponseDto> cities,
String houseNumberToFind) |
protected List<com.gisgraphy.fulltext.SolrResponseDto> |
findCitiesInText(String text,
String countryCode) |
protected List<com.gisgraphy.fulltext.SolrResponseDto> |
findExactMatches(String text,
String countryCode) |
protected String |
findHouseNumber(String address,
String countryCode) |
protected List<com.gisgraphy.fulltext.SolrResponseDto> |
findInText(String text,
String countryCode,
com.vividsolutions.jts.geom.Point point,
Class<?>[] placetypes) |
protected List<com.gisgraphy.fulltext.SolrResponseDto> |
findStreetInText(String text,
String countryCode,
com.vividsolutions.jts.geom.Point point) |
com.gisgraphy.addressparser.AddressResultsDto |
geocode(com.gisgraphy.addressparser.AddressQuery query) |
com.gisgraphy.addressparser.AddressResultsDto |
geocode(com.gisgraphy.addressparser.Address address,
String countryCode) |
void |
geocodeAndSerialize(com.gisgraphy.addressparser.AddressQuery query,
OutputStream outputStream) |
String |
geocodeToString(com.gisgraphy.addressparser.AddressQuery query) |
protected String |
getBestCitySearchSentence(com.gisgraphy.addressparser.Address address) |
protected boolean |
isGeocodable(com.gisgraphy.addressparser.Address address) |
protected List<com.gisgraphy.fulltext.SolrResponseDto> |
mergeSolrResponseDto(List<com.gisgraphy.fulltext.SolrResponseDto> exactMatches,
List<com.gisgraphy.fulltext.SolrResponseDto> aproximativeMatches) |
protected void |
populateAddressFromCity(com.gisgraphy.fulltext.SolrResponseDto city,
com.gisgraphy.addressparser.Address address) |
protected com.gisgraphy.street.HouseNumberDto |
searchHouseNumber(String houseNumberToFind,
List<com.gisgraphy.street.HouseNumberDto> houseNumbersList,
String countryCode) |
void |
setAddressParser(com.gisgraphy.addressparser.IAddressParserService addressParser) |
void |
setFullTextSearchEngine(com.gisgraphy.fulltext.IFullTextSearchEngine fullTextSearchEngine) |
void |
setGisgraphyConfig(com.gisgraphy.domain.valueobject.GisgraphyConfig gisgraphyConfig) |
void |
setImporterConfig(ImporterConfig importerConfig) |
void |
setStatsUsageService(IStatsUsageService statsUsageService) |
public static final int ACCEPT_DISTANCE_BETWEEN_CITY_AND_STREET
public static final com.gisgraphy.domain.valueobject.Output LONG_OUTPUT
public static final com.gisgraphy.domain.valueobject.Output MEDIUM_OUTPUT
public static final com.gisgraphy.domain.valueobject.Pagination ONE_RESULT_PAGINATION
public static final com.gisgraphy.domain.valueobject.Pagination FIVE_RESULT_PAGINATION
public static final SolrResponseDtoDistanceComparator comparator
public static final Pattern HOUSENUMBERPATTERN
protected static final org.slf4j.Logger logger
public void geocodeAndSerialize(com.gisgraphy.addressparser.AddressQuery query,
OutputStream outputStream)
throws com.gisgraphy.geocoding.GeocodingException
geocodeAndSerialize in interface com.gisgraphy.geocoding.IGeocodingServicecom.gisgraphy.geocoding.GeocodingExceptionpublic String geocodeToString(com.gisgraphy.addressparser.AddressQuery query) throws com.gisgraphy.geocoding.GeocodingException
geocodeToString in interface com.gisgraphy.geocoding.IGeocodingServicecom.gisgraphy.geocoding.GeocodingExceptionpublic com.gisgraphy.addressparser.AddressResultsDto geocode(com.gisgraphy.addressparser.AddressQuery query)
throws com.gisgraphy.geocoding.GeocodingException
geocode in interface com.gisgraphy.geocoding.IGeocodingServicecom.gisgraphy.geocoding.GeocodingExceptionprotected boolean isGeocodable(com.gisgraphy.addressparser.Address address)
public com.gisgraphy.addressparser.AddressResultsDto geocode(com.gisgraphy.addressparser.Address address,
String countryCode)
throws com.gisgraphy.geocoding.GeocodingException
geocode in interface com.gisgraphy.geocoding.IGeocodingServicecom.gisgraphy.geocoding.GeocodingExceptionprotected String getBestCitySearchSentence(com.gisgraphy.addressparser.Address address)
protected com.gisgraphy.addressparser.AddressResultsDto buildAddressResultDtoFromStreetsAndCities(List<com.gisgraphy.fulltext.SolrResponseDto> streets, List<com.gisgraphy.fulltext.SolrResponseDto> cities, String houseNumberToFind)
protected com.gisgraphy.street.HouseNumberDto searchHouseNumber(String houseNumberToFind, List<com.gisgraphy.street.HouseNumberDto> houseNumbersList, String countryCode)
protected com.gisgraphy.addressparser.AddressResultsDto buildAddressResultDtoFromSolrResponseDto(List<com.gisgraphy.fulltext.SolrResponseDto> solResponseDtos, String houseNumberToFind)
protected void populateAddressFromCity(com.gisgraphy.fulltext.SolrResponseDto city,
com.gisgraphy.addressparser.Address address)
protected List<com.gisgraphy.fulltext.SolrResponseDto> findCitiesInText(String text, String countryCode)
protected List<com.gisgraphy.fulltext.SolrResponseDto> findStreetInText(String text, String countryCode, com.vividsolutions.jts.geom.Point point)
protected List<com.gisgraphy.fulltext.SolrResponseDto> findInText(String text, String countryCode, com.vividsolutions.jts.geom.Point point, Class<?>[] placetypes)
protected List<com.gisgraphy.fulltext.SolrResponseDto> mergeSolrResponseDto(List<com.gisgraphy.fulltext.SolrResponseDto> exactMatches, List<com.gisgraphy.fulltext.SolrResponseDto> aproximativeMatches)
exactMatches - aproximativeMatches - SolrResponseDto with
list1[0],list2[0],list1[1],list2[1],... it remove duplicates and
nullprotected List<com.gisgraphy.fulltext.SolrResponseDto> findExactMatches(String text, String countryCode)
@Autowired public void setAddressParser(com.gisgraphy.addressparser.IAddressParserService addressParser)
@Autowired public void setFullTextSearchEngine(com.gisgraphy.fulltext.IFullTextSearchEngine fullTextSearchEngine)
@Autowired public void setStatsUsageService(IStatsUsageService statsUsageService)
@Autowired public void setImporterConfig(ImporterConfig importerConfig)
@Autowired public void setGisgraphyConfig(com.gisgraphy.domain.valueobject.GisgraphyConfig gisgraphyConfig)
Copyright © 2015. All rights reserved.