Index: applications/editors/josm/plugins/CustomizePublicTransportStop/Text/es.txt
===================================================================
--- applications/editors/josm/plugins/CustomizePublicTransportStop/Text/es.txt	(revision 32840)
+++ applications/editors/josm/plugins/CustomizePublicTransportStop/Text/es.txt	(revision 32840)
@@ -0,0 +1,28 @@
+Personalizar parada
+Personalizar parada bajo el estándar público de tránsito OSM v2
+Parar personalización
+Asignar etiqueta al área de detención
+Nombre
+Nombre (inglés)
+Red
+Operador
+Nivel de red
+Transporte urbano
+Local
+Regional
+Larga distancia
+Alta velocidad
+Autobús
+Taxi compartido
+Trolebús
+Estación de autobús
+Tranvía
+Estación de tren
+Parada de tren
+Asignar tipo de transporte a la plataforma
+Techo
+Banco
+Cubierto
+Área
+Guardar
+Cancelar
Index: applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CreateNewStopPointOperation.java
===================================================================
--- applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CreateNewStopPointOperation.java	(revision 32839)
+++ applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CreateNewStopPointOperation.java	(revision 32840)
@@ -112,5 +112,5 @@
     				{
     					nearestNode = node;
-    					break;
+    					return new AbstractMap.SimpleEntry<Double, Node> (distances[distanceIndex], nearestNode);
     				}
     			}
@@ -119,7 +119,5 @@
     		}
     	}
-    	if(nearestNode == null)
-    		return null;
-    	return new AbstractMap.SimpleEntry<Double, Node> (distances[--distanceIndex], nearestNode);
+   		return null;
     }
 
