mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-18 16:29:51 +00:00
Hafas: More improvements to splitting place and name, mostly for POIs.
This commit is contained in:
parent
589cf69063
commit
7ff06cc2d4
20 changed files with 213 additions and 81 deletions
|
@ -255,6 +255,11 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
return new String[] { null, name };
|
||||
}
|
||||
|
||||
protected String[] splitPOI(final String poi)
|
||||
{
|
||||
return new String[] { null, poi };
|
||||
}
|
||||
|
||||
protected String[] splitAddress(final String address)
|
||||
{
|
||||
return new String[] { null, address };
|
||||
|
@ -410,7 +415,8 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
}
|
||||
else if (type == 4) // poi
|
||||
{
|
||||
location = new Location(LocationType.POI, localId, lat, lon, null, value);
|
||||
final String[] placeAndName = splitPOI(value);
|
||||
location = new Location(LocationType.POI, localId, lat, lon, placeAndName[0], placeAndName[1]);
|
||||
}
|
||||
else if (type == 128) // crossing
|
||||
{
|
||||
|
@ -2100,7 +2106,8 @@ public abstract class AbstractHafasProvider extends AbstractNetworkProvider
|
|||
}
|
||||
else if (type == 3)
|
||||
{
|
||||
return new Location(LocationType.POI, null, lat, lon, null, name);
|
||||
final String[] placeAndName = splitPOI(name);
|
||||
return new Location(LocationType.POI, null, lat, lon, placeAndName[0], placeAndName[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue