'nearby stations by coordinate' for all efa-based providers

git-svn-id: https://public-transport-enabler.googlecode.com/svn/trunk@568 0924bc21-9374-b0fa-ee44-9ff1593b38f0
This commit is contained in:
andreas.schildbach@gmail.com 2011-04-16 10:24:51 +00:00
parent ff84a2f29e
commit a415ae008b
73 changed files with 376 additions and 230 deletions

View file

@ -23,7 +23,6 @@ import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import de.schildbach.pte.dto.Location;
@ -65,16 +64,6 @@ public class VrrProvider extends AbstractEfaProvider
return xmlStopfinderRequest(new Location(LocationType.ANY, 0, null, constraint.toString()));
}
private static final String NEARBY_LATLON_URI = API_BASE
+ "XSLT_DM_REQUEST"
+ "?outputFormat=XML&mode=direct&coordOutputFormat=WGS84&mergeDep=1&useAllStops=1&name_dm=%2.6f:%2.6f:WGS84&type_dm=coord&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1";
@Override
protected String nearbyLatLonUri(final int lat, final int lon)
{
return String.format(Locale.ENGLISH, NEARBY_LATLON_URI, latLonToDouble(lon), latLonToDouble(lat));
}
private static final String NEARBY_STATION_URI = API_BASE
+ "XSLT_DM_REQUEST"
+ "?outputFormat=XML&coordOutputFormat=WGS84&type_dm=stop&name_dm=%s&itOptionsActive=1&ptOptionsActive=1&useProxFootSearch=1&mergeDep=1&useAllStops=1&mode=direct&deleteAssignedStop=0";