@@ -323,10 +321,15 @@
 		if(nearestNode != null && nearestWaySegment != null)
 		{
-			if(nearestWaySegment.distanceSq < nearestNode.getKey())
+			Double segmentDist = Main.map.mapView.getPoint2D(platformCoord).distanceSq(Main.map.mapView.getPoint2D(nearestWaySegment.newNode));
+			Double nodeDistSq =  nearestNode.getKey();
+//			nodeDistSq *= nodeDistSq - 2;
+			if(segmentDist < nodeDistSq - 2)
 			{
+//				MessageBox.ok("new stop node v2 "  + segmentDist.toString() + "   " + nodeDistSq.toString());
 				newStopPointNode = createNodeOnWay(nearestWaySegment.newNode, nearestWaySegment.waySegment);
 			}
 			else
 			{
+//				MessageBox.ok("new stop node v3 "  + segmentDist.toString() + "   " + nodeDistSq.toString());
 				newStopPointNode = nearestNode.getValue();
 			}
@@ -340,4 +343,5 @@
 				if(nearestNode == null && nearestWaySegment != null)
 				{
+//					MessageBox.ok("new stop node2");
 					newStopPointNode = createNodeOnWay(nearestWaySegment.newNode, nearestWaySegment.waySegment);
 				}
Index: applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CreateStopAreaFromSelectedObjectOperation.java
===================================================================
--- applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CreateStopAreaFromSelectedObjectOperation.java	(revision 32839)
+++ applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CreateStopAreaFromSelectedObjectOperation.java	(revision 32840)
@@ -44,4 +44,6 @@
 		if(stopArea.service == null)
 			stopArea.service = getTagValue(member, OSMTags.SERVICE_TAG);
+		if(OSMTags.LOCAL_NETWORK_TAG_VALUE.equals(stopArea.service))
+			stopArea.service = OSMTags.COMMUTER_NETWORK_TAG_VALUE;
 		if(compareTag(member, OSMTags.BUS_TAG, OSMTags.YES_TAG_VALUE))
 			stopArea.isBus = true;
Index: applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CustomizePublicTransportStopDialog.java
===================================================================
--- applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CustomizePublicTransportStopDialog.java	(revision 32839)
+++ applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CustomizePublicTransportStopDialog.java	(revision 32840)
@@ -57,10 +57,10 @@
 	public static final String LONG_DISTANCE_NETWORK_CAPTION = "Long distance";
 	public static final String REGIONAL_NETWORK_CAPTION = "Regional";
-	public static final String LOCAL_NETWORK_CAPTION = "Local";
+	public static final String COMMUTER_NETWORK_CAPTION = "Commuter";
 	public static final String CITY_NETWORK_CAPTION = "City transport";
 	public static final String HIGH_SPEED_NETWORK_CAPTION = "High speed";
 	
-	private String[] serviceCaptionStrings = { CITY_NETWORK_CAPTION, LOCAL_NETWORK_CAPTION, REGIONAL_NETWORK_CAPTION, LONG_DISTANCE_NETWORK_CAPTION, HIGH_SPEED_NETWORK_CAPTION };
-    private String[] serviceStrings = { OSMTags.CITY_NETWORK_TAG_VALUE, OSMTags.LOCAL_NETWORK_TAG_VALUE, 
+	private String[] serviceCaptionStrings = { CITY_NETWORK_CAPTION, COMMUTER_NETWORK_CAPTION, REGIONAL_NETWORK_CAPTION, LONG_DISTANCE_NETWORK_CAPTION, HIGH_SPEED_NETWORK_CAPTION };
+    private String[] serviceStrings = { OSMTags.CITY_NETWORK_TAG_VALUE, OSMTags.COMMUTER_NETWORK_TAG_VALUE, 
     									OSMTags.REGIONAL_NETWORK_TAG_VALUE, OSMTags.LONG_DISTANCE_NETWORK_TAG_VALUE, OSMTags.HIGH_SPEED_NETWORK_TAG_VALUE };
 
Index: applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CustomizeStopAction.java
===================================================================
--- applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CustomizeStopAction.java	(revision 32839)
+++ applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CustomizeStopAction.java	(revision 32840)
@@ -76,6 +76,5 @@
 		if (!isEnabled())
 			return;
-		CreateStopAreaFromSelectedObjectOperation createStopAreaFromSelectedObjectOperation = new CreateStopAreaFromSelectedObjectOperation(
-		        getLayerManager().getEditDataSet());
+		CreateStopAreaFromSelectedObjectOperation createStopAreaFromSelectedObjectOperation = new CreateStopAreaFromSelectedObjectOperation(getLayerManager().getEditDataSet());
 		StopArea stopArea = createStopAreaFromSelectedObjectOperation.performCustomizing(null);
 		if(stopArea == null)
Index: applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CustomizeStopAreaOperation.java
===================================================================
--- applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CustomizeStopAreaOperation.java	(revision 32839)
+++ applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CustomizeStopAreaOperation.java	(revision 32840)
@@ -59,4 +59,20 @@
 	
     /**
+     * Clear transport type tags
+     * @param target Josm object for tag clearing 
+     * @param commands Command list
+     * @return Resulting list of commands
+     */
+	protected List<Command> transportTypeTagClearing(OsmPrimitive target,
+			List<Command> commands) {
+		commands = clearTag(commands, target, OSMTags.BUS_TAG);
+		commands = clearTag(commands, target, OSMTags.SHARE_TAXI_TAG);
+		commands = clearTag(commands, target, OSMTags.TROLLEYBUS_TAG);
+		commands = clearTag(commands, target, OSMTags.TRAM_TAG);
+		commands = clearTag(commands, target, OSMTags.TRAIN_TAG);
+		return commands;
+	}
+
+	/**
      * Assign transport type tags to node
      * @param target Josm object for tag assigning 
@@ -102,9 +118,5 @@
 			else
 			{
-	    		commands = clearTag(commands, target, OSMTags.BUS_TAG);
-	    		commands = clearTag(commands, target, OSMTags.SHARE_TAXI_TAG);
-	    		commands = clearTag(commands, target, OSMTags.TROLLEYBUS_TAG);
-	    		commands = clearTag(commands, target, OSMTags.TRAM_TAG);
-	    		commands = clearTag(commands, target, OSMTags.TRAIN_TAG);    		
+	    		commands = transportTypeTagClearing(target, commands);    		
 			}
 		}
@@ -117,8 +129,7 @@
 	 * @param commands List of commands
 	 * @param stopArea Stop area object
-     * @param isStopPoint Flag of stop point
 	 * @return Resulting list of commands
 	 */
-    public List<Command> generalTagAssign(OsmPrimitive target, List<Command> commands, StopArea stopArea, Boolean isStopPoint)
+    public List<Command> generalTagAssign(OsmPrimitive target, List<Command> commands, StopArea stopArea)
     {
     	if(commands == null)
@@ -130,5 +141,4 @@
     	commands = assignTag(commands, target, OSMTags.SERVICE_TAG, null == stopArea.service || OSMTags.CITY_NETWORK_TAG_VALUE.equals(stopArea.service) ? null : stopArea.service);
     	
-    	commands = transportTypeTagAssign(target, commands, stopArea, isStopPoint);
     	return commands;
     }
@@ -148,5 +158,6 @@
     		commands = new ArrayList<Command>();
     	
-    	commands = generalTagAssign(target, commands, stopArea, true);
+    	commands = generalTagAssign(target, commands, stopArea);
+    	commands = transportTypeTagAssign(target, commands, stopArea, true);
     	if(isFirst)
     	{
@@ -192,5 +203,6 @@
     		commands = new ArrayList<Command>();
     	
-    	commands = generalTagAssign(target, commands, stopArea, false);
+    	commands = generalTagAssign(target, commands, stopArea);
+    	commands = transportTypeTagAssign(target, commands, stopArea, false);
     	
     	if(compareTag(target, OSMTags.RAILWAY_TAG, OSMTags.HALT_TAG_VALUE) || compareTag(target, OSMTags.RAILWAY_TAG, OSMTags.STATION_TAG_VALUE))
@@ -263,5 +275,5 @@
 		}
 		Main.main.undoRedo.add(new AddCommand(newRelation));
-		commands = generalTagAssign(newRelation, commands, stopArea, false);
+		commands = generalTagAssign(newRelation, commands, stopArea);
 		commands = assignTag(commands, newRelation, OSMTags.TYPE_TAG, OSMTags.PUBLIC_TRANSPORT_TAG);
 		commands = assignTag(commands, newRelation, OSMTags.PUBLIC_TRANSPORT_TAG, OSMTags.STOP_AREA_TAG_VALUE);
@@ -581,5 +593,6 @@
 			else
 			{
-				commands = generalTagAssign(stopArea.stopAreaRelation, commands, stopArea, false);
+				commands = generalTagAssign(stopArea.stopAreaRelation, commands, stopArea);
+				commands = transportTypeTagClearing(stopArea.stopAreaRelation, commands);
 				commands = addNewRelationMembers(commands, stopArea);
 			}
Index: applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/OSMTags.java
===================================================================
--- applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/OSMTags.java	(revision 32839)
+++ applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/OSMTags.java	(revision 32840)
@@ -59,4 +59,5 @@
 
 	public static final String CITY_NETWORK_TAG_VALUE = "city";
+	public static final String COMMUTER_NETWORK_TAG_VALUE = "commuter";
 	public static final String LOCAL_NETWORK_TAG_VALUE = "local";
 	public static final String REGIONAL_NETWORK_TAG_VALUE = "regional";